From 30a3982bc923d020d49a8ff52ee9c54de6d9dffa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 17:57:02 +0000 Subject: [PATCH] feat: update via SDK Studio (#100) --- api.md | 1973 +++++++---------- src/cloudflare/_client.py | 6 +- .../addressing/address_maps/address_maps.py | 10 +- .../addressing/prefixes/bgp/bindings.py | 19 +- .../addressing/prefixes/bgp/prefixes.py | 23 +- .../addressing/prefixes/delegations.py | 10 +- .../resources/addressing/prefixes/prefixes.py | 28 +- .../alerting/v3/destinations/webhooks.py | 10 +- .../resources/alerting/v3/histories.py | 14 +- .../resources/alerting/v3/policies.py | 10 +- src/cloudflare/resources/available_plans.py | 10 +- src/cloudflare/resources/brand_protection.py | 20 +- src/cloudflare/resources/cache/variants.py | 10 +- src/cloudflare/resources/calls.py | 38 +- .../hostname_associations.py | 31 +- .../resources/challenges/widgets.py | 60 +- .../resources/client_certificates.py | 77 +- .../cloudforce_one/requests/message.py | 19 +- .../cloudforce_one/requests/priority.py | 38 +- .../cloudforce_one/requests/requests.py | 72 +- .../custom_certificates.py | 17 +- .../resources/custom_nameservers.py | 10 +- src/cloudflare/resources/d1/database.py | 33 +- .../resources/dcv_delegation/uuid.py | 14 +- .../dns/analytics/reports/bytimes.py | 10 +- .../dns/analytics/reports/reports.py | 10 +- .../dns/firewall/analytics/reports/bytimes.py | 11 +- .../dns/firewall/analytics/reports/reports.py | 11 +- .../resources/dns/firewall/firewall.py | 41 +- src/cloudflare/resources/dnssec.py | 18 +- .../email_routing/routing/rules/catch_alls.py | 18 +- src/cloudflare/resources/filters.py | 41 +- .../resources/firewall/lockdowns.py | 41 +- src/cloudflare/resources/firewall/rules.py | 41 +- .../resources/firewall/waf/overrides.py | 41 +- .../resources/firewall/waf/packages/groups.py | 14 +- .../resources/firewall/waf/packages/rules.py | 14 +- .../resources/healthchecks/healthchecks.py | 37 +- .../resources/healthchecks/previews.py | 24 +- .../resources/hostnames/settings/tls.py | 33 +- src/cloudflare/resources/images/v1/keys.py | 10 +- src/cloudflare/resources/images/v1/stats.py | 10 +- src/cloudflare/resources/images/v1/v1.py | 28 +- .../resources/images/v1/variants.py | 38 +- src/cloudflare/resources/intel/asn/asn.py | 14 +- src/cloudflare/resources/intel/asn/subnets.py | 5 +- src/cloudflare/resources/intel/dns.py | 10 +- .../resources/intel/domains/domains.py | 10 +- .../intel/indicator_feeds/indicator_feeds.py | 30 +- .../intel/indicator_feeds/permissions.py | 19 +- src/cloudflare/resources/intel/whois.py | 10 +- .../resources/keyless_certificates.py | 28 +- .../resources/kv/namespaces/namespaces.py | 23 +- .../load_balancers/monitors/monitors.py | 37 +- .../resources/load_balancers/pools/pools.py | 37 +- .../resources/load_balancers/previews.py | 10 +- src/cloudflare/resources/logpush/edge.py | 10 +- src/cloudflare/resources/logpush/jobs.py | 35 +- .../resources/logs/control/cmb/config.py | 23 +- .../configs/configs.py | 48 +- .../magic_network_monitoring/configs/full.py | 10 +- .../rules/advertisements.py | 14 +- .../magic_network_monitoring/rules/rules.py | 49 +- .../mtls_certificates/mtls_certificates.py | 47 +- .../hostnames/certificates.py | 46 +- .../hostnames/hostnames.py | 20 +- .../resources/page_shield/connections.py | 10 +- .../resources/page_shield/page_shield.py | 18 +- .../resources/page_shield/policies.py | 28 +- .../resources/pagerules/settings.py | 10 +- .../pages/projects/deployments/deployments.py | 42 +- .../resources/pages/projects/projects.py | 19 +- src/cloudflare/resources/pcaps/ownerships.py | 19 +- src/cloudflare/resources/queues/consumers.py | 20 +- src/cloudflare/resources/queues/queues.py | 30 +- src/cloudflare/resources/r2/buckets.py | 24 +- src/cloudflare/resources/r2/sippy.py | 18 +- src/cloudflare/resources/rules/lists/lists.py | 34 +- .../resources/rulesets/phases/phases.py | 19 +- .../resources/rulesets/phases/versions.py | 18 +- src/cloudflare/resources/rulesets/rules.py | 33 +- src/cloudflare/resources/rulesets/rulesets.py | 38 +- .../resources/rulesets/versions/by_tags.py | 10 +- .../resources/rulesets/versions/versions.py | 18 +- src/cloudflare/resources/rum/rules.py | 25 +- src/cloudflare/resources/rum/site_infos.py | 41 +- .../resources/secondary_dns/acls.py | 28 +- .../resources/secondary_dns/peers.py | 28 +- .../resources/secondary_dns/tsigs.py | 28 +- src/cloudflare/resources/snippets/snippets.py | 24 +- .../resources/speed/availabilities.py | 10 +- src/cloudflare/resources/speed/speed.py | 20 +- src/cloudflare/resources/speed/tests.py | 19 +- .../resources/ssl/universal/settings.py | 26 +- src/cloudflare/resources/storage/analytics.py | 20 +- .../resources/stream/audio_tracks.py | 19 +- src/cloudflare/resources/stream/clips.py | 10 +- src/cloudflare/resources/stream/copies.py | 11 +- src/cloudflare/resources/stream/keys.py | 10 +- .../stream/live_inputs/live_inputs.py | 28 +- .../resources/stream/live_inputs/outputs.py | 24 +- src/cloudflare/resources/stream/stream.py | 10 +- .../resources/user/firewall/access_rules.py | 32 +- .../resources/user/load_balancers/monitors.py | 37 +- .../resources/user/load_balancers/pools.py | 37 +- .../resources/user/load_balancers/preview.py | 10 +- .../resources/user/organizations.py | 19 +- src/cloudflare/resources/vectorize/indexes.py | 72 +- .../resources/waiting_rooms/events/details.py | 10 +- .../resources/waiting_rooms/events/events.py | 37 +- .../resources/waiting_rooms/waiting_rooms.py | 37 +- .../resources/web3/hostnames/hostnames.py | 28 +- .../content_lists/content_lists.py | 27 +- .../content_lists/entries.py | 28 +- src/cloudflare/resources/workers/domains.py | 24 +- src/cloudflare/resources/workers/filters.py | 10 +- src/cloudflare/resources/workers/routes.py | 19 +- .../resources/workers/scripts/content.py | 11 +- .../resources/workers/scripts/scripts.py | 10 +- .../workers/services/environments/content.py | 11 +- .../namespaces/scripts/content/scripts.py | 14 +- .../dispatch/namespaces/scripts/scripts.py | 20 +- .../access/applications/applications.py | 40 +- .../access/applications/policies.py | 28 +- .../resources/zero_trust/access/bookmarks.py | 32 +- .../access/certificates/certificates.py | 28 +- .../access/certificates/settings.py | 11 +- .../zero_trust/access/custom_pages.py | 29 +- .../resources/zero_trust/access/groups.py | 28 +- .../zero_trust/access/service_tokens.py | 28 +- .../resources/zero_trust/access/tags.py | 28 +- .../access/users/last_seen_identity.py | 10 +- .../resources/zero_trust/devices/dex_tests.py | 46 +- .../resources/zero_trust/devices/networks.py | 40 +- .../zero_trust/devices/policies/excludes.py | 5 +- .../devices/policies/fallback_domains.py | 5 +- .../zero_trust/devices/policies/includes.py | 5 +- .../zero_trust/devices/policies/policies.py | 40 +- .../devices/postures/integrations.py | 46 +- .../zero_trust/devices/postures/postures.py | 28 +- .../resources/zero_trust/devices/settings.py | 30 +- .../zero_trust/dex/fleet_status/devices.py | 16 +- .../zero_trust/dex/http_tests/http_tests.py | 14 +- .../zero_trust/dex/http_tests/percentiles.py | 19 +- .../zero_trust/dex/tests/unique_devices.py | 14 +- .../traceroute_test_results/network_path.py | 16 +- .../zero_trust/dex/traceroute_tests.py | 48 +- .../zero_trust/dlp/datasets/datasets.py | 39 +- .../zero_trust/dlp/datasets/upload.py | 19 +- .../zero_trust/dlp/profiles/customs.py | 19 +- .../zero_trust/dlp/profiles/predefineds.py | 18 +- .../zero_trust/gateway/audit_ssh_settings.py | 22 +- .../zero_trust/gateway/lists/lists.py | 28 +- .../resources/zero_trust/gateway/locations.py | 28 +- .../resources/zero_trust/gateway/loggings.py | 30 +- .../zero_trust/gateway/proxy_endpoints.py | 28 +- .../resources/zero_trust/gateway/rules.py | 28 +- .../zero_trust/identity_providers.py | 40 +- .../zero_trust/networks/routes/ips.py | 11 +- .../zero_trust/networks/routes/networks.py | 33 +- .../zero_trust/networks/routes/routes.py | 42 +- .../resources/zero_trust/organizations.py | 28 +- .../zero_trust/tunnels/connectors.py | 10 +- .../resources/zero_trust/tunnels/tunnels.py | 28 +- .../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 | 30 +- .../automatic_platform_optimization.py | 28 +- .../resources/zones/settings/brotli.py | 18 +- .../zones/settings/browser_cache_ttl.py | 22 +- .../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 | 22 +- .../resources/zones/settings/early_hints.py | 18 +- .../zones/settings/email_obfuscation.py | 22 +- .../resources/zones/settings/font_settings.py | 18 +- .../zones/settings/h2_prioritization.py | 26 +- .../zones/settings/hotlink_protection.py | 22 +- .../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 | 30 +- .../zones/settings/opportunistic_onion.py | 22 +- .../zones/settings/orange_to_orange.py | 22 +- .../settings/origin_error_page_pass_thru.py | 30 +- .../resources/zones/settings/polish.py | 22 +- .../zones/settings/prefetch_preload.py | 22 +- .../zones/settings/proxy_read_timeout.py | 26 +- .../resources/zones/settings/pseudo_ipv4.py | 18 +- .../zones/settings/response_buffering.py | 22 +- .../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 | 22 +- .../settings/sort_query_string_for_cache.py | 30 +- .../resources/zones/settings/ssl.py | 18 +- .../zones/settings/ssl_recommender.py | 22 +- .../resources/zones/settings/tls_1_3.py | 18 +- .../zones/settings/tls_client_auth.py | 18 +- .../zones/settings/true_client_ip_header.py | 22 +- .../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 | 83 +- src/cloudflare/types/accounts/__init__.py | 1 + .../types/accounts/iam_schemas_role.py | 21 + .../types/accounts/member_list_response.py | 19 +- .../types/accounts/role_list_response.py | 21 +- src/cloudflare/types/addressing/__init__.py | 6 +- .../addressing/address_map_list_response.py | 53 +- ...response.py => addressing_address_maps.py} | 4 +- ...esponse.py => addressing_ipam_prefixes.py} | 4 +- .../types/addressing/prefix_edit_response.py | 59 - .../types/addressing/prefix_get_response.py | 59 - .../types/addressing/prefix_list_response.py | 61 +- .../types/addressing/prefixes/__init__.py | 2 +- ...onse.py => addressing_ipam_delegations.py} | 4 +- .../types/addressing/prefixes/bgp/__init__.py | 6 +- ...nse.py => addressing_ipam_bgp_prefixes.py} | 4 +- ...ponse.py => addressing_service_binding.py} | 4 +- .../prefixes/bgp/binding_get_response.py | 33 - .../prefixes/bgp/binding_list_response.py | 35 +- .../prefixes/bgp/prefix_get_response.py | 67 - .../prefixes/bgp/prefix_list_response.py | 74 +- .../prefixes/delegation_list_response.py | 28 +- src/cloudflare/types/alerting/v3/__init__.py | 4 +- ...istory_list_response.py => aaa_history.py} | 4 +- ...policy_get_response.py => aaa_policies.py} | 4 +- .../alerting/v3/destinations/__init__.py | 3 +- .../alerting/v3/destinations/aaa_pagerduty.py | 15 + ...ebhook_get_response.py => aaa_webhooks.py} | 4 +- .../v3/destinations/pagerduty_get_response.py | 17 +- .../v3/destinations/webhook_list_response.py | 51 +- .../types/alerting/v3/policy_list_response.py | 244 +- .../types/available_plan_list_response.py | 42 +- ...y => bill_subs_api_available_rate_plan.py} | 4 +- src/cloudflare/types/cache/__init__.py | 2 +- ...t_delete_response.py => cache_variants.py} | 4 +- src/cloudflare/types/call_delete_response.py | 22 - src/cloudflare/types/call_list_response.py | 24 +- src/cloudflare/types/call_update_response.py | 22 - .../{call_get_response.py => calls_app.py} | 4 +- ...e_response.py => calls_app_with_secret.py} | 4 +- .../types/certificate_authorities/__init__.py | 5 +- .../hostname_association_update_response.py | 18 - ...tes_and_hostnames_hostname_association.py} | 4 +- src/cloudflare/types/challenges/__init__.py | 8 +- ...y => nc_challenges_admin_widget_detail.py} | 4 +- ....py => nc_challenges_admin_widget_list.py} | 4 +- .../challenges/widget_create_response.py | 53 - .../challenges/widget_delete_response.py | 53 - .../widget_rotate_secret_response.py | 53 - .../challenges/widget_update_response.py | 53 - .../client_certificate_create_response.py | 75 - .../client_certificate_delete_response.py | 75 - .../types/client_certificate_edit_response.py | 75 - .../types/client_certificate_list_response.py | 75 - .../types/cloudforce_one/__init__.py | 12 +- ...ta_response.py => cloudforce_one_quota.py} | 4 +- ...py => cloudforce_one_request_constants.py} | 4 +- ...onse.py => cloudforce_one_request_item.py} | 4 +- ...py => cloudforce_one_request_list_item.py} | 4 +- ...nse.py => cloudforce_one_request_types.py} | 4 +- .../cloudforce_one/request_create_response.py | 46 - .../cloudforce_one/request_get_response.py | 46 - .../types/cloudforce_one/requests/__init__.py | 8 +- ...nse.py => cloudforce_one_priority_item.py} | 4 +- ...=> cloudforce_one_request_message_item.py} | 4 +- .../requests/message_get_response.py | 30 +- .../requests/message_update_response.py | 28 - .../requests/priority_get_response.py | 46 - .../requests/priority_quota_response.py | 22 - .../requests/priority_update_response.py | 46 - .../prioritize_update_response.py | 137 +- .../types/custom_nameserver_get_response.py | 35 +- .../custom_nameserver_verify_response.py | 39 +- src/cloudflare/types/d1/__init__.py | 6 +- ...list_response.py => d1_create_database.py} | 4 +- ...get_response.py => d1_database_details.py} | 4 +- src/cloudflare/types/d1/d1_query_result.py | 31 + .../types/d1/database_create_response.py | 18 - .../types/d1/database_query_response.py | 33 +- .../types/dcv_delegation/__init__.py | 4 +- ...certificates_and_hostnames_uuid_object.py} | 4 +- src/cloudflare/types/diagnostics/__init__.py | 1 + .../magic_transit_target_result.py | 93 + .../diagnostics/traceroute_create_response.py | 102 +- src/cloudflare/types/dns/__init__.py | 5 +- .../types/dns/analytics/__init__.py | 2 +- ...nse.py => dns_dns_analytics_api_report.py} | 4 +- .../types/dns/analytics/reports/__init__.py | 2 +- ...=> dns_dns_analytics_api_report_bytime.py} | 4 +- ...sponse.py => dns_firewall_dns_firewall.py} | 4 +- .../types/dns/firewall/analytics/__init__.py | 1 - .../firewall/analytics/report_get_response.py | 79 - .../firewall/analytics/reports/__init__.py | 1 - .../analytics/reports/bytime_get_response.py | 93 - .../types/dns/firewall_create_response.py | 70 - .../types/dns/firewall_edit_response.py | 70 - .../types/dns/firewall_get_response.py | 70 - ...py => dns_custom_nameservers_custom_ns.py} | 4 +- ...nssec_get_response.py => dnssec_dnssec.py} | 4 +- src/cloudflare/types/dnssec_edit_response.py | 69 - .../types/durable_objects/__init__.py | 1 + .../namespace_list_response.py | 21 +- .../durable_objects/namespaces/__init__.py | 1 + .../namespaces/object_list_response.py | 19 +- .../namespaces/workers_object.py | 17 + .../durable_objects/workers_namespace.py | 19 + .../types/email_routing/routing/__init__.py | 1 + .../email_routing/routing/dns_get_response.py | 54 +- .../email_routing/routing/email_dns_record.py | 52 + .../email_routing/routing/rules/__init__.py | 3 +- .../rules/catch_all_update_response.py | 40 - ...et_response.py => email_catch_all_rule.py} | 4 +- .../types/filter_create_response.py | 30 +- src/cloudflare/types/filter_get_response.py | 28 - src/cloudflare/types/filter_list_response.py | 28 - .../types/filter_update_response.py | 28 - src/cloudflare/types/firewall/__init__.py | 10 +- ..._response.py => legacy_jhs_filter_rule.py} | 30 +- ...response.py => legacy_jhs_zonelockdown.py} | 4 +- .../firewall/lockdown_create_response.py | 75 - .../types/firewall/lockdown_list_response.py | 75 - .../firewall/lockdown_update_response.py | 75 - .../types/firewall/rule_create_response.py | 84 +- .../types/firewall/rule_edit_response.py | 84 +- .../types/firewall/rule_get_response.py | 74 - .../types/firewall/rule_list_response.py | 74 - .../types/firewall/rule_update_response.py | 74 - src/cloudflare/types/firewall/waf/__init__.py | 5 +- ...get_response.py => legacy_jhs_override.py} | 4 +- .../firewall/waf/override_create_response.py | 71 - .../firewall/waf/override_list_response.py | 71 - .../firewall/waf/override_update_response.py | 71 - .../types/firewall/waf/packages/__init__.py | 4 +- ..._response.py => waf_managed_rules_rule.py} | 4 +- ....py => waf_managed_rules_schemas_group.py} | 4 +- .../types/healthcheck_create_response.py | 152 -- .../types/healthcheck_get_response.py | 152 -- .../types/healthcheck_list_response.py | 159 +- .../types/healthcheck_update_response.py | 152 -- src/cloudflare/types/healthchecks/__init__.py | 2 - .../healthchecks/preview_create_response.py | 152 -- .../healthchecks/preview_get_response.py | 152 -- ...sponse.py => healthchecks_healthchecks.py} | 4 +- .../types/hostnames/settings/__init__.py | 8 +- ...tificates_and_hostnames_setting_object.py} | 4 +- ...es_and_hostnames_setting_object_delete.py} | 4 +- src/cloudflare/types/images/__init__.py | 4 +- .../{v1_get_response.py => images_image.py} | 4 +- src/cloudflare/types/images/v1/__init__.py | 10 +- ...riant_get_response.py => image_variant.py} | 4 +- ...ant_list_response.py => image_variants.py} | 4 +- ..._list_response.py => images_image_keys.py} | 4 +- ...get_response.py => images_images_stats.py} | 4 +- .../images/v1/variant_create_response.py | 44 - .../types/images/v1/variant_edit_response.py | 44 - .../types/images/v1_create_response.py | 38 - .../types/images/v1_edit_response.py | 38 - .../types/images/v1_list_response.py | 38 +- .../types/images/v2_list_response.py | 38 +- src/cloudflare/types/intel/__init__.py | 18 +- .../types/intel/asn/subnet_get_response.py | 3 +- .../intel/domain_history_get_response.py | 24 +- .../intel/indicator_feed_list_response.py | 27 +- .../types/intel/indicator_feeds/__init__.py | 4 +- .../intel_permission_list_item.py | 18 + ...esponse.py => intel_permissions_update.py} | 4 +- .../permission_create_response.py | 12 - .../permission_list_response.py | 20 +- .../{asn_get_response.py => intel_asn.py} | 4 +- ...domain_get_response.py => intel_domain.py} | 4 +- .../types/intel/intel_domain_history.py | 22 + ...sponse.py => intel_indicator_feed_item.py} | 4 +- ...se.py => intel_indicator_feed_metadata.py} | 4 +- src/cloudflare/types/intel/intel_ip_list.py | 15 + ...response.py => intel_passive_dns_by_ip.py} | 4 +- .../types/intel/intel_schemas_ip.py | 33 + .../intel/intel_sinkholes_sinkhole_item.py | 31 + ...pdate_response.py => intel_update_feed.py} | 4 +- .../{whois_get_response.py => intel_whois.py} | 4 +- src/cloudflare/types/intel/ip_get_response.py | 35 +- .../types/intel/ip_list_get_response.py | 17 +- .../types/intel/sinkhole_list_response.py | 33 +- ...response.py => intel_phishing_url_info.py} | 4 +- ...sponse.py => intel_phishing_url_submit.py} | 4 +- .../keyless_certificate_create_response.py | 55 - .../types/keyless_certificate_get_response.py | 55 - .../keyless_certificate_list_response.py | 61 +- src/cloudflare/types/kv/__init__.py | 3 +- .../types/kv/namespace_create_response.py | 22 - .../types/kv/namespaces/__init__.py | 1 + .../types/kv/namespaces/key_list_response.py | 27 +- .../types/kv/namespaces/workers_kv_key.py | 25 + ...st_response.py => workers_kv_namespace.py} | 4 +- ...elete_response.py => legacy_jhs_filter.py} | 6 +- .../types/load_balancers/__init__.py | 9 - .../load_balancers/monitor_create_response.py | 113 - .../load_balancers/monitor_edit_response.py | 113 - .../load_balancers/monitor_get_response.py | 113 - .../load_balancers/monitor_list_response.py | 115 +- .../load_balancers/monitor_update_response.py | 113 - .../load_balancers/pool_create_response.py | 273 --- .../load_balancers/pool_edit_response.py | 273 --- .../types/load_balancers/pool_get_response.py | 273 --- .../load_balancers/pool_list_response.py | 276 +-- .../load_balancers/pool_update_response.py | 273 --- .../load_balancers/preview_get_response.py | 30 - src/cloudflare/types/logpush/__init__.py | 5 +- .../types/logpush/datasets/__init__.py | 1 + .../logpush/datasets/job_get_response.py | 145 +- .../logpush_logpush_job.py} | 6 +- .../types/logpush/edge_get_response.py | 27 +- .../types/logpush/job_get_response.py | 145 -- .../types/logpush/job_list_response.py | 145 +- .../types/logpush/job_update_response.py | 145 -- ...esponse.py => logpush_instant_logs_job.py} | 4 +- .../types/logs/control/cmb/__init__.py | 3 +- .../control/cmb/config_create_response.py | 12 - ...t_response.py => logcontrol_cmb_config.py} | 4 +- .../magic_network_monitoring/__init__.py | 12 +- .../config_create_response.py | 20 - .../config_edit_response.py | 20 - .../config_get_response.py | 20 - .../config_update_response.py | 20 - .../configs/__init__.py | 2 - .../configs/full_get_response.py | 20 - ...onse.py => magic_visibility_mnm_config.py} | 4 +- ...sponse.py => magic_visibility_mnm_rule.py} | 4 +- .../rule_create_response.py | 51 - .../rule_delete_response.py | 51 - .../rule_edit_response.py | 51 - .../rule_list_response.py | 51 +- .../rule_update_response.py | 51 - .../rules/__init__.py | 4 +- ...magic_visibility_mnm_rule_advertisable.py} | 4 +- .../types/mtls_certificate_delete_response.py | 37 - .../types/mtls_certificate_list_response.py | 41 +- .../types/mtls_certificates/__init__.py | 3 + .../association_get_response.py | 17 +- ...icates_and_hostnames_association_object.py | 15 + ...et_response.py => observatory_schedule.py} | 4 +- ..._list_response.py => observatory_trend.py} | 4 +- .../types/origin_tls_client_auth/__init__.py | 4 +- .../hostname_update_response.py | 35 +- .../hostnames/__init__.py | 6 +- .../hostnames/certificate_delete_response.py | 45 - .../hostnames/certificate_get_response.py | 45 - .../hostnames/certificate_list_response.py | 35 +- ...d_hostnames_schemas_certificate_object.py} | 4 +- ...s_and_hostnames_hostname_certid_object.py} | 4 +- src/cloudflare/types/page_shield/__init__.py | 7 +- .../page_shield/connection_list_response.py | 31 +- ..._response.py => page_shield_connection.py} | 4 +- ...se.py => page_shield_pageshield_policy.py} | 4 +- .../types/page_shield/page_shield_script.py | 35 + .../types/page_shield/policy_get_response.py | 31 - .../types/page_shield/policy_list_response.py | 33 +- .../page_shield/policy_update_response.py | 31 - .../types/page_shield/script_list_response.py | 37 +- ...se.py => page_shield_get_zone_settings.py} | 4 +- ...py => page_shield_update_zone_settings.py} | 4 +- .../types/pagerule_list_response.py | 92 +- src/cloudflare/types/pagerules/__init__.py | 2 +- .../types/pagerules/setting_list_response.py | 7 - .../zones_settings.py} | 4 +- src/cloudflare/types/pages/__init__.py | 4 +- ...t_get_response.py => pages_deployments.py} | 6 +- .../types/pages/pages_deployments_param.py | 11 + ...ject_get_response.py => pages_projects.py} | 177 +- .../types/pages/project_create_params.py | 15 +- .../types/pages/project_list_response.py | 96 +- .../types/pages/projects/__init__.py | 4 - .../projects/deployment_create_response.py | 88 - .../projects/deployment_list_response.py | 96 +- .../projects/deployment_retry_response.py | 88 - .../projects/deployment_rollback_response.py | 88 - src/cloudflare/types/pcaps/__init__.py | 3 +- ...py => magic_visibility_pcaps_ownership.py} | 4 +- .../types/pcaps/ownership_create_response.py | 28 - .../types/pcaps/ownership_get_response.py | 30 +- src/cloudflare/types/queue_list_response.py | 27 +- src/cloudflare/types/queues/__init__.py | 5 +- .../types/queues/consumer_get_response.py | 29 +- .../types/queues/workers_consumer.py | 27 + ...esponse.py => workers_consumer_created.py} | 4 +- ...esponse.py => workers_consumer_updated.py} | 4 +- src/cloudflare/types/r2/__init__.py | 6 +- .../types/r2/bucket_create_response.py | 19 - .../types/r2/bucket_list_response.py | 21 +- .../{bucket_get_response.py => r2_bucket.py} | 4 +- .../r2/{sippy_get_response.py => r2_sippy.py} | 4 +- .../types/r2/sippy_update_response.py | 43 - src/cloudflare/types/rules/__init__.py | 4 +- .../types/rules/list_create_response.py | 7 - .../types/rules/list_list_response.py | 40 +- .../types/rules/list_update_response.py | 7 - src/cloudflare/types/rules/lists_list.py | 38 + src/cloudflare/types/ruleset_get_response.py | 393 ---- .../types/ruleset_update_response.py | 393 ---- src/cloudflare/types/rulesets/__init__.py | 7 - .../types/rulesets/phase_get_response.py | 393 ---- .../types/rulesets/phase_update_response.py | 393 ---- .../types/rulesets/phases/__init__.py | 3 - .../rulesets/phases/version_get_response.py | 393 ---- .../rulesets/phases/version_list_response.py | 59 - .../types/rulesets/rule_create_response.py | 393 ---- .../types/rulesets/rule_delete_response.py | 393 ---- .../types/rulesets/rule_edit_response.py | 393 ---- .../types/rulesets/version_get_response.py | 393 ---- .../types/rulesets/version_list_response.py | 59 - .../types/rulesets/versions/__init__.py | 2 - .../rulesets/versions/by_tag_get_response.py | 393 ---- ...sponse.py => rulesets_ruleset_response.py} | 4 +- ...ponse.py => rulesets_rulesets_response.py} | 6 +- src/cloudflare/types/rum/__init__.py | 8 +- .../types/rum/rule_list_response.py | 27 +- .../types/rum/rule_update_response.py | 29 - .../{rule_create_response.py => rum_rule.py} | 4 +- ...{site_info_get_response.py => rum_site.py} | 28 +- .../types/rum/site_info_create_response.py | 66 - .../types/rum/site_info_list_response.py | 66 - .../types/rum/site_info_update_response.py | 66 - .../types/secondary_dns/__init__.py | 22 +- .../secondary_dns/acl_create_response.py | 21 - .../types/secondary_dns/acl_list_response.py | 23 +- .../secondary_dns/acl_update_response.py | 21 - .../force_axfr_create_response.py | 6 - .../types/secondary_dns/outgoing/__init__.py | 2 - .../outgoing_disable_response.py | 6 - .../secondary_dns/outgoing_enable_response.py | 6 - .../outgoing_force_notify_response.py | 6 - .../secondary_dns/peer_create_response.py | 38 - .../types/secondary_dns/peer_list_response.py | 40 +- .../secondary_dns/peer_update_response.py | 38 - ...l_get_response.py => secondary_dns_acl.py} | 4 +- .../secondary_dns_disable_transfer_result.py | 6 + .../secondary_dns_enable_transfer_result.py | 6 + .../secondary_dns_force_result.py | 6 + ..._get_response.py => secondary_dns_peer.py} | 4 +- .../secondary_dns_schemas_force_result.py | 6 + ..._get_response.py => secondary_dns_tsig.py} | 4 +- .../secondary_dns/tsig_create_response.py | 18 - .../types/secondary_dns/tsig_list_response.py | 20 +- .../secondary_dns/tsig_update_response.py | 18 - .../{snippet_get_response.py => snippet.py} | 4 +- src/cloudflare/types/snippet_list_response.py | 20 +- .../types/snippet_update_response.py | 18 - src/cloudflare/types/speed/__init__.py | 5 +- ...ponse.py => observatory_availabilities.py} | 4 +- ...t_response.py => observatory_page_test.py} | 5 +- .../types/speed/page_list_response.py | 165 +- .../types/speed/schedule_create_response.py | 211 +- .../types/speed/test_create_response.py | 161 -- src/cloudflare/types/ssl/__init__.py | 3 + ...certificates_and_hostnames_verification.py | 47 + .../types/ssl/universal/__init__.py | 5 +- .../ssl/universal/setting_get_response.py | 38 - ...s_certificates_and_hostnames_universal.py} | 4 +- .../types/ssl/verification_get_response.py | 49 +- src/cloudflare/types/storage/__init__.py | 4 +- ...> workers_kv_components_schemas_result.py} | 4 +- ...sponse.py => workers_kv_schemas_result.py} | 4 +- src/cloudflare/types/stream/__init__.py | 14 +- .../types/stream/audio_track_copy_response.py | 25 - .../types/stream/audio_track_get_response.py | 27 +- .../types/stream/caption_get_response.py | 17 +- .../types/stream/copy_create_response.py | 234 -- .../stream/direct_upload_create_response.py | 61 +- .../stream/live_input_create_response.py | 165 -- .../stream/live_input_update_response.py | 165 -- .../types/stream/live_inputs/__init__.py | 3 +- .../live_inputs/output_list_response.py | 31 +- .../live_inputs/output_update_response.py | 29 - ...ut_create_response.py => stream_output.py} | 4 +- ...response.py => stream_additional_audio.py} | 4 +- .../types/stream/stream_captions.py | 15 + ..._create_response.py => stream_clipping.py} | 4 +- ...{key_create_response.py => stream_keys.py} | 4 +- ...t_get_response.py => stream_live_input.py} | 13 +- .../types/stream/stream_watermarks.py | 66 + .../types/stream/watermark_list_response.py | 68 +- src/cloudflare/types/stream_list_response.py | 243 +- ...tream_get_response.py => stream_videos.py} | 63 +- ...=> tls_certificates_and_hostnames_base.py} | 4 +- ..._and_hostnames_certificate_object_post.py} | 4 +- ...cates_and_hostnames_client_certificate.py} | 4 +- ..._components_schemas_certificate_object.py} | 4 +- ...cates_and_hostnames_custom_certificate.py} | 53 +- src/cloudflare/types/user/__init__.py | 2 +- src/cloudflare/types/user/billing/__init__.py | 1 + .../billing/bill_subs_api_billing_history.py | 37 + .../user/billing/history_get_response.py | 39 +- .../types/user/firewall/__init__.py | 4 +- .../firewall/access_rule_create_response.py | 119 - .../firewall/access_rule_list_response.py | 119 - ...le_edit_response.py => legacy_jhs_rule.py} | 4 +- ...n_list_response.py => iam_organization.py} | 4 +- .../types/user/invite_list_response.py | 19 +- .../types/user/load_balancers/__init__.py | 12 +- .../user/load_balancers/analytics/__init__.py | 1 + .../analytics/event_list_response.py | 20 +- .../analytics/load_balancing_analytics.py | 18 + ..._response.py => load_balancing_monitor.py} | 4 +- ...get_response.py => load_balancing_pool.py} | 4 +- .../load_balancing_preview_result.py | 32 + .../load_balancers/monitor_create_response.py | 113 - .../load_balancers/monitor_edit_response.py | 113 - .../load_balancers/monitor_list_response.py | 115 +- .../load_balancers/monitor_update_response.py | 113 - .../load_balancers/pool_create_response.py | 273 --- .../user/load_balancers/pool_edit_response.py | 273 --- .../user/load_balancers/pool_list_response.py | 276 +-- .../load_balancers/pool_update_response.py | 273 --- .../load_balancers/preview_get_response.py | 30 - .../types/user/token_create_response.py | 3 +- src/cloudflare/types/user/tokens/__init__.py | 2 +- .../tokens/iam_value.py} | 4 +- .../user/tokens/value_update_response.py | 6 - src/cloudflare/types/vectorize/__init__.py | 12 +- .../types/vectorize/index_get_response.py | 31 - .../types/vectorize/index_list_response.py | 33 +- .../types/vectorize/index_update_response.py | 31 - ..._response.py => vectorize_create_index.py} | 4 +- ...> vectorize_index_delete_vectors_by_id.py} | 4 +- ..._response.py => vectorize_index_insert.py} | 4 +- ...y_response.py => vectorize_index_query.py} | 4 +- ..._response.py => vectorize_index_upsert.py} | 4 +- .../types/waiting_room_create_response.py | 388 ---- .../types/waiting_room_edit_response.py | 388 ---- .../types/waiting_room_list_response.py | 395 +--- .../types/waiting_room_update_response.py | 388 ---- .../types/waiting_rooms/__init__.py | 6 +- .../waiting_rooms/event_create_response.py | 97 - .../waiting_rooms/event_edit_response.py | 97 - .../types/waiting_rooms/event_get_response.py | 97 - .../waiting_rooms/event_list_response.py | 99 +- .../types/waiting_rooms/events/__init__.py | 2 +- ...py => waitingroom_event_details_result.py} | 4 +- .../waiting_rooms/rule_create_response.py | 33 +- .../waiting_rooms/rule_delete_response.py | 33 +- .../types/waiting_rooms/rule_edit_response.py | 33 +- .../types/waiting_rooms/rule_list_response.py | 33 +- .../waiting_rooms/rule_update_response.py | 33 +- ...esponse.py => waitingroom_event_result.py} | 4 +- .../waiting_rooms/waitingroom_rule_result.py | 31 + ...response.py => waitingroom_waitingroom.py} | 4 +- src/cloudflare/types/web3/__init__.py | 4 +- ...sponse.py => dweb_config_web3_hostname.py} | 4 +- .../types/web3/hostname_edit_response.py | 33 - .../types/web3/hostname_get_response.py | 33 - .../types/web3/hostname_list_response.py | 35 +- .../ipfs_universal_paths/__init__.py | 3 +- .../content_list_get_response.py | 13 - .../content_list_update_params.py | 17 +- .../content_lists/__init__.py | 5 +- ...e.py => dweb_config_content_list_entry.py} | 4 +- .../dweb_config_content_list_entry_param.py | 18 + .../content_lists/entry_get_response.py | 27 - .../content_lists/entry_list_response.py | 25 +- .../content_lists/entry_update_response.py | 27 - ...py => dweb_config_content_list_details.py} | 4 +- src/cloudflare/types/workers/__init__.py | 10 +- .../types/workers/domain_list_response.py | 29 +- .../types/workers/domain_update_response.py | 27 - .../types/workers/filter_list_response.py | 16 +- .../types/workers/route_list_response.py | 17 +- .../types/workers/route_update_response.py | 15 - .../types/workers/script_list_response.py | 50 +- .../types/workers/scripts/__init__.py | 2 +- .../workers/scripts/binding_get_response.py | 38 +- .../scripts/content_update_response.py | 48 - .../scripts/workers_schemas_binding.py | 30 + .../workers/services/environments/__init__.py | 1 - .../environments/content_update_response.py | 48 - ...main_get_response.py => workers_domain.py} | 4 +- ..._update_response.py => workers_filters.py} | 4 +- ...oute_get_response.py => workers_routes.py} | 4 +- ...t_update_response.py => workers_script.py} | 4 +- .../dispatch/namespaces/__init__.py | 3 +- .../namespaces/script_get_response.py | 61 - .../namespaces/script_update_response.py | 48 - .../namespaces/scripts/content/__init__.py | 1 - .../scripts/content/script_update_response.py | 48 - .../namespaces/workers_namespace_script.py | 22 + ...queue_get_response.py => workers_queue.py} | 4 +- ...e_response.py => workers_queue_created.py} | 4 +- ...e_response.py => workers_queue_updated.py} | 4 +- src/cloudflare/types/zero_trust/__init__.py | 14 +- .../types/zero_trust/access/__init__.py | 30 +- ...ication_get_response.py => access_apps.py} | 4 +- ...rk_get_response.py => access_bookmarks.py} | 4 +- ...get_response.py => access_certificates.py} | 4 +- ..._get_response.py => access_custom_page.py} | 4 +- ....py => access_custom_page_without_html.py} | 4 +- ...group_get_response.py => access_groups.py} | 4 +- ...e_response.py => access_service_tokens.py} | 4 +- .../{tag_get_response.py => access_tag.py} | 4 +- .../types/zero_trust/access/access_users.py | 41 + .../access/application_create_response.py | 830 ------- .../access/application_list_response.py | 837 +------ .../access/application_update_response.py | 830 ------- .../access/applications/__init__.py | 5 +- .../access/applications/access_ca.py | 21 + ...icy_get_response.py => access_policies.py} | 4 +- .../access/applications/ca_list_response.py | 23 +- .../applications/policy_create_response.py | 810 ------- .../applications/policy_list_response.py | 819 +------ .../applications/policy_update_response.py | 810 ------- .../access/bookmark_create_response.py | 29 - .../access/bookmark_list_response.py | 31 +- .../access/bookmark_update_response.py | 29 - .../access/certificate_create_response.py | 28 - .../access/certificate_list_response.py | 30 +- .../access/certificate_update_response.py | 28 - .../access/certificates/__init__.py | 2 + .../access/certificates/access_settings.py | 23 + .../certificates/access_settings_param.py | 25 + .../certificates/setting_list_response.py | 25 +- .../certificates/setting_update_params.py | 24 +- .../certificates/setting_update_response.py | 25 +- .../access/custom_page_list_response.py | 29 +- .../access/custom_page_update_response.py | 27 - .../access/group_create_response.py | 1010 --------- .../zero_trust/access/group_list_response.py | 1019 +-------- .../access/group_update_response.py | 1010 --------- .../types/zero_trust/access/logs/__init__.py | 1 + .../access/logs/access_access_requests.py | 36 + .../logs/access_request_list_response.py | 38 +- .../access/service_token_list_response.py | 35 +- .../access/service_token_refresh_response.py | 33 - .../access/service_token_update_response.py | 33 - .../zero_trust/access/tag_create_response.py | 20 - .../zero_trust/access/tag_list_response.py | 22 +- .../zero_trust/access/tag_update_response.py | 20 - .../zero_trust/access/user_list_response.py | 43 +- .../types/zero_trust/access/users/__init__.py | 2 +- ...ity_get_response.py => access_identity.py} | 12 +- ...sponse.py => access_identity_providers.py} | 4 +- ...st_response.py => access_organizations.py} | 4 +- .../types/zero_trust/access_seats.py | 23 + .../types/zero_trust/device_list_response.py | 82 +- .../types/zero_trust/devices/__init__.py | 25 +- .../devices/dex_test_create_response.py | 38 - .../devices/dex_test_delete_response.py | 40 +- .../devices/dex_test_list_response.py | 40 +- .../devices/dex_test_update_response.py | 38 - .../devices/network_delete_response.py | 42 +- .../devices/network_get_response.py | 40 - .../devices/network_list_response.py | 42 +- .../devices/network_update_response.py | 40 - .../zero_trust/devices/policies/__init__.py | 8 + .../devices/policies/exclude_get_response.py | 26 +- .../devices/policies/exclude_list_response.py | 26 +- .../devices/policies/exclude_update_params.py | 23 +- .../policies/exclude_update_response.py | 26 +- .../policies/fallback_domain_get_response.py | 20 +- .../policies/fallback_domain_list_response.py | 20 +- .../policies/fallback_domain_update_params.py | 17 +- .../fallback_domain_update_response.py | 20 +- .../devices/policies/include_get_response.py | 26 +- .../devices/policies/include_list_response.py | 26 +- .../devices/policies/include_update_params.py | 23 +- .../policies/include_update_response.py | 26 +- .../policies/teams_devices_fallback_domain.py | 18 + .../teams_devices_fallback_domain_param.py | 19 + .../policies/teams_devices_split_tunnel.py | 24 + .../teams_devices_split_tunnel_include.py | 24 + ...eams_devices_split_tunnel_include_param.py | 24 + .../teams_devices_split_tunnel_param.py | 24 + .../devices/policy_create_response.py | 7 - .../devices/policy_delete_response.py | 156 +- .../devices/policy_edit_response.py | 7 - .../zero_trust/devices/policy_get_response.py | 7 - .../devices/policy_list_response.py | 156 +- .../devices/posture_get_response.py | 328 --- .../devices/posture_list_response.py | 331 +-- .../devices/posture_update_response.py | 328 --- .../zero_trust/devices/postures/__init__.py | 6 +- .../postures/integration_create_response.py | 41 - .../postures/integration_get_response.py | 41 - .../postures/integration_list_response.py | 43 +- ...ms_devices_device_posture_integrations.py} | 4 +- .../devices/setting_update_response.py | 21 - ...s_devices_device_dex_test_schemas_http.py} | 4 +- ... teams_devices_device_managed_networks.py} | 4 +- ... => teams_devices_device_posture_rules.py} | 4 +- .../teams_devices_device_settings_policy.py | 103 + ...ces_zero_trust_account_device_settings.py} | 4 +- .../types/zero_trust/dex/__init__.py | 17 +- ...tal_experience_monitoring_http_details.py} | 4 +- .../digital_experience_monitoring_tests.py | 311 +++ ...perience_monitoring_traceroute_details.py} | 4 +- ...itoring_traceroute_details_percentiles.py} | 4 +- ...onitoring_traceroute_test_network_path.py} | 9 +- .../zero_trust/dex/fleet_status/__init__.py | 2 +- ...> digital_experience_monitoring_device.py} | 4 +- .../zero_trust/dex/http_tests/__init__.py | 4 +- ...ce_monitoring_http_details_percentiles.py} | 9 +- .../zero_trust/dex/test_list_response.py | 289 +-- .../types/zero_trust/dex/tests/__init__.py | 4 +- ...l_experience_monitoring_unique_devices.py} | 4 +- .../dex/traceroute_test_results/__init__.py | 4 +- ...ng_traceroute_test_result_network_path.py} | 4 +- .../types/zero_trust/dlp/__init__.py | 8 +- .../zero_trust/dlp/dataset_create_response.py | 52 - .../zero_trust/dlp/dataset_list_response.py | 40 - .../zero_trust/dlp/dataset_update_response.py | 37 - .../types/zero_trust/dlp/datasets/__init__.py | 3 +- ...response.py => dlp_dataset_new_version.py} | 4 +- .../dlp/datasets/upload_edit_response.py | 37 - ...dataset_get_response.py => dlp_dataset.py} | 4 +- .../types/zero_trust/dlp/dlp_dataset_array.py | 9 + .../zero_trust/dlp/dlp_dataset_creation.py | 23 + .../types/zero_trust/dlp/dlp_profiles.py | 52 + .../zero_trust/dlp/profile_get_response.py | 148 +- .../zero_trust/dlp/profile_list_response.py | 202 +- .../types/zero_trust/dlp/profiles/__init__.py | 6 +- .../dlp/profiles/custom_create_response.py | 97 +- .../dlp/profiles/custom_update_response.py | 88 - ..._get_response.py => dlp_custom_profile.py} | 4 +- ..._response.py => dlp_predefined_profile.py} | 4 +- .../profiles/predefined_update_response.py | 61 - .../types/zero_trust/gateway/__init__.py | 26 +- .../gateway/app_type_list_response.py | 53 +- .../audit_ssh_setting_update_response.py | 20 - .../gateway/category_list_response.py | 63 +- .../zero_trust/gateway/list_get_response.py | 30 - .../zero_trust/gateway/list_list_response.py | 32 +- .../gateway/list_update_response.py | 30 - .../gateway/location_create_response.py | 46 - .../gateway/location_list_response.py | 48 +- .../gateway/location_update_response.py | 46 - .../gateway/logging_get_response.py | 29 - .../gateway/proxy_endpoint_create_response.py | 25 - .../gateway/proxy_endpoint_get_response.py | 25 - .../gateway/proxy_endpoint_list_response.py | 27 +- .../zero_trust/gateway/rule_get_response.py | 376 ---- .../zero_trust/gateway/rule_list_response.py | 379 +--- .../gateway/rule_update_response.py | 376 ---- .../gateway/zero_trust_gateway_app_types.py | 45 + .../gateway/zero_trust_gateway_categories.py | 61 + ...teway_gateway_account_logging_settings.py} | 4 +- ...esponse.py => zero_trust_gateway_lists.py} | 4 +- ...nse.py => zero_trust_gateway_locations.py} | 4 +- ... => zero_trust_gateway_proxy_endpoints.py} | 4 +- ...esponse.py => zero_trust_gateway_rules.py} | 4 +- ...onse.py => zero_trust_gateway_settings.py} | 4 +- .../identity_provider_create_response.py | 1346 ----------- .../identity_provider_update_response.py | 1346 ----------- .../types/zero_trust/networks/__init__.py | 7 +- .../networks/route_create_response.py | 38 - .../networks/route_delete_response.py | 38 - .../zero_trust/networks/routes/__init__.py | 4 - .../networks/routes/ip_get_response.py | 48 - .../routes/network_create_response.py | 38 - .../routes/network_delete_response.py | 38 - .../networks/routes/network_edit_response.py | 38 - ...route_edit_response.py => tunnel_route.py} | 4 +- ...ute_list_response.py => tunnel_teamnet.py} | 4 +- .../networks/tunnel_virtual_network.py | 30 + .../networks/virtual_network_list_response.py | 32 +- .../organization_create_response.py | 95 - .../organization_update_response.py | 95 - .../types/zero_trust/seat_edit_response.py | 25 +- .../types/zero_trust/teams_devices_devices.py | 80 + ..._get_response.py => tunnel_argo_tunnel.py} | 4 +- .../zero_trust/tunnel_create_response.py | 44 - .../zero_trust/tunnel_delete_response.py | 44 - .../types/zero_trust/tunnels/__init__.py | 2 +- .../tunnels/connection_get_response.py | 67 +- ...et_response.py => tunnel_tunnel_client.py} | 4 +- .../types/zones/setting_edit_params.py | 705 +----- .../types/zones/setting_edit_response.py | 1128 +--------- .../types/zones/setting_get_response.py | 1128 +--------- .../types/zones/settings/__init__.py | 216 +- .../settings/always_online_edit_response.py | 26 - .../always_use_https_edit_response.py | 26 - .../automatic_https_rewrite_edit_response.py | 26 - ...matic_platform_optimization_edit_params.py | 38 +- .../zones/settings/brotli_edit_response.py | 26 - .../browser_cache_ttl_edit_response.py | 55 - .../settings/browser_check_edit_response.py | 26 - .../settings/cache_level_edit_response.py | 26 - .../settings/challenge_ttl_edit_response.py | 26 - .../zones/settings/cipher_edit_response.py | 26 - .../development_mode_edit_response.py | 33 - .../settings/early_hint_edit_response.py | 26 - .../email_obfuscation_edit_response.py | 26 - .../settings/font_setting_edit_response.py | 26 - .../settings/h2_prioritization_edit_params.py | 16 +- .../h2_prioritization_edit_response.py | 26 - .../hotlink_protection_edit_response.py | 26 - .../zones/settings/http2_edit_response.py | 26 - .../zones/settings/http3_edit_response.py | 26 - .../settings/image_resizing_edit_params.py | 16 +- .../settings/image_resizing_edit_response.py | 26 - .../settings/ip_geolocation_edit_response.py | 26 - .../zones/settings/ipv6_edit_response.py | 26 - .../settings/min_tls_version_edit_response.py | 26 - .../zones/settings/minify_edit_response.py | 37 - .../zones/settings/mirage_edit_response.py | 26 - .../settings/mobile_redirect_edit_response.py | 43 - .../types/zones/settings/nel_edit_params.py | 20 +- .../types/zones/settings/nel_edit_response.py | 30 - .../opportunistic_encryption_edit_response.py | 26 - .../opportunistic_onion_edit_response.py | 26 - .../settings/orange_to_orange_edit_params.py | 16 +- .../orange_to_orange_edit_response.py | 26 - ...igin_error_page_pass_thru_edit_response.py | 26 - .../zones/settings/polish_edit_params.py | 16 +- .../zones/settings/polish_edit_response.py | 26 - .../prefetch_preload_edit_response.py | 26 - .../proxy_read_timeout_edit_params.py | 16 +- .../proxy_read_timeout_edit_response.py | 26 - .../settings/pseudo_ipv4_edit_response.py | 26 - .../response_buffering_edit_response.py | 26 - .../settings/rocket_loader_edit_params.py | 16 +- .../settings/rocket_loader_edit_response.py | 26 - .../settings/security_header_edit_response.py | 45 - .../settings/security_level_edit_response.py | 26 - .../server_side_exclude_edit_response.py | 26 - ...rt_query_string_for_cache_edit_response.py | 26 - ..._response.py => speed_cloudflare_fonts.py} | 4 +- .../types/zones/settings/ssl_edit_response.py | 26 - .../settings/ssl_recommender_edit_params.py | 16 +- .../settings/ssl_recommender_edit_response.py | 16 - .../zones/settings/tls_1_3_edit_response.py | 26 - .../settings/tls_client_auth_edit_response.py | 26 - .../true_client_ip_header_edit_response.py | 26 - .../types/zones/settings/waf_edit_response.py | 26 - .../zones/settings/webp_edit_response.py | 26 - .../zones/settings/websocket_edit_response.py | 26 - .../zones/settings/zero_rtt_edit_response.py | 26 - ...zero_rtt_get_response.py => zones_0rtt.py} | 4 +- .../types/zones/settings/zones_0rtt_param.py | 15 + ...get_response.py => zones_advanced_ddos.py} | 4 +- .../settings/zones_advanced_ddos_param.py | 15 + ...get_response.py => zones_always_online.py} | 4 +- .../settings/zones_always_online_param.py | 15 + ..._response.py => zones_always_use_https.py} | 4 +- .../settings/zones_always_use_https_param.py | 15 + ...e.py => zones_automatic_https_rewrites.py} | 4 +- .../zones_automatic_https_rewrites_param.py | 15 + ... zones_automatic_platform_optimization.py} | 4 +- ..._automatic_platform_optimization_param.py} | 21 +- ...brotli_get_response.py => zones_brotli.py} | 4 +- .../zones/settings/zones_brotli_param.py | 15 + ...response.py => zones_browser_cache_ttl.py} | 4 +- .../settings/zones_browser_cache_ttl_param.py | 46 + ...get_response.py => zones_browser_check.py} | 4 +- .../settings/zones_browser_check_param.py | 15 + ...ing_get_response.py => zones_buffering.py} | 4 +- .../zones/settings/zones_buffering_param.py | 15 + ...l_get_response.py => zones_cache_level.py} | 4 +- .../zones/settings/zones_cache_level_param.py | 15 + ...get_response.py => zones_challenge_ttl.py} | 4 +- .../settings/zones_challenge_ttl_param.py | 17 + ...ipher_get_response.py => zones_ciphers.py} | 4 +- .../zones/settings/zones_ciphers_param.py | 16 + ..._response.py => zones_development_mode.py} | 4 +- .../settings/zones_development_mode_param.py | 15 + ...t_get_response.py => zones_early_hints.py} | 4 +- .../zones/settings/zones_early_hints_param.py | 15 + ...response.py => zones_email_obfuscation.py} | 4 +- .../settings/zones_email_obfuscation_param.py | 15 + ...response.py => zones_h2_prioritization.py} | 4 +- .../settings/zones_h2_prioritization_param.py | 15 + ...esponse.py => zones_hotlink_protection.py} | 4 +- .../zones_hotlink_protection_param.py | 15 + .../{http2_get_response.py => zones_http2.py} | 4 +- .../types/zones/settings/zones_http2_param.py | 15 + .../{http3_get_response.py => zones_http3.py} | 4 +- .../types/zones/settings/zones_http3_param.py | 15 + ...et_response.py => zones_image_resizing.py} | 4 +- .../settings/zones_image_resizing_param.py | 15 + ...et_response.py => zones_ip_geolocation.py} | 4 +- .../settings/zones_ip_geolocation_param.py | 15 + .../{ipv6_get_response.py => zones_ipv6.py} | 4 +- .../types/zones/settings/zones_ipv6_param.py | 15 + ...t_response.py => zones_min_tls_version.py} | 4 +- .../settings/zones_min_tls_version_param.py | 15 + ...minify_get_response.py => zones_minify.py} | 4 +- .../zones/settings/zones_minify_param.py | 26 + ...mirage_get_response.py => zones_mirage.py} | 4 +- .../zones/settings/zones_mirage_param.py | 15 + ...t_response.py => zones_mobile_redirect.py} | 4 +- .../settings/zones_mobile_redirect_param.py | 33 + .../{nel_get_response.py => zones_nel.py} | 4 +- .../types/zones/settings/zones_nel_param.py | 19 + ...e.py => zones_opportunistic_encryption.py} | 4 +- .../zones_opportunistic_encryption_param.py | 15 + ...sponse.py => zones_opportunistic_onion.py} | 4 +- .../zones_opportunistic_onion_param.py | 15 + ..._response.py => zones_orange_to_orange.py} | 4 +- .../settings/zones_orange_to_orange_param.py | 15 + ...y => zones_origin_error_page_pass_thru.py} | 4 +- ...zones_origin_error_page_pass_thru_param.py | 15 + ...polish_get_response.py => zones_polish.py} | 4 +- .../zones/settings/zones_polish_param.py | 15 + ..._response.py => zones_prefetch_preload.py} | 4 +- .../settings/zones_prefetch_preload_param.py | 15 + ...esponse.py => zones_proxy_read_timeout.py} | 4 +- .../zones_proxy_read_timeout_param.py | 15 + ...4_get_response.py => zones_pseudo_ipv4.py} | 4 +- .../zones/settings/zones_pseudo_ipv4_param.py | 15 + ...get_response.py => zones_rocket_loader.py} | 4 +- .../settings/zones_rocket_loader_param.py | 15 + ...t_response.py => zones_security_header.py} | 4 +- .../settings/zones_security_header_param.py | 34 + ...et_response.py => zones_security_level.py} | 4 +- .../settings/zones_security_level_param.py | 15 + ...sponse.py => zones_server_side_exclude.py} | 4 +- .../zones_server_side_exclude_param.py | 15 + ...y => zones_sort_query_string_for_cache.py} | 4 +- ...zones_sort_query_string_for_cache_param.py | 15 + .../{ssl_get_response.py => zones_ssl.py} | 4 +- .../types/zones/settings/zones_ssl_param.py | 15 + ...t_response.py => zones_ssl_recommender.py} | 4 +- .../settings/zones_ssl_recommender_param.py | 15 + ...s_1_3_get_response.py => zones_tls_1_3.py} | 4 +- .../zones/settings/zones_tls_1_3_param.py | 15 + ...t_response.py => zones_tls_client_auth.py} | 4 +- .../settings/zones_tls_client_auth_param.py | 15 + ...onse.py => zones_true_client_ip_header.py} | 4 +- .../zones_true_client_ip_header_param.py | 15 + .../{waf_get_response.py => zones_waf.py} | 4 +- .../types/zones/settings/zones_waf_param.py | 15 + .../{webp_get_response.py => zones_webp.py} | 4 +- .../types/zones/settings/zones_webp_param.py | 15 + ...et_get_response.py => zones_websockets.py} | 4 +- .../zones/settings/zones_websockets_param.py | 15 + src/cloudflare/types/zones_page_rule.py | 83 + .../addressing/prefixes/bgp/test_bindings.py | 31 +- .../addressing/prefixes/bgp/test_prefixes.py | 34 +- .../addressing/prefixes/test_delegations.py | 14 +- .../addressing/test_address_maps.py | 18 +- .../api_resources/addressing/test_prefixes.py | 40 +- .../alerting/v3/destinations/test_webhooks.py | 14 +- .../alerting/v3/test_histories.py | 18 +- .../alerting/v3/test_policies.py | 14 +- tests/api_resources/cache/test_variants.py | 14 +- .../test_hostname_associations.py | 35 +- .../api_resources/challenges/test_widgets.py | 96 +- .../cloudforce_one/requests/test_message.py | 35 +- .../cloudforce_one/requests/test_priority.py | 54 +- .../cloudforce_one/test_requests.py | 108 +- tests/api_resources/d1/test_database.py | 45 +- .../api_resources/dcv_delegation/test_uuid.py | 14 +- .../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 | 65 +- .../routing/rules/test_catch_alls.py | 33 +- .../api_resources/firewall/test_lockdowns.py | 57 +- tests/api_resources/firewall/test_rules.py | 61 +- .../firewall/waf/packages/test_groups.py | 18 +- .../firewall/waf/packages/test_rules.py | 18 +- .../firewall/waf/test_overrides.py | 57 +- .../healthchecks/test_previews.py | 35 +- .../hostnames/settings/test_tls.py | 30 +- tests/api_resources/images/test_v1.py | 48 +- tests/api_resources/images/v1/test_keys.py | 14 +- tests/api_resources/images/v1/test_stats.py | 14 +- .../api_resources/images/v1/test_variants.py | 62 +- .../intel/indicator_feeds/test_permissions.py | 35 +- tests/api_resources/intel/test_asn.py | 14 +- tests/api_resources/intel/test_dns.py | 18 +- tests/api_resources/intel/test_domains.py | 18 +- .../intel/test_indicator_feeds.py | 50 +- tests/api_resources/intel/test_whois.py | 18 +- tests/api_resources/kv/test_namespaces.py | 31 +- .../load_balancers/test_monitors.py | 65 +- .../load_balancers/test_pools.py | 65 +- .../load_balancers/test_previews.py | 14 +- tests/api_resources/logpush/test_edge.py | 18 +- tests/api_resources/logpush/test_jobs.py | 57 +- .../logs/control/cmb/test_config.py | 34 +- .../configs/test_full.py | 14 +- .../rules/test_advertisements.py | 14 +- .../magic_network_monitoring/test_configs.py | 68 +- .../magic_network_monitoring/test_rules.py | 69 +- .../hostnames/test_certificates.py | 40 +- .../origin_tls_client_auth/test_hostnames.py | 17 +- .../page_shield/test_connections.py | 14 +- .../page_shield/test_policies.py | 48 +- .../api_resources/pagerules/test_settings.py | 14 +- .../pages/projects/test_deployments.py | 61 +- tests/api_resources/pages/test_projects.py | 14 +- tests/api_resources/pcaps/test_ownerships.py | 27 +- tests/api_resources/queues/test_consumers.py | 28 +- tests/api_resources/r2/test_buckets.py | 34 +- tests/api_resources/r2/test_sippy.py | 30 +- tests/api_resources/rules/test_lists.py | 48 +- .../rulesets/phases/test_versions.py | 34 +- tests/api_resources/rulesets/test_phases.py | 34 +- tests/api_resources/rulesets/test_rules.py | 54 +- tests/api_resources/rulesets/test_versions.py | 34 +- .../rulesets/versions/test_by_tags.py | 14 +- tests/api_resources/rum/test_rules.py | 39 +- tests/api_resources/rum/test_site_infos.py | 65 +- .../api_resources/secondary_dns/test_acls.py | 40 +- .../api_resources/secondary_dns/test_peers.py | 44 +- .../api_resources/secondary_dns/test_tsigs.py | 40 +- .../speed/test_availabilities.py | 14 +- tests/api_resources/speed/test_tests.py | 31 +- .../ssl/universal/test_settings.py | 30 +- tests/api_resources/storage/test_analytics.py | 36 +- .../stream/live_inputs/test_outputs.py | 31 +- .../api_resources/stream/test_audio_tracks.py | 35 +- tests/api_resources/stream/test_clips.py | 18 +- tests/api_resources/stream/test_copies.py | 18 +- tests/api_resources/stream/test_keys.py | 14 +- .../api_resources/stream/test_live_inputs.py | 48 +- tests/api_resources/test_available_plans.py | 14 +- tests/api_resources/test_brand_protection.py | 36 +- tests/api_resources/test_calls.py | 64 +- .../api_resources/test_client_certificates.py | 86 +- .../api_resources/test_custom_certificates.py | 34 +- .../api_resources/test_custom_nameservers.py | 18 +- tests/api_resources/test_dnssec.py | 30 +- tests/api_resources/test_filters.py | 57 +- tests/api_resources/test_healthchecks.py | 65 +- .../test_keyless_certificates.py | 48 +- tests/api_resources/test_mtls_certificates.py | 69 +- tests/api_resources/test_page_shield.py | 30 +- tests/api_resources/test_queues.py | 42 +- tests/api_resources/test_rulesets.py | 70 +- tests/api_resources/test_snippets.py | 35 +- tests/api_resources/test_speed.py | 32 +- tests/api_resources/test_stream.py | 14 +- tests/api_resources/test_waiting_rooms.py | 65 +- .../user/firewall/test_access_rules.py | 52 +- .../user/load_balancers/test_monitors.py | 65 +- .../user/load_balancers/test_pools.py | 65 +- .../user/load_balancers/test_preview.py | 14 +- .../api_resources/user/test_organizations.py | 18 +- tests/api_resources/vectorize/test_indexes.py | 108 +- .../waiting_rooms/events/test_details.py | 14 +- .../waiting_rooms/test_events.py | 65 +- .../content_lists/test_entries.py | 48 +- .../test_content_lists.py | 27 +- tests/api_resources/web3/test_hostnames.py | 48 +- .../workers/scripts/test_content.py | 18 +- .../services/environments/test_content.py | 18 +- tests/api_resources/workers/test_domains.py | 30 +- tests/api_resources/workers/test_filters.py | 14 +- tests/api_resources/workers/test_routes.py | 31 +- tests/api_resources/workers/test_scripts.py | 21 +- .../scripts/content/test_scripts.py | 20 +- .../dispatch/namespaces/test_scripts.py | 32 +- .../access/applications/test_policies.py | 52 +- .../zero_trust/access/test_applications.py | 52 +- .../zero_trust/access/test_bookmarks.py | 44 +- .../zero_trust/access/test_certificates.py | 52 +- .../zero_trust/access/test_custom_pages.py | 49 +- .../zero_trust/access/test_groups.py | 52 +- .../zero_trust/access/test_service_tokens.py | 48 +- .../zero_trust/access/test_tags.py | 40 +- .../access/users/test_last_seen_identity.py | 14 +- .../devices/postures/test_integrations.py | 48 +- .../zero_trust/devices/test_dex_tests.py | 48 +- .../zero_trust/devices/test_networks.py | 48 +- .../zero_trust/devices/test_policies.py | 48 +- .../zero_trust/devices/test_postures.py | 48 +- .../zero_trust/devices/test_settings.py | 30 +- .../dex/fleet_status/test_devices.py | 20 +- .../dex/http_tests/test_percentiles.py | 20 +- .../zero_trust/dex/test_http_tests.py | 18 +- .../zero_trust/dex/test_traceroute_tests.py | 58 +- .../dex/tests/test_unique_devices.py | 18 +- .../test_network_path.py | 20 +- .../zero_trust/dlp/datasets/test_upload.py | 27 +- .../zero_trust/dlp/profiles/test_customs.py | 31 +- .../dlp/profiles/test_predefineds.py | 33 +- .../zero_trust/dlp/test_datasets.py | 63 +- .../gateway/test_audit_ssh_settings.py | 33 +- .../zero_trust/gateway/test_lists.py | 48 +- .../zero_trust/gateway/test_locations.py | 48 +- .../zero_trust/gateway/test_loggings.py | 30 +- .../gateway/test_proxy_endpoints.py | 48 +- .../zero_trust/gateway/test_rules.py | 48 +- .../zero_trust/networks/routes/test_ips.py | 18 +- .../networks/routes/test_networks.py | 50 +- .../zero_trust/networks/test_routes.py | 66 +- .../zero_trust/test_identity_providers.py | 52 +- .../zero_trust/test_organizations.py | 52 +- .../api_resources/zero_trust/test_tunnels.py | 40 +- .../zero_trust/tunnels/test_connectors.py | 14 +- .../zones/settings/test_advanced_ddos.py | 14 +- .../zones/settings/test_always_online.py | 26 +- .../zones/settings/test_always_use_https.py | 29 +- .../settings/test_automatic_https_rewrites.py | 29 +- .../test_automatic_platform_optimization.py | 27 +- .../zones/settings/test_brotli.py | 26 +- .../zones/settings/test_browser_cache_ttl.py | 29 +- .../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 | 29 +- .../zones/settings/test_early_hints.py | 26 +- .../zones/settings/test_email_obfuscation.py | 29 +- .../zones/settings/test_font_settings.py | 26 +- .../zones/settings/test_h2_prioritization.py | 33 +- .../zones/settings/test_hotlink_protection.py | 29 +- .../zones/settings/test_http2.py | 26 +- .../zones/settings/test_http3.py | 26 +- .../zones/settings/test_image_resizing.py | 33 +- .../zones/settings/test_ip_geolocation.py | 29 +- .../api_resources/zones/settings/test_ipv6.py | 26 +- .../zones/settings/test_min_tls_version.py | 29 +- .../zones/settings/test_minify.py | 30 +- .../zones/settings/test_mirage.py | 26 +- .../zones/settings/test_mobile_redirect.py | 33 +- .../api_resources/zones/settings/test_nel.py | 30 +- .../settings/test_opportunistic_encryption.py | 37 +- .../settings/test_opportunistic_onion.py | 29 +- .../zones/settings/test_orange_to_orange.py | 33 +- .../test_origin_error_page_pass_thru.py | 53 +- .../zones/settings/test_polish.py | 30 +- .../zones/settings/test_prefetch_preload.py | 29 +- .../zones/settings/test_proxy_read_timeout.py | 33 +- .../zones/settings/test_pseudo_ipv4.py | 26 +- .../zones/settings/test_response_buffering.py | 29 +- .../zones/settings/test_rocket_loader.py | 30 +- .../zones/settings/test_security_headers.py | 33 +- .../zones/settings/test_security_level.py | 29 +- .../settings/test_server_side_excludes.py | 29 +- .../test_sort_query_string_for_cache.py | 53 +- .../api_resources/zones/settings/test_ssl.py | 26 +- .../zones/settings/test_ssl_recommender.py | 33 +- .../zones/settings/test_tls_1_3.py | 26 +- .../zones/settings/test_tls_client_auth.py | 29 +- .../settings/test_true_client_ip_header.py | 29 +- .../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 +- 1252 files changed, 11264 insertions(+), 49447 deletions(-) create mode 100644 src/cloudflare/types/accounts/iam_schemas_role.py rename src/cloudflare/types/addressing/{address_map_edit_response.py => addressing_address_maps.py} (94%) rename src/cloudflare/types/addressing/{prefix_create_response.py => addressing_ipam_prefixes.py} (94%) delete mode 100644 src/cloudflare/types/addressing/prefix_edit_response.py delete mode 100644 src/cloudflare/types/addressing/prefix_get_response.py rename src/cloudflare/types/addressing/prefixes/{delegation_create_response.py => addressing_ipam_delegations.py} (87%) rename src/cloudflare/types/addressing/prefixes/bgp/{prefix_edit_response.py => addressing_ipam_bgp_prefixes.py} (93%) rename src/cloudflare/types/addressing/prefixes/bgp/{binding_create_response.py => addressing_service_binding.py} (89%) delete mode 100644 src/cloudflare/types/addressing/prefixes/bgp/binding_get_response.py delete mode 100644 src/cloudflare/types/addressing/prefixes/bgp/prefix_get_response.py rename src/cloudflare/types/alerting/v3/{history_list_response.py => aaa_history.py} (94%) rename src/cloudflare/types/alerting/v3/{policy_get_response.py => aaa_policies.py} (98%) create mode 100644 src/cloudflare/types/alerting/v3/destinations/aaa_pagerduty.py rename src/cloudflare/types/alerting/v3/destinations/{webhook_get_response.py => aaa_webhooks.py} (95%) rename src/cloudflare/types/{available_plan_get_response.py => bill_subs_api_available_rate_plan.py} (92%) rename src/cloudflare/types/cache/{variant_delete_response.py => cache_variants.py} (81%) delete mode 100644 src/cloudflare/types/call_delete_response.py delete mode 100644 src/cloudflare/types/call_update_response.py rename src/cloudflare/types/{call_get_response.py => calls_app.py} (89%) rename src/cloudflare/types/{call_create_response.py => calls_app_with_secret.py} (89%) delete mode 100644 src/cloudflare/types/certificate_authorities/hostname_association_update_response.py rename src/cloudflare/types/certificate_authorities/{hostname_association_get_response.py => tls_certificates_and_hostnames_hostname_association.py} (77%) rename src/cloudflare/types/challenges/{widget_get_response.py => nc_challenges_admin_widget_detail.py} (93%) rename src/cloudflare/types/challenges/{widget_list_response.py => nc_challenges_admin_widget_list.py} (93%) delete mode 100644 src/cloudflare/types/challenges/widget_create_response.py delete mode 100644 src/cloudflare/types/challenges/widget_delete_response.py delete mode 100644 src/cloudflare/types/challenges/widget_rotate_secret_response.py delete mode 100644 src/cloudflare/types/challenges/widget_update_response.py delete mode 100644 src/cloudflare/types/client_certificate_create_response.py delete mode 100644 src/cloudflare/types/client_certificate_delete_response.py delete mode 100644 src/cloudflare/types/client_certificate_edit_response.py delete mode 100644 src/cloudflare/types/client_certificate_list_response.py rename src/cloudflare/types/cloudforce_one/{request_quota_response.py => cloudforce_one_quota.py} (88%) rename src/cloudflare/types/cloudforce_one/{request_constants_response.py => cloudforce_one_request_constants.py} (82%) rename src/cloudflare/types/cloudforce_one/{request_update_response.py => cloudforce_one_request_item.py} (92%) rename src/cloudflare/types/cloudforce_one/{request_list_response.py => cloudforce_one_request_list_item.py} (92%) rename src/cloudflare/types/cloudforce_one/{request_types_response.py => cloudforce_one_request_types.py} (50%) delete mode 100644 src/cloudflare/types/cloudforce_one/request_create_response.py delete mode 100644 src/cloudflare/types/cloudforce_one/request_get_response.py rename src/cloudflare/types/cloudforce_one/requests/{priority_create_response.py => cloudforce_one_priority_item.py} (87%) rename src/cloudflare/types/cloudforce_one/requests/{message_create_response.py => cloudforce_one_request_message_item.py} (83%) delete mode 100644 src/cloudflare/types/cloudforce_one/requests/message_update_response.py delete mode 100644 src/cloudflare/types/cloudforce_one/requests/priority_get_response.py delete mode 100644 src/cloudflare/types/cloudforce_one/requests/priority_quota_response.py delete mode 100644 src/cloudflare/types/cloudforce_one/requests/priority_update_response.py rename src/cloudflare/types/d1/{database_list_response.py => d1_create_database.py} (82%) rename src/cloudflare/types/d1/{database_get_response.py => d1_database_details.py} (86%) create mode 100644 src/cloudflare/types/d1/d1_query_result.py delete mode 100644 src/cloudflare/types/d1/database_create_response.py rename src/cloudflare/types/dcv_delegation/{uuid_get_response.py => tls_certificates_and_hostnames_uuid_object.py} (64%) create mode 100644 src/cloudflare/types/diagnostics/magic_transit_target_result.py rename src/cloudflare/types/dns/analytics/{report_get_response.py => dns_dns_analytics_api_report.py} (94%) rename src/cloudflare/types/dns/analytics/reports/{bytime_get_response.py => dns_dns_analytics_api_report_bytime.py} (95%) rename src/cloudflare/types/dns/{firewall_list_response.py => dns_firewall_dns_firewall.py} (94%) delete mode 100644 src/cloudflare/types/dns/firewall/analytics/report_get_response.py delete mode 100644 src/cloudflare/types/dns/firewall/analytics/reports/bytime_get_response.py delete mode 100644 src/cloudflare/types/dns/firewall_create_response.py delete mode 100644 src/cloudflare/types/dns/firewall_edit_response.py delete mode 100644 src/cloudflare/types/dns/firewall_get_response.py rename src/cloudflare/types/{custom_nameserver_create_response.py => dns_custom_nameservers_custom_ns.py} (87%) rename src/cloudflare/types/{dnssec_get_response.py => dnssec_dnssec.py} (96%) delete mode 100644 src/cloudflare/types/dnssec_edit_response.py create mode 100644 src/cloudflare/types/durable_objects/namespaces/workers_object.py create mode 100644 src/cloudflare/types/durable_objects/workers_namespace.py create mode 100644 src/cloudflare/types/email_routing/routing/email_dns_record.py delete mode 100644 src/cloudflare/types/email_routing/routing/rules/catch_all_update_response.py rename src/cloudflare/types/email_routing/routing/rules/{catch_all_get_response.py => email_catch_all_rule.py} (91%) delete mode 100644 src/cloudflare/types/filter_get_response.py delete mode 100644 src/cloudflare/types/filter_list_response.py delete mode 100644 src/cloudflare/types/filter_update_response.py rename src/cloudflare/types/firewall/{rule_delete_response.py => legacy_jhs_filter_rule.py} (64%) rename src/cloudflare/types/firewall/{lockdown_get_response.py => legacy_jhs_zonelockdown.py} (96%) delete mode 100644 src/cloudflare/types/firewall/lockdown_create_response.py delete mode 100644 src/cloudflare/types/firewall/lockdown_list_response.py delete mode 100644 src/cloudflare/types/firewall/lockdown_update_response.py delete mode 100644 src/cloudflare/types/firewall/rule_get_response.py delete mode 100644 src/cloudflare/types/firewall/rule_list_response.py delete mode 100644 src/cloudflare/types/firewall/rule_update_response.py rename src/cloudflare/types/firewall/waf/{override_get_response.py => legacy_jhs_override.py} (96%) delete mode 100644 src/cloudflare/types/firewall/waf/override_create_response.py delete mode 100644 src/cloudflare/types/firewall/waf/override_list_response.py delete mode 100644 src/cloudflare/types/firewall/waf/override_update_response.py rename src/cloudflare/types/firewall/waf/packages/{rule_list_response.py => waf_managed_rules_rule.py} (98%) rename src/cloudflare/types/firewall/waf/packages/{group_list_response.py => waf_managed_rules_schemas_group.py} (91%) delete mode 100644 src/cloudflare/types/healthcheck_create_response.py delete mode 100644 src/cloudflare/types/healthcheck_get_response.py delete mode 100644 src/cloudflare/types/healthcheck_update_response.py delete mode 100644 src/cloudflare/types/healthchecks/preview_create_response.py delete mode 100644 src/cloudflare/types/healthchecks/preview_get_response.py rename src/cloudflare/types/{healthcheck_edit_response.py => healthchecks_healthchecks.py} (97%) rename src/cloudflare/types/hostnames/settings/{tls_update_response.py => tls_certificates_and_hostnames_setting_object.py} (85%) rename src/cloudflare/types/hostnames/settings/{tls_delete_response.py => tls_certificates_and_hostnames_setting_object_delete.py} (81%) rename src/cloudflare/types/images/{v1_get_response.py => images_image.py} (94%) rename src/cloudflare/types/images/v1/{variant_get_response.py => image_variant.py} (91%) rename src/cloudflare/types/images/v1/{variant_list_response.py => image_variants.py} (90%) rename src/cloudflare/types/images/v1/{key_list_response.py => images_image_keys.py} (80%) rename src/cloudflare/types/images/v1/{stat_get_response.py => images_images_stats.py} (81%) delete mode 100644 src/cloudflare/types/images/v1/variant_create_response.py delete mode 100644 src/cloudflare/types/images/v1/variant_edit_response.py delete mode 100644 src/cloudflare/types/images/v1_create_response.py delete mode 100644 src/cloudflare/types/images/v1_edit_response.py create mode 100644 src/cloudflare/types/intel/indicator_feeds/intel_permission_list_item.py rename src/cloudflare/types/intel/indicator_feeds/{permission_delete_response.py => intel_permissions_update.py} (71%) delete mode 100644 src/cloudflare/types/intel/indicator_feeds/permission_create_response.py rename src/cloudflare/types/intel/{asn_get_response.py => intel_asn.py} (52%) rename src/cloudflare/types/intel/{domain_get_response.py => intel_domain.py} (97%) create mode 100644 src/cloudflare/types/intel/intel_domain_history.py rename src/cloudflare/types/intel/{indicator_feed_create_response.py => intel_indicator_feed_item.py} (87%) rename src/cloudflare/types/intel/{indicator_feed_get_response.py => intel_indicator_feed_metadata.py} (90%) create mode 100644 src/cloudflare/types/intel/intel_ip_list.py rename src/cloudflare/types/intel/{dns_get_response.py => intel_passive_dns_by_ip.py} (90%) create mode 100644 src/cloudflare/types/intel/intel_schemas_ip.py create mode 100644 src/cloudflare/types/intel/intel_sinkholes_sinkhole_item.py rename src/cloudflare/types/intel/{indicator_feed_update_response.py => intel_update_feed.py} (79%) rename src/cloudflare/types/intel/{whois_get_response.py => intel_whois.py} (88%) rename src/cloudflare/types/{brand_protection_url_info_response.py => intel_phishing_url_info.py} (93%) rename src/cloudflare/types/{brand_protection_submit_response.py => intel_phishing_url_submit.py} (88%) delete mode 100644 src/cloudflare/types/keyless_certificate_create_response.py delete mode 100644 src/cloudflare/types/keyless_certificate_get_response.py delete mode 100644 src/cloudflare/types/kv/namespace_create_response.py create mode 100644 src/cloudflare/types/kv/namespaces/workers_kv_key.py rename src/cloudflare/types/kv/{namespace_list_response.py => workers_kv_namespace.py} (86%) rename src/cloudflare/types/{filter_delete_response.py => legacy_jhs_filter.py} (87%) delete mode 100644 src/cloudflare/types/load_balancers/monitor_create_response.py delete mode 100644 src/cloudflare/types/load_balancers/monitor_edit_response.py delete mode 100644 src/cloudflare/types/load_balancers/monitor_get_response.py delete mode 100644 src/cloudflare/types/load_balancers/monitor_update_response.py delete mode 100644 src/cloudflare/types/load_balancers/pool_create_response.py delete mode 100644 src/cloudflare/types/load_balancers/pool_edit_response.py delete mode 100644 src/cloudflare/types/load_balancers/pool_get_response.py delete mode 100644 src/cloudflare/types/load_balancers/pool_update_response.py delete mode 100644 src/cloudflare/types/load_balancers/preview_get_response.py rename src/cloudflare/types/logpush/{job_create_response.py => datasets/logpush_logpush_job.py} (97%) delete mode 100644 src/cloudflare/types/logpush/job_get_response.py delete mode 100644 src/cloudflare/types/logpush/job_update_response.py rename src/cloudflare/types/logpush/{edge_create_response.py => logpush_instant_logs_job.py} (90%) delete mode 100644 src/cloudflare/types/logs/control/cmb/config_create_response.py rename src/cloudflare/types/logs/control/cmb/{config_get_response.py => logcontrol_cmb_config.py} (73%) delete mode 100644 src/cloudflare/types/magic_network_monitoring/config_create_response.py delete mode 100644 src/cloudflare/types/magic_network_monitoring/config_edit_response.py delete mode 100644 src/cloudflare/types/magic_network_monitoring/config_get_response.py delete mode 100644 src/cloudflare/types/magic_network_monitoring/config_update_response.py delete mode 100644 src/cloudflare/types/magic_network_monitoring/configs/full_get_response.py rename src/cloudflare/types/magic_network_monitoring/{config_delete_response.py => magic_visibility_mnm_config.py} (82%) rename src/cloudflare/types/magic_network_monitoring/{rule_get_response.py => magic_visibility_mnm_rule.py} (95%) delete mode 100644 src/cloudflare/types/magic_network_monitoring/rule_create_response.py delete mode 100644 src/cloudflare/types/magic_network_monitoring/rule_delete_response.py delete mode 100644 src/cloudflare/types/magic_network_monitoring/rule_edit_response.py delete mode 100644 src/cloudflare/types/magic_network_monitoring/rule_update_response.py rename src/cloudflare/types/magic_network_monitoring/rules/{advertisement_edit_response.py => magic_visibility_mnm_rule_advertisable.py} (79%) delete mode 100644 src/cloudflare/types/mtls_certificate_delete_response.py create mode 100644 src/cloudflare/types/mtls_certificates/tls_certificates_and_hostnames_association_object.py rename src/cloudflare/types/{speed_schedule_get_response.py => observatory_schedule.py} (92%) rename src/cloudflare/types/{speed_trends_list_response.py => observatory_trend.py} (91%) delete mode 100644 src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_delete_response.py delete mode 100644 src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_get_response.py rename src/cloudflare/types/origin_tls_client_auth/hostnames/{certificate_create_response.py => tls_certificates_and_hostnames_schemas_certificate_object.py} (89%) rename src/cloudflare/types/origin_tls_client_auth/{hostname_get_response.py => tls_certificates_and_hostnames_hostname_certid_object.py} (94%) rename src/cloudflare/types/page_shield/{connection_get_response.py => page_shield_connection.py} (87%) rename src/cloudflare/types/page_shield/{policy_create_response.py => page_shield_pageshield_policy.py} (89%) create mode 100644 src/cloudflare/types/page_shield/page_shield_script.py delete mode 100644 src/cloudflare/types/page_shield/policy_get_response.py delete mode 100644 src/cloudflare/types/page_shield/policy_update_response.py rename src/cloudflare/types/{page_shield_list_response.py => page_shield_get_zone_settings.py} (88%) rename src/cloudflare/types/{page_shield_update_response.py => page_shield_update_zone_settings.py} (87%) delete mode 100644 src/cloudflare/types/pagerules/setting_list_response.py rename src/cloudflare/types/{rules/list_get_response.py => pagerules/zones_settings.py} (56%) rename src/cloudflare/types/pages/{projects/deployment_get_response.py => pages_deployments.py} (92%) create mode 100644 src/cloudflare/types/pages/pages_deployments_param.py rename src/cloudflare/types/pages/{project_get_response.py => pages_projects.py} (74%) delete mode 100644 src/cloudflare/types/pages/projects/deployment_create_response.py delete mode 100644 src/cloudflare/types/pages/projects/deployment_retry_response.py delete mode 100644 src/cloudflare/types/pages/projects/deployment_rollback_response.py rename src/cloudflare/types/pcaps/{ownership_validate_response.py => magic_visibility_pcaps_ownership.py} (89%) delete mode 100644 src/cloudflare/types/pcaps/ownership_create_response.py create mode 100644 src/cloudflare/types/queues/workers_consumer.py rename src/cloudflare/types/queues/{consumer_create_response.py => workers_consumer_created.py} (85%) rename src/cloudflare/types/queues/{consumer_update_response.py => workers_consumer_updated.py} (85%) delete mode 100644 src/cloudflare/types/r2/bucket_create_response.py rename src/cloudflare/types/r2/{bucket_get_response.py => r2_bucket.py} (85%) rename src/cloudflare/types/r2/{sippy_get_response.py => r2_sippy.py} (92%) delete mode 100644 src/cloudflare/types/r2/sippy_update_response.py delete mode 100644 src/cloudflare/types/rules/list_create_response.py delete mode 100644 src/cloudflare/types/rules/list_update_response.py create mode 100644 src/cloudflare/types/rules/lists_list.py delete mode 100644 src/cloudflare/types/ruleset_get_response.py delete mode 100644 src/cloudflare/types/ruleset_update_response.py delete mode 100644 src/cloudflare/types/rulesets/phase_get_response.py delete mode 100644 src/cloudflare/types/rulesets/phase_update_response.py delete mode 100644 src/cloudflare/types/rulesets/phases/version_get_response.py delete mode 100644 src/cloudflare/types/rulesets/phases/version_list_response.py delete mode 100644 src/cloudflare/types/rulesets/rule_create_response.py delete mode 100644 src/cloudflare/types/rulesets/rule_delete_response.py delete mode 100644 src/cloudflare/types/rulesets/rule_edit_response.py delete mode 100644 src/cloudflare/types/rulesets/version_get_response.py delete mode 100644 src/cloudflare/types/rulesets/version_list_response.py delete mode 100644 src/cloudflare/types/rulesets/versions/by_tag_get_response.py rename src/cloudflare/types/{ruleset_create_response.py => rulesets_ruleset_response.py} (99%) rename src/cloudflare/types/{ruleset_list_response.py => rulesets_rulesets_response.py} (89%) delete mode 100644 src/cloudflare/types/rum/rule_update_response.py rename src/cloudflare/types/rum/{rule_create_response.py => rum_rule.py} (90%) rename src/cloudflare/types/rum/{site_info_get_response.py => rum_site.py} (57%) delete mode 100644 src/cloudflare/types/rum/site_info_create_response.py delete mode 100644 src/cloudflare/types/rum/site_info_list_response.py delete mode 100644 src/cloudflare/types/rum/site_info_update_response.py delete mode 100644 src/cloudflare/types/secondary_dns/acl_create_response.py delete mode 100644 src/cloudflare/types/secondary_dns/acl_update_response.py delete mode 100644 src/cloudflare/types/secondary_dns/force_axfr_create_response.py delete mode 100644 src/cloudflare/types/secondary_dns/outgoing_disable_response.py delete mode 100644 src/cloudflare/types/secondary_dns/outgoing_enable_response.py delete mode 100644 src/cloudflare/types/secondary_dns/outgoing_force_notify_response.py delete mode 100644 src/cloudflare/types/secondary_dns/peer_create_response.py delete mode 100644 src/cloudflare/types/secondary_dns/peer_update_response.py rename src/cloudflare/types/secondary_dns/{acl_get_response.py => secondary_dns_acl.py} (89%) create 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_result.py create mode 100644 src/cloudflare/types/secondary_dns/secondary_dns_force_result.py rename src/cloudflare/types/secondary_dns/{peer_get_response.py => secondary_dns_peer.py} (93%) create mode 100644 src/cloudflare/types/secondary_dns/secondary_dns_schemas_force_result.py rename src/cloudflare/types/secondary_dns/{tsig_get_response.py => secondary_dns_tsig.py} (77%) delete mode 100644 src/cloudflare/types/secondary_dns/tsig_create_response.py delete mode 100644 src/cloudflare/types/secondary_dns/tsig_update_response.py rename src/cloudflare/types/{snippet_get_response.py => snippet.py} (83%) delete mode 100644 src/cloudflare/types/snippet_update_response.py rename src/cloudflare/types/speed/{availability_list_response.py => observatory_availabilities.py} (94%) rename src/cloudflare/types/speed/{test_get_response.py => observatory_page_test.py} (96%) delete mode 100644 src/cloudflare/types/speed/test_create_response.py create mode 100644 src/cloudflare/types/ssl/tls_certificates_and_hostnames_verification.py delete mode 100644 src/cloudflare/types/ssl/universal/setting_get_response.py rename src/cloudflare/types/ssl/universal/{setting_edit_response.py => tls_certificates_and_hostnames_universal.py} (92%) rename src/cloudflare/types/storage/{analytics_stored_response.py => workers_kv_components_schemas_result.py} (95%) rename src/cloudflare/types/storage/{analytics_list_response.py => workers_kv_schemas_result.py} (96%) delete mode 100644 src/cloudflare/types/stream/audio_track_copy_response.py delete mode 100644 src/cloudflare/types/stream/copy_create_response.py delete mode 100644 src/cloudflare/types/stream/live_input_create_response.py delete mode 100644 src/cloudflare/types/stream/live_input_update_response.py delete mode 100644 src/cloudflare/types/stream/live_inputs/output_update_response.py rename src/cloudflare/types/stream/live_inputs/{output_create_response.py => stream_output.py} (92%) rename src/cloudflare/types/stream/{audio_track_edit_response.py => stream_additional_audio.py} (89%) create mode 100644 src/cloudflare/types/stream/stream_captions.py rename src/cloudflare/types/stream/{clip_create_response.py => stream_clipping.py} (97%) rename src/cloudflare/types/stream/{key_create_response.py => stream_keys.py} (86%) rename src/cloudflare/types/stream/{live_input_get_response.py => stream_live_input.py} (96%) create mode 100644 src/cloudflare/types/stream/stream_watermarks.py rename src/cloudflare/types/{stream_get_response.py => stream_videos.py} (74%) rename src/cloudflare/types/{keyless_certificate_edit_response.py => tls_certificates_and_hostnames_base.py} (91%) rename src/cloudflare/types/{mtls_certificate_create_response.py => tls_certificates_and_hostnames_certificate_object_post.py} (89%) rename src/cloudflare/types/{client_certificate_get_response.py => tls_certificates_and_hostnames_client_certificate.py} (93%) rename src/cloudflare/types/{mtls_certificate_get_response.py => tls_certificates_and_hostnames_components_schemas_certificate_object.py} (85%) rename src/cloudflare/types/{custom_certificate_list_response.py => tls_certificates_and_hostnames_custom_certificate.py} (69%) create mode 100644 src/cloudflare/types/user/billing/bill_subs_api_billing_history.py delete mode 100644 src/cloudflare/types/user/firewall/access_rule_create_response.py delete mode 100644 src/cloudflare/types/user/firewall/access_rule_list_response.py rename src/cloudflare/types/user/firewall/{access_rule_edit_response.py => legacy_jhs_rule.py} (97%) rename src/cloudflare/types/user/{organization_list_response.py => iam_organization.py} (88%) create mode 100644 src/cloudflare/types/user/load_balancers/analytics/load_balancing_analytics.py rename src/cloudflare/types/user/load_balancers/{monitor_get_response.py => load_balancing_monitor.py} (97%) rename src/cloudflare/types/user/load_balancers/{pool_get_response.py => load_balancing_pool.py} (99%) create mode 100644 src/cloudflare/types/user/load_balancers/load_balancing_preview_result.py delete mode 100644 src/cloudflare/types/user/load_balancers/monitor_create_response.py delete mode 100644 src/cloudflare/types/user/load_balancers/monitor_edit_response.py delete mode 100644 src/cloudflare/types/user/load_balancers/monitor_update_response.py delete mode 100644 src/cloudflare/types/user/load_balancers/pool_create_response.py delete mode 100644 src/cloudflare/types/user/load_balancers/pool_edit_response.py delete mode 100644 src/cloudflare/types/user/load_balancers/pool_update_response.py delete mode 100644 src/cloudflare/types/user/load_balancers/preview_get_response.py rename src/cloudflare/types/{secondary_dns/outgoing/status_get_response.py => user/tokens/iam_value.py} (50%) delete mode 100644 src/cloudflare/types/user/tokens/value_update_response.py delete mode 100644 src/cloudflare/types/vectorize/index_get_response.py delete mode 100644 src/cloudflare/types/vectorize/index_update_response.py rename src/cloudflare/types/vectorize/{index_create_response.py => vectorize_create_index.py} (90%) rename src/cloudflare/types/vectorize/{index_delete_by_ids_response.py => vectorize_index_delete_vectors_by_id.py} (79%) rename src/cloudflare/types/vectorize/{index_upsert_response.py => vectorize_index_insert.py} (82%) rename src/cloudflare/types/vectorize/{index_query_response.py => vectorize_index_query.py} (87%) rename src/cloudflare/types/vectorize/{index_insert_response.py => vectorize_index_upsert.py} (82%) delete mode 100644 src/cloudflare/types/waiting_room_create_response.py delete mode 100644 src/cloudflare/types/waiting_room_edit_response.py delete mode 100644 src/cloudflare/types/waiting_room_update_response.py delete mode 100644 src/cloudflare/types/waiting_rooms/event_create_response.py delete mode 100644 src/cloudflare/types/waiting_rooms/event_edit_response.py delete mode 100644 src/cloudflare/types/waiting_rooms/event_get_response.py rename src/cloudflare/types/waiting_rooms/events/{detail_get_response.py => waitingroom_event_details_result.py} (95%) rename src/cloudflare/types/waiting_rooms/{event_update_response.py => waitingroom_event_result.py} (97%) create mode 100644 src/cloudflare/types/waiting_rooms/waitingroom_rule_result.py rename src/cloudflare/types/{waiting_room_get_response.py => waitingroom_waitingroom.py} (99%) rename src/cloudflare/types/web3/{hostname_create_response.py => dweb_config_web3_hostname.py} (91%) delete mode 100644 src/cloudflare/types/web3/hostname_edit_response.py delete mode 100644 src/cloudflare/types/web3/hostname_get_response.py delete mode 100644 src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_list_get_response.py rename src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/{entry_create_response.py => dweb_config_content_list_entry.py} (87%) create mode 100644 src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/dweb_config_content_list_entry_param.py delete mode 100644 src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_get_response.py delete mode 100644 src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_update_response.py rename src/cloudflare/types/web3/hostnames/ipfs_universal_paths/{content_list_update_response.py => dweb_config_content_list_details.py} (73%) delete mode 100644 src/cloudflare/types/workers/domain_update_response.py delete mode 100644 src/cloudflare/types/workers/route_update_response.py delete mode 100644 src/cloudflare/types/workers/scripts/content_update_response.py create mode 100644 src/cloudflare/types/workers/scripts/workers_schemas_binding.py delete mode 100644 src/cloudflare/types/workers/services/environments/content_update_response.py rename src/cloudflare/types/workers/{domain_get_response.py => workers_domain.py} (90%) rename src/cloudflare/types/workers/{filter_update_response.py => workers_filters.py} (68%) rename src/cloudflare/types/workers/{route_get_response.py => workers_routes.py} (77%) rename src/cloudflare/types/workers/{script_update_response.py => workers_script.py} (94%) delete mode 100644 src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_get_response.py delete mode 100644 src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_response.py delete mode 100644 src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/script_update_response.py create mode 100644 src/cloudflare/types/workers_for_platforms/dispatch/namespaces/workers_namespace_script.py rename src/cloudflare/types/{queue_get_response.py => workers_queue.py} (87%) rename src/cloudflare/types/{queue_create_response.py => workers_queue_created.py} (79%) rename src/cloudflare/types/{queue_update_response.py => workers_queue_updated.py} (79%) rename src/cloudflare/types/zero_trust/access/{application_get_response.py => access_apps.py} (99%) rename src/cloudflare/types/zero_trust/access/{bookmark_get_response.py => access_bookmarks.py} (90%) rename src/cloudflare/types/zero_trust/access/{certificate_get_response.py => access_certificates.py} (89%) rename src/cloudflare/types/zero_trust/access/{custom_page_get_response.py => access_custom_page.py} (88%) rename src/cloudflare/types/zero_trust/access/{custom_page_create_response.py => access_custom_page_without_html.py} (85%) rename src/cloudflare/types/zero_trust/access/{group_get_response.py => access_groups.py} (99%) rename src/cloudflare/types/zero_trust/access/{service_token_delete_response.py => access_service_tokens.py} (90%) rename src/cloudflare/types/zero_trust/access/{tag_get_response.py => access_tag.py} (85%) create mode 100644 src/cloudflare/types/zero_trust/access/access_users.py delete mode 100644 src/cloudflare/types/zero_trust/access/application_create_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/application_update_response.py create mode 100644 src/cloudflare/types/zero_trust/access/applications/access_ca.py rename src/cloudflare/types/zero_trust/access/applications/{policy_get_response.py => access_policies.py} (99%) delete mode 100644 src/cloudflare/types/zero_trust/access/applications/policy_create_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/applications/policy_update_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/bookmark_create_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/bookmark_update_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/certificate_create_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/certificate_update_response.py create mode 100644 src/cloudflare/types/zero_trust/access/certificates/access_settings.py create mode 100644 src/cloudflare/types/zero_trust/access/certificates/access_settings_param.py delete mode 100644 src/cloudflare/types/zero_trust/access/custom_page_update_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/group_create_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/group_update_response.py create mode 100644 src/cloudflare/types/zero_trust/access/logs/access_access_requests.py delete mode 100644 src/cloudflare/types/zero_trust/access/service_token_refresh_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/service_token_update_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/tag_create_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/tag_update_response.py rename src/cloudflare/types/zero_trust/access/users/{last_seen_identity_get_response.py => access_identity.py} (90%) rename src/cloudflare/types/zero_trust/{identity_provider_get_response.py => access_identity_providers.py} (99%) rename src/cloudflare/types/zero_trust/{organization_list_response.py => access_organizations.py} (96%) create mode 100644 src/cloudflare/types/zero_trust/access_seats.py delete mode 100644 src/cloudflare/types/zero_trust/devices/dex_test_create_response.py delete mode 100644 src/cloudflare/types/zero_trust/devices/dex_test_update_response.py delete mode 100644 src/cloudflare/types/zero_trust/devices/network_get_response.py delete mode 100644 src/cloudflare/types/zero_trust/devices/network_update_response.py create mode 100644 src/cloudflare/types/zero_trust/devices/policies/teams_devices_fallback_domain.py create mode 100644 src/cloudflare/types/zero_trust/devices/policies/teams_devices_fallback_domain_param.py create mode 100644 src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel.py create mode 100644 src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_include.py create mode 100644 src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_include_param.py create mode 100644 src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_param.py delete mode 100644 src/cloudflare/types/zero_trust/devices/policy_create_response.py delete mode 100644 src/cloudflare/types/zero_trust/devices/policy_edit_response.py delete mode 100644 src/cloudflare/types/zero_trust/devices/policy_get_response.py delete mode 100644 src/cloudflare/types/zero_trust/devices/posture_get_response.py delete mode 100644 src/cloudflare/types/zero_trust/devices/posture_update_response.py delete mode 100644 src/cloudflare/types/zero_trust/devices/postures/integration_create_response.py delete mode 100644 src/cloudflare/types/zero_trust/devices/postures/integration_get_response.py rename src/cloudflare/types/zero_trust/devices/postures/{integration_edit_response.py => teams_devices_device_posture_integrations.py} (90%) delete mode 100644 src/cloudflare/types/zero_trust/devices/setting_update_response.py rename src/cloudflare/types/zero_trust/devices/{dex_test_get_response.py => teams_devices_device_dex_test_schemas_http.py} (87%) rename src/cloudflare/types/zero_trust/devices/{network_create_response.py => teams_devices_device_managed_networks.py} (90%) rename src/cloudflare/types/zero_trust/devices/{posture_create_response.py => teams_devices_device_posture_rules.py} (99%) create mode 100644 src/cloudflare/types/zero_trust/devices/teams_devices_device_settings_policy.py rename src/cloudflare/types/zero_trust/devices/{setting_list_response.py => teams_devices_zero_trust_account_device_settings.py} (82%) rename src/cloudflare/types/zero_trust/dex/{http_test_get_response.py => digital_experience_monitoring_http_details.py} (98%) create mode 100644 src/cloudflare/types/zero_trust/dex/digital_experience_monitoring_tests.py rename src/cloudflare/types/zero_trust/dex/{traceroute_test_get_response.py => digital_experience_monitoring_traceroute_details.py} (98%) rename src/cloudflare/types/zero_trust/dex/{traceroute_test_percentiles_response.py => digital_experience_monitoring_traceroute_details_percentiles.py} (88%) rename src/cloudflare/types/zero_trust/dex/{traceroute_test_network_path_response.py => digital_experience_monitoring_traceroute_test_network_path.py} (89%) rename src/cloudflare/types/zero_trust/dex/fleet_status/{device_list_response.py => digital_experience_monitoring_device.py} (86%) rename src/cloudflare/types/zero_trust/dex/http_tests/{percentile_list_response.py => digital_experience_monitoring_http_details_percentiles.py} (87%) rename src/cloudflare/types/zero_trust/dex/tests/{unique_device_list_response.py => digital_experience_monitoring_unique_devices.py} (68%) rename src/cloudflare/types/zero_trust/dex/traceroute_test_results/{network_path_list_response.py => digital_experience_monitoring_traceroute_test_result_network_path.py} (89%) delete mode 100644 src/cloudflare/types/zero_trust/dlp/dataset_create_response.py delete mode 100644 src/cloudflare/types/zero_trust/dlp/dataset_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/dlp/dataset_update_response.py rename src/cloudflare/types/zero_trust/dlp/datasets/{upload_create_response.py => dlp_dataset_new_version.py} (72%) delete mode 100644 src/cloudflare/types/zero_trust/dlp/datasets/upload_edit_response.py rename src/cloudflare/types/zero_trust/dlp/{dataset_get_response.py => dlp_dataset.py} (87%) create mode 100644 src/cloudflare/types/zero_trust/dlp/dlp_dataset_array.py create mode 100644 src/cloudflare/types/zero_trust/dlp/dlp_dataset_creation.py create mode 100644 src/cloudflare/types/zero_trust/dlp/dlp_profiles.py delete mode 100644 src/cloudflare/types/zero_trust/dlp/profiles/custom_update_response.py rename src/cloudflare/types/zero_trust/dlp/profiles/{custom_get_response.py => dlp_custom_profile.py} (94%) rename src/cloudflare/types/zero_trust/dlp/profiles/{predefined_get_response.py => dlp_predefined_profile.py} (92%) delete mode 100644 src/cloudflare/types/zero_trust/dlp/profiles/predefined_update_response.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/audit_ssh_setting_update_response.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/list_get_response.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/list_update_response.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/location_create_response.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/location_update_response.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/logging_get_response.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/proxy_endpoint_create_response.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/proxy_endpoint_get_response.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/rule_get_response.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/rule_update_response.py create mode 100644 src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_app_types.py create mode 100644 src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_categories.py rename src/cloudflare/types/zero_trust/gateway/{logging_update_response.py => zero_trust_gateway_gateway_account_logging_settings.py} (83%) rename src/cloudflare/types/zero_trust/gateway/{list_edit_response.py => zero_trust_gateway_lists.py} (89%) rename src/cloudflare/types/zero_trust/gateway/{location_get_response.py => zero_trust_gateway_locations.py} (92%) rename src/cloudflare/types/zero_trust/gateway/{proxy_endpoint_edit_response.py => zero_trust_gateway_proxy_endpoints.py} (85%) rename src/cloudflare/types/zero_trust/gateway/{rule_create_response.py => zero_trust_gateway_rules.py} (99%) rename src/cloudflare/types/zero_trust/gateway/{audit_ssh_setting_get_response.py => zero_trust_gateway_settings.py} (80%) delete mode 100644 src/cloudflare/types/zero_trust/identity_provider_create_response.py delete mode 100644 src/cloudflare/types/zero_trust/identity_provider_update_response.py delete mode 100644 src/cloudflare/types/zero_trust/networks/route_create_response.py delete mode 100644 src/cloudflare/types/zero_trust/networks/route_delete_response.py delete mode 100644 src/cloudflare/types/zero_trust/networks/routes/ip_get_response.py delete mode 100644 src/cloudflare/types/zero_trust/networks/routes/network_create_response.py delete mode 100644 src/cloudflare/types/zero_trust/networks/routes/network_delete_response.py delete mode 100644 src/cloudflare/types/zero_trust/networks/routes/network_edit_response.py rename src/cloudflare/types/zero_trust/networks/{route_edit_response.py => tunnel_route.py} (93%) rename src/cloudflare/types/zero_trust/networks/{route_list_response.py => tunnel_teamnet.py} (95%) create mode 100644 src/cloudflare/types/zero_trust/networks/tunnel_virtual_network.py delete mode 100644 src/cloudflare/types/zero_trust/organization_create_response.py delete mode 100644 src/cloudflare/types/zero_trust/organization_update_response.py create mode 100644 src/cloudflare/types/zero_trust/teams_devices_devices.py rename src/cloudflare/types/zero_trust/{tunnel_get_response.py => tunnel_argo_tunnel.py} (93%) delete mode 100644 src/cloudflare/types/zero_trust/tunnel_create_response.py delete mode 100644 src/cloudflare/types/zero_trust/tunnel_delete_response.py rename src/cloudflare/types/zero_trust/tunnels/{connector_get_response.py => tunnel_tunnel_client.py} (96%) delete mode 100644 src/cloudflare/types/zones/settings/always_online_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/always_use_https_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/automatic_https_rewrite_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/brotli_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/browser_cache_ttl_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/browser_check_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/cache_level_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/challenge_ttl_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/cipher_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/development_mode_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/early_hint_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/email_obfuscation_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/font_setting_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/h2_prioritization_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/hotlink_protection_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/http2_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/http3_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/image_resizing_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/ip_geolocation_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/ipv6_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/min_tls_version_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/minify_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/mirage_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/mobile_redirect_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/nel_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/opportunistic_encryption_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/opportunistic_onion_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/orange_to_orange_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/origin_error_page_pass_thru_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/polish_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/prefetch_preload_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/proxy_read_timeout_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/pseudo_ipv4_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/response_buffering_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/rocket_loader_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/security_header_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/security_level_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/server_side_exclude_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/sort_query_string_for_cache_edit_response.py rename src/cloudflare/types/zones/settings/{font_setting_get_response.py => speed_cloudflare_fonts.py} (88%) delete mode 100644 src/cloudflare/types/zones/settings/ssl_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/ssl_recommender_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/tls_1_3_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/tls_client_auth_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/true_client_ip_header_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/waf_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/webp_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/websocket_edit_response.py delete mode 100644 src/cloudflare/types/zones/settings/zero_rtt_edit_response.py rename src/cloudflare/types/zones/settings/{zero_rtt_get_response.py => zones_0rtt.py} (89%) create mode 100644 src/cloudflare/types/zones/settings/zones_0rtt_param.py rename src/cloudflare/types/zones/settings/{advanced_ddos_get_response.py => zones_advanced_ddos.py} (88%) create mode 100644 src/cloudflare/types/zones/settings/zones_advanced_ddos_param.py rename src/cloudflare/types/zones/settings/{always_online_get_response.py => zones_always_online.py} (88%) create mode 100644 src/cloudflare/types/zones/settings/zones_always_online_param.py rename src/cloudflare/types/zones/settings/{always_use_https_get_response.py => zones_always_use_https.py} (87%) create mode 100644 src/cloudflare/types/zones/settings/zones_always_use_https_param.py rename src/cloudflare/types/zones/settings/{automatic_https_rewrite_get_response.py => zones_automatic_https_rewrites.py} (86%) create mode 100644 src/cloudflare/types/zones/settings/zones_automatic_https_rewrites_param.py rename src/cloudflare/types/zones/settings/{automatic_platform_optimization_get_response.py => zones_automatic_platform_optimization.py} (88%) rename src/cloudflare/types/zones/settings/{automatic_platform_optimization_edit_response.py => zones_automatic_platform_optimization_param.py} (64%) rename src/cloudflare/types/zones/settings/{brotli_get_response.py => zones_brotli.py} (89%) create mode 100644 src/cloudflare/types/zones/settings/zones_brotli_param.py rename src/cloudflare/types/zones/settings/{browser_cache_ttl_get_response.py => zones_browser_cache_ttl.py} (92%) create mode 100644 src/cloudflare/types/zones/settings/zones_browser_cache_ttl_param.py rename src/cloudflare/types/zones/settings/{browser_check_get_response.py => zones_browser_check.py} (88%) create mode 100644 src/cloudflare/types/zones/settings/zones_browser_check_param.py rename src/cloudflare/types/zones/settings/{response_buffering_get_response.py => zones_buffering.py} (87%) create mode 100644 src/cloudflare/types/zones/settings/zones_buffering_param.py rename src/cloudflare/types/zones/settings/{cache_level_get_response.py => zones_cache_level.py} (89%) create mode 100644 src/cloudflare/types/zones/settings/zones_cache_level_param.py rename src/cloudflare/types/zones/settings/{challenge_ttl_get_response.py => zones_challenge_ttl.py} (89%) create mode 100644 src/cloudflare/types/zones/settings/zones_challenge_ttl_param.py rename src/cloudflare/types/zones/settings/{cipher_get_response.py => zones_ciphers.py} (89%) create mode 100644 src/cloudflare/types/zones/settings/zones_ciphers_param.py rename src/cloudflare/types/zones/settings/{development_mode_get_response.py => zones_development_mode.py} (91%) create mode 100644 src/cloudflare/types/zones/settings/zones_development_mode_param.py rename src/cloudflare/types/zones/settings/{early_hint_get_response.py => zones_early_hints.py} (88%) create mode 100644 src/cloudflare/types/zones/settings/zones_early_hints_param.py rename src/cloudflare/types/zones/settings/{email_obfuscation_get_response.py => zones_email_obfuscation.py} (87%) create mode 100644 src/cloudflare/types/zones/settings/zones_email_obfuscation_param.py rename src/cloudflare/types/zones/settings/{h2_prioritization_get_response.py => zones_h2_prioritization.py} (87%) create mode 100644 src/cloudflare/types/zones/settings/zones_h2_prioritization_param.py rename src/cloudflare/types/zones/settings/{hotlink_protection_get_response.py => zones_hotlink_protection.py} (87%) create mode 100644 src/cloudflare/types/zones/settings/zones_hotlink_protection_param.py rename src/cloudflare/types/zones/settings/{http2_get_response.py => zones_http2.py} (89%) create mode 100644 src/cloudflare/types/zones/settings/zones_http2_param.py rename src/cloudflare/types/zones/settings/{http3_get_response.py => zones_http3.py} (89%) create mode 100644 src/cloudflare/types/zones/settings/zones_http3_param.py rename src/cloudflare/types/zones/settings/{image_resizing_get_response.py => zones_image_resizing.py} (88%) create mode 100644 src/cloudflare/types/zones/settings/zones_image_resizing_param.py rename src/cloudflare/types/zones/settings/{ip_geolocation_get_response.py => zones_ip_geolocation.py} (87%) create mode 100644 src/cloudflare/types/zones/settings/zones_ip_geolocation_param.py rename src/cloudflare/types/zones/settings/{ipv6_get_response.py => zones_ipv6.py} (90%) create mode 100644 src/cloudflare/types/zones/settings/zones_ipv6_param.py rename src/cloudflare/types/zones/settings/{min_tls_version_get_response.py => zones_min_tls_version.py} (88%) create mode 100644 src/cloudflare/types/zones/settings/zones_min_tls_version_param.py rename src/cloudflare/types/zones/settings/{minify_get_response.py => zones_minify.py} (92%) create mode 100644 src/cloudflare/types/zones/settings/zones_minify_param.py rename src/cloudflare/types/zones/settings/{mirage_get_response.py => zones_mirage.py} (89%) create mode 100644 src/cloudflare/types/zones/settings/zones_mirage_param.py rename src/cloudflare/types/zones/settings/{mobile_redirect_get_response.py => zones_mobile_redirect.py} (92%) create mode 100644 src/cloudflare/types/zones/settings/zones_mobile_redirect_param.py rename src/cloudflare/types/zones/settings/{nel_get_response.py => zones_nel.py} (89%) create mode 100644 src/cloudflare/types/zones/settings/zones_nel_param.py rename src/cloudflare/types/zones/settings/{opportunistic_encryption_get_response.py => zones_opportunistic_encryption.py} (85%) create mode 100644 src/cloudflare/types/zones/settings/zones_opportunistic_encryption_param.py rename src/cloudflare/types/zones/settings/{opportunistic_onion_get_response.py => zones_opportunistic_onion.py} (86%) create mode 100644 src/cloudflare/types/zones/settings/zones_opportunistic_onion_param.py rename src/cloudflare/types/zones/settings/{orange_to_orange_get_response.py => zones_orange_to_orange.py} (87%) create mode 100644 src/cloudflare/types/zones/settings/zones_orange_to_orange_param.py rename src/cloudflare/types/zones/settings/{origin_error_page_pass_thru_get_response.py => zones_origin_error_page_pass_thru.py} (85%) create mode 100644 src/cloudflare/types/zones/settings/zones_origin_error_page_pass_thru_param.py rename src/cloudflare/types/zones/settings/{polish_get_response.py => zones_polish.py} (89%) create mode 100644 src/cloudflare/types/zones/settings/zones_polish_param.py rename src/cloudflare/types/zones/settings/{prefetch_preload_get_response.py => zones_prefetch_preload.py} (87%) create mode 100644 src/cloudflare/types/zones/settings/zones_prefetch_preload_param.py rename src/cloudflare/types/zones/settings/{proxy_read_timeout_get_response.py => zones_proxy_read_timeout.py} (86%) create mode 100644 src/cloudflare/types/zones/settings/zones_proxy_read_timeout_param.py rename src/cloudflare/types/zones/settings/{pseudo_ipv4_get_response.py => zones_pseudo_ipv4.py} (89%) create mode 100644 src/cloudflare/types/zones/settings/zones_pseudo_ipv4_param.py rename src/cloudflare/types/zones/settings/{rocket_loader_get_response.py => zones_rocket_loader.py} (88%) create mode 100644 src/cloudflare/types/zones/settings/zones_rocket_loader_param.py rename src/cloudflare/types/zones/settings/{security_header_get_response.py => zones_security_header.py} (90%) create mode 100644 src/cloudflare/types/zones/settings/zones_security_header_param.py rename src/cloudflare/types/zones/settings/{security_level_get_response.py => zones_security_level.py} (88%) create mode 100644 src/cloudflare/types/zones/settings/zones_security_level_param.py rename src/cloudflare/types/zones/settings/{server_side_exclude_get_response.py => zones_server_side_exclude.py} (87%) create mode 100644 src/cloudflare/types/zones/settings/zones_server_side_exclude_param.py rename src/cloudflare/types/zones/settings/{sort_query_string_for_cache_get_response.py => zones_sort_query_string_for_cache.py} (85%) create mode 100644 src/cloudflare/types/zones/settings/zones_sort_query_string_for_cache_param.py rename src/cloudflare/types/zones/settings/{ssl_get_response.py => zones_ssl.py} (90%) create mode 100644 src/cloudflare/types/zones/settings/zones_ssl_param.py rename src/cloudflare/types/zones/settings/{ssl_recommender_get_response.py => zones_ssl_recommender.py} (80%) create mode 100644 src/cloudflare/types/zones/settings/zones_ssl_recommender_param.py rename src/cloudflare/types/zones/settings/{tls_1_3_get_response.py => zones_tls_1_3.py} (89%) create mode 100644 src/cloudflare/types/zones/settings/zones_tls_1_3_param.py rename src/cloudflare/types/zones/settings/{tls_client_auth_get_response.py => zones_tls_client_auth.py} (87%) create mode 100644 src/cloudflare/types/zones/settings/zones_tls_client_auth_param.py rename src/cloudflare/types/zones/settings/{true_client_ip_header_get_response.py => zones_true_client_ip_header.py} (86%) create mode 100644 src/cloudflare/types/zones/settings/zones_true_client_ip_header_param.py rename src/cloudflare/types/zones/settings/{waf_get_response.py => zones_waf.py} (90%) create mode 100644 src/cloudflare/types/zones/settings/zones_waf_param.py rename src/cloudflare/types/zones/settings/{webp_get_response.py => zones_webp.py} (90%) create mode 100644 src/cloudflare/types/zones/settings/zones_webp_param.py rename src/cloudflare/types/zones/settings/{websocket_get_response.py => zones_websockets.py} (88%) create mode 100644 src/cloudflare/types/zones/settings/zones_websockets_param.py create mode 100644 src/cloudflare/types/zones_page_rule.py diff --git a/api.md b/api.md index 7d263af0b..2b0d150c0 100644 --- a/api.md +++ b/api.md @@ -38,7 +38,7 @@ Methods: Types: ```python -from cloudflare.types.accounts import RoleListResponse, RoleGetResponse +from cloudflare.types.accounts import IamSchemasRole, RoleListResponse, RoleGetResponse ``` Methods: @@ -131,7 +131,7 @@ Methods: Types: ```python -from cloudflare.types.user.billing import HistoryGetResponse +from cloudflare.types.user.billing import BillSubsAPIBillingHistory, HistoryGetResponse ``` Methods: @@ -157,27 +157,27 @@ Methods: Types: ```python -from cloudflare.types.user.firewall import ( - AccessRuleCreateResponse, - AccessRuleListResponse, - AccessRuleDeleteResponse, - AccessRuleEditResponse, -) +from cloudflare.types.user.firewall import LegacyJhsRule, AccessRuleDeleteResponse ``` Methods: -- client.user.firewall.access_rules.create(\*\*params) -> Optional -- client.user.firewall.access_rules.list(\*\*params) -> SyncV4PagePaginationArray[AccessRuleListResponse] +- client.user.firewall.access_rules.create(\*\*params) -> Optional +- client.user.firewall.access_rules.list(\*\*params) -> SyncV4PagePaginationArray[LegacyJhsRule] - 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 Types: ```python -from cloudflare.types.user import InviteListResponse, InviteEditResponse, InviteGetResponse +from cloudflare.types.user import ( + IamSchemasInvite, + InviteListResponse, + InviteEditResponse, + InviteGetResponse, +) ``` Methods: @@ -194,12 +194,9 @@ Types: ```python from cloudflare.types.user.load_balancers import ( - MonitorCreateResponse, - MonitorUpdateResponse, + LoadBalancingMonitor, MonitorListResponse, MonitorDeleteResponse, - MonitorEditResponse, - MonitorGetResponse, MonitorPreviewResponse, MonitorReferencesResponse, ) @@ -207,12 +204,12 @@ from cloudflare.types.user.load_balancers import ( Methods: -- client.user.load_balancers.monitors.create(\*\*params) -> MonitorCreateResponse -- client.user.load_balancers.monitors.update(monitor_id, \*\*params) -> MonitorUpdateResponse +- 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.delete(monitor_id) -> MonitorDeleteResponse -- client.user.load_balancers.monitors.edit(monitor_id, \*\*params) -> MonitorEditResponse -- client.user.load_balancers.monitors.get(monitor_id) -> MonitorGetResponse +- client.user.load_balancers.monitors.edit(monitor_id, \*\*params) -> LoadBalancingMonitor +- client.user.load_balancers.monitors.get(monitor_id) -> LoadBalancingMonitor - client.user.load_balancers.monitors.preview(monitor_id, \*\*params) -> MonitorPreviewResponse - client.user.load_balancers.monitors.references(monitor_id) -> Optional @@ -222,12 +219,9 @@ Types: ```python from cloudflare.types.user.load_balancers import ( - PoolCreateResponse, - PoolUpdateResponse, + LoadBalancingPool, PoolListResponse, PoolDeleteResponse, - PoolEditResponse, - PoolGetResponse, PoolHealthResponse, PoolPreviewResponse, PoolReferencesResponse, @@ -236,12 +230,12 @@ from cloudflare.types.user.load_balancers import ( Methods: -- client.user.load_balancers.pools.create(\*\*params) -> PoolCreateResponse -- client.user.load_balancers.pools.update(pool_id, \*\*params) -> PoolUpdateResponse +- 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.delete(pool_id) -> PoolDeleteResponse -- client.user.load_balancers.pools.edit(pool_id, \*\*params) -> PoolEditResponse -- client.user.load_balancers.pools.get(pool_id) -> PoolGetResponse +- client.user.load_balancers.pools.edit(pool_id, \*\*params) -> LoadBalancingPool +- client.user.load_balancers.pools.get(pool_id) -> LoadBalancingPool - client.user.load_balancers.pools.health(pool_id) -> PoolHealthResponse - client.user.load_balancers.pools.preview(pool_id, \*\*params) -> PoolPreviewResponse - client.user.load_balancers.pools.references(pool_id) -> Optional @@ -251,12 +245,12 @@ Methods: Types: ```python -from cloudflare.types.user.load_balancers import PreviewGetResponse +from cloudflare.types.user.load_balancers import LoadBalancingPreviewResult ``` Methods: -- client.user.load_balancers.preview.get(preview_id) -> PreviewGetResponse +- client.user.load_balancers.preview.get(preview_id) -> LoadBalancingPreviewResult ### Analytics @@ -265,7 +259,7 @@ Methods: Types: ```python -from cloudflare.types.user.load_balancers.analytics import EventListResponse +from cloudflare.types.user.load_balancers.analytics import LoadBalancingAnalytics, EventListResponse ``` Methods: @@ -278,7 +272,7 @@ Types: ```python from cloudflare.types.user import ( - OrganizationListResponse, + IamOrganization, OrganizationDeleteResponse, OrganizationGetResponse, ) @@ -286,7 +280,7 @@ from cloudflare.types.user import ( Methods: -- client.user.organizations.list(\*\*params) -> SyncV4PagePaginationArray[OrganizationListResponse] +- client.user.organizations.list(\*\*params) -> SyncV4PagePaginationArray[IamOrganization] - client.user.organizations.delete(organization_id) -> OrganizationDeleteResponse - client.user.organizations.get(organization_id) -> OrganizationGetResponse @@ -296,6 +290,7 @@ Types: ```python from cloudflare.types.user import ( + BillSubsAPISubscription, SubscriptionUpdateResponse, SubscriptionDeleteResponse, SubscriptionEditResponse, @@ -351,12 +346,12 @@ Methods: Types: ```python -from cloudflare.types.user.tokens import ValueUpdateResponse +from cloudflare.types.user.tokens import IamValue ``` Methods: -- client.user.tokens.value.update(token_id, \*\*params) -> str +- client.user.tokens.value.update(token_id, \*\*params) -> str # Zones @@ -411,426 +406,402 @@ Methods: Types: ```python -from cloudflare.types.zones.settings import ZeroRTTEditResponse, ZeroRTTGetResponse +from cloudflare.types.zones.settings import Zones0rtt ``` 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 AdvancedDDOSGetResponse +from cloudflare.types.zones.settings import ZonesAdvancedDDOS ``` 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 AlwaysOnlineEditResponse, AlwaysOnlineGetResponse +from cloudflare.types.zones.settings import ZonesAlwaysOnline ``` 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 AlwaysUseHTTPSEditResponse, AlwaysUseHTTPSGetResponse +from cloudflare.types.zones.settings import ZonesAlwaysUseHTTPS ``` 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 ( - AutomaticHTTPSRewriteEditResponse, - AutomaticHTTPSRewriteGetResponse, -) +from cloudflare.types.zones.settings import ZonesAutomaticHTTPSRewrites ``` 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 ( - AutomaticPlatformOptimizationEditResponse, - AutomaticPlatformOptimizationGetResponse, -) +from cloudflare.types.zones.settings import ZonesAutomaticPlatformOptimization ``` 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 BrotliEditResponse, BrotliGetResponse +from cloudflare.types.zones.settings import ZonesBrotli ``` 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 BrowserCacheTTLEditResponse, BrowserCacheTTLGetResponse +from cloudflare.types.zones.settings import ZonesBrowserCacheTTL ``` 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 BrowserCheckEditResponse, BrowserCheckGetResponse +from cloudflare.types.zones.settings import ZonesBrowserCheck ``` 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 CacheLevelEditResponse, CacheLevelGetResponse +from cloudflare.types.zones.settings import ZonesCacheLevel ``` 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 ChallengeTTLEditResponse, ChallengeTTLGetResponse +from cloudflare.types.zones.settings import ZonesChallengeTTL ``` 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 CipherEditResponse, CipherGetResponse +from cloudflare.types.zones.settings import ZonesCiphers ``` 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 DevelopmentModeEditResponse, DevelopmentModeGetResponse +from cloudflare.types.zones.settings import ZonesDevelopmentMode ``` 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 EarlyHintEditResponse, EarlyHintGetResponse +from cloudflare.types.zones.settings import ZonesEarlyHints ``` 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 ( - EmailObfuscationEditResponse, - EmailObfuscationGetResponse, -) +from cloudflare.types.zones.settings import ZonesEmailObfuscation ``` 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 ( - H2PrioritizationEditResponse, - H2PrioritizationGetResponse, -) +from cloudflare.types.zones.settings import ZonesH2Prioritization ``` 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 ( - HotlinkProtectionEditResponse, - HotlinkProtectionGetResponse, -) +from cloudflare.types.zones.settings import ZonesHotlinkProtection ``` 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 HTTP2EditResponse, HTTP2GetResponse +from cloudflare.types.zones.settings import ZonesHTTP2 ``` 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 HTTP3EditResponse, HTTP3GetResponse +from cloudflare.types.zones.settings import ZonesHTTP3 ``` 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 ImageResizingEditResponse, ImageResizingGetResponse +from cloudflare.types.zones.settings import ZonesImageResizing ``` 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 IPGeolocationEditResponse, IPGeolocationGetResponse +from cloudflare.types.zones.settings import ZonesIPGeolocation ``` 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 IPV6EditResponse, IPV6GetResponse +from cloudflare.types.zones.settings import ZonesIPV6 ``` 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 MinTLSVersionEditResponse, MinTLSVersionGetResponse +from cloudflare.types.zones.settings import ZonesMinTLSVersion ``` 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 MinifyEditResponse, MinifyGetResponse +from cloudflare.types.zones.settings import ZonesMinify ``` 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 MirageEditResponse, MirageGetResponse +from cloudflare.types.zones.settings import ZonesMirage ``` 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 MobileRedirectEditResponse, MobileRedirectGetResponse +from cloudflare.types.zones.settings import ZonesMobileRedirect ``` 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 NELEditResponse, NELGetResponse +from cloudflare.types.zones.settings import ZonesNEL ``` 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 ( - OpportunisticEncryptionEditResponse, - OpportunisticEncryptionGetResponse, -) +from cloudflare.types.zones.settings import ZonesOpportunisticEncryption ``` 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 ( - OpportunisticOnionEditResponse, - OpportunisticOnionGetResponse, -) +from cloudflare.types.zones.settings import ZonesOpportunisticOnion ``` 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 OrangeToOrangeEditResponse, OrangeToOrangeGetResponse +from cloudflare.types.zones.settings import ZonesOrangeToOrange ``` 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 ( - OriginErrorPagePassThruEditResponse, - OriginErrorPagePassThruGetResponse, -) +from cloudflare.types.zones.settings import ZonesOriginErrorPagePassThru ``` 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 @@ -853,262 +824,247 @@ Methods: Types: ```python -from cloudflare.types.zones.settings import PolishEditResponse, PolishGetResponse +from cloudflare.types.zones.settings import ZonesPolish ``` 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 PrefetchPreloadEditResponse, PrefetchPreloadGetResponse +from cloudflare.types.zones.settings import ZonesPrefetchPreload ``` 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 ( - ProxyReadTimeoutEditResponse, - ProxyReadTimeoutGetResponse, -) +from cloudflare.types.zones.settings import ZonesProxyReadTimeout ``` 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 PseudoIPV4EditResponse, PseudoIPV4GetResponse +from cloudflare.types.zones.settings import ZonesPseudoIPV4 ``` 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 ( - ResponseBufferingEditResponse, - ResponseBufferingGetResponse, -) +from cloudflare.types.zones.settings import ZonesBuffering ``` 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 RocketLoaderEditResponse, RocketLoaderGetResponse +from cloudflare.types.zones.settings import ZonesRocketLoader ``` 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 SecurityHeaderEditResponse, SecurityHeaderGetResponse +from cloudflare.types.zones.settings import ZonesSecurityHeader ``` 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 SecurityLevelEditResponse, SecurityLevelGetResponse +from cloudflare.types.zones.settings import ZonesSecurityLevel ``` 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 ( - ServerSideExcludeEditResponse, - ServerSideExcludeGetResponse, -) +from cloudflare.types.zones.settings import ZonesServerSideExclude ``` 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 ( - SortQueryStringForCacheEditResponse, - SortQueryStringForCacheGetResponse, -) +from cloudflare.types.zones.settings import ZonesSortQueryStringForCache ``` 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 SSLEditResponse, SSLGetResponse +from cloudflare.types.zones.settings import ZonesSSL ``` 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 SSLRecommenderEditResponse, SSLRecommenderGetResponse +from cloudflare.types.zones.settings import ZonesSSLRecommender ``` 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 TLS1_3EditResponse, TLS1_3GetResponse +from cloudflare.types.zones.settings import ZonesTLS1_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 TLSClientAuthEditResponse, TLSClientAuthGetResponse +from cloudflare.types.zones.settings import ZonesTLSClientAuth ``` 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 ( - TrueClientIPHeaderEditResponse, - TrueClientIPHeaderGetResponse, -) +from cloudflare.types.zones.settings import ZonesTrueClientIPHeader ``` 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 WAFEditResponse, WAFGetResponse +from cloudflare.types.zones.settings import ZonesWAF ``` 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 WebpEditResponse, WebpGetResponse +from cloudflare.types.zones.settings import ZonesWebp ``` 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 WebsocketEditResponse, WebsocketGetResponse +from cloudflare.types.zones.settings import ZonesWebsockets ``` 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 FontSettingEditResponse, FontSettingGetResponse +from cloudflare.types.zones.settings import SpeedCloudflareFonts ``` 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 @@ -1193,24 +1149,17 @@ Methods: Types: ```python -from cloudflare.types.load_balancers import ( - MonitorCreateResponse, - MonitorUpdateResponse, - MonitorListResponse, - MonitorDeleteResponse, - MonitorEditResponse, - MonitorGetResponse, -) +from cloudflare.types.load_balancers import MonitorListResponse, MonitorDeleteResponse ``` Methods: -- client.load_balancers.monitors.create(\*, account_id, \*\*params) -> MonitorCreateResponse -- client.load_balancers.monitors.update(monitor_id, \*, account_id, \*\*params) -> MonitorUpdateResponse +- 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.delete(monitor_id, \*, account_id) -> MonitorDeleteResponse -- client.load_balancers.monitors.edit(monitor_id, \*, account_id, \*\*params) -> MonitorEditResponse -- client.load_balancers.monitors.get(monitor_id, \*, account_id) -> MonitorGetResponse +- client.load_balancers.monitors.edit(monitor_id, \*, account_id, \*\*params) -> LoadBalancingMonitor +- client.load_balancers.monitors.get(monitor_id, \*, account_id) -> LoadBalancingMonitor ### Previews @@ -1241,24 +1190,17 @@ Methods: Types: ```python -from cloudflare.types.load_balancers import ( - PoolCreateResponse, - PoolUpdateResponse, - PoolListResponse, - PoolDeleteResponse, - PoolEditResponse, - PoolGetResponse, -) +from cloudflare.types.load_balancers import PoolListResponse, PoolDeleteResponse ``` Methods: -- client.load_balancers.pools.create(\*, account_id, \*\*params) -> PoolCreateResponse -- client.load_balancers.pools.update(pool_id, \*, account_id, \*\*params) -> PoolUpdateResponse +- 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.delete(pool_id, \*, account_id) -> PoolDeleteResponse -- client.load_balancers.pools.edit(pool_id, \*, account_id, \*\*params) -> PoolEditResponse -- client.load_balancers.pools.get(pool_id, \*, account_id) -> PoolGetResponse +- client.load_balancers.pools.edit(pool_id, \*, account_id, \*\*params) -> LoadBalancingPool +- client.load_balancers.pools.get(pool_id, \*, account_id) -> LoadBalancingPool ### Health @@ -1287,15 +1229,9 @@ Methods: ## Previews -Types: - -```python -from cloudflare.types.load_balancers import PreviewGetResponse -``` - Methods: -- client.load_balancers.previews.get(preview_id, \*, account_id) -> PreviewGetResponse +- client.load_balancers.previews.get(preview_id, \*, account_id) -> LoadBalancingPreviewResult ## Regions @@ -1377,12 +1313,12 @@ Methods: Types: ```python -from cloudflare.types.cache import VariantDeleteResponse, VariantEditResponse, VariantGetResponse +from cloudflare.types.cache import CacheVariants, VariantEditResponse, VariantGetResponse ``` Methods: -- client.cache.variants.delete(\*, zone_id) -> VariantDeleteResponse +- client.cache.variants.delete(\*, zone_id) -> CacheVariants - client.cache.variants.edit(\*, zone_id, \*\*params) -> VariantEditResponse - client.cache.variants.get(\*, zone_id) -> VariantGetResponse @@ -1476,20 +1412,24 @@ Methods: Types: ```python -from cloudflare.types.ssl.universal import SettingEditResponse, SettingGetResponse +from cloudflare.types.ssl.universal import TLSCertificatesAndHostnamesUniversal ``` Methods: -- client.ssl.universal.settings.edit(\*, zone_id, \*\*params) -> SettingEditResponse -- client.ssl.universal.settings.get(\*, zone_id) -> SettingGetResponse +- client.ssl.universal.settings.edit(\*, zone_id, \*\*params) -> TLSCertificatesAndHostnamesUniversal +- client.ssl.universal.settings.get(\*, zone_id) -> TLSCertificatesAndHostnamesUniversal ## Verification Types: ```python -from cloudflare.types.ssl import VerificationEditResponse, VerificationGetResponse +from cloudflare.types.ssl import ( + TLSCertificatesAndHostnamesVerification, + VerificationEditResponse, + VerificationGetResponse, +) ``` Methods: @@ -1567,20 +1507,20 @@ Methods: Types: ```python -from cloudflare.types import AvailablePlanListResponse, AvailablePlanGetResponse +from cloudflare.types import BillSubsAPIAvailableRatePlan, AvailablePlanListResponse ``` Methods: - client.available_plans.list(zone_identifier) -> Optional -- client.available_plans.get(plan_identifier, \*, zone_identifier) -> AvailablePlanGetResponse +- client.available_plans.get(plan_identifier, \*, zone_identifier) -> BillSubsAPIAvailableRatePlan # AvailableRatePlans Types: ```python -from cloudflare.types import AvailableRatePlanGetResponse +from cloudflare.types import BillSubsRatePlan, AvailableRatePlanGetResponse ``` Methods: @@ -1594,38 +1534,29 @@ Methods: Types: ```python -from cloudflare.types.certificate_authorities import ( - HostnameAssociationUpdateResponse, - HostnameAssociationGetResponse, -) +from cloudflare.types.certificate_authorities import TLSCertificatesAndHostnamesHostnameAssociation ``` Methods: -- client.certificate_authorities.hostname_associations.update(\*, zone_id, \*\*params) -> HostnameAssociationUpdateResponse -- client.certificate_authorities.hostname_associations.get(\*, zone_id, \*\*params) -> HostnameAssociationGetResponse +- client.certificate_authorities.hostname_associations.update(\*, zone_id, \*\*params) -> TLSCertificatesAndHostnamesHostnameAssociation +- client.certificate_authorities.hostname_associations.get(\*, zone_id, \*\*params) -> TLSCertificatesAndHostnamesHostnameAssociation # ClientCertificates Types: ```python -from cloudflare.types import ( - ClientCertificateCreateResponse, - ClientCertificateListResponse, - ClientCertificateDeleteResponse, - ClientCertificateEditResponse, - ClientCertificateGetResponse, -) +from cloudflare.types import TLSCertificatesAndHostnamesClientCertificate ``` Methods: -- client.client_certificates.create(\*, zone_id, \*\*params) -> ClientCertificateCreateResponse -- client.client_certificates.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[ClientCertificateListResponse] -- client.client_certificates.delete(client_certificate_id, \*, zone_id) -> ClientCertificateDeleteResponse -- client.client_certificates.edit(client_certificate_id, \*, zone_id) -> ClientCertificateEditResponse -- client.client_certificates.get(client_certificate_id, \*, zone_id) -> ClientCertificateGetResponse +- 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 # CustomCertificates @@ -1633,8 +1564,8 @@ Types: ```python from cloudflare.types import ( + TLSCertificatesAndHostnamesCustomCertificate, CustomCertificateCreateResponse, - CustomCertificateListResponse, CustomCertificateDeleteResponse, CustomCertificateEditResponse, CustomCertificateGetResponse, @@ -1644,7 +1575,7 @@ from cloudflare.types import ( Methods: - client.custom_certificates.create(\*, zone_id, \*\*params) -> CustomCertificateCreateResponse -- client.custom_certificates.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[CustomCertificateListResponse] +- client.custom_certificates.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate] - 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 @@ -1667,6 +1598,7 @@ Types: ```python from cloudflare.types import ( + TLSCertificatesAndHostnamesCustomHostname, CustomHostnameCreateResponse, CustomHostnameListResponse, CustomHostnameDeleteResponse, @@ -1707,7 +1639,7 @@ Types: ```python from cloudflare.types import ( - CustomNameserverCreateResponse, + DNSCustomNameserversCustomNS, CustomNameserverDeleteResponse, CustomNameserverAvailabiltyResponse, CustomNameserverGetResponse, @@ -1717,7 +1649,7 @@ from cloudflare.types import ( Methods: -- client.custom_nameservers.create(\*, account_id, \*\*params) -> CustomNameserverCreateResponse +- client.custom_nameservers.create(\*, account_id, \*\*params) -> DNSCustomNameserversCustomNS - client.custom_nameservers.delete(custom_ns_id, \*, account_id) -> Optional - client.custom_nameservers.availabilty(\*, account_id) -> Optional - client.custom_nameservers.get(\*, account_id) -> Optional @@ -1731,27 +1663,7 @@ Types: ```python from cloudflare.types.dns import ( - DNSARecord, - DNSAAAARecord, - DNSCAARecord, - DNSCertRecord, - DNSCNAMERecord, - DNSDNSKEYRecord, - DNSDSRecord, - DNSHTTPSRecord, - DNSLOCRecord, - DNSMXRecord, - DNSNAPTRRecord, - DNSNSRecord, - DNSPTRRecord, DNSRecord, - DNSSMIMERecord, - DNSSRVRecord, - DNSSSHFPRecord, - DNSSVCBRecord, - DNSTLSARecord, - DNSTXTRecord, - DNSURIRecord, RecordCreateResponse, RecordUpdateResponse, RecordListResponse, @@ -1783,86 +1695,68 @@ Methods: Types: ```python -from cloudflare.types.dns.analytics import ReportGetResponse +from cloudflare.types.dns.analytics import DNSDNSAnalyticsAPIReport ``` Methods: -- client.dns.analytics.reports.get(identifier, \*\*params) -> ReportGetResponse +- client.dns.analytics.reports.get(identifier, \*\*params) -> DNSDNSAnalyticsAPIReport #### Bytimes Types: ```python -from cloudflare.types.dns.analytics.reports import BytimeGetResponse +from cloudflare.types.dns.analytics.reports import DNSDNSAnalyticsAPIReportBytime ``` Methods: -- client.dns.analytics.reports.bytimes.get(identifier, \*\*params) -> BytimeGetResponse +- client.dns.analytics.reports.bytimes.get(identifier, \*\*params) -> DNSDNSAnalyticsAPIReportBytime ## Firewall Types: ```python -from cloudflare.types.dns import ( - FirewallCreateResponse, - FirewallListResponse, - FirewallDeleteResponse, - FirewallEditResponse, - FirewallGetResponse, -) +from cloudflare.types.dns import DNSFirewallDNSFirewall, FirewallDeleteResponse ``` Methods: -- client.dns.firewall.create(\*, account_id, \*\*params) -> FirewallCreateResponse -- client.dns.firewall.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[FirewallListResponse] +- client.dns.firewall.create(\*, account_id, \*\*params) -> DNSFirewallDNSFirewall +- client.dns.firewall.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[DNSFirewallDNSFirewall] - client.dns.firewall.delete(dns_firewall_id, \*, account_id) -> FirewallDeleteResponse -- client.dns.firewall.edit(dns_firewall_id, \*, account_id, \*\*params) -> FirewallEditResponse -- client.dns.firewall.get(dns_firewall_id, \*, account_id) -> FirewallGetResponse +- client.dns.firewall.edit(dns_firewall_id, \*, account_id, \*\*params) -> DNSFirewallDNSFirewall +- client.dns.firewall.get(dns_firewall_id, \*, account_id) -> DNSFirewallDNSFirewall ### Analytics #### Reports -Types: - -```python -from cloudflare.types.dns.firewall.analytics import ReportGetResponse -``` - Methods: -- client.dns.firewall.analytics.reports.get(identifier, \*, account_identifier, \*\*params) -> ReportGetResponse +- client.dns.firewall.analytics.reports.get(identifier, \*, account_identifier, \*\*params) -> DNSDNSAnalyticsAPIReport ##### Bytimes -Types: - -```python -from cloudflare.types.dns.firewall.analytics.reports import BytimeGetResponse -``` - Methods: -- client.dns.firewall.analytics.reports.bytimes.get(identifier, \*, account_identifier, \*\*params) -> BytimeGetResponse +- client.dns.firewall.analytics.reports.bytimes.get(identifier, \*, account_identifier, \*\*params) -> DNSDNSAnalyticsAPIReportBytime # DNSSEC Types: ```python -from cloudflare.types import DNSSECDeleteResponse, DNSSECEditResponse, DNSSECGetResponse +from cloudflare.types import DNSSECDNSSEC, DNSSECDeleteResponse ``` Methods: - client.dnssec.delete(\*, zone_id) -> DNSSECDeleteResponse -- client.dnssec.edit(\*, zone_id, \*\*params) -> DNSSECEditResponse -- client.dnssec.get(\*, zone_id) -> DNSSECGetResponse +- client.dnssec.edit(\*, zone_id, \*\*params) -> DNSSECDNSSEC +- client.dnssec.get(\*, zone_id) -> DNSSECDNSSEC # EmailRouting @@ -1871,7 +1765,7 @@ Methods: Types: ```python -from cloudflare.types.email_routing import RoutingGetResponse +from cloudflare.types.email_routing import EmailSettings, RoutingGetResponse ``` Methods: @@ -1895,7 +1789,7 @@ Methods: Types: ```python -from cloudflare.types.email_routing.routing import DNSGetResponse +from cloudflare.types.email_routing.routing import EmailDNSRecord, DNSGetResponse ``` Methods: @@ -1920,6 +1814,7 @@ Types: ```python from cloudflare.types.email_routing.routing import ( + EmailRules, RuleCreateResponse, RuleUpdateResponse, RuleListResponse, @@ -1941,13 +1836,13 @@ Methods: Types: ```python -from cloudflare.types.email_routing.routing.rules import CatchAllUpdateResponse, CatchAllGetResponse +from cloudflare.types.email_routing.routing.rules import EmailCatchAllRule ``` Methods: -- client.email_routing.routing.rules.catch_alls.update(zone_identifier, \*\*params) -> CatchAllUpdateResponse -- client.email_routing.routing.rules.catch_alls.get(zone_identifier) -> CatchAllGetResponse +- client.email_routing.routing.rules.catch_alls.update(zone_identifier, \*\*params) -> EmailCatchAllRule +- client.email_routing.routing.rules.catch_alls.get(zone_identifier) -> EmailCatchAllRule ### Addresses @@ -1955,6 +1850,7 @@ Types: ```python from cloudflare.types.email_routing.routing import ( + EmailAddresses, AddressCreateResponse, AddressListResponse, AddressDeleteResponse, @@ -1974,22 +1870,16 @@ Methods: Types: ```python -from cloudflare.types import ( - FilterCreateResponse, - FilterUpdateResponse, - FilterListResponse, - FilterDeleteResponse, - FilterGetResponse, -) +from cloudflare.types import LegacyJhsFilter, FilterCreateResponse ``` Methods: - client.filters.create(zone_identifier, \*\*params) -> Optional -- client.filters.update(id, \*, zone_identifier, \*\*params) -> Optional -- client.filters.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[FilterListResponse] -- 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[LegacyJhsFilter] +- client.filters.delete(id, \*, zone_identifier) -> Optional +- client.filters.get(id, \*, zone_identifier) -> Optional # Firewall @@ -1998,46 +1888,33 @@ Methods: Types: ```python -from cloudflare.types.firewall import ( - LockdownCreateResponse, - LockdownUpdateResponse, - LockdownListResponse, - LockdownDeleteResponse, - LockdownGetResponse, -) +from cloudflare.types.firewall import LegacyJhsZonelockdown, 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[LockdownListResponse] +- 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.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 ( - RuleCreateResponse, - RuleUpdateResponse, - RuleListResponse, - RuleDeleteResponse, - RuleEditResponse, - RuleGetResponse, -) +from cloudflare.types.firewall import LegacyJhsFilterRule, 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[RuleListResponse] -- 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[LegacyJhsFilterRule] +- 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 @@ -2067,6 +1944,7 @@ Types: ```python from cloudflare.types.firewall import ( + LegacyJhsUARules, UARuleCreateResponse, UARuleUpdateResponse, UARuleListResponse, @@ -2090,22 +1968,16 @@ Methods: Types: ```python -from cloudflare.types.firewall.waf import ( - OverrideCreateResponse, - OverrideUpdateResponse, - OverrideListResponse, - OverrideDeleteResponse, - OverrideGetResponse, -) +from cloudflare.types.firewall.waf import LegacyJhsOverride, 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[OverrideListResponse] +- 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.delete(id, \*, zone_identifier) -> Optional -- client.firewall.waf.overrides.get(id, \*, zone_identifier) -> Optional +- client.firewall.waf.overrides.get(id, \*, zone_identifier) -> Optional ### Packages @@ -2126,7 +1998,7 @@ Types: ```python from cloudflare.types.firewall.waf.packages import ( - GroupListResponse, + WAFManagedRulesSchemasGroup, GroupEditResponse, GroupGetResponse, ) @@ -2134,7 +2006,7 @@ from cloudflare.types.firewall.waf.packages import ( Methods: -- client.firewall.waf.packages.groups.list(package_id, \*, zone_id, \*\*params) -> SyncV4PagePaginationArray[GroupListResponse] +- client.firewall.waf.packages.groups.list(package_id, \*, zone_id, \*\*params) -> SyncV4PagePaginationArray[WAFManagedRulesSchemasGroup] - 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 @@ -2144,7 +2016,7 @@ Types: ```python from cloudflare.types.firewall.waf.packages import ( - RuleListResponse, + WAFManagedRulesRule, RuleEditResponse, RuleGetResponse, ) @@ -2152,7 +2024,7 @@ from cloudflare.types.firewall.waf.packages import ( Methods: -- client.firewall.waf.packages.rules.list(package_id, \*, zone_id, \*\*params) -> SyncV4PagePaginationArray[RuleListResponse] +- client.firewall.waf.packages.rules.list(package_id, \*, zone_id, \*\*params) -> SyncV4PagePaginationArray[WAFManagedRulesRule] - client.firewall.waf.packages.rules.edit(rule_id, \*, zone_id, package_id, \*\*params) -> RuleEditResponse - client.firewall.waf.packages.rules.get(rule_id, \*, zone_id, package_id) -> RuleGetResponse @@ -2162,41 +2034,34 @@ Types: ```python from cloudflare.types import ( - HealthcheckCreateResponse, - HealthcheckUpdateResponse, + HealthchecksHealthchecks, HealthcheckListResponse, HealthcheckDeleteResponse, - HealthcheckEditResponse, - HealthcheckGetResponse, ) ``` Methods: -- client.healthchecks.create(zone_identifier, \*\*params) -> HealthcheckCreateResponse -- client.healthchecks.update(identifier, \*, zone_identifier, \*\*params) -> HealthcheckUpdateResponse +- client.healthchecks.create(zone_identifier, \*\*params) -> HealthchecksHealthchecks +- client.healthchecks.update(identifier, \*, zone_identifier, \*\*params) -> HealthchecksHealthchecks - client.healthchecks.list(zone_identifier) -> Optional - client.healthchecks.delete(identifier, \*, zone_identifier) -> HealthcheckDeleteResponse -- client.healthchecks.edit(identifier, \*, zone_identifier, \*\*params) -> HealthcheckEditResponse -- client.healthchecks.get(identifier, \*, zone_identifier) -> HealthcheckGetResponse +- client.healthchecks.edit(identifier, \*, zone_identifier, \*\*params) -> HealthchecksHealthchecks +- client.healthchecks.get(identifier, \*, zone_identifier) -> HealthchecksHealthchecks ## Previews Types: ```python -from cloudflare.types.healthchecks import ( - PreviewCreateResponse, - PreviewDeleteResponse, - PreviewGetResponse, -) +from cloudflare.types.healthchecks import PreviewDeleteResponse ``` Methods: -- client.healthchecks.previews.create(zone_identifier, \*\*params) -> PreviewCreateResponse +- client.healthchecks.previews.create(zone_identifier, \*\*params) -> HealthchecksHealthchecks - client.healthchecks.previews.delete(identifier, \*, zone_identifier) -> PreviewDeleteResponse -- client.healthchecks.previews.get(identifier, \*, zone_identifier) -> PreviewGetResponse +- client.healthchecks.previews.get(identifier, \*, zone_identifier) -> HealthchecksHealthchecks # KeylessCertificates @@ -2204,21 +2069,20 @@ Types: ```python from cloudflare.types import ( - KeylessCertificateCreateResponse, + TLSCertificatesAndHostnamesBase, + TLSCertificatesAndHostnamesKeylessCertificate, KeylessCertificateListResponse, KeylessCertificateDeleteResponse, - KeylessCertificateEditResponse, - KeylessCertificateGetResponse, ) ``` Methods: -- client.keyless_certificates.create(\*, zone_id, \*\*params) -> KeylessCertificateCreateResponse +- client.keyless_certificates.create(\*, zone_id, \*\*params) -> TLSCertificatesAndHostnamesBase - 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) -> KeylessCertificateEditResponse -- client.keyless_certificates.get(keyless_certificate_id, \*, zone_id) -> KeylessCertificateGetResponse +- client.keyless_certificates.edit(keyless_certificate_id, \*, zone_id, \*\*params) -> TLSCertificatesAndHostnamesBase +- client.keyless_certificates.get(keyless_certificate_id, \*, zone_id) -> TLSCertificatesAndHostnamesBase # Logpush @@ -2241,7 +2105,7 @@ Methods: Types: ```python -from cloudflare.types.logpush.datasets import JobGetResponse +from cloudflare.types.logpush.datasets import LogpushLogpushJob, JobGetResponse ``` Methods: @@ -2253,12 +2117,12 @@ Methods: Types: ```python -from cloudflare.types.logpush import EdgeCreateResponse, EdgeGetResponse +from cloudflare.types.logpush import LogpushInstantLogsJob, 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 @@ -2266,22 +2130,16 @@ Methods: Types: ```python -from cloudflare.types.logpush import ( - JobCreateResponse, - JobUpdateResponse, - JobListResponse, - JobDeleteResponse, - JobGetResponse, -) +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 @@ -2335,18 +2193,14 @@ Methods: Types: ```python -from cloudflare.types.logs.control.cmb import ( - ConfigCreateResponse, - ConfigDeleteResponse, - ConfigGetResponse, -) +from cloudflare.types.logs.control.cmb import LogcontrolCmbConfig, 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 @@ -2390,6 +2244,7 @@ Types: ```python from cloudflare.types import ( + TLSCertificatesAndHostnamesZoneAuthenticatedOriginPull, OriginTLSClientAuthCreateResponse, OriginTLSClientAuthListResponse, OriginTLSClientAuthDeleteResponse, @@ -2409,13 +2264,17 @@ Methods: Types: ```python -from cloudflare.types.origin_tls_client_auth import HostnameUpdateResponse, HostnameGetResponse +from cloudflare.types.origin_tls_client_auth import ( + TLSCertificatesAndHostnamesHostnameAuthenticatedOriginPull, + TLSCertificatesAndHostnamesHostnameCertidObject, + HostnameUpdateResponse, +) ``` Methods: - client.origin_tls_client_auth.hostnames.update(\*, zone_id, \*\*params) -> Optional -- client.origin_tls_client_auth.hostnames.get(hostname, \*, zone_id) -> HostnameGetResponse +- client.origin_tls_client_auth.hostnames.get(hostname, \*, zone_id) -> TLSCertificatesAndHostnamesHostnameCertidObject ### Certificates @@ -2423,19 +2282,17 @@ Types: ```python from cloudflare.types.origin_tls_client_auth.hostnames import ( - CertificateCreateResponse, + TLSCertificatesAndHostnamesSchemasCertificateObject, CertificateListResponse, - CertificateDeleteResponse, - CertificateGetResponse, ) ``` Methods: -- client.origin_tls_client_auth.hostnames.certificates.create(\*, zone_id, \*\*params) -> CertificateCreateResponse +- client.origin_tls_client_auth.hostnames.certificates.create(\*, zone_id, \*\*params) -> TLSCertificatesAndHostnamesSchemasCertificateObject - client.origin_tls_client_auth.hostnames.certificates.list(\*, zone_id) -> Optional -- client.origin_tls_client_auth.hostnames.certificates.delete(certificate_id, \*, zone_id) -> CertificateDeleteResponse -- client.origin_tls_client_auth.hostnames.certificates.get(certificate_id, \*, zone_id) -> CertificateGetResponse +- 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 ## Settings @@ -2456,6 +2313,7 @@ Types: ```python from cloudflare.types import ( + ZonesPageRule, PageruleCreateResponse, PageruleUpdateResponse, PageruleListResponse, @@ -2479,12 +2337,12 @@ Methods: Types: ```python -from cloudflare.types.pagerules import SettingListResponse +from cloudflare.types.pagerules import ZonesSettings ``` Methods: -- client.pagerules.settings.list(\*, zone_id) -> SettingListResponse +- client.pagerules.settings.list(\*, zone_id) -> ZonesSettings # RateLimits @@ -2492,6 +2350,7 @@ Types: ```python from cloudflare.types import ( + LegacyJhsRateLimits, RateLimitCreateResponse, RateLimitListResponse, RateLimitDeleteResponse, @@ -2515,12 +2374,12 @@ Methods: Types: ```python -from cloudflare.types.secondary_dns import ForceAxfrCreateResponse +from cloudflare.types.secondary_dns import SecondaryDNSForceResult ``` Methods: -- client.secondary_dns.force_axfrs.create(\*, zone_id) -> str +- client.secondary_dns.force_axfrs.create(\*, zone_id) -> str ## Incoming @@ -2548,12 +2407,12 @@ Types: ```python from cloudflare.types.secondary_dns import ( + SecondaryDNSDisableTransferResult, + SecondaryDNSEnableTransferResult, + SecondaryDNSSchemasForceResult, OutgoingCreateResponse, OutgoingUpdateResponse, OutgoingDeleteResponse, - OutgoingDisableResponse, - OutgoingEnableResponse, - OutgoingForceNotifyResponse, OutgoingGetResponse, ) ``` @@ -2563,88 +2422,64 @@ 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 -Types: - -```python -from cloudflare.types.secondary_dns.outgoing import StatusGetResponse -``` - Methods: -- client.secondary_dns.outgoing.status.get(\*, zone_id) -> str +- client.secondary_dns.outgoing.status.get(\*, zone_id) -> str ## ACLs Types: ```python -from cloudflare.types.secondary_dns import ( - ACLCreateResponse, - ACLUpdateResponse, - ACLListResponse, - ACLDeleteResponse, - ACLGetResponse, -) +from cloudflare.types.secondary_dns import SecondaryDNSACL, ACLListResponse, ACLDeleteResponse ``` Methods: -- client.secondary_dns.acls.create(\*, account_id, \*\*params) -> ACLCreateResponse -- client.secondary_dns.acls.update(acl_id, \*, account_id, \*\*params) -> ACLUpdateResponse +- 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.delete(acl_id, \*, account_id) -> ACLDeleteResponse -- client.secondary_dns.acls.get(acl_id, \*, account_id) -> ACLGetResponse +- client.secondary_dns.acls.get(acl_id, \*, account_id) -> SecondaryDNSACL ## Peers Types: ```python -from cloudflare.types.secondary_dns import ( - PeerCreateResponse, - PeerUpdateResponse, - PeerListResponse, - PeerDeleteResponse, - PeerGetResponse, -) +from cloudflare.types.secondary_dns import SecondaryDNSPeer, PeerListResponse, PeerDeleteResponse ``` Methods: -- client.secondary_dns.peers.create(\*, account_id, \*\*params) -> PeerCreateResponse -- client.secondary_dns.peers.update(peer_id, \*, account_id, \*\*params) -> PeerUpdateResponse +- 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.delete(peer_id, \*, account_id) -> PeerDeleteResponse -- client.secondary_dns.peers.get(peer_id, \*, account_id) -> PeerGetResponse +- client.secondary_dns.peers.get(peer_id, \*, account_id) -> SecondaryDNSPeer ## TSIGs Types: ```python -from cloudflare.types.secondary_dns import ( - TSIGCreateResponse, - TSIGUpdateResponse, - TSIGListResponse, - TSIGDeleteResponse, - TSIGGetResponse, -) +from cloudflare.types.secondary_dns import SecondaryDNSTSIG, TSIGListResponse, TSIGDeleteResponse ``` Methods: -- client.secondary_dns.tsigs.create(\*, account_id, \*\*params) -> TSIGCreateResponse -- client.secondary_dns.tsigs.update(tsig_id, \*, account_id, \*\*params) -> TSIGUpdateResponse +- 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.delete(tsig_id, \*, account_id) -> TSIGDeleteResponse -- client.secondary_dns.tsigs.get(tsig_id, \*, account_id) -> TSIGGetResponse +- client.secondary_dns.tsigs.get(tsig_id, \*, account_id) -> SecondaryDNSTSIG # WaitingRooms @@ -2652,24 +2487,21 @@ Types: ```python from cloudflare.types import ( - WaitingRoomCreateResponse, - WaitingRoomUpdateResponse, + WaitingroomWaitingroom, WaitingRoomListResponse, WaitingRoomDeleteResponse, - WaitingRoomEditResponse, - WaitingRoomGetResponse, WaitingRoomPreviewResponse, ) ``` Methods: -- client.waiting_rooms.create(zone_identifier, \*\*params) -> WaitingRoomCreateResponse -- client.waiting_rooms.update(waiting_room_id, \*, zone_identifier, \*\*params) -> WaitingRoomUpdateResponse +- client.waiting_rooms.create(zone_identifier, \*\*params) -> WaitingroomWaitingroom +- client.waiting_rooms.update(waiting_room_id, \*, zone_identifier, \*\*params) -> WaitingroomWaitingroom - 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) -> WaitingRoomEditResponse -- client.waiting_rooms.get(waiting_room_id, \*, zone_identifier) -> WaitingRoomGetResponse +- client.waiting_rooms.edit(waiting_room_id, \*, zone_identifier, \*\*params) -> WaitingroomWaitingroom +- client.waiting_rooms.get(waiting_room_id, \*, zone_identifier) -> WaitingroomWaitingroom - client.waiting_rooms.preview(zone_identifier, \*\*params) -> WaitingRoomPreviewResponse ## Events @@ -2678,35 +2510,32 @@ Types: ```python from cloudflare.types.waiting_rooms import ( - EventCreateResponse, - EventUpdateResponse, + WaitingroomEventResult, EventListResponse, EventDeleteResponse, - EventEditResponse, - EventGetResponse, ) ``` Methods: -- client.waiting_rooms.events.create(waiting_room_id, \*, zone_identifier, \*\*params) -> EventCreateResponse -- client.waiting_rooms.events.update(event_id, \*, zone_identifier, waiting_room_id, \*\*params) -> EventUpdateResponse +- 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.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) -> EventEditResponse -- client.waiting_rooms.events.get(event_id, \*, zone_identifier, waiting_room_id) -> EventGetResponse +- 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 ### Details Types: ```python -from cloudflare.types.waiting_rooms.events import DetailGetResponse +from cloudflare.types.waiting_rooms.events import WaitingroomEventDetailsResult ``` Methods: -- client.waiting_rooms.events.details.get(event_id, \*, zone_identifier, waiting_room_id) -> DetailGetResponse +- client.waiting_rooms.events.details.get(event_id, \*, zone_identifier, waiting_room_id) -> WaitingroomEventDetailsResult ## Rules @@ -2714,6 +2543,7 @@ Types: ```python from cloudflare.types.waiting_rooms import ( + WaitingroomRuleResult, RuleCreateResponse, RuleUpdateResponse, RuleListResponse, @@ -2768,21 +2598,19 @@ Types: ```python from cloudflare.types.web3 import ( - HostnameCreateResponse, + DwebConfigWeb3Hostname, HostnameListResponse, HostnameDeleteResponse, - HostnameEditResponse, - HostnameGetResponse, ) ``` Methods: -- client.web3.hostnames.create(zone_identifier, \*\*params) -> HostnameCreateResponse +- client.web3.hostnames.create(zone_identifier, \*\*params) -> DwebConfigWeb3Hostname - client.web3.hostnames.list(zone_identifier) -> Optional - client.web3.hostnames.delete(identifier, \*, zone_identifier) -> Optional -- client.web3.hostnames.edit(identifier, \*, zone_identifier, \*\*params) -> HostnameEditResponse -- client.web3.hostnames.get(identifier, \*, zone_identifier) -> HostnameGetResponse +- client.web3.hostnames.edit(identifier, \*, zone_identifier, \*\*params) -> DwebConfigWeb3Hostname +- client.web3.hostnames.get(identifier, \*, zone_identifier) -> DwebConfigWeb3Hostname ### IPFSUniversalPaths @@ -2791,16 +2619,13 @@ Methods: Types: ```python -from cloudflare.types.web3.hostnames.ipfs_universal_paths import ( - ContentListUpdateResponse, - ContentListGetResponse, -) +from cloudflare.types.web3.hostnames.ipfs_universal_paths import DwebConfigContentListDetails ``` Methods: -- client.web3.hostnames.ipfs_universal_paths.content_lists.update(identifier, \*, zone_identifier, \*\*params) -> ContentListUpdateResponse -- client.web3.hostnames.ipfs_universal_paths.content_lists.get(identifier, \*, zone_identifier) -> ContentListGetResponse +- 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 ##### Entries @@ -2808,21 +2633,19 @@ Types: ```python from cloudflare.types.web3.hostnames.ipfs_universal_paths.content_lists import ( - EntryCreateResponse, - EntryUpdateResponse, + DwebConfigContentListEntry, EntryListResponse, EntryDeleteResponse, - EntryGetResponse, ) ``` Methods: -- client.web3.hostnames.ipfs_universal_paths.content_lists.entries.create(identifier, \*, zone_identifier, \*\*params) -> EntryCreateResponse -- client.web3.hostnames.ipfs_universal_paths.content_lists.entries.update(content_list_entry_identifier, \*, zone_identifier, identifier, \*\*params) -> EntryUpdateResponse +- 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.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) -> EntryGetResponse +- client.web3.hostnames.ipfs_universal_paths.content_lists.entries.get(content_list_entry_identifier, \*, zone_identifier, identifier) -> DwebConfigContentListEntry # Workers @@ -2843,12 +2666,12 @@ Methods: Types: ```python -from cloudflare.types.workers import ScriptUpdateResponse, ScriptListResponse +from cloudflare.types.workers import WorkersScript, ScriptListResponse ``` Methods: -- client.workers.scripts.update(script_name, \*, account_id, \*\*params) -> ScriptUpdateResponse +- client.workers.scripts.update(script_name, \*, account_id, \*\*params) -> WorkersScript - client.workers.scripts.list(\*, account_id) -> ScriptListResponse - client.workers.scripts.delete(script_name, \*, account_id, \*\*params) -> None - client.workers.scripts.get(script_name, \*, account_id) -> BinaryAPIResponse @@ -2858,7 +2681,7 @@ Methods: Types: ```python -from cloudflare.types.workers.scripts import BindingGetResponse +from cloudflare.types.workers.scripts import WorkersSchemasBinding, BindingGetResponse ``` Methods: @@ -2907,15 +2730,9 @@ Methods: ### Content -Types: - -```python -from cloudflare.types.workers.scripts import ContentUpdateResponse -``` - Methods: -- client.workers.scripts.content.update(script_name, \*, account_id, \*\*params) -> ContentUpdateResponse +- client.workers.scripts.content.update(script_name, \*, account_id, \*\*params) -> WorkersScript ### ContentV2 @@ -2942,8 +2759,8 @@ Types: ```python from cloudflare.types.workers import ( + WorkersFilters, FilterCreateResponse, - FilterUpdateResponse, FilterListResponse, FilterDeleteResponse, ) @@ -2952,7 +2769,7 @@ from cloudflare.types.workers import ( Methods: - client.workers.filters.create(\*, zone_id, \*\*params) -> Optional -- client.workers.filters.update(filter_id, \*, zone_id, \*\*params) -> FilterUpdateResponse +- client.workers.filters.update(filter_id, \*, zone_id, \*\*params) -> WorkersFilters - client.workers.filters.list(\*, zone_id) -> FilterListResponse - client.workers.filters.delete(filter_id, \*, zone_id) -> Optional @@ -2962,21 +2779,20 @@ Types: ```python from cloudflare.types.workers import ( + WorkersRoutes, RouteCreateResponse, - RouteUpdateResponse, RouteListResponse, RouteDeleteResponse, - RouteGetResponse, ) ``` Methods: - client.workers.routes.create(\*, zone_id, \*\*params) -> RouteCreateResponse -- client.workers.routes.update(route_id, \*, zone_id, \*\*params) -> RouteUpdateResponse +- client.workers.routes.update(route_id, \*, zone_id, \*\*params) -> WorkersRoutes - client.workers.routes.list(\*, zone_id) -> RouteListResponse - client.workers.routes.delete(route_id, \*, zone_id) -> RouteDeleteResponse -- client.workers.routes.get(route_id, \*, zone_id) -> RouteGetResponse +- client.workers.routes.get(route_id, \*, zone_id) -> WorkersRoutes ## AccountSettings @@ -3022,15 +2838,15 @@ Methods: Types: ```python -from cloudflare.types.workers import DomainUpdateResponse, DomainListResponse, DomainGetResponse +from cloudflare.types.workers import WorkersDomain, DomainListResponse ``` Methods: -- client.workers.domains.update(\*, account_id, \*\*params) -> DomainUpdateResponse +- client.workers.domains.update(\*, account_id, \*\*params) -> WorkersDomain - client.workers.domains.list(\*, account_id, \*\*params) -> DomainListResponse - client.workers.domains.delete(domain_id, \*, account_id) -> None -- client.workers.domains.get(domain_id, \*, account_id) -> DomainGetResponse +- client.workers.domains.get(domain_id, \*, account_id) -> WorkersDomain ## Subdomains @@ -3051,15 +2867,9 @@ Methods: #### Content -Types: - -```python -from cloudflare.types.workers.services.environments import ContentUpdateResponse -``` - Methods: -- client.workers.services.environments.content.update(environment_name, \*, account_id, service_name, \*\*params) -> ContentUpdateResponse +- client.workers.services.environments.content.update(environment_name, \*, account_id, service_name, \*\*params) -> WorkersScript - client.workers.services.environments.content.get(environment_name, \*, account_id, service_name) -> BinaryAPIResponse #### Settings @@ -3082,19 +2892,14 @@ Methods: Types: ```python -from cloudflare.types.kv import ( - NamespaceCreateResponse, - NamespaceUpdateResponse, - NamespaceListResponse, - NamespaceDeleteResponse, -) +from cloudflare.types.kv import WorkersKVNamespace, NamespaceUpdateResponse, NamespaceDeleteResponse ``` Methods: -- client.kv.namespaces.create(\*, account_id, \*\*params) -> NamespaceCreateResponse +- client.kv.namespaces.create(\*, account_id, \*\*params) -> WorkersKVNamespace - client.kv.namespaces.update(namespace_id, \*, account_id, \*\*params) -> NamespaceUpdateResponse -- client.kv.namespaces.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[NamespaceListResponse] +- client.kv.namespaces.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[WorkersKVNamespace] - client.kv.namespaces.delete(namespace_id, \*, account_id) -> NamespaceDeleteResponse ### Bulk @@ -3115,7 +2920,7 @@ Methods: Types: ```python -from cloudflare.types.kv.namespaces import KeyListResponse +from cloudflare.types.kv.namespaces import WorkersKVKey, KeyListResponse ``` Methods: @@ -3159,7 +2964,7 @@ Methods: Types: ```python -from cloudflare.types.durable_objects import NamespaceListResponse +from cloudflare.types.durable_objects import WorkersNamespace, NamespaceListResponse ``` Methods: @@ -3171,7 +2976,7 @@ Methods: Types: ```python -from cloudflare.types.durable_objects.namespaces import ObjectListResponse +from cloudflare.types.durable_objects.namespaces import WorkersObject, ObjectListResponse ``` Methods: @@ -3184,21 +2989,21 @@ Types: ```python from cloudflare.types import ( - QueueCreateResponse, - QueueUpdateResponse, + WorkersQueue, + WorkersQueueCreated, + WorkersQueueUpdated, QueueListResponse, QueueDeleteResponse, - QueueGetResponse, ) ``` Methods: -- client.queues.create(\*, account_id, \*\*params) -> Optional -- client.queues.update(name, \*, account_id, \*\*params) -> Optional +- client.queues.create(\*, account_id, \*\*params) -> Optional +- client.queues.update(name, \*, account_id, \*\*params) -> Optional - client.queues.list(\*, account_id) -> Optional - client.queues.delete(name, \*, account_id) -> Optional -- client.queues.get(name, \*, account_id) -> Optional +- client.queues.get(name, \*, account_id) -> Optional ## Consumers @@ -3206,8 +3011,9 @@ Types: ```python from cloudflare.types.queues import ( - ConsumerCreateResponse, - ConsumerUpdateResponse, + WorkersConsumer, + WorkersConsumerCreated, + WorkersConsumerUpdated, ConsumerDeleteResponse, ConsumerGetResponse, ) @@ -3215,8 +3021,8 @@ from cloudflare.types.queues import ( Methods: -- client.queues.consumers.create(name, \*, account_id, \*\*params) -> Optional -- client.queues.consumers.update(consumer_name, \*, account_id, name, \*\*params) -> Optional +- client.queues.consumers.create(name, \*, account_id, \*\*params) -> Optional +- client.queues.consumers.update(consumer_name, \*, account_id, name, \*\*params) -> Optional - client.queues.consumers.delete(consumer_name, \*, account_id, name) -> Optional - client.queues.consumers.get(name, \*, account_id) -> Optional @@ -3238,54 +3044,49 @@ Methods: Types: ```python -from cloudflare.types import PageShieldUpdateResponse, PageShieldListResponse +from cloudflare.types import PageShieldGetZoneSettings, PageShieldUpdateZoneSettings ``` Methods: -- client.page_shield.update(\*, zone_id, \*\*params) -> PageShieldUpdateResponse -- client.page_shield.list(\*, zone_id) -> PageShieldListResponse +- client.page_shield.update(\*, zone_id, \*\*params) -> PageShieldUpdateZoneSettings +- client.page_shield.list(\*, zone_id) -> PageShieldGetZoneSettings ## Policies Types: ```python -from cloudflare.types.page_shield import ( - PolicyCreateResponse, - PolicyUpdateResponse, - PolicyListResponse, - PolicyGetResponse, -) +from cloudflare.types.page_shield import PageShieldPageshieldPolicy, PolicyListResponse ``` Methods: -- client.page_shield.policies.create(\*, zone_id, \*\*params) -> PolicyCreateResponse -- client.page_shield.policies.update(policy_id, \*, zone_id, \*\*params) -> PolicyUpdateResponse +- client.page_shield.policies.create(\*, zone_id, \*\*params) -> PageShieldPageshieldPolicy +- client.page_shield.policies.update(policy_id, \*, zone_id, \*\*params) -> PageShieldPageshieldPolicy - 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) -> PolicyGetResponse +- client.page_shield.policies.get(policy_id, \*, zone_id) -> PageShieldPageshieldPolicy ## Connections Types: ```python -from cloudflare.types.page_shield import ConnectionListResponse, ConnectionGetResponse +from cloudflare.types.page_shield import PageShieldConnection, ConnectionListResponse ``` Methods: - client.page_shield.connections.list(\*, zone_id, \*\*params) -> Optional -- client.page_shield.connections.get(connection_id, \*, zone_id) -> ConnectionGetResponse +- client.page_shield.connections.get(connection_id, \*, zone_id) -> PageShieldConnection ## Scripts Types: ```python -from cloudflare.types.page_shield import ScriptListResponse, ScriptGetResponse +from cloudflare.types.page_shield import PageShieldScript, ScriptListResponse, ScriptGetResponse ``` Methods: @@ -3298,87 +3099,52 @@ Methods: Types: ```python -from cloudflare.types import ( - RulesetCreateResponse, - RulesetUpdateResponse, - RulesetListResponse, - RulesetGetResponse, -) +from cloudflare.types import RulesetsRulesetResponse, RulesetsRulesetsResponse ``` Methods: -- client.rulesets.create(\*, account_id, zone_id, \*\*params) -> RulesetCreateResponse -- client.rulesets.update(ruleset_id, \*, account_id, zone_id, \*\*params) -> RulesetUpdateResponse -- client.rulesets.list(\*, account_id, zone_id) -> RulesetListResponse +- 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.delete(ruleset_id, \*, account_id, zone_id) -> None -- client.rulesets.get(ruleset_id, \*, account_id, zone_id) -> RulesetGetResponse +- client.rulesets.get(ruleset_id, \*, account_id, zone_id) -> RulesetsRulesetResponse ## Phases -Types: - -```python -from cloudflare.types.rulesets import PhaseUpdateResponse, PhaseGetResponse -``` - Methods: -- client.rulesets.phases.update(ruleset_phase, \*, account_id, zone_id, \*\*params) -> PhaseUpdateResponse -- client.rulesets.phases.get(ruleset_phase, \*, account_id, zone_id) -> PhaseGetResponse +- client.rulesets.phases.update(ruleset_phase, \*, account_id, zone_id, \*\*params) -> RulesetsRulesetResponse +- client.rulesets.phases.get(ruleset_phase, \*, account_id, zone_id) -> RulesetsRulesetResponse ### Versions -Types: - -```python -from cloudflare.types.rulesets.phases import VersionListResponse, VersionGetResponse -``` - Methods: -- client.rulesets.phases.versions.list(ruleset_phase, \*, account_id, zone_id) -> VersionListResponse -- client.rulesets.phases.versions.get(ruleset_version, \*, ruleset_phase, account_id, zone_id) -> VersionGetResponse +- client.rulesets.phases.versions.list(ruleset_phase, \*, account_id, zone_id) -> RulesetsRulesetsResponse +- client.rulesets.phases.versions.get(ruleset_version, \*, ruleset_phase, account_id, zone_id) -> RulesetsRulesetResponse ## Rules -Types: - -```python -from cloudflare.types.rulesets import RuleCreateResponse, RuleDeleteResponse, RuleEditResponse -``` - Methods: -- client.rulesets.rules.create(ruleset_id, \*, account_id, zone_id, \*\*params) -> RuleCreateResponse -- client.rulesets.rules.delete(rule_id, \*, ruleset_id, account_id, zone_id) -> RuleDeleteResponse -- client.rulesets.rules.edit(rule_id, \*, ruleset_id, account_id, zone_id, \*\*params) -> RuleEditResponse +- 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 ## Versions -Types: - -```python -from cloudflare.types.rulesets import VersionListResponse, VersionGetResponse -``` - Methods: -- client.rulesets.versions.list(ruleset_id, \*, account_id, zone_id) -> VersionListResponse +- client.rulesets.versions.list(ruleset_id, \*, account_id, zone_id) -> RulesetsRulesetsResponse - 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) -> VersionGetResponse +- client.rulesets.versions.get(ruleset_version, \*, ruleset_id, account_id, zone_id) -> RulesetsRulesetResponse ### ByTags -Types: - -```python -from cloudflare.types.rulesets.versions import ByTagGetResponse -``` - Methods: -- client.rulesets.versions.by_tags.get(rule_tag, \*, account_id, ruleset_id, ruleset_version) -> ByTagGetResponse +- client.rulesets.versions.by_tags.get(rule_tag, \*, account_id, ruleset_id, ruleset_version) -> RulesetsRulesetResponse # URLNormalization @@ -3479,10 +3245,10 @@ Types: ```python from cloudflare.types.addressing import ( + AddressingAddressMaps, AddressMapCreateResponse, AddressMapListResponse, AddressMapDeleteResponse, - AddressMapEditResponse, AddressMapGetResponse, ) ``` @@ -3492,7 +3258,7 @@ Methods: - client.addressing.address_maps.create(\*, account_id, \*\*params) -> AddressMapCreateResponse - client.addressing.address_maps.list(\*, account_id) -> Optional - client.addressing.address_maps.delete(address_map_id, \*, account_id) -> Optional -- client.addressing.address_maps.edit(address_map_id, \*, account_id, \*\*params) -> AddressMapEditResponse +- client.addressing.address_maps.edit(address_map_id, \*, account_id, \*\*params) -> AddressingAddressMaps - client.addressing.address_maps.get(address_map_id, \*, account_id) -> AddressMapGetResponse ### Accounts @@ -3564,21 +3330,19 @@ Types: ```python from cloudflare.types.addressing import ( - PrefixCreateResponse, + AddressingIpamPrefixes, PrefixListResponse, PrefixDeleteResponse, - PrefixEditResponse, - PrefixGetResponse, ) ``` Methods: -- client.addressing.prefixes.create(\*, account_id, \*\*params) -> PrefixCreateResponse +- client.addressing.prefixes.create(\*, account_id, \*\*params) -> AddressingIpamPrefixes - client.addressing.prefixes.list(\*, account_id) -> Optional - client.addressing.prefixes.delete(prefix_id, \*, account_id) -> Optional -- client.addressing.prefixes.edit(prefix_id, \*, account_id, \*\*params) -> PrefixEditResponse -- client.addressing.prefixes.get(prefix_id, \*, account_id) -> PrefixGetResponse +- client.addressing.prefixes.edit(prefix_id, \*, account_id, \*\*params) -> AddressingIpamPrefixes +- client.addressing.prefixes.get(prefix_id, \*, account_id) -> AddressingIpamPrefixes ### BGP @@ -3588,37 +3352,32 @@ Types: ```python from cloudflare.types.addressing.prefixes.bgp import ( - BindingCreateResponse, + AddressingServiceBinding, BindingListResponse, BindingDeleteResponse, - BindingGetResponse, ) ``` Methods: -- client.addressing.prefixes.bgp.bindings.create(prefix_id, \*, account_id, \*\*params) -> BindingCreateResponse +- 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.delete(binding_id, \*, account_id, prefix_id) -> BindingDeleteResponse -- client.addressing.prefixes.bgp.bindings.get(binding_id, \*, account_id, prefix_id) -> BindingGetResponse +- client.addressing.prefixes.bgp.bindings.get(binding_id, \*, account_id, prefix_id) -> AddressingServiceBinding #### Prefixes Types: ```python -from cloudflare.types.addressing.prefixes.bgp import ( - PrefixListResponse, - PrefixEditResponse, - PrefixGetResponse, -) +from cloudflare.types.addressing.prefixes.bgp import AddressingIpamBGPPrefixes, PrefixListResponse ``` Methods: - client.addressing.prefixes.bgp.prefixes.list(prefix_id, \*, account_id) -> Optional -- client.addressing.prefixes.bgp.prefixes.edit(bgp_prefix_id, \*, account_id, prefix_id, \*\*params) -> PrefixEditResponse -- client.addressing.prefixes.bgp.prefixes.get(bgp_prefix_id, \*, account_id, prefix_id) -> PrefixGetResponse +- 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 #### Statuses @@ -3639,7 +3398,7 @@ Types: ```python from cloudflare.types.addressing.prefixes import ( - DelegationCreateResponse, + AddressingIpamDelegations, DelegationListResponse, DelegationDeleteResponse, ) @@ -3647,7 +3406,7 @@ from cloudflare.types.addressing.prefixes import ( Methods: -- client.addressing.prefixes.delegations.create(prefix_id, \*, account_id, \*\*params) -> DelegationCreateResponse +- 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.delete(delegation_id, \*, account_id, prefix_id) -> DelegationDeleteResponse @@ -3682,13 +3441,13 @@ Methods: Types: ```python -from cloudflare.types import BrandProtectionSubmitResponse, BrandProtectionURLInfoResponse +from cloudflare.types import IntelPhishingURLInfo, IntelPhishingURLSubmit ``` Methods: -- client.brand_protection.submit(\*, account_id, \*\*params) -> BrandProtectionSubmitResponse -- client.brand_protection.url_info(\*, account_id, \*\*params) -> BrandProtectionURLInfoResponse +- client.brand_protection.submit(\*, account_id, \*\*params) -> IntelPhishingURLSubmit +- client.brand_protection.url_info(\*, account_id, \*\*params) -> IntelPhishingURLInfo # Diagnostics @@ -3697,7 +3456,7 @@ Methods: Types: ```python -from cloudflare.types.diagnostics import TracerouteCreateResponse +from cloudflare.types.diagnostics import MagicTransitTargetResult, TracerouteCreateResponse ``` Methods: @@ -3711,68 +3470,56 @@ Methods: Types: ```python -from cloudflare.types.images import ( - V1CreateResponse, - V1ListResponse, - V1DeleteResponse, - V1EditResponse, - V1GetResponse, -) +from cloudflare.types.images import ImagesImage, V1ListResponse, V1DeleteResponse ``` Methods: -- client.images.v1.create(\*, account_id, \*\*params) -> V1CreateResponse +- client.images.v1.create(\*, account_id, \*\*params) -> ImagesImage - 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) -> V1EditResponse -- client.images.v1.get(image_id, \*, account_id) -> V1GetResponse +- client.images.v1.edit(image_id, \*, account_id, \*\*params) -> ImagesImage +- client.images.v1.get(image_id, \*, account_id) -> ImagesImage ### Keys Types: ```python -from cloudflare.types.images.v1 import KeyListResponse +from cloudflare.types.images.v1 import ImagesImageKeys ``` Methods: -- client.images.v1.keys.list(\*, account_id) -> KeyListResponse +- client.images.v1.keys.list(\*, account_id) -> ImagesImageKeys ### Stats Types: ```python -from cloudflare.types.images.v1 import StatGetResponse +from cloudflare.types.images.v1 import ImagesImagesStats ``` Methods: -- client.images.v1.stats.get(\*, account_id) -> StatGetResponse +- client.images.v1.stats.get(\*, account_id) -> ImagesImagesStats ### Variants Types: ```python -from cloudflare.types.images.v1 import ( - VariantCreateResponse, - VariantListResponse, - VariantDeleteResponse, - VariantEditResponse, - VariantGetResponse, -) +from cloudflare.types.images.v1 import ImageVariant, ImageVariants, VariantDeleteResponse ``` Methods: -- client.images.v1.variants.create(\*, account_id, \*\*params) -> VariantCreateResponse -- client.images.v1.variants.list(\*, account_id) -> VariantListResponse +- client.images.v1.variants.create(\*, account_id, \*\*params) -> ImageVariant +- client.images.v1.variants.list(\*, account_id) -> ImageVariants - client.images.v1.variants.delete(variant_id, \*, account_id) -> VariantDeleteResponse -- client.images.v1.variants.edit(variant_id, \*, account_id, \*\*params) -> VariantEditResponse -- client.images.v1.variants.get(variant_id, \*, account_id) -> VariantGetResponse +- client.images.v1.variants.edit(variant_id, \*, account_id, \*\*params) -> ImageVariant +- client.images.v1.variants.get(variant_id, \*, account_id) -> ImageVariant ### Blobs @@ -3811,12 +3558,12 @@ Methods: Types: ```python -from cloudflare.types.intel import ASNGetResponse +from cloudflare.types.intel import IntelASN ``` Methods: -- client.intel.asn.get(asn, \*, account_id) -> ASNGetResponse +- client.intel.asn.get(asn, \*, account_id) -> IntelASN ### Subnets @@ -3835,24 +3582,24 @@ Methods: Types: ```python -from cloudflare.types.intel import DNSGetResponse +from cloudflare.types.intel import IntelPassiveDNSByIP ``` Methods: -- client.intel.dns.get(\*, account_id, \*\*params) -> DNSGetResponse +- client.intel.dns.get(\*, account_id, \*\*params) -> IntelPassiveDNSByIP ## Domains Types: ```python -from cloudflare.types.intel import DomainGetResponse +from cloudflare.types.intel import IntelDomain ``` Methods: -- client.intel.domains.get(\*, account_id, \*\*params) -> DomainGetResponse +- client.intel.domains.get(\*, account_id, \*\*params) -> IntelDomain ### Bulks @@ -3871,7 +3618,7 @@ Methods: Types: ```python -from cloudflare.types.intel import DomainHistoryGetResponse +from cloudflare.types.intel import IntelDomainHistory, DomainHistoryGetResponse ``` Methods: @@ -3883,7 +3630,7 @@ Methods: Types: ```python -from cloudflare.types.intel import IPGetResponse +from cloudflare.types.intel import IntelSchemasIP, IPGetResponse ``` Methods: @@ -3895,7 +3642,7 @@ Methods: Types: ```python -from cloudflare.types.intel import IPListGetResponse +from cloudflare.types.intel import IntelIPList, IPListGetResponse ``` Methods: @@ -3919,12 +3666,12 @@ Methods: Types: ```python -from cloudflare.types.intel import WhoisGetResponse +from cloudflare.types.intel import IntelWhois ``` Methods: -- client.intel.whois.get(\*, account_id, \*\*params) -> WhoisGetResponse +- client.intel.whois.get(\*, account_id, \*\*params) -> IntelWhois ## IndicatorFeeds @@ -3932,21 +3679,21 @@ Types: ```python from cloudflare.types.intel import ( - IndicatorFeedCreateResponse, - IndicatorFeedUpdateResponse, + IntelIndicatorFeedItem, + IntelIndicatorFeedMetadata, + IntelUpdateFeed, IndicatorFeedListResponse, IndicatorFeedDataResponse, - IndicatorFeedGetResponse, ) ``` 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.create(\*, account_id, \*\*params) -> IntelIndicatorFeedItem +- client.intel.indicator_feeds.update(feed_id, \*, account_id, \*\*params) -> IntelUpdateFeed - client.intel.indicator_feeds.list(\*, account_id) -> IndicatorFeedListResponse - client.intel.indicator_feeds.data(feed_id, \*, account_id) -> str -- client.intel.indicator_feeds.get(feed_id, \*, account_id) -> IndicatorFeedGetResponse +- client.intel.indicator_feeds.get(feed_id, \*, account_id) -> IntelIndicatorFeedMetadata ### Permissions @@ -3954,24 +3701,24 @@ Types: ```python from cloudflare.types.intel.indicator_feeds import ( - PermissionCreateResponse, + IntelPermissionListItem, + IntelPermissionsUpdate, PermissionListResponse, - PermissionDeleteResponse, ) ``` Methods: -- client.intel.indicator_feeds.permissions.create(\*, account_id, \*\*params) -> PermissionCreateResponse +- client.intel.indicator_feeds.permissions.create(\*, account_id, \*\*params) -> IntelPermissionsUpdate - client.intel.indicator_feeds.permissions.list(\*, account_id) -> PermissionListResponse -- client.intel.indicator_feeds.permissions.delete(\*, account_id, \*\*params) -> PermissionDeleteResponse +- client.intel.indicator_feeds.permissions.delete(\*, account_id, \*\*params) -> IntelPermissionsUpdate ## Sinkholes Types: ```python -from cloudflare.types.intel import SinkholeListResponse +from cloudflare.types.intel import IntelSinkholesSinkholeItem, SinkholeListResponse ``` Methods: @@ -4075,70 +3822,51 @@ Methods: Types: ```python -from cloudflare.types.magic_network_monitoring import ( - ConfigCreateResponse, - ConfigUpdateResponse, - ConfigDeleteResponse, - ConfigEditResponse, - ConfigGetResponse, -) +from cloudflare.types.magic_network_monitoring import MagicVisibilityMNMConfig ``` Methods: -- client.magic_network_monitoring.configs.create(account_identifier) -> ConfigCreateResponse -- client.magic_network_monitoring.configs.update(account_identifier) -> ConfigUpdateResponse -- client.magic_network_monitoring.configs.delete(account_identifier) -> ConfigDeleteResponse -- client.magic_network_monitoring.configs.edit(account_identifier) -> ConfigEditResponse -- client.magic_network_monitoring.configs.get(account_identifier) -> ConfigGetResponse +- client.magic_network_monitoring.configs.create(account_identifier) -> MagicVisibilityMNMConfig +- client.magic_network_monitoring.configs.update(account_identifier) -> MagicVisibilityMNMConfig +- client.magic_network_monitoring.configs.delete(account_identifier) -> MagicVisibilityMNMConfig +- client.magic_network_monitoring.configs.edit(account_identifier) -> MagicVisibilityMNMConfig +- client.magic_network_monitoring.configs.get(account_identifier) -> MagicVisibilityMNMConfig ### Full -Types: - -```python -from cloudflare.types.magic_network_monitoring.configs import FullGetResponse -``` - Methods: -- client.magic_network_monitoring.configs.full.get(account_identifier) -> FullGetResponse +- client.magic_network_monitoring.configs.full.get(account_identifier) -> MagicVisibilityMNMConfig ## Rules Types: ```python -from cloudflare.types.magic_network_monitoring import ( - RuleCreateResponse, - RuleUpdateResponse, - RuleListResponse, - RuleDeleteResponse, - RuleEditResponse, - RuleGetResponse, -) +from cloudflare.types.magic_network_monitoring import MagicVisibilityMNMRule, RuleListResponse ``` Methods: -- client.magic_network_monitoring.rules.create(account_identifier) -> Optional -- client.magic_network_monitoring.rules.update(account_identifier) -> Optional +- client.magic_network_monitoring.rules.create(account_identifier) -> Optional +- client.magic_network_monitoring.rules.update(account_identifier) -> Optional - client.magic_network_monitoring.rules.list(account_identifier) -> Optional -- client.magic_network_monitoring.rules.delete(rule_identifier, \*, account_identifier) -> Optional -- client.magic_network_monitoring.rules.edit(rule_identifier, \*, account_identifier) -> Optional -- client.magic_network_monitoring.rules.get(rule_identifier, \*, account_identifier) -> Optional +- client.magic_network_monitoring.rules.delete(rule_identifier, \*, account_identifier) -> Optional +- client.magic_network_monitoring.rules.edit(rule_identifier, \*, account_identifier) -> Optional +- client.magic_network_monitoring.rules.get(rule_identifier, \*, account_identifier) -> Optional ### Advertisements Types: ```python -from cloudflare.types.magic_network_monitoring.rules import AdvertisementEditResponse +from cloudflare.types.magic_network_monitoring.rules import MagicVisibilityMNMRuleAdvertisable ``` Methods: -- client.magic_network_monitoring.rules.advertisements.edit(rule_identifier, \*, account_identifier) -> Optional +- client.magic_network_monitoring.rules.advertisements.edit(rule_identifier, \*, account_identifier) -> Optional # MTLSCertificates @@ -4146,26 +3874,28 @@ Types: ```python from cloudflare.types import ( - MTLSCertificateCreateResponse, + TLSCertificatesAndHostnamesCertificateObjectPost, + TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, MTLSCertificateListResponse, - MTLSCertificateDeleteResponse, - MTLSCertificateGetResponse, ) ``` Methods: -- client.mtls_certificates.create(\*, account_id, \*\*params) -> MTLSCertificateCreateResponse +- client.mtls_certificates.create(\*, account_id, \*\*params) -> TLSCertificatesAndHostnamesCertificateObjectPost - client.mtls_certificates.list(\*, account_id) -> Optional -- client.mtls_certificates.delete(mtls_certificate_id, \*, account_id) -> MTLSCertificateDeleteResponse -- client.mtls_certificates.get(mtls_certificate_id, \*, account_id) -> MTLSCertificateGetResponse +- client.mtls_certificates.delete(mtls_certificate_id, \*, account_id) -> TLSCertificatesAndHostnamesComponentsSchemasCertificateObject +- client.mtls_certificates.get(mtls_certificate_id, \*, account_id) -> TLSCertificatesAndHostnamesComponentsSchemasCertificateObject ## Associations Types: ```python -from cloudflare.types.mtls_certificates import AssociationGetResponse +from cloudflare.types.mtls_certificates import ( + TLSCertificatesAndHostnamesAssociationObject, + AssociationGetResponse, +) ``` Methods: @@ -4180,11 +3910,12 @@ Types: ```python from cloudflare.types.pages import ( + PagesDeployments, + PagesProjects, ProjectCreateResponse, ProjectListResponse, ProjectDeleteResponse, ProjectEditResponse, - ProjectGetResponse, ProjectPurgeBuildCacheResponse, ) ``` @@ -4195,7 +3926,7 @@ Methods: - client.pages.projects.list(\*, account_id) -> ProjectListResponse - 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) -> ProjectGetResponse +- client.pages.projects.get(project_name, \*, account_id) -> PagesProjects - client.pages.projects.purge_build_cache(project_name, \*, account_id) -> object ### Deployments @@ -4203,24 +3934,17 @@ Methods: Types: ```python -from cloudflare.types.pages.projects import ( - DeploymentCreateResponse, - DeploymentListResponse, - DeploymentDeleteResponse, - DeploymentGetResponse, - DeploymentRetryResponse, - DeploymentRollbackResponse, -) +from cloudflare.types.pages.projects import DeploymentListResponse, DeploymentDeleteResponse ``` Methods: -- client.pages.projects.deployments.create(project_name, \*, account_id, \*\*params) -> DeploymentCreateResponse +- client.pages.projects.deployments.create(project_name, \*, account_id, \*\*params) -> PagesDeployments - client.pages.projects.deployments.list(project_name, \*, account_id) -> DeploymentListResponse - client.pages.projects.deployments.delete(deployment_id, \*, account_id, project_name) -> object -- client.pages.projects.deployments.get(deployment_id, \*, account_id, project_name) -> DeploymentGetResponse -- client.pages.projects.deployments.retry(deployment_id, \*, account_id, project_name) -> DeploymentRetryResponse -- client.pages.projects.deployments.rollback(deployment_id, \*, account_id, project_name) -> DeploymentRollbackResponse +- client.pages.projects.deployments.get(deployment_id, \*, account_id, project_name) -> PagesDeployments +- client.pages.projects.deployments.retry(deployment_id, \*, account_id, project_name) -> PagesDeployments +- client.pages.projects.deployments.rollback(deployment_id, \*, account_id, project_name) -> PagesDeployments #### History @@ -4277,19 +4001,15 @@ Methods: Types: ```python -from cloudflare.types.pcaps import ( - OwnershipCreateResponse, - OwnershipGetResponse, - OwnershipValidateResponse, -) +from cloudflare.types.pcaps import MagicVisibilityPCAPsOwnership, OwnershipGetResponse ``` Methods: -- client.pcaps.ownerships.create(\*, account_id, \*\*params) -> OwnershipCreateResponse +- client.pcaps.ownerships.create(\*, account_id, \*\*params) -> MagicVisibilityPCAPsOwnership - client.pcaps.ownerships.delete(ownership_id, \*, account_id) -> None - client.pcaps.ownerships.get(\*, account_id) -> Optional -- client.pcaps.ownerships.validate(\*, account_id, \*\*params) -> OwnershipValidateResponse +- client.pcaps.ownerships.validate(\*, account_id, \*\*params) -> MagicVisibilityPCAPsOwnership ## Downloads @@ -4304,7 +4024,12 @@ Methods: Types: ```python -from cloudflare.types.registrar import DomainUpdateResponse, DomainListResponse, DomainGetResponse +from cloudflare.types.registrar import ( + RegistrarAPIDomains, + DomainUpdateResponse, + DomainListResponse, + DomainGetResponse, +) ``` Methods: @@ -4334,22 +4059,16 @@ Methods: Types: ```python -from cloudflare.types.rules import ( - ListCreateResponse, - ListUpdateResponse, - ListListResponse, - ListDeleteResponse, - ListGetResponse, -) +from cloudflare.types.rules import ListsList, ListListResponse, ListDeleteResponse ``` Methods: -- client.rules.lists.create(\*, account_id, \*\*params) -> Optional -- client.rules.lists.update(list_id, \*, account_id, \*\*params) -> Optional +- 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.delete(list_id, \*, account_id) -> Optional -- client.rules.lists.get(list_id, \*, account_id) -> Optional +- client.rules.lists.get(list_id, \*, account_id) -> Optional ### BulkOperations @@ -4392,20 +4111,20 @@ Methods: Types: ```python -from cloudflare.types.storage import AnalyticsListResponse, AnalyticsStoredResponse +from cloudflare.types.storage import WorkersKVComponentsSchemasResult, WorkersKVSchemasResult ``` Methods: -- client.storage.analytics.list(\*, account_id, \*\*params) -> AnalyticsListResponse -- client.storage.analytics.stored(\*, account_id, \*\*params) -> AnalyticsStoredResponse +- client.storage.analytics.list(\*, account_id, \*\*params) -> WorkersKVSchemasResult +- client.storage.analytics.stored(\*, account_id, \*\*params) -> WorkersKVComponentsSchemasResult # Stream Types: ```python -from cloudflare.types import StreamListResponse, StreamGetResponse +from cloudflare.types import StreamVideos, StreamListResponse ``` Methods: @@ -4413,7 +4132,7 @@ Methods: - client.stream.create(\*, account_id) -> None - client.stream.list(\*, account_id, \*\*params) -> StreamListResponse - client.stream.delete(identifier, \*, account_id) -> None -- client.stream.get(identifier, \*, account_id) -> StreamGetResponse +- client.stream.get(identifier, \*, account_id) -> StreamVideos ## AudioTracks @@ -4421,9 +4140,8 @@ Types: ```python from cloudflare.types.stream import ( + StreamAdditionalAudio, AudioTrackDeleteResponse, - AudioTrackCopyResponse, - AudioTrackEditResponse, AudioTrackGetResponse, ) ``` @@ -4431,8 +4149,8 @@ from cloudflare.types.stream import ( Methods: - client.stream.audio_tracks.delete(audio_identifier, \*, account_id, identifier) -> AudioTrackDeleteResponse -- client.stream.audio_tracks.copy(identifier, \*, account_id, \*\*params) -> AudioTrackCopyResponse -- client.stream.audio_tracks.edit(audio_identifier, \*, account_id, identifier, \*\*params) -> AudioTrackEditResponse +- 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.get(identifier, \*, account_id) -> AudioTrackGetResponse ## Videos @@ -4452,24 +4170,18 @@ Methods: Types: ```python -from cloudflare.types.stream import ClipCreateResponse +from cloudflare.types.stream import StreamClipping ``` Methods: -- client.stream.clips.create(\*, account_id, \*\*params) -> ClipCreateResponse +- client.stream.clips.create(\*, account_id, \*\*params) -> StreamClipping ## Copies -Types: - -```python -from cloudflare.types.stream import CopyCreateResponse -``` - Methods: -- client.stream.copies.create(\*, account_id, \*\*params) -> CopyCreateResponse +- client.stream.copies.create(\*, account_id, \*\*params) -> StreamVideos ## DirectUploads @@ -4488,12 +4200,12 @@ Methods: Types: ```python -from cloudflare.types.stream import KeyCreateResponse, KeyDeleteResponse, KeyGetResponse +from cloudflare.types.stream import StreamKeys, KeyDeleteResponse, KeyGetResponse ``` Methods: -- client.stream.keys.create(\*, account_id) -> KeyCreateResponse +- client.stream.keys.create(\*, account_id) -> StreamKeys - client.stream.keys.delete(identifier, \*, account_id) -> KeyDeleteResponse - client.stream.keys.get(\*, account_id) -> KeyGetResponse @@ -4502,38 +4214,29 @@ Methods: Types: ```python -from cloudflare.types.stream import ( - LiveInputCreateResponse, - LiveInputUpdateResponse, - LiveInputListResponse, - LiveInputGetResponse, -) +from cloudflare.types.stream import StreamLiveInput, LiveInputListResponse ``` Methods: -- client.stream.live_inputs.create(\*, account_id, \*\*params) -> LiveInputCreateResponse -- client.stream.live_inputs.update(live_input_identifier, \*, account_id, \*\*params) -> LiveInputUpdateResponse +- client.stream.live_inputs.create(\*, account_id, \*\*params) -> StreamLiveInput +- client.stream.live_inputs.update(live_input_identifier, \*, account_id, \*\*params) -> StreamLiveInput - client.stream.live_inputs.list(\*, account_id, \*\*params) -> LiveInputListResponse - client.stream.live_inputs.delete(live_input_identifier, \*, account_id) -> None -- client.stream.live_inputs.get(live_input_identifier, \*, account_id) -> LiveInputGetResponse +- client.stream.live_inputs.get(live_input_identifier, \*, account_id) -> StreamLiveInput ### Outputs Types: ```python -from cloudflare.types.stream.live_inputs import ( - OutputCreateResponse, - OutputUpdateResponse, - OutputListResponse, -) +from cloudflare.types.stream.live_inputs import StreamOutput, OutputListResponse ``` Methods: -- client.stream.live_inputs.outputs.create(live_input_identifier, \*, account_id, \*\*params) -> OutputCreateResponse -- client.stream.live_inputs.outputs.update(output_identifier, \*, account_id, live_input_identifier, \*\*params) -> OutputUpdateResponse +- 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.delete(output_identifier, \*, account_id, live_input_identifier) -> None @@ -4543,6 +4246,7 @@ Types: ```python from cloudflare.types.stream import ( + StreamWatermarks, WatermarkCreateResponse, WatermarkListResponse, WatermarkDeleteResponse, @@ -4576,7 +4280,12 @@ Methods: Types: ```python -from cloudflare.types.stream import CaptionUpdateResponse, CaptionDeleteResponse, CaptionGetResponse +from cloudflare.types.stream import ( + StreamCaptions, + CaptionUpdateResponse, + CaptionDeleteResponse, + CaptionGetResponse, +) ``` Methods: @@ -4661,6 +4370,7 @@ Types: ```python from cloudflare.types.alerting.v3.destinations import ( + AaaPagerduty, PagerdutyCreateResponse, PagerdutyDeleteResponse, PagerdutyGetResponse, @@ -4681,11 +4391,11 @@ Types: ```python from cloudflare.types.alerting.v3.destinations import ( + AaaWebhooks, WebhookCreateResponse, WebhookUpdateResponse, WebhookListResponse, WebhookDeleteResponse, - WebhookGetResponse, ) ``` @@ -4695,19 +4405,19 @@ Methods: - client.alerting.v3.destinations.webhooks.update(webhook_id, \*, account_id, \*\*params) -> WebhookUpdateResponse - client.alerting.v3.destinations.webhooks.list(\*, account_id) -> Optional - client.alerting.v3.destinations.webhooks.delete(webhook_id, \*, account_id) -> Optional -- client.alerting.v3.destinations.webhooks.get(webhook_id, \*, account_id) -> WebhookGetResponse +- client.alerting.v3.destinations.webhooks.get(webhook_id, \*, account_id) -> AaaWebhooks ### Histories Types: ```python -from cloudflare.types.alerting.v3 import HistoryListResponse +from cloudflare.types.alerting.v3 import AaaHistory ``` Methods: -- client.alerting.v3.histories.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[HistoryListResponse] +- client.alerting.v3.histories.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[AaaHistory] ### Policies @@ -4715,11 +4425,11 @@ Types: ```python from cloudflare.types.alerting.v3 import ( + AaaPolicies, PolicyCreateResponse, PolicyUpdateResponse, PolicyListResponse, PolicyDeleteResponse, - PolicyGetResponse, ) ``` @@ -4729,7 +4439,7 @@ Methods: - client.alerting.v3.policies.update(policy_id, \*, account_id, \*\*params) -> PolicyUpdateResponse - client.alerting.v3.policies.list(\*, account_id) -> Optional - client.alerting.v3.policies.delete(policy_id, \*, account_id) -> Optional -- client.alerting.v3.policies.get(policy_id, \*, account_id) -> PolicyGetResponse +- client.alerting.v3.policies.get(policy_id, \*, account_id) -> AaaPolicies # D1 @@ -4739,20 +4449,20 @@ Types: ```python from cloudflare.types.d1 import ( - DatabaseCreateResponse, - DatabaseListResponse, + D1CreateDatabase, + D1DatabaseDetails, + D1QueryResult, DatabaseDeleteResponse, - DatabaseGetResponse, DatabaseQueryResponse, ) ``` Methods: -- client.d1.database.create(\*, account_id, \*\*params) -> DatabaseCreateResponse -- client.d1.database.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[DatabaseListResponse] +- client.d1.database.create(\*, account_id, \*\*params) -> D1CreateDatabase +- client.d1.database.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[D1CreateDatabase] - client.d1.database.delete(database_identifier, \*, account_identifier) -> Optional -- client.d1.database.get(database_identifier, \*, account_identifier) -> DatabaseGetResponse +- client.d1.database.get(database_identifier, \*, account_identifier) -> D1DatabaseDetails - client.d1.database.query(database_identifier, \*, account_identifier, \*\*params) -> DatabaseQueryResponse # R2 @@ -4762,34 +4472,29 @@ Methods: Types: ```python -from cloudflare.types.r2 import ( - BucketCreateResponse, - BucketListResponse, - BucketDeleteResponse, - BucketGetResponse, -) +from cloudflare.types.r2 import R2Bucket, BucketListResponse, BucketDeleteResponse ``` Methods: -- client.r2.buckets.create(\*, account_id, \*\*params) -> BucketCreateResponse +- client.r2.buckets.create(\*, account_id, \*\*params) -> R2Bucket - client.r2.buckets.list(\*, account_id, \*\*params) -> BucketListResponse - client.r2.buckets.delete(bucket_name, \*, account_id) -> object -- client.r2.buckets.get(bucket_name, \*, account_id) -> BucketGetResponse +- client.r2.buckets.get(bucket_name, \*, account_id) -> R2Bucket ## Sippy Types: ```python -from cloudflare.types.r2 import SippyUpdateResponse, SippyDeleteResponse, SippyGetResponse +from cloudflare.types.r2 import R2Sippy, SippyDeleteResponse ``` Methods: -- client.r2.sippy.update(bucket_name, \*, account_id, \*\*params) -> SippyUpdateResponse +- client.r2.sippy.update(bucket_name, \*, account_id, \*\*params) -> R2Sippy - client.r2.sippy.delete(bucket_name, \*, account_id) -> SippyDeleteResponse -- client.r2.sippy.get(bucket_name, \*, account_id) -> SippyGetResponse +- client.r2.sippy.get(bucket_name, \*, account_id) -> R2Sippy # WARPConnector @@ -4826,33 +4531,22 @@ Methods: Types: ```python -from cloudflare.types.workers_for_platforms.dispatch.namespaces import ( - ScriptUpdateResponse, - ScriptGetResponse, -) +from cloudflare.types.workers_for_platforms.dispatch.namespaces import WorkersNamespaceScript ``` Methods: -- client.workers_for_platforms.dispatch.namespaces.scripts.update(script_name, \*, account_id, dispatch_namespace, \*\*params) -> ScriptUpdateResponse +- 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) -> ScriptGetResponse +- client.workers_for_platforms.dispatch.namespaces.scripts.get(script_name, \*, account_id, dispatch_namespace) -> WorkersNamespaceScript ##### Content ###### Scripts -Types: - -```python -from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts.content import ( - ScriptUpdateResponse, -) -``` - Methods: -- client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.update(script_name, \*, account_id, dispatch_namespace, \*\*params) -> ScriptUpdateResponse +- client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.update(script_name, \*, account_id, dispatch_namespace, \*\*params) -> WorkersScript - client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.get(script_name, \*, account_id, dispatch_namespace) -> BinaryAPIResponse ###### Settings @@ -4892,7 +4586,7 @@ Methods: Types: ```python -from cloudflare.types.zero_trust import DeviceListResponse, DeviceGetResponse +from cloudflare.types.zero_trust import TeamsDevicesDevices, DeviceListResponse, DeviceGetResponse ``` Methods: @@ -4906,21 +4600,19 @@ Types: ```python from cloudflare.types.zero_trust.devices import ( - DEXTestCreateResponse, - DEXTestUpdateResponse, + TeamsDevicesDeviceDEXTestSchemasHTTP, DEXTestListResponse, DEXTestDeleteResponse, - DEXTestGetResponse, ) ``` 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 @@ -4928,21 +4620,19 @@ Types: ```python from cloudflare.types.zero_trust.devices import ( - NetworkCreateResponse, - NetworkUpdateResponse, + TeamsDevicesDeviceManagedNetworks, NetworkListResponse, NetworkDeleteResponse, - NetworkGetResponse, ) ``` 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 @@ -4950,21 +4640,19 @@ Types: ```python from cloudflare.types.zero_trust.devices import ( - PolicyCreateResponse, + TeamsDevicesDeviceSettingsPolicy, PolicyListResponse, PolicyDeleteResponse, - PolicyEditResponse, - PolicyGetResponse, ) ``` 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 @@ -4984,6 +4672,7 @@ Types: ```python from cloudflare.types.zero_trust.devices.policies import ( + TeamsDevicesSplitTunnel, ExcludeUpdateResponse, ExcludeListResponse, ExcludeGetResponse, @@ -5002,6 +4691,7 @@ Types: ```python from cloudflare.types.zero_trust.devices.policies import ( + TeamsDevicesFallbackDomain, FallbackDomainUpdateResponse, FallbackDomainListResponse, FallbackDomainGetResponse, @@ -5020,6 +4710,7 @@ Types: ```python from cloudflare.types.zero_trust.devices.policies import ( + TeamsDevicesSplitTunnelInclude, IncludeUpdateResponse, IncludeListResponse, IncludeGetResponse, @@ -5038,21 +4729,19 @@ Types: ```python from cloudflare.types.zero_trust.devices import ( - PostureCreateResponse, - PostureUpdateResponse, + TeamsDevicesDevicePostureRules, PostureListResponse, PostureDeleteResponse, - PostureGetResponse, ) ``` Methods: -- client.zero_trust.devices.postures.create(\*, account_id, \*\*params) -> Optional -- client.zero_trust.devices.postures.update(rule_id, \*, account_id, \*\*params) -> Optional +- client.zero_trust.devices.postures.create(\*, account_id, \*\*params) -> Optional +- client.zero_trust.devices.postures.update(rule_id, \*, account_id, \*\*params) -> Optional - client.zero_trust.devices.postures.list(\*, account_id) -> Optional - client.zero_trust.devices.postures.delete(rule_id, \*, account_id) -> Optional -- client.zero_trust.devices.postures.get(rule_id, \*, account_id) -> Optional +- client.zero_trust.devices.postures.get(rule_id, \*, account_id) -> Optional #### Integrations @@ -5060,21 +4749,19 @@ Types: ```python from cloudflare.types.zero_trust.devices.postures import ( - IntegrationCreateResponse, + TeamsDevicesDevicePostureIntegrations, IntegrationListResponse, IntegrationDeleteResponse, - IntegrationEditResponse, - IntegrationGetResponse, ) ``` Methods: -- client.zero_trust.devices.postures.integrations.create(\*, account_id, \*\*params) -> Optional +- client.zero_trust.devices.postures.integrations.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.devices.postures.integrations.list(\*, account_id) -> Optional - client.zero_trust.devices.postures.integrations.delete(integration_id, \*, account_id) -> Optional -- client.zero_trust.devices.postures.integrations.edit(integration_id, \*, account_id, \*\*params) -> Optional -- client.zero_trust.devices.postures.integrations.get(integration_id, \*, account_id) -> Optional +- client.zero_trust.devices.postures.integrations.edit(integration_id, \*, account_id, \*\*params) -> Optional +- client.zero_trust.devices.postures.integrations.get(integration_id, \*, account_id) -> Optional ### Revokes @@ -5093,13 +4780,13 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.devices import SettingUpdateResponse, SettingListResponse +from cloudflare.types.zero_trust.devices import TeamsDevicesZeroTrustAccountDeviceSettings ``` 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 ### Unrevokes @@ -5131,40 +4818,33 @@ Types: ```python from cloudflare.types.zero_trust import ( - IdentityProviderCreateResponse, - IdentityProviderUpdateResponse, + AccessIdentityProviders, IdentityProviderListResponse, IdentityProviderDeleteResponse, - IdentityProviderGetResponse, ) ``` Methods: -- client.zero_trust.identity_providers.create(\*, account_id, zone_id, \*\*params) -> IdentityProviderCreateResponse -- client.zero_trust.identity_providers.update(uuid, \*, account_id, zone_id, \*\*params) -> IdentityProviderUpdateResponse +- 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.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) -> IdentityProviderGetResponse +- client.zero_trust.identity_providers.get(uuid, \*, account_id, zone_id) -> AccessIdentityProviders ## Organizations Types: ```python -from cloudflare.types.zero_trust import ( - OrganizationCreateResponse, - OrganizationUpdateResponse, - OrganizationListResponse, - OrganizationRevokeUsersResponse, -) +from cloudflare.types.zero_trust import AccessOrganizations, OrganizationRevokeUsersResponse ``` Methods: -- client.zero_trust.organizations.create(\*, account_id, zone_id, \*\*params) -> OrganizationCreateResponse -- client.zero_trust.organizations.update(\*, account_id, zone_id, \*\*params) -> OrganizationUpdateResponse -- client.zero_trust.organizations.list(\*, account_id, zone_id) -> OrganizationListResponse +- 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.revoke_users(\*, account_id, zone_id, \*\*params) -> Optional ## Seats @@ -5172,7 +4852,7 @@ Methods: Types: ```python -from cloudflare.types.zero_trust import SeatEditResponse +from cloudflare.types.zero_trust import AccessSeats, SeatEditResponse ``` Methods: @@ -5187,22 +4867,20 @@ Types: ```python from cloudflare.types.zero_trust.access import ( - ApplicationCreateResponse, - ApplicationUpdateResponse, + AccessApps, ApplicationListResponse, ApplicationDeleteResponse, - ApplicationGetResponse, ApplicationRevokeTokensResponse, ) ``` Methods: -- client.zero_trust.access.applications.create(\*, account_id, zone_id, \*\*params) -> ApplicationCreateResponse -- client.zero_trust.access.applications.update(app_id, \*, account_id, zone_id, \*\*params) -> ApplicationUpdateResponse +- 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.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) -> ApplicationGetResponse +- client.zero_trust.access.applications.get(app_id, \*, account_id, zone_id) -> AccessApps - client.zero_trust.access.applications.revoke_tokens(app_id, \*, account_id, zone_id) -> object #### CAs @@ -5211,6 +4889,7 @@ Types: ```python from cloudflare.types.zero_trust.access.applications import ( + AccessCA, CACreateResponse, CAListResponse, CADeleteResponse, @@ -5243,21 +4922,19 @@ Types: ```python from cloudflare.types.zero_trust.access.applications import ( - PolicyCreateResponse, - PolicyUpdateResponse, + AccessPolicies, PolicyListResponse, PolicyDeleteResponse, - PolicyGetResponse, ) ``` Methods: -- client.zero_trust.access.applications.policies.create(uuid, \*, account_id, zone_id, \*\*params) -> PolicyCreateResponse -- client.zero_trust.access.applications.policies.update(uuid, \*, uuid1, account_id, zone_id, \*\*params) -> PolicyUpdateResponse +- 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.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) -> PolicyGetResponse +- client.zero_trust.access.applications.policies.get(uuid, \*, uuid1, account_id, zone_id) -> AccessPolicies ### Certificates @@ -5265,21 +4942,19 @@ Types: ```python from cloudflare.types.zero_trust.access import ( - CertificateCreateResponse, - CertificateUpdateResponse, + AccessCertificates, CertificateListResponse, CertificateDeleteResponse, - CertificateGetResponse, ) ``` Methods: -- client.zero_trust.access.certificates.create(\*, account_id, zone_id, \*\*params) -> CertificateCreateResponse -- client.zero_trust.access.certificates.update(uuid, \*, account_id, zone_id, \*\*params) -> CertificateUpdateResponse +- 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.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) -> CertificateGetResponse +- client.zero_trust.access.certificates.get(uuid, \*, account_id, zone_id) -> AccessCertificates #### Settings @@ -5287,6 +4962,7 @@ Types: ```python from cloudflare.types.zero_trust.access.certificates import ( + AccessSettings, SettingUpdateResponse, SettingListResponse, ) @@ -5302,22 +4978,16 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.access import ( - GroupCreateResponse, - GroupUpdateResponse, - GroupListResponse, - GroupDeleteResponse, - GroupGetResponse, -) +from cloudflare.types.zero_trust.access import AccessGroups, GroupListResponse, GroupDeleteResponse ``` Methods: -- client.zero_trust.access.groups.create(\*, account_id, zone_id, \*\*params) -> GroupCreateResponse -- client.zero_trust.access.groups.update(uuid, \*, account_id, zone_id, \*\*params) -> GroupUpdateResponse +- 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.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) -> GroupGetResponse +- client.zero_trust.access.groups.get(uuid, \*, account_id, zone_id) -> AccessGroups ### ServiceTokens @@ -5325,11 +4995,9 @@ Types: ```python from cloudflare.types.zero_trust.access import ( + AccessServiceTokens, ServiceTokenCreateResponse, - ServiceTokenUpdateResponse, ServiceTokenListResponse, - ServiceTokenDeleteResponse, - ServiceTokenRefreshResponse, ServiceTokenRotateResponse, ) ``` @@ -5337,10 +5005,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) -> ServiceTokenUpdateResponse +- client.zero_trust.access.service_tokens.update(uuid, \*, account_id, zone_id, \*\*params) -> AccessServiceTokens - client.zero_trust.access.service_tokens.list(\*, account_id, zone_id) -> Optional -- client.zero_trust.access.service_tokens.delete(uuid, \*, account_id, zone_id) -> ServiceTokenDeleteResponse -- client.zero_trust.access.service_tokens.refresh(uuid, \*, identifier) -> ServiceTokenRefreshResponse +- 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.rotate(uuid, \*, identifier) -> ServiceTokenRotateResponse ### Bookmarks @@ -5349,21 +5017,19 @@ Types: ```python from cloudflare.types.zero_trust.access import ( - BookmarkCreateResponse, - BookmarkUpdateResponse, + AccessBookmarks, BookmarkListResponse, BookmarkDeleteResponse, - BookmarkGetResponse, ) ``` Methods: -- client.zero_trust.access.bookmarks.create(uuid, \*, identifier) -> BookmarkCreateResponse -- client.zero_trust.access.bookmarks.update(uuid, \*, identifier) -> BookmarkUpdateResponse +- client.zero_trust.access.bookmarks.create(uuid, \*, identifier) -> AccessBookmarks +- client.zero_trust.access.bookmarks.update(uuid, \*, identifier) -> AccessBookmarks - 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) -> BookmarkGetResponse +- client.zero_trust.access.bookmarks.get(uuid, \*, identifier) -> AccessBookmarks ### Keys @@ -5386,7 +5052,7 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.access.logs import AccessRequestListResponse +from cloudflare.types.zero_trust.access.logs import AccessAccessRequests, AccessRequestListResponse ``` Methods: @@ -5398,7 +5064,7 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.access import UserListResponse +from cloudflare.types.zero_trust.access import AccessUsers, UserListResponse ``` Methods: @@ -5426,12 +5092,12 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.access.users import LastSeenIdentityGetResponse +from cloudflare.types.zero_trust.access.users import AccessIdentity ``` Methods: -- client.zero_trust.access.users.last_seen_identity.get(id, \*, identifier) -> LastSeenIdentityGetResponse +- client.zero_trust.access.users.last_seen_identity.get(id, \*, identifier) -> AccessIdentity #### FailedLogins @@ -5451,43 +5117,36 @@ Types: ```python from cloudflare.types.zero_trust.access import ( - CustomPageCreateResponse, - CustomPageUpdateResponse, + AccessCustomPage, + AccessCustomPageWithoutHTML, CustomPageListResponse, CustomPageDeleteResponse, - CustomPageGetResponse, ) ``` Methods: -- client.zero_trust.access.custom_pages.create(identifier, \*\*params) -> CustomPageCreateResponse -- client.zero_trust.access.custom_pages.update(uuid, \*, identifier, \*\*params) -> CustomPageUpdateResponse +- 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.list(identifier) -> Optional - client.zero_trust.access.custom_pages.delete(uuid, \*, identifier) -> CustomPageDeleteResponse -- client.zero_trust.access.custom_pages.get(uuid, \*, identifier) -> CustomPageGetResponse +- client.zero_trust.access.custom_pages.get(uuid, \*, identifier) -> AccessCustomPage ### Tags Types: ```python -from cloudflare.types.zero_trust.access import ( - TagCreateResponse, - TagUpdateResponse, - TagListResponse, - TagDeleteResponse, - TagGetResponse, -) +from cloudflare.types.zero_trust.access import AccessTag, TagListResponse, TagDeleteResponse ``` Methods: -- client.zero_trust.access.tags.create(identifier, \*\*params) -> TagCreateResponse -- client.zero_trust.access.tags.update(tag_name, \*, identifier, \*\*params) -> TagUpdateResponse +- 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.list(identifier) -> Optional - client.zero_trust.access.tags.delete(name, \*, identifier) -> TagDeleteResponse -- client.zero_trust.access.tags.get(name, \*, identifier) -> TagGetResponse +- client.zero_trust.access.tags.get(name, \*, identifier) -> AccessTag ## DEX @@ -5510,12 +5169,12 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.dex.fleet_status import DeviceListResponse +from cloudflare.types.zero_trust.dex.fleet_status import DigitalExperienceMonitoringDevice ``` Methods: -- client.zero_trust.dex.fleet_status.devices.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[DeviceListResponse] +- client.zero_trust.dex.fleet_status.devices.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[DigitalExperienceMonitoringDevice] #### Live @@ -5540,31 +5199,33 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.dex import HTTPTestGetResponse +from cloudflare.types.zero_trust.dex import DigitalExperienceMonitoringHTTPDetails ``` Methods: -- client.zero_trust.dex.http_tests.get(test_id, \*, account_id, \*\*params) -> HTTPTestGetResponse +- client.zero_trust.dex.http_tests.get(test_id, \*, account_id, \*\*params) -> DigitalExperienceMonitoringHTTPDetails #### Percentiles Types: ```python -from cloudflare.types.zero_trust.dex.http_tests import PercentileListResponse +from cloudflare.types.zero_trust.dex.http_tests import ( + DigitalExperienceMonitoringHTTPDetailsPercentiles, +) ``` Methods: -- client.zero_trust.dex.http_tests.percentiles.list(test_id, \*, account_id, \*\*params) -> PercentileListResponse +- client.zero_trust.dex.http_tests.percentiles.list(test_id, \*, account_id, \*\*params) -> DigitalExperienceMonitoringHTTPDetailsPercentiles ### Tests Types: ```python -from cloudflare.types.zero_trust.dex import TestListResponse +from cloudflare.types.zero_trust.dex import DigitalExperienceMonitoringTests, TestListResponse ``` Methods: @@ -5576,12 +5237,12 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.dex.tests import UniqueDeviceListResponse +from cloudflare.types.zero_trust.dex.tests import DigitalExperienceMonitoringUniqueDevices ``` Methods: -- client.zero_trust.dex.tests.unique_devices.list(\*, account_id, \*\*params) -> UniqueDeviceListResponse +- client.zero_trust.dex.tests.unique_devices.list(\*, account_id, \*\*params) -> DigitalExperienceMonitoringUniqueDevices ### TracerouteTestResults @@ -5590,12 +5251,14 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.dex.traceroute_test_results import NetworkPathListResponse +from cloudflare.types.zero_trust.dex.traceroute_test_results import ( + DigitalExperienceMonitoringTracerouteTestResultNetworkPath, +) ``` Methods: -- client.zero_trust.dex.traceroute_test_results.network_path.list(test_result_id, \*, account_id) -> NetworkPathListResponse +- client.zero_trust.dex.traceroute_test_results.network_path.list(test_result_id, \*, account_id) -> DigitalExperienceMonitoringTracerouteTestResultNetworkPath ### TracerouteTests @@ -5603,39 +5266,33 @@ Types: ```python from cloudflare.types.zero_trust.dex import ( - TracerouteTestGetResponse, - TracerouteTestNetworkPathResponse, - TracerouteTestPercentilesResponse, + DigitalExperienceMonitoringTracerouteDetails, + DigitalExperienceMonitoringTracerouteDetailsPercentiles, + DigitalExperienceMonitoringTracerouteTestNetworkPath, ) ``` Methods: -- client.zero_trust.dex.traceroute_tests.get(test_id, \*, account_id, \*\*params) -> TracerouteTestGetResponse -- client.zero_trust.dex.traceroute_tests.network_path(test_id, \*, account_id, \*\*params) -> TracerouteTestNetworkPathResponse -- client.zero_trust.dex.traceroute_tests.percentiles(test_id, \*, account_id, \*\*params) -> TracerouteTestPercentilesResponse +- client.zero_trust.dex.traceroute_tests.get(test_id, \*, account_id, \*\*params) -> DigitalExperienceMonitoringTracerouteDetails +- client.zero_trust.dex.traceroute_tests.network_path(test_id, \*, account_id, \*\*params) -> DigitalExperienceMonitoringTracerouteTestNetworkPath +- client.zero_trust.dex.traceroute_tests.percentiles(test_id, \*, account_id, \*\*params) -> DigitalExperienceMonitoringTracerouteDetailsPercentiles ## Tunnels Types: ```python -from cloudflare.types.zero_trust import ( - TunnelCreateResponse, - TunnelListResponse, - TunnelDeleteResponse, - TunnelEditResponse, - TunnelGetResponse, -) +from cloudflare.types.zero_trust import TunnelArgoTunnel, TunnelListResponse, TunnelEditResponse ``` Methods: -- client.zero_trust.tunnels.create(\*, account_id, \*\*params) -> TunnelCreateResponse +- client.zero_trust.tunnels.create(\*, account_id, \*\*params) -> TunnelArgoTunnel - client.zero_trust.tunnels.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[TunnelListResponse] -- client.zero_trust.tunnels.delete(tunnel_id, \*, account_id, \*\*params) -> TunnelDeleteResponse +- client.zero_trust.tunnels.delete(tunnel_id, \*, account_id, \*\*params) -> TunnelArgoTunnel - client.zero_trust.tunnels.edit(tunnel_id, \*, account_id, \*\*params) -> TunnelEditResponse -- client.zero_trust.tunnels.get(tunnel_id, \*, account_id) -> TunnelGetResponse +- client.zero_trust.tunnels.get(tunnel_id, \*, account_id) -> TunnelArgoTunnel ### Configurations @@ -5658,7 +5315,11 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.tunnels import ConnectionDeleteResponse, ConnectionGetResponse +from cloudflare.types.zero_trust.tunnels import ( + TunnelTunnelClient, + ConnectionDeleteResponse, + ConnectionGetResponse, +) ``` Methods: @@ -5680,15 +5341,9 @@ Methods: ### Connectors -Types: - -```python -from cloudflare.types.zero_trust.tunnels import ConnectorGetResponse -``` - Methods: -- client.zero_trust.tunnels.connectors.get(connector_id, \*, account_id, tunnel_id) -> ConnectorGetResponse +- client.zero_trust.tunnels.connectors.get(connector_id, \*, account_id, tunnel_id) -> TunnelTunnelClient ### Management @@ -5725,34 +5380,29 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.dlp import ( - DatasetCreateResponse, - DatasetUpdateResponse, - DatasetListResponse, - DatasetGetResponse, -) +from cloudflare.types.zero_trust.dlp import DLPDataset, DLPDatasetArray, DLPDatasetCreation ``` 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.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.delete(dataset_id, \*, account_id) -> None -- client.zero_trust.dlp.datasets.get(dataset_id, \*, account_id) -> Optional +- client.zero_trust.dlp.datasets.get(dataset_id, \*, account_id) -> Optional #### Upload Types: ```python -from cloudflare.types.zero_trust.dlp.datasets import UploadCreateResponse, UploadEditResponse +from cloudflare.types.zero_trust.dlp.datasets import DLPDatasetNewVersion ``` Methods: -- client.zero_trust.dlp.datasets.upload.create(dataset_id, \*, account_id) -> Optional -- client.zero_trust.dlp.datasets.upload.edit(version, \*, account_id, dataset_id) -> Optional +- client.zero_trust.dlp.datasets.upload.create(dataset_id, \*, account_id) -> Optional +- client.zero_trust.dlp.datasets.upload.edit(version, \*, account_id, dataset_id) -> Optional ### Patterns @@ -5784,7 +5434,7 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.dlp import ProfileListResponse, ProfileGetResponse +from cloudflare.types.zero_trust.dlp import DLPProfiles, ProfileListResponse, ProfileGetResponse ``` Methods: @@ -5798,32 +5448,31 @@ Types: ```python from cloudflare.types.zero_trust.dlp.profiles import ( + DLPCustomProfile, CustomCreateResponse, - CustomUpdateResponse, CustomDeleteResponse, - CustomGetResponse, ) ``` Methods: - client.zero_trust.dlp.profiles.customs.create(\*, account_id, \*\*params) -> Optional -- client.zero_trust.dlp.profiles.customs.update(profile_id, \*, account_id, \*\*params) -> CustomUpdateResponse +- client.zero_trust.dlp.profiles.customs.update(profile_id, \*, account_id, \*\*params) -> DLPCustomProfile - client.zero_trust.dlp.profiles.customs.delete(profile_id, \*, account_id) -> CustomDeleteResponse -- client.zero_trust.dlp.profiles.customs.get(profile_id, \*, account_id) -> CustomGetResponse +- client.zero_trust.dlp.profiles.customs.get(profile_id, \*, account_id) -> DLPCustomProfile #### Predefineds Types: ```python -from cloudflare.types.zero_trust.dlp.profiles import PredefinedUpdateResponse, PredefinedGetResponse +from cloudflare.types.zero_trust.dlp.profiles import DLPPredefinedProfile ``` Methods: -- client.zero_trust.dlp.profiles.predefineds.update(profile_id, \*, account_id, \*\*params) -> PredefinedUpdateResponse -- client.zero_trust.dlp.profiles.predefineds.get(profile_id, \*, account_id) -> PredefinedGetResponse +- client.zero_trust.dlp.profiles.predefineds.update(profile_id, \*, account_id, \*\*params) -> DLPPredefinedProfile +- client.zero_trust.dlp.profiles.predefineds.get(profile_id, \*, account_id) -> DLPPredefinedProfile ## Gateway @@ -5843,23 +5492,20 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.gateway import ( - AuditSSHSettingUpdateResponse, - AuditSSHSettingGetResponse, -) +from cloudflare.types.zero_trust.gateway import ZeroTrustGatewaySettings ``` Methods: -- client.zero_trust.gateway.audit_ssh_settings.update(\*, account_id, \*\*params) -> AuditSSHSettingUpdateResponse -- client.zero_trust.gateway.audit_ssh_settings.get(\*, account_id) -> AuditSSHSettingGetResponse +- client.zero_trust.gateway.audit_ssh_settings.update(\*, account_id, \*\*params) -> ZeroTrustGatewaySettings +- client.zero_trust.gateway.audit_ssh_settings.get(\*, account_id) -> ZeroTrustGatewaySettings ### Categories Types: ```python -from cloudflare.types.zero_trust.gateway import CategoryListResponse +from cloudflare.types.zero_trust.gateway import ZeroTrustGatewayCategories, CategoryListResponse ``` Methods: @@ -5871,7 +5517,7 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.gateway import AppTypeListResponse +from cloudflare.types.zero_trust.gateway import ZeroTrustGatewayAppTypes, AppTypeListResponse ``` Methods: @@ -5902,23 +5548,21 @@ Types: ```python from cloudflare.types.zero_trust.gateway import ( + ZeroTrustGatewayLists, ListCreateResponse, - ListUpdateResponse, ListListResponse, ListDeleteResponse, - ListEditResponse, - ListGetResponse, ) ``` Methods: - client.zero_trust.gateway.lists.create(\*, account_id, \*\*params) -> ListCreateResponse -- client.zero_trust.gateway.lists.update(list_id, \*, account_id, \*\*params) -> ListUpdateResponse +- 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.delete(list_id, \*, account_id) -> ListDeleteResponse -- client.zero_trust.gateway.lists.edit(list_id, \*, account_id, \*\*params) -> ListEditResponse -- client.zero_trust.gateway.lists.get(list_id, \*, account_id) -> ListGetResponse +- client.zero_trust.gateway.lists.edit(list_id, \*, account_id, \*\*params) -> ZeroTrustGatewayLists +- client.zero_trust.gateway.lists.get(list_id, \*, account_id) -> ZeroTrustGatewayLists #### Items @@ -5938,34 +5582,32 @@ Types: ```python from cloudflare.types.zero_trust.gateway import ( - LocationCreateResponse, - LocationUpdateResponse, + ZeroTrustGatewayLocations, LocationListResponse, LocationDeleteResponse, - LocationGetResponse, ) ``` Methods: -- client.zero_trust.gateway.locations.create(\*, account_id, \*\*params) -> LocationCreateResponse -- client.zero_trust.gateway.locations.update(location_id, \*, account_id, \*\*params) -> LocationUpdateResponse +- 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.delete(location_id, \*, account_id) -> LocationDeleteResponse -- client.zero_trust.gateway.locations.get(location_id, \*, account_id) -> LocationGetResponse +- client.zero_trust.gateway.locations.get(location_id, \*, account_id) -> ZeroTrustGatewayLocations ### Loggings Types: ```python -from cloudflare.types.zero_trust.gateway import LoggingUpdateResponse, LoggingGetResponse +from cloudflare.types.zero_trust.gateway import ZeroTrustGatewayGatewayAccountLoggingSettings ``` Methods: -- client.zero_trust.gateway.loggings.update(\*, account_id, \*\*params) -> LoggingUpdateResponse -- client.zero_trust.gateway.loggings.get(\*, account_id) -> LoggingGetResponse +- client.zero_trust.gateway.loggings.update(\*, account_id, \*\*params) -> ZeroTrustGatewayGatewayAccountLoggingSettings +- client.zero_trust.gateway.loggings.get(\*, account_id) -> ZeroTrustGatewayGatewayAccountLoggingSettings ### ProxyEndpoints @@ -5973,21 +5615,19 @@ Types: ```python from cloudflare.types.zero_trust.gateway import ( - ProxyEndpointCreateResponse, + ZeroTrustGatewayProxyEndpoints, ProxyEndpointListResponse, ProxyEndpointDeleteResponse, - ProxyEndpointEditResponse, - ProxyEndpointGetResponse, ) ``` Methods: -- client.zero_trust.gateway.proxy_endpoints.create(\*, account_id, \*\*params) -> ProxyEndpointCreateResponse +- 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.delete(proxy_endpoint_id, \*, account_id) -> ProxyEndpointDeleteResponse -- client.zero_trust.gateway.proxy_endpoints.edit(proxy_endpoint_id, \*, account_id, \*\*params) -> ProxyEndpointEditResponse -- client.zero_trust.gateway.proxy_endpoints.get(proxy_endpoint_id, \*, account_id) -> ProxyEndpointGetResponse +- 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 ### Rules @@ -5995,21 +5635,19 @@ Types: ```python from cloudflare.types.zero_trust.gateway import ( - RuleCreateResponse, - RuleUpdateResponse, + ZeroTrustGatewayRules, RuleListResponse, RuleDeleteResponse, - RuleGetResponse, ) ``` Methods: -- client.zero_trust.gateway.rules.create(\*, account_id, \*\*params) -> RuleCreateResponse -- client.zero_trust.gateway.rules.update(rule_id, \*, account_id, \*\*params) -> RuleUpdateResponse +- 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.delete(rule_id, \*, account_id) -> RuleDeleteResponse -- client.zero_trust.gateway.rules.get(rule_id, \*, account_id) -> RuleGetResponse +- client.zero_trust.gateway.rules.get(rule_id, \*, account_id) -> ZeroTrustGatewayRules ## Networks @@ -6018,50 +5656,29 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.networks import ( - RouteCreateResponse, - RouteListResponse, - RouteDeleteResponse, - RouteEditResponse, -) +from cloudflare.types.zero_trust.networks import TunnelRoute, TunnelTeamnet ``` Methods: -- client.zero_trust.networks.routes.create(\*, account_id, \*\*params) -> RouteCreateResponse -- client.zero_trust.networks.routes.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[RouteListResponse] -- client.zero_trust.networks.routes.delete(route_id, \*, account_id) -> RouteDeleteResponse -- client.zero_trust.networks.routes.edit(route_id, \*, account_id, \*\*params) -> RouteEditResponse +- client.zero_trust.networks.routes.create(\*, account_id, \*\*params) -> TunnelRoute +- client.zero_trust.networks.routes.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[TunnelTeamnet] +- client.zero_trust.networks.routes.delete(route_id, \*, account_id) -> TunnelRoute +- client.zero_trust.networks.routes.edit(route_id, \*, account_id, \*\*params) -> TunnelRoute #### IPs -Types: - -```python -from cloudflare.types.zero_trust.networks.routes import IPGetResponse -``` - Methods: -- client.zero_trust.networks.routes.ips.get(ip, \*, account_id, \*\*params) -> IPGetResponse +- client.zero_trust.networks.routes.ips.get(ip, \*, account_id, \*\*params) -> TunnelTeamnet #### Networks -Types: - -```python -from cloudflare.types.zero_trust.networks.routes import ( - NetworkCreateResponse, - NetworkDeleteResponse, - NetworkEditResponse, -) -``` - Methods: -- client.zero_trust.networks.routes.networks.create(ip_network_encoded, \*, account_id, \*\*params) -> NetworkCreateResponse -- client.zero_trust.networks.routes.networks.delete(ip_network_encoded, \*, account_id, \*\*params) -> NetworkDeleteResponse -- client.zero_trust.networks.routes.networks.edit(ip_network_encoded, \*, account_id) -> NetworkEditResponse +- client.zero_trust.networks.routes.networks.create(ip_network_encoded, \*, account_id, \*\*params) -> TunnelRoute +- client.zero_trust.networks.routes.networks.delete(ip_network_encoded, \*, account_id, \*\*params) -> TunnelRoute +- client.zero_trust.networks.routes.networks.edit(ip_network_encoded, \*, account_id) -> TunnelRoute ### VirtualNetworks @@ -6069,6 +5686,7 @@ Types: ```python from cloudflare.types.zero_trust.networks import ( + TunnelVirtualNetwork, VirtualNetworkCreateResponse, VirtualNetworkListResponse, VirtualNetworkDeleteResponse, @@ -6090,24 +5708,17 @@ Methods: Types: ```python -from cloudflare.types.challenges import ( - WidgetCreateResponse, - WidgetUpdateResponse, - WidgetListResponse, - WidgetDeleteResponse, - WidgetGetResponse, - WidgetRotateSecretResponse, -) +from cloudflare.types.challenges import NcChallengesAdminWidgetDetail, NcChallengesAdminWidgetList ``` Methods: -- client.challenges.widgets.create(account_identifier, \*\*params) -> Optional -- client.challenges.widgets.update(sitekey, \*, account_identifier, \*\*params) -> Optional -- client.challenges.widgets.list(account_identifier, \*\*params) -> SyncV4PagePaginationArray[WidgetListResponse] -- client.challenges.widgets.delete(sitekey, \*, account_identifier) -> Optional -- client.challenges.widgets.get(sitekey, \*, account_identifier) -> Optional -- client.challenges.widgets.rotate_secret(sitekey, \*, account_identifier, \*\*params) -> Optional +- client.challenges.widgets.create(account_identifier, \*\*params) -> Optional +- client.challenges.widgets.update(sitekey, \*, account_identifier, \*\*params) -> Optional +- client.challenges.widgets.list(account_identifier, \*\*params) -> SyncV4PagePaginationArray[NcChallengesAdminWidgetList] +- client.challenges.widgets.delete(sitekey, \*, account_identifier) -> Optional +- client.challenges.widgets.get(sitekey, \*, account_identifier) -> Optional +- client.challenges.widgets.rotate_secret(sitekey, \*, account_identifier, \*\*params) -> Optional # Hyperdrive @@ -6117,6 +5728,7 @@ Types: ```python from cloudflare.types.hyperdrive import ( + HyperdriveHyperdriveWithIdentifier, ConfigCreateResponse, ConfigUpdateResponse, ConfigListResponse, @@ -6142,40 +5754,29 @@ Methods: Types: ```python -from cloudflare.types.rum import ( - SiteInfoCreateResponse, - SiteInfoUpdateResponse, - SiteInfoListResponse, - SiteInfoDeleteResponse, - SiteInfoGetResponse, -) +from cloudflare.types.rum import RUMSite, SiteInfoDeleteResponse ``` Methods: -- client.rum.site_infos.create(\*, account_id, \*\*params) -> Optional -- client.rum.site_infos.update(site_id, \*, account_id, \*\*params) -> Optional -- client.rum.site_infos.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[SiteInfoListResponse] +- client.rum.site_infos.create(\*, account_id, \*\*params) -> Optional +- client.rum.site_infos.update(site_id, \*, account_id, \*\*params) -> Optional +- client.rum.site_infos.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[RUMSite] - client.rum.site_infos.delete(site_id, \*, account_id) -> Optional -- client.rum.site_infos.get(site_id, \*, account_id) -> Optional +- client.rum.site_infos.get(site_id, \*, account_id) -> Optional ## Rules Types: ```python -from cloudflare.types.rum import ( - RuleCreateResponse, - RuleUpdateResponse, - RuleListResponse, - RuleDeleteResponse, -) +from cloudflare.types.rum import RUMRule, RuleListResponse, RuleDeleteResponse ``` Methods: -- client.rum.rules.create(ruleset_id, \*, account_id, \*\*params) -> Optional -- client.rum.rules.update(rule_id, \*, account_id, ruleset_id, \*\*params) -> Optional +- client.rum.rules.create(ruleset_id, \*, account_id, \*\*params) -> Optional +- client.rum.rules.update(rule_id, \*, account_id, ruleset_id, \*\*params) -> Optional - client.rum.rules.list(ruleset_id, \*, account_id) -> Optional - client.rum.rules.delete(rule_id, \*, account_id, ruleset_id) -> Optional @@ -6187,31 +5788,29 @@ Types: ```python from cloudflare.types.vectorize import ( - IndexCreateResponse, - IndexUpdateResponse, + VectorizeCreateIndex, + VectorizeIndexDeleteVectorsByID, + VectorizeIndexInsert, + VectorizeIndexQuery, + VectorizeIndexUpsert, IndexListResponse, IndexDeleteResponse, - IndexDeleteByIDsResponse, - IndexGetResponse, IndexGetByIDsResponse, - IndexInsertResponse, - IndexQueryResponse, - IndexUpsertResponse, ) ``` Methods: -- client.vectorize.indexes.create(account_identifier, \*\*params) -> Optional -- client.vectorize.indexes.update(index_name, \*, account_identifier, \*\*params) -> Optional +- 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.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 +- client.vectorize.indexes.delete_by_ids(index_name, \*, account_identifier, \*\*params) -> Optional +- client.vectorize.indexes.get(index_name, \*, account_identifier) -> Optional - client.vectorize.indexes.get_by_ids(index_name, \*, account_identifier, \*\*params) -> object -- client.vectorize.indexes.insert(index_name, \*, account_identifier) -> Optional -- client.vectorize.indexes.query(index_name, \*, account_identifier, \*\*params) -> Optional -- client.vectorize.indexes.upsert(index_name, \*, account_identifier) -> Optional +- client.vectorize.indexes.insert(index_name, \*, account_identifier) -> Optional +- client.vectorize.indexes.query(index_name, \*, account_identifier, \*\*params) -> Optional +- client.vectorize.indexes.upsert(index_name, \*, account_identifier) -> Optional # URLScanner @@ -7315,34 +6914,29 @@ Methods: Types: ```python -from cloudflare.types import SpeedDeleteResponse, SpeedScheduleGetResponse, SpeedTrendsListResponse +from cloudflare.types import ObservatorySchedule, ObservatoryTrend, SpeedDeleteResponse ``` Methods: - client.speed.delete(url, \*, zone_id, \*\*params) -> Optional -- client.speed.schedule_get(url, \*, zone_id, \*\*params) -> Optional -- client.speed.trends_list(url, \*, zone_id, \*\*params) -> Optional +- client.speed.schedule_get(url, \*, zone_id, \*\*params) -> Optional +- client.speed.trends_list(url, \*, zone_id, \*\*params) -> Optional ## Tests Types: ```python -from cloudflare.types.speed import ( - TestCreateResponse, - TestListResponse, - TestDeleteResponse, - TestGetResponse, -) +from cloudflare.types.speed import ObservatoryPageTest, TestListResponse, TestDeleteResponse ``` Methods: -- client.speed.tests.create(url, \*, zone_id, \*\*params) -> Optional +- client.speed.tests.create(url, \*, zone_id, \*\*params) -> Optional - client.speed.tests.list(url, \*, zone_id, \*\*params) -> TestListResponse - client.speed.tests.delete(url, \*, zone_id, \*\*params) -> Optional -- client.speed.tests.get(test_id, \*, zone_id, url) -> Optional +- client.speed.tests.get(test_id, \*, zone_id, url) -> Optional ## Schedule @@ -7361,12 +6955,12 @@ Methods: Types: ```python -from cloudflare.types.speed import AvailabilityListResponse +from cloudflare.types.speed import ObservatoryAvailabilities ``` Methods: -- client.speed.availabilities.list(\*, zone_id) -> Optional +- client.speed.availabilities.list(\*, zone_id) -> Optional ## Pages @@ -7387,12 +6981,12 @@ Methods: Types: ```python -from cloudflare.types.dcv_delegation import UUIDGetResponse +from cloudflare.types.dcv_delegation import TLSCertificatesAndHostnamesUUIDObject ``` Methods: -- client.dcv_delegation.uuid.get(\*, zone_id) -> UUIDGetResponse +- client.dcv_delegation.uuid.get(\*, zone_id) -> TLSCertificatesAndHostnamesUUIDObject # Hostnames @@ -7403,13 +6997,17 @@ Methods: Types: ```python -from cloudflare.types.hostnames.settings import TLSUpdateResponse, TLSDeleteResponse, TLSGetResponse +from cloudflare.types.hostnames.settings import ( + TLSCertificatesAndHostnamesSettingObject, + TLSCertificatesAndHostnamesSettingObjectDelete, + TLSGetResponse, +) ``` Methods: -- client.hostnames.settings.tls.update(hostname, \*, zone_id, setting_id, \*\*params) -> TLSUpdateResponse -- client.hostnames.settings.tls.delete(hostname, \*, zone_id, setting_id) -> TLSDeleteResponse +- 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.get(setting_id, \*, zone_id) -> Optional # Snippets @@ -7417,20 +7015,15 @@ Methods: Types: ```python -from cloudflare.types import ( - SnippetUpdateResponse, - SnippetListResponse, - SnippetDeleteResponse, - SnippetGetResponse, -) +from cloudflare.types import Snippet, SnippetListResponse, SnippetDeleteResponse ``` Methods: -- client.snippets.update(snippet_name, \*, zone_identifier, \*\*params) -> SnippetUpdateResponse +- client.snippets.update(snippet_name, \*, zone_identifier, \*\*params) -> Snippet - client.snippets.list(zone_identifier) -> SnippetListResponse - client.snippets.delete(snippet_name, \*, zone_identifier) -> SnippetDeleteResponse -- client.snippets.get(snippet_name, \*, zone_identifier) -> SnippetGetResponse +- client.snippets.get(snippet_name, \*, zone_identifier) -> Snippet ## Content @@ -7456,22 +7049,16 @@ Methods: Types: ```python -from cloudflare.types import ( - CallCreateResponse, - CallUpdateResponse, - CallListResponse, - CallDeleteResponse, - CallGetResponse, -) +from cloudflare.types import CallsApp, CallsAppWithSecret, CallListResponse ``` Methods: -- client.calls.create(\*, account_id, \*\*params) -> CallCreateResponse -- client.calls.update(app_id, \*, account_id, \*\*params) -> CallUpdateResponse +- client.calls.create(\*, account_id, \*\*params) -> CallsAppWithSecret +- client.calls.update(app_id, \*, account_id, \*\*params) -> CallsApp - client.calls.list(\*, account_id) -> CallListResponse -- client.calls.delete(app_id, \*, account_id) -> CallDeleteResponse -- client.calls.get(app_id, \*, account_id) -> CallGetResponse +- client.calls.delete(app_id, \*, account_id) -> CallsApp +- client.calls.get(app_id, \*, account_id) -> CallsApp # CloudforceOne @@ -7481,27 +7068,25 @@ Types: ```python from cloudflare.types.cloudforce_one import ( - RequestCreateResponse, - RequestUpdateResponse, - RequestListResponse, + CloudforceOneQuota, + CloudforceOneRequestConstants, + CloudforceOneRequestItem, + CloudforceOneRequestListItem, + CloudforceOneRequestTypes, RequestDeleteResponse, - RequestConstantsResponse, - RequestGetResponse, - RequestQuotaResponse, - RequestTypesResponse, ) ``` Methods: -- client.cloudforce_one.requests.create(account_identifier, \*\*params) -> RequestCreateResponse -- client.cloudforce_one.requests.update(request_identifier, \*, account_identifier, \*\*params) -> RequestUpdateResponse -- client.cloudforce_one.requests.list(account_identifier, \*\*params) -> SyncV4PagePaginationArray[RequestListResponse] +- client.cloudforce_one.requests.create(account_identifier, \*\*params) -> CloudforceOneRequestItem +- client.cloudforce_one.requests.update(request_identifier, \*, account_identifier, \*\*params) -> CloudforceOneRequestItem +- client.cloudforce_one.requests.list(account_identifier, \*\*params) -> SyncV4PagePaginationArray[CloudforceOneRequestListItem] - client.cloudforce_one.requests.delete(request_identifier, \*, account_identifier) -> RequestDeleteResponse -- client.cloudforce_one.requests.constants(account_identifier) -> RequestConstantsResponse -- client.cloudforce_one.requests.get(request_identifier, \*, account_identifier) -> RequestGetResponse -- client.cloudforce_one.requests.quota(account_identifier) -> RequestQuotaResponse -- client.cloudforce_one.requests.types(account_identifier) -> RequestTypesResponse +- client.cloudforce_one.requests.constants(account_identifier) -> CloudforceOneRequestConstants +- client.cloudforce_one.requests.get(request_identifier, \*, account_identifier) -> CloudforceOneRequestItem +- client.cloudforce_one.requests.quota(account_identifier) -> CloudforceOneQuota +- client.cloudforce_one.requests.types(account_identifier) -> CloudforceOneRequestTypes ### Message @@ -7509,8 +7094,7 @@ Types: ```python from cloudflare.types.cloudforce_one.requests import ( - MessageCreateResponse, - MessageUpdateResponse, + CloudforceOneRequestMessageItem, MessageDeleteResponse, MessageGetResponse, ) @@ -7518,8 +7102,8 @@ from cloudflare.types.cloudforce_one.requests import ( Methods: -- client.cloudforce_one.requests.message.create(request_identifier, \*, account_identifier, \*\*params) -> MessageCreateResponse -- client.cloudforce_one.requests.message.update(message_identifer, \*, account_identifier, request_identifier, \*\*params) -> MessageUpdateResponse +- client.cloudforce_one.requests.message.create(request_identifier, \*, account_identifier, \*\*params) -> CloudforceOneRequestMessageItem +- client.cloudforce_one.requests.message.update(message_identifer, \*, account_identifier, request_identifier, \*\*params) -> CloudforceOneRequestMessageItem - client.cloudforce_one.requests.message.delete(message_identifer, \*, account_identifier, request_identifier) -> MessageDeleteResponse - client.cloudforce_one.requests.message.get(request_identifier, \*, account_identifier, \*\*params) -> MessageGetResponse @@ -7529,18 +7113,15 @@ Types: ```python from cloudflare.types.cloudforce_one.requests import ( - PriorityCreateResponse, - PriorityUpdateResponse, + CloudforceOnePriorityItem, PriorityDeleteResponse, - PriorityGetResponse, - PriorityQuotaResponse, ) ``` Methods: -- client.cloudforce_one.requests.priority.create(account_identifier, \*\*params) -> PriorityCreateResponse -- client.cloudforce_one.requests.priority.update(priority_identifer, \*, account_identifier, \*\*params) -> PriorityUpdateResponse +- client.cloudforce_one.requests.priority.create(account_identifier, \*\*params) -> CloudforceOnePriorityItem +- client.cloudforce_one.requests.priority.update(priority_identifer, \*, account_identifier, \*\*params) -> CloudforceOneRequestItem - client.cloudforce_one.requests.priority.delete(priority_identifer, \*, account_identifier) -> PriorityDeleteResponse -- client.cloudforce_one.requests.priority.get(priority_identifer, \*, account_identifier) -> PriorityGetResponse -- client.cloudforce_one.requests.priority.quota(account_identifier) -> PriorityQuotaResponse +- client.cloudforce_one.requests.priority.get(priority_identifer, \*, account_identifier) -> CloudforceOneRequestItem +- client.cloudforce_one.requests.priority.quota(account_identifier) -> CloudforceOneQuota diff --git a/src/cloudflare/_client.py b/src/cloudflare/_client.py index 762aa9fb6..b21891ec0 100644 --- a/src/cloudflare/_client.py +++ b/src/cloudflare/_client.py @@ -335,7 +335,8 @@ class Cloudflare(SyncAPIClient): return { **super().default_headers, "X-Stainless-Async": "false", - "x-auth-email": self.api_email if self.api_email is not None else Omit(), + "X-Auth-Key": self.api_key if self.api_key is not None else Omit(), + "X-Auth-Email": self.api_email if self.api_email is not None else Omit(), **self._custom_headers, } @@ -745,7 +746,8 @@ class AsyncCloudflare(AsyncAPIClient): return { **super().default_headers, "X-Stainless-Async": f"async:{get_async_library()}", - "x-auth-email": self.api_email if self.api_email is not None else Omit(), + "X-Auth-Key": self.api_key if self.api_key is not None else Omit(), + "X-Auth-Email": self.api_email if self.api_email is not None else Omit(), **self._custom_headers, } diff --git a/src/cloudflare/resources/addressing/address_maps/address_maps.py b/src/cloudflare/resources/addressing/address_maps/address_maps.py index e2c3e4aed..7ecf92da2 100644 --- a/src/cloudflare/resources/addressing/address_maps/address_maps.py +++ b/src/cloudflare/resources/addressing/address_maps/address_maps.py @@ -48,8 +48,8 @@ from ...._base_client import ( make_request_options, ) from ....types.addressing import ( + AddressingAddressMaps, AddressMapGetResponse, - AddressMapEditResponse, AddressMapListResponse, AddressMapCreateResponse, AddressMapDeleteResponse, @@ -239,7 +239,7 @@ class AddressMaps(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AddressMapEditResponse: + ) -> AddressingAddressMaps: """ Modify properties of an address map owned by the account. @@ -289,7 +289,7 @@ class AddressMaps(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AddressMapEditResponse], ResultWrapper[AddressMapEditResponse]), + cast_to=cast(Type[AddressingAddressMaps], ResultWrapper[AddressingAddressMaps]), ) def get( @@ -516,7 +516,7 @@ class AsyncAddressMaps(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AddressMapEditResponse: + ) -> AddressingAddressMaps: """ Modify properties of an address map owned by the account. @@ -566,7 +566,7 @@ class AsyncAddressMaps(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AddressMapEditResponse], ResultWrapper[AddressMapEditResponse]), + cast_to=cast(Type[AddressingAddressMaps], ResultWrapper[AddressingAddressMaps]), ) async def get( diff --git a/src/cloudflare/resources/addressing/prefixes/bgp/bindings.py b/src/cloudflare/resources/addressing/prefixes/bgp/bindings.py index 4e60b413f..ec7c8730d 100644 --- a/src/cloudflare/resources/addressing/prefixes/bgp/bindings.py +++ b/src/cloudflare/resources/addressing/prefixes/bgp/bindings.py @@ -24,10 +24,9 @@ from ....._base_client import ( make_request_options, ) from .....types.addressing.prefixes.bgp import ( - BindingGetResponse, BindingListResponse, - BindingCreateResponse, BindingDeleteResponse, + AddressingServiceBinding, binding_create_params, ) @@ -56,7 +55,7 @@ class Bindings(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BindingCreateResponse: + ) -> AddressingServiceBinding: """ Creates a new Service Binding, routing traffic to IPs within the given CIDR to a service running on Cloudflare's network. **Note:** This API may only be used on @@ -100,7 +99,7 @@ class Bindings(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BindingCreateResponse], ResultWrapper[BindingCreateResponse]), + cast_to=cast(Type[AddressingServiceBinding], ResultWrapper[AddressingServiceBinding]), ) def list( @@ -219,7 +218,7 @@ class Bindings(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BindingGetResponse: + ) -> AddressingServiceBinding: """ Fetch a single Service Binding @@ -253,7 +252,7 @@ class Bindings(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BindingGetResponse], ResultWrapper[BindingGetResponse]), + cast_to=cast(Type[AddressingServiceBinding], ResultWrapper[AddressingServiceBinding]), ) @@ -279,7 +278,7 @@ class AsyncBindings(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BindingCreateResponse: + ) -> AddressingServiceBinding: """ Creates a new Service Binding, routing traffic to IPs within the given CIDR to a service running on Cloudflare's network. **Note:** This API may only be used on @@ -323,7 +322,7 @@ class AsyncBindings(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BindingCreateResponse], ResultWrapper[BindingCreateResponse]), + cast_to=cast(Type[AddressingServiceBinding], ResultWrapper[AddressingServiceBinding]), ) async def list( @@ -442,7 +441,7 @@ class AsyncBindings(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BindingGetResponse: + ) -> AddressingServiceBinding: """ Fetch a single Service Binding @@ -476,7 +475,7 @@ class AsyncBindings(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BindingGetResponse], ResultWrapper[BindingGetResponse]), + cast_to=cast(Type[AddressingServiceBinding], ResultWrapper[AddressingServiceBinding]), ) diff --git a/src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py b/src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py index a0a96eb38..00ca73352 100644 --- a/src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py +++ b/src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py @@ -23,12 +23,7 @@ from ....._wrappers import ResultWrapper from ....._base_client import ( make_request_options, ) -from .....types.addressing.prefixes.bgp import ( - PrefixGetResponse, - PrefixEditResponse, - PrefixListResponse, - prefix_edit_params, -) +from .....types.addressing.prefixes.bgp import PrefixListResponse, AddressingIpamBGPPrefixes, prefix_edit_params __all__ = ["Prefixes", "AsyncPrefixes"] @@ -103,7 +98,7 @@ class Prefixes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PrefixEditResponse: + ) -> AddressingIpamBGPPrefixes: """ Update the properties of a BGP Prefix, such as the on demand advertisement status (advertised or withdrawn). @@ -139,7 +134,7 @@ class Prefixes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PrefixEditResponse], ResultWrapper[PrefixEditResponse]), + cast_to=cast(Type[AddressingIpamBGPPrefixes], ResultWrapper[AddressingIpamBGPPrefixes]), ) def get( @@ -154,7 +149,7 @@ class Prefixes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PrefixGetResponse: + ) -> AddressingIpamBGPPrefixes: """ Retrieve a single BGP Prefix according to its identifier @@ -188,7 +183,7 @@ class Prefixes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PrefixGetResponse], ResultWrapper[PrefixGetResponse]), + cast_to=cast(Type[AddressingIpamBGPPrefixes], ResultWrapper[AddressingIpamBGPPrefixes]), ) @@ -262,7 +257,7 @@ class AsyncPrefixes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PrefixEditResponse: + ) -> AddressingIpamBGPPrefixes: """ Update the properties of a BGP Prefix, such as the on demand advertisement status (advertised or withdrawn). @@ -298,7 +293,7 @@ class AsyncPrefixes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PrefixEditResponse], ResultWrapper[PrefixEditResponse]), + cast_to=cast(Type[AddressingIpamBGPPrefixes], ResultWrapper[AddressingIpamBGPPrefixes]), ) async def get( @@ -313,7 +308,7 @@ class AsyncPrefixes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PrefixGetResponse: + ) -> AddressingIpamBGPPrefixes: """ Retrieve a single BGP Prefix according to its identifier @@ -347,7 +342,7 @@ class AsyncPrefixes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PrefixGetResponse], ResultWrapper[PrefixGetResponse]), + cast_to=cast(Type[AddressingIpamBGPPrefixes], ResultWrapper[AddressingIpamBGPPrefixes]), ) diff --git a/src/cloudflare/resources/addressing/prefixes/delegations.py b/src/cloudflare/resources/addressing/prefixes/delegations.py index 6d3ba6a3d..3bb16e442 100644 --- a/src/cloudflare/resources/addressing/prefixes/delegations.py +++ b/src/cloudflare/resources/addressing/prefixes/delegations.py @@ -25,8 +25,8 @@ from ...._base_client import ( ) from ....types.addressing.prefixes import ( DelegationListResponse, - DelegationCreateResponse, DelegationDeleteResponse, + AddressingIpamDelegations, delegation_create_params, ) @@ -55,7 +55,7 @@ class Delegations(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DelegationCreateResponse: + ) -> AddressingIpamDelegations: """ Create a new account delegation for a given IP prefix. @@ -96,7 +96,7 @@ class Delegations(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DelegationCreateResponse], ResultWrapper[DelegationCreateResponse]), + cast_to=cast(Type[AddressingIpamDelegations], ResultWrapper[AddressingIpamDelegations]), ) def list( @@ -215,7 +215,7 @@ class AsyncDelegations(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DelegationCreateResponse: + ) -> AddressingIpamDelegations: """ Create a new account delegation for a given IP prefix. @@ -256,7 +256,7 @@ class AsyncDelegations(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DelegationCreateResponse], ResultWrapper[DelegationCreateResponse]), + cast_to=cast(Type[AddressingIpamDelegations], ResultWrapper[AddressingIpamDelegations]), ) async def list( diff --git a/src/cloudflare/resources/addressing/prefixes/prefixes.py b/src/cloudflare/resources/addressing/prefixes/prefixes.py index 5593253e6..a67e86960 100644 --- a/src/cloudflare/resources/addressing/prefixes/prefixes.py +++ b/src/cloudflare/resources/addressing/prefixes/prefixes.py @@ -41,11 +41,9 @@ from ...._base_client import ( make_request_options, ) from ....types.addressing import ( - PrefixGetResponse, - PrefixEditResponse, PrefixListResponse, - PrefixCreateResponse, PrefixDeleteResponse, + AddressingIpamPrefixes, prefix_edit_params, prefix_create_params, ) @@ -83,7 +81,7 @@ class Prefixes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PrefixCreateResponse: + ) -> AddressingIpamPrefixes: """ Add a new prefix under the account. @@ -123,7 +121,7 @@ class Prefixes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PrefixCreateResponse], ResultWrapper[PrefixCreateResponse]), + cast_to=cast(Type[AddressingIpamPrefixes], ResultWrapper[AddressingIpamPrefixes]), ) def list( @@ -226,7 +224,7 @@ class Prefixes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PrefixEditResponse: + ) -> AddressingIpamPrefixes: """ Modify the description for a prefix owned by the account. @@ -259,7 +257,7 @@ class Prefixes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PrefixEditResponse], ResultWrapper[PrefixEditResponse]), + cast_to=cast(Type[AddressingIpamPrefixes], ResultWrapper[AddressingIpamPrefixes]), ) def get( @@ -273,7 +271,7 @@ class Prefixes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PrefixGetResponse: + ) -> AddressingIpamPrefixes: """ List a particular prefix owned by the account. @@ -303,7 +301,7 @@ class Prefixes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PrefixGetResponse], ResultWrapper[PrefixGetResponse]), + cast_to=cast(Type[AddressingIpamPrefixes], ResultWrapper[AddressingIpamPrefixes]), ) @@ -337,7 +335,7 @@ class AsyncPrefixes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PrefixCreateResponse: + ) -> AddressingIpamPrefixes: """ Add a new prefix under the account. @@ -377,7 +375,7 @@ class AsyncPrefixes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PrefixCreateResponse], ResultWrapper[PrefixCreateResponse]), + cast_to=cast(Type[AddressingIpamPrefixes], ResultWrapper[AddressingIpamPrefixes]), ) async def list( @@ -480,7 +478,7 @@ class AsyncPrefixes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PrefixEditResponse: + ) -> AddressingIpamPrefixes: """ Modify the description for a prefix owned by the account. @@ -513,7 +511,7 @@ class AsyncPrefixes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PrefixEditResponse], ResultWrapper[PrefixEditResponse]), + cast_to=cast(Type[AddressingIpamPrefixes], ResultWrapper[AddressingIpamPrefixes]), ) async def get( @@ -527,7 +525,7 @@ class AsyncPrefixes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PrefixGetResponse: + ) -> AddressingIpamPrefixes: """ List a particular prefix owned by the account. @@ -557,7 +555,7 @@ class AsyncPrefixes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PrefixGetResponse], ResultWrapper[PrefixGetResponse]), + cast_to=cast(Type[AddressingIpamPrefixes], ResultWrapper[AddressingIpamPrefixes]), ) diff --git a/src/cloudflare/resources/alerting/v3/destinations/webhooks.py b/src/cloudflare/resources/alerting/v3/destinations/webhooks.py index 7e62b0eae..f595622f2 100644 --- a/src/cloudflare/resources/alerting/v3/destinations/webhooks.py +++ b/src/cloudflare/resources/alerting/v3/destinations/webhooks.py @@ -24,7 +24,7 @@ from ....._base_client import ( make_request_options, ) from .....types.alerting.v3.destinations import ( - WebhookGetResponse, + AaaWebhooks, WebhookListResponse, WebhookCreateResponse, WebhookDeleteResponse, @@ -267,7 +267,7 @@ class Webhooks(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WebhookGetResponse: + ) -> AaaWebhooks: """ Get details for a single webhooks destination. @@ -297,7 +297,7 @@ class Webhooks(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WebhookGetResponse], ResultWrapper[WebhookGetResponse]), + cast_to=cast(Type[AaaWebhooks], ResultWrapper[AaaWebhooks]), ) @@ -532,7 +532,7 @@ class AsyncWebhooks(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WebhookGetResponse: + ) -> AaaWebhooks: """ Get details for a single webhooks destination. @@ -562,7 +562,7 @@ class AsyncWebhooks(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WebhookGetResponse], ResultWrapper[WebhookGetResponse]), + cast_to=cast(Type[AaaWebhooks], ResultWrapper[AaaWebhooks]), ) diff --git a/src/cloudflare/resources/alerting/v3/histories.py b/src/cloudflare/resources/alerting/v3/histories.py index 6b05f723f..0e4f3399d 100644 --- a/src/cloudflare/resources/alerting/v3/histories.py +++ b/src/cloudflare/resources/alerting/v3/histories.py @@ -22,7 +22,7 @@ from ...._base_client import ( AsyncPaginator, make_request_options, ) -from ....types.alerting.v3 import HistoryListResponse, history_list_params +from ....types.alerting.v3 import AaaHistory, history_list_params __all__ = ["Histories", "AsyncHistories"] @@ -50,7 +50,7 @@ class Histories(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[HistoryListResponse]: + ) -> SyncV4PagePaginationArray[AaaHistory]: """Gets a list of history records for notifications sent to an account. The records @@ -82,7 +82,7 @@ class Histories(SyncAPIResource): 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[HistoryListResponse], + page=SyncV4PagePaginationArray[AaaHistory], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -98,7 +98,7 @@ class Histories(SyncAPIResource): history_list_params.HistoryListParams, ), ), - model=HistoryListResponse, + model=AaaHistory, ) @@ -125,7 +125,7 @@ class AsyncHistories(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[HistoryListResponse, AsyncV4PagePaginationArray[HistoryListResponse]]: + ) -> AsyncPaginator[AaaHistory, AsyncV4PagePaginationArray[AaaHistory]]: """Gets a list of history records for notifications sent to an account. The records @@ -157,7 +157,7 @@ class AsyncHistories(AsyncAPIResource): 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[HistoryListResponse], + page=AsyncV4PagePaginationArray[AaaHistory], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -173,7 +173,7 @@ class AsyncHistories(AsyncAPIResource): history_list_params.HistoryListParams, ), ), - model=HistoryListResponse, + model=AaaHistory, ) diff --git a/src/cloudflare/resources/alerting/v3/policies.py b/src/cloudflare/resources/alerting/v3/policies.py index 4580f5f56..efee91f3f 100644 --- a/src/cloudflare/resources/alerting/v3/policies.py +++ b/src/cloudflare/resources/alerting/v3/policies.py @@ -25,7 +25,7 @@ from ...._base_client import ( make_request_options, ) from ....types.alerting.v3 import ( - PolicyGetResponse, + AaaPolicies, PolicyListResponse, PolicyCreateResponse, PolicyDeleteResponse, @@ -407,7 +407,7 @@ class Policies(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PolicyGetResponse: + ) -> AaaPolicies: """ Get details for a single policy. @@ -437,7 +437,7 @@ class Policies(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PolicyGetResponse], ResultWrapper[PolicyGetResponse]), + cast_to=cast(Type[AaaPolicies], ResultWrapper[AaaPolicies]), ) @@ -811,7 +811,7 @@ class AsyncPolicies(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PolicyGetResponse: + ) -> AaaPolicies: """ Get details for a single policy. @@ -841,7 +841,7 @@ class AsyncPolicies(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PolicyGetResponse], ResultWrapper[PolicyGetResponse]), + cast_to=cast(Type[AaaPolicies], ResultWrapper[AaaPolicies]), ) diff --git a/src/cloudflare/resources/available_plans.py b/src/cloudflare/resources/available_plans.py index 57bad30d6..33c513a1a 100644 --- a/src/cloudflare/resources/available_plans.py +++ b/src/cloudflare/resources/available_plans.py @@ -6,7 +6,7 @@ from typing import Type, Optional, cast import httpx -from ..types import AvailablePlanGetResponse, AvailablePlanListResponse +from ..types import AvailablePlanListResponse, BillSubsAPIAvailableRatePlan from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -83,7 +83,7 @@ class AvailablePlans(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AvailablePlanGetResponse: + ) -> BillSubsAPIAvailableRatePlan: """ Details of the available plan that the zone can subscribe to. @@ -113,7 +113,7 @@ class AvailablePlans(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AvailablePlanGetResponse], ResultWrapper[AvailablePlanGetResponse]), + cast_to=cast(Type[BillSubsAPIAvailableRatePlan], ResultWrapper[BillSubsAPIAvailableRatePlan]), ) @@ -176,7 +176,7 @@ class AsyncAvailablePlans(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AvailablePlanGetResponse: + ) -> BillSubsAPIAvailableRatePlan: """ Details of the available plan that the zone can subscribe to. @@ -206,7 +206,7 @@ class AsyncAvailablePlans(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AvailablePlanGetResponse], ResultWrapper[AvailablePlanGetResponse]), + cast_to=cast(Type[BillSubsAPIAvailableRatePlan], ResultWrapper[BillSubsAPIAvailableRatePlan]), ) diff --git a/src/cloudflare/resources/brand_protection.py b/src/cloudflare/resources/brand_protection.py index 8c132e3ee..1cab97fb9 100644 --- a/src/cloudflare/resources/brand_protection.py +++ b/src/cloudflare/resources/brand_protection.py @@ -7,8 +7,8 @@ from typing import Type, cast import httpx from ..types import ( - BrandProtectionSubmitResponse, - BrandProtectionURLInfoResponse, + IntelPhishingURLInfo, + IntelPhishingURLSubmit, brand_protection_submit_params, brand_protection_url_info_params, ) @@ -53,7 +53,7 @@ class BrandProtection(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BrandProtectionSubmitResponse: + ) -> IntelPhishingURLSubmit: """ Submit suspicious URL for scanning @@ -82,7 +82,7 @@ class BrandProtection(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BrandProtectionSubmitResponse], ResultWrapper[BrandProtectionSubmitResponse]), + cast_to=cast(Type[IntelPhishingURLSubmit], ResultWrapper[IntelPhishingURLSubmit]), ) def url_info( @@ -97,7 +97,7 @@ class BrandProtection(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BrandProtectionURLInfoResponse: + ) -> IntelPhishingURLInfo: """ Get results for a URL scan @@ -130,7 +130,7 @@ class BrandProtection(SyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BrandProtectionURLInfoResponse], ResultWrapper[BrandProtectionURLInfoResponse]), + cast_to=cast(Type[IntelPhishingURLInfo], ResultWrapper[IntelPhishingURLInfo]), ) @@ -154,7 +154,7 @@ class AsyncBrandProtection(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BrandProtectionSubmitResponse: + ) -> IntelPhishingURLSubmit: """ Submit suspicious URL for scanning @@ -183,7 +183,7 @@ class AsyncBrandProtection(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BrandProtectionSubmitResponse], ResultWrapper[BrandProtectionSubmitResponse]), + cast_to=cast(Type[IntelPhishingURLSubmit], ResultWrapper[IntelPhishingURLSubmit]), ) async def url_info( @@ -198,7 +198,7 @@ class AsyncBrandProtection(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BrandProtectionURLInfoResponse: + ) -> IntelPhishingURLInfo: """ Get results for a URL scan @@ -231,7 +231,7 @@ class AsyncBrandProtection(AsyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BrandProtectionURLInfoResponse], ResultWrapper[BrandProtectionURLInfoResponse]), + cast_to=cast(Type[IntelPhishingURLInfo], ResultWrapper[IntelPhishingURLInfo]), ) diff --git a/src/cloudflare/resources/cache/variants.py b/src/cloudflare/resources/cache/variants.py index 1f70cbef8..6a11e445e 100644 --- a/src/cloudflare/resources/cache/variants.py +++ b/src/cloudflare/resources/cache/variants.py @@ -20,7 +20,7 @@ from ..._response import ( async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ...types.cache import VariantGetResponse, VariantEditResponse, VariantDeleteResponse, variant_edit_params +from ...types.cache import CacheVariants, VariantGetResponse, VariantEditResponse, variant_edit_params from ..._base_client import ( make_request_options, ) @@ -47,7 +47,7 @@ class Variants(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VariantDeleteResponse: + ) -> CacheVariants: """ Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the @@ -77,7 +77,7 @@ class Variants(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VariantDeleteResponse], ResultWrapper[VariantDeleteResponse]), + cast_to=cast(Type[CacheVariants], ResultWrapper[CacheVariants]), ) def edit( @@ -190,7 +190,7 @@ class AsyncVariants(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VariantDeleteResponse: + ) -> CacheVariants: """ Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the @@ -220,7 +220,7 @@ class AsyncVariants(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VariantDeleteResponse], ResultWrapper[VariantDeleteResponse]), + cast_to=cast(Type[CacheVariants], ResultWrapper[CacheVariants]), ) async def edit( diff --git a/src/cloudflare/resources/calls.py b/src/cloudflare/resources/calls.py index b42cab8ab..0150d3679 100644 --- a/src/cloudflare/resources/calls.py +++ b/src/cloudflare/resources/calls.py @@ -7,11 +7,9 @@ from typing import Type, cast import httpx from ..types import ( - CallGetResponse, + CallsApp, CallListResponse, - CallCreateResponse, - CallDeleteResponse, - CallUpdateResponse, + CallsAppWithSecret, call_create_params, call_update_params, ) @@ -56,7 +54,7 @@ class Calls(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CallCreateResponse: + ) -> CallsAppWithSecret: """Creates a new Cloudflare calls app. An app is an unique enviroment where each @@ -87,7 +85,7 @@ class Calls(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CallCreateResponse], ResultWrapper[CallCreateResponse]), + cast_to=cast(Type[CallsAppWithSecret], ResultWrapper[CallsAppWithSecret]), ) def update( @@ -102,7 +100,7 @@ class Calls(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CallUpdateResponse: + ) -> CallsApp: """ Edit details for a single app. @@ -135,7 +133,7 @@ class Calls(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CallUpdateResponse], ResultWrapper[CallUpdateResponse]), + cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]), ) def list( @@ -188,7 +186,7 @@ class Calls(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CallDeleteResponse: + ) -> CallsApp: """ Deletes an app from Cloudflare Calls @@ -218,7 +216,7 @@ class Calls(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CallDeleteResponse], ResultWrapper[CallDeleteResponse]), + cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]), ) def get( @@ -232,7 +230,7 @@ class Calls(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CallGetResponse: + ) -> CallsApp: """ Fetches details for a single Calls app. @@ -262,7 +260,7 @@ class Calls(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CallGetResponse], ResultWrapper[CallGetResponse]), + cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]), ) @@ -286,7 +284,7 @@ class AsyncCalls(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CallCreateResponse: + ) -> CallsAppWithSecret: """Creates a new Cloudflare calls app. An app is an unique enviroment where each @@ -317,7 +315,7 @@ class AsyncCalls(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CallCreateResponse], ResultWrapper[CallCreateResponse]), + cast_to=cast(Type[CallsAppWithSecret], ResultWrapper[CallsAppWithSecret]), ) async def update( @@ -332,7 +330,7 @@ class AsyncCalls(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CallUpdateResponse: + ) -> CallsApp: """ Edit details for a single app. @@ -365,7 +363,7 @@ class AsyncCalls(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CallUpdateResponse], ResultWrapper[CallUpdateResponse]), + cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]), ) async def list( @@ -418,7 +416,7 @@ class AsyncCalls(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CallDeleteResponse: + ) -> CallsApp: """ Deletes an app from Cloudflare Calls @@ -448,7 +446,7 @@ class AsyncCalls(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CallDeleteResponse], ResultWrapper[CallDeleteResponse]), + cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]), ) async def get( @@ -462,7 +460,7 @@ class AsyncCalls(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CallGetResponse: + ) -> CallsApp: """ Fetches details for a single Calls app. @@ -492,7 +490,7 @@ class AsyncCalls(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CallGetResponse], ResultWrapper[CallGetResponse]), + cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]), ) diff --git a/src/cloudflare/resources/certificate_authorities/hostname_associations.py b/src/cloudflare/resources/certificate_authorities/hostname_associations.py index 5931e320d..d9ef3a7dc 100644 --- a/src/cloudflare/resources/certificate_authorities/hostname_associations.py +++ b/src/cloudflare/resources/certificate_authorities/hostname_associations.py @@ -24,8 +24,7 @@ from ..._base_client import ( make_request_options, ) from ...types.certificate_authorities import ( - HostnameAssociationGetResponse, - HostnameAssociationUpdateResponse, + TLSCertificatesAndHostnamesHostnameAssociation, hostname_association_get_params, hostname_association_update_params, ) @@ -54,7 +53,7 @@ class HostnameAssociations(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HostnameAssociationUpdateResponse: + ) -> TLSCertificatesAndHostnamesHostnameAssociation: """ Replace Hostname Associations @@ -91,7 +90,10 @@ class HostnameAssociations(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HostnameAssociationUpdateResponse], ResultWrapper[HostnameAssociationUpdateResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesHostnameAssociation], + ResultWrapper[TLSCertificatesAndHostnamesHostnameAssociation], + ), ) def get( @@ -105,7 +107,7 @@ class HostnameAssociations(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HostnameAssociationGetResponse: + ) -> TLSCertificatesAndHostnamesHostnameAssociation: """ List Hostname Associations @@ -139,7 +141,10 @@ class HostnameAssociations(SyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HostnameAssociationGetResponse], ResultWrapper[HostnameAssociationGetResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesHostnameAssociation], + ResultWrapper[TLSCertificatesAndHostnamesHostnameAssociation], + ), ) @@ -164,7 +169,7 @@ class AsyncHostnameAssociations(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HostnameAssociationUpdateResponse: + ) -> TLSCertificatesAndHostnamesHostnameAssociation: """ Replace Hostname Associations @@ -201,7 +206,10 @@ class AsyncHostnameAssociations(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HostnameAssociationUpdateResponse], ResultWrapper[HostnameAssociationUpdateResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesHostnameAssociation], + ResultWrapper[TLSCertificatesAndHostnamesHostnameAssociation], + ), ) async def get( @@ -215,7 +223,7 @@ class AsyncHostnameAssociations(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HostnameAssociationGetResponse: + ) -> TLSCertificatesAndHostnamesHostnameAssociation: """ List Hostname Associations @@ -249,7 +257,10 @@ class AsyncHostnameAssociations(AsyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HostnameAssociationGetResponse], ResultWrapper[HostnameAssociationGetResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesHostnameAssociation], + ResultWrapper[TLSCertificatesAndHostnamesHostnameAssociation], + ), ) diff --git a/src/cloudflare/resources/challenges/widgets.py b/src/cloudflare/resources/challenges/widgets.py index f39b411b8..e8a0fb2f3 100644 --- a/src/cloudflare/resources/challenges/widgets.py +++ b/src/cloudflare/resources/challenges/widgets.py @@ -27,12 +27,8 @@ from ..._base_client import ( make_request_options, ) from ...types.challenges import ( - WidgetGetResponse, - WidgetListResponse, - WidgetCreateResponse, - WidgetDeleteResponse, - WidgetUpdateResponse, - WidgetRotateSecretResponse, + NcChallengesAdminWidgetList, + NcChallengesAdminWidgetDetail, widget_list_params, widget_create_params, widget_update_params, @@ -72,7 +68,7 @@ class Widgets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WidgetCreateResponse]: + ) -> Optional[NcChallengesAdminWidgetDetail]: """ Lists challenge widgets. @@ -143,7 +139,7 @@ class Widgets(SyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WidgetCreateResponse]], ResultWrapper[WidgetCreateResponse]), + cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), ) def update( @@ -163,7 +159,7 @@ class Widgets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WidgetUpdateResponse]: + ) -> Optional[NcChallengesAdminWidgetDetail]: """ Update the configuration of a widget. @@ -218,7 +214,7 @@ class Widgets(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WidgetUpdateResponse]], ResultWrapper[WidgetUpdateResponse]), + cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), ) def list( @@ -235,7 +231,7 @@ class Widgets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[WidgetListResponse]: + ) -> SyncV4PagePaginationArray[NcChallengesAdminWidgetList]: """ Lists all turnstile widgets of an account. @@ -262,7 +258,7 @@ class Widgets(SyncAPIResource): raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}") return self._get_api_list( f"/accounts/{account_identifier}/challenges/widgets", - page=SyncV4PagePaginationArray[WidgetListResponse], + page=SyncV4PagePaginationArray[NcChallengesAdminWidgetList], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -278,7 +274,7 @@ class Widgets(SyncAPIResource): widget_list_params.WidgetListParams, ), ), - model=WidgetListResponse, + model=NcChallengesAdminWidgetList, ) def delete( @@ -292,7 +288,7 @@ class Widgets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WidgetDeleteResponse]: + ) -> Optional[NcChallengesAdminWidgetDetail]: """ Destroy a Turnstile Widget. @@ -322,7 +318,7 @@ class Widgets(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WidgetDeleteResponse]], ResultWrapper[WidgetDeleteResponse]), + cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), ) def get( @@ -336,7 +332,7 @@ class Widgets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WidgetGetResponse]: + ) -> Optional[NcChallengesAdminWidgetDetail]: """ Show a single challenge widget configuration. @@ -366,7 +362,7 @@ class Widgets(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WidgetGetResponse]], ResultWrapper[WidgetGetResponse]), + cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), ) def rotate_secret( @@ -381,7 +377,7 @@ class Widgets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WidgetRotateSecretResponse]: + ) -> Optional[NcChallengesAdminWidgetDetail]: """Generate a new secret key for this widget. If `invalidate_immediately` is set to @@ -422,7 +418,7 @@ class Widgets(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WidgetRotateSecretResponse]], ResultWrapper[WidgetRotateSecretResponse]), + cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), ) @@ -456,7 +452,7 @@ class AsyncWidgets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WidgetCreateResponse]: + ) -> Optional[NcChallengesAdminWidgetDetail]: """ Lists challenge widgets. @@ -527,7 +523,7 @@ class AsyncWidgets(AsyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WidgetCreateResponse]], ResultWrapper[WidgetCreateResponse]), + cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), ) async def update( @@ -547,7 +543,7 @@ class AsyncWidgets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WidgetUpdateResponse]: + ) -> Optional[NcChallengesAdminWidgetDetail]: """ Update the configuration of a widget. @@ -602,7 +598,7 @@ class AsyncWidgets(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WidgetUpdateResponse]], ResultWrapper[WidgetUpdateResponse]), + cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), ) def list( @@ -619,7 +615,7 @@ class AsyncWidgets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[WidgetListResponse, AsyncV4PagePaginationArray[WidgetListResponse]]: + ) -> AsyncPaginator[NcChallengesAdminWidgetList, AsyncV4PagePaginationArray[NcChallengesAdminWidgetList]]: """ Lists all turnstile widgets of an account. @@ -646,7 +642,7 @@ class AsyncWidgets(AsyncAPIResource): raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}") return self._get_api_list( f"/accounts/{account_identifier}/challenges/widgets", - page=AsyncV4PagePaginationArray[WidgetListResponse], + page=AsyncV4PagePaginationArray[NcChallengesAdminWidgetList], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -662,7 +658,7 @@ class AsyncWidgets(AsyncAPIResource): widget_list_params.WidgetListParams, ), ), - model=WidgetListResponse, + model=NcChallengesAdminWidgetList, ) async def delete( @@ -676,7 +672,7 @@ class AsyncWidgets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WidgetDeleteResponse]: + ) -> Optional[NcChallengesAdminWidgetDetail]: """ Destroy a Turnstile Widget. @@ -706,7 +702,7 @@ class AsyncWidgets(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WidgetDeleteResponse]], ResultWrapper[WidgetDeleteResponse]), + cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), ) async def get( @@ -720,7 +716,7 @@ class AsyncWidgets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WidgetGetResponse]: + ) -> Optional[NcChallengesAdminWidgetDetail]: """ Show a single challenge widget configuration. @@ -750,7 +746,7 @@ class AsyncWidgets(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WidgetGetResponse]], ResultWrapper[WidgetGetResponse]), + cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), ) async def rotate_secret( @@ -765,7 +761,7 @@ class AsyncWidgets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WidgetRotateSecretResponse]: + ) -> Optional[NcChallengesAdminWidgetDetail]: """Generate a new secret key for this widget. If `invalidate_immediately` is set to @@ -806,7 +802,7 @@ class AsyncWidgets(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WidgetRotateSecretResponse]], ResultWrapper[WidgetRotateSecretResponse]), + cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), ) diff --git a/src/cloudflare/resources/client_certificates.py b/src/cloudflare/resources/client_certificates.py index b2e3f05b9..3a6395ae7 100644 --- a/src/cloudflare/resources/client_certificates.py +++ b/src/cloudflare/resources/client_certificates.py @@ -8,11 +8,7 @@ from typing_extensions import Literal import httpx from ..types import ( - ClientCertificateGetResponse, - ClientCertificateEditResponse, - ClientCertificateListResponse, - ClientCertificateCreateResponse, - ClientCertificateDeleteResponse, + TLSCertificatesAndHostnamesClientCertificate, client_certificate_list_params, client_certificate_create_params, ) @@ -60,7 +56,7 @@ class ClientCertificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClientCertificateCreateResponse: + ) -> TLSCertificatesAndHostnamesClientCertificate: """ Create a new API Shield mTLS Client Certificate @@ -97,7 +93,10 @@ class ClientCertificates(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ClientCertificateCreateResponse], ResultWrapper[ClientCertificateCreateResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesClientCertificate], + ResultWrapper[TLSCertificatesAndHostnamesClientCertificate], + ), ) def list( @@ -116,7 +115,7 @@ class ClientCertificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[ClientCertificateListResponse]: + ) -> SyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate]: """ List all of your Zone's API Shield mTLS Client Certificates by Status and/or using Pagination @@ -146,7 +145,7 @@ class ClientCertificates(SyncAPIResource): 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[ClientCertificateListResponse], + page=SyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -163,7 +162,7 @@ class ClientCertificates(SyncAPIResource): client_certificate_list_params.ClientCertificateListParams, ), ), - model=ClientCertificateListResponse, + model=TLSCertificatesAndHostnamesClientCertificate, ) def delete( @@ -177,7 +176,7 @@ class ClientCertificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClientCertificateDeleteResponse: + ) -> TLSCertificatesAndHostnamesClientCertificate: """ Set a API Shield mTLS Client Certificate to pending_revocation status for processing to revoked status. @@ -210,7 +209,10 @@ class ClientCertificates(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ClientCertificateDeleteResponse], ResultWrapper[ClientCertificateDeleteResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesClientCertificate], + ResultWrapper[TLSCertificatesAndHostnamesClientCertificate], + ), ) def edit( @@ -224,7 +226,7 @@ class ClientCertificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClientCertificateEditResponse: + ) -> TLSCertificatesAndHostnamesClientCertificate: """ If a API Shield mTLS Client Certificate is in a pending_revocation state, you may reactivate it with this endpoint. @@ -257,7 +259,10 @@ class ClientCertificates(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ClientCertificateEditResponse], ResultWrapper[ClientCertificateEditResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesClientCertificate], + ResultWrapper[TLSCertificatesAndHostnamesClientCertificate], + ), ) def get( @@ -271,7 +276,7 @@ class ClientCertificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClientCertificateGetResponse: + ) -> TLSCertificatesAndHostnamesClientCertificate: """ Get Details for a single mTLS API Shield Client Certificate @@ -303,7 +308,10 @@ class ClientCertificates(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ClientCertificateGetResponse], ResultWrapper[ClientCertificateGetResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesClientCertificate], + ResultWrapper[TLSCertificatesAndHostnamesClientCertificate], + ), ) @@ -328,7 +336,7 @@ class AsyncClientCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClientCertificateCreateResponse: + ) -> TLSCertificatesAndHostnamesClientCertificate: """ Create a new API Shield mTLS Client Certificate @@ -365,7 +373,10 @@ class AsyncClientCertificates(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ClientCertificateCreateResponse], ResultWrapper[ClientCertificateCreateResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesClientCertificate], + ResultWrapper[TLSCertificatesAndHostnamesClientCertificate], + ), ) def list( @@ -384,7 +395,10 @@ class AsyncClientCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[ClientCertificateListResponse, AsyncV4PagePaginationArray[ClientCertificateListResponse]]: + ) -> AsyncPaginator[ + TLSCertificatesAndHostnamesClientCertificate, + AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], + ]: """ List all of your Zone's API Shield mTLS Client Certificates by Status and/or using Pagination @@ -414,7 +428,7 @@ class AsyncClientCertificates(AsyncAPIResource): 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[ClientCertificateListResponse], + page=AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -431,7 +445,7 @@ class AsyncClientCertificates(AsyncAPIResource): client_certificate_list_params.ClientCertificateListParams, ), ), - model=ClientCertificateListResponse, + model=TLSCertificatesAndHostnamesClientCertificate, ) async def delete( @@ -445,7 +459,7 @@ class AsyncClientCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClientCertificateDeleteResponse: + ) -> TLSCertificatesAndHostnamesClientCertificate: """ Set a API Shield mTLS Client Certificate to pending_revocation status for processing to revoked status. @@ -478,7 +492,10 @@ class AsyncClientCertificates(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ClientCertificateDeleteResponse], ResultWrapper[ClientCertificateDeleteResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesClientCertificate], + ResultWrapper[TLSCertificatesAndHostnamesClientCertificate], + ), ) async def edit( @@ -492,7 +509,7 @@ class AsyncClientCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClientCertificateEditResponse: + ) -> TLSCertificatesAndHostnamesClientCertificate: """ If a API Shield mTLS Client Certificate is in a pending_revocation state, you may reactivate it with this endpoint. @@ -525,7 +542,10 @@ class AsyncClientCertificates(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ClientCertificateEditResponse], ResultWrapper[ClientCertificateEditResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesClientCertificate], + ResultWrapper[TLSCertificatesAndHostnamesClientCertificate], + ), ) async def get( @@ -539,7 +559,7 @@ class AsyncClientCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClientCertificateGetResponse: + ) -> TLSCertificatesAndHostnamesClientCertificate: """ Get Details for a single mTLS API Shield Client Certificate @@ -571,7 +591,10 @@ class AsyncClientCertificates(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ClientCertificateGetResponse], ResultWrapper[ClientCertificateGetResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesClientCertificate], + ResultWrapper[TLSCertificatesAndHostnamesClientCertificate], + ), ) diff --git a/src/cloudflare/resources/cloudforce_one/requests/message.py b/src/cloudflare/resources/cloudforce_one/requests/message.py index aaee1d0a4..6d2ea0d8a 100644 --- a/src/cloudflare/resources/cloudforce_one/requests/message.py +++ b/src/cloudflare/resources/cloudforce_one/requests/message.py @@ -27,9 +27,8 @@ from ...._base_client import ( ) from ....types.cloudforce_one.requests import ( MessageGetResponse, - MessageCreateResponse, MessageDeleteResponse, - MessageUpdateResponse, + CloudforceOneRequestMessageItem, message_get_params, message_create_params, message_update_params, @@ -59,7 +58,7 @@ class Message(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MessageCreateResponse: + ) -> CloudforceOneRequestMessageItem: """ Creating a request adds the request into the Cloudforce One queue for analysis. In addition to the content, a short title, type, priority, and releasability @@ -94,7 +93,7 @@ class Message(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MessageCreateResponse], ResultWrapper[MessageCreateResponse]), + cast_to=cast(Type[CloudforceOneRequestMessageItem], ResultWrapper[CloudforceOneRequestMessageItem]), ) def update( @@ -114,7 +113,7 @@ class Message(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MessageUpdateResponse: + ) -> CloudforceOneRequestMessageItem: """ Update a Request Message @@ -164,7 +163,7 @@ class Message(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MessageUpdateResponse], ResultWrapper[MessageUpdateResponse]), + cast_to=cast(Type[CloudforceOneRequestMessageItem], ResultWrapper[CloudforceOneRequestMessageItem]), ) def delete( @@ -312,7 +311,7 @@ class AsyncMessage(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MessageCreateResponse: + ) -> CloudforceOneRequestMessageItem: """ Creating a request adds the request into the Cloudforce One queue for analysis. In addition to the content, a short title, type, priority, and releasability @@ -347,7 +346,7 @@ class AsyncMessage(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MessageCreateResponse], ResultWrapper[MessageCreateResponse]), + cast_to=cast(Type[CloudforceOneRequestMessageItem], ResultWrapper[CloudforceOneRequestMessageItem]), ) async def update( @@ -367,7 +366,7 @@ class AsyncMessage(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MessageUpdateResponse: + ) -> CloudforceOneRequestMessageItem: """ Update a Request Message @@ -417,7 +416,7 @@ class AsyncMessage(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MessageUpdateResponse], ResultWrapper[MessageUpdateResponse]), + cast_to=cast(Type[CloudforceOneRequestMessageItem], ResultWrapper[CloudforceOneRequestMessageItem]), ) async def delete( diff --git a/src/cloudflare/resources/cloudforce_one/requests/priority.py b/src/cloudflare/resources/cloudforce_one/requests/priority.py index 015e2bbdb..c445c6bdb 100644 --- a/src/cloudflare/resources/cloudforce_one/requests/priority.py +++ b/src/cloudflare/resources/cloudforce_one/requests/priority.py @@ -24,12 +24,10 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) +from ....types.cloudforce_one import CloudforceOneQuota, CloudforceOneRequestItem from ....types.cloudforce_one.requests import ( - PriorityGetResponse, - PriorityQuotaResponse, - PriorityCreateResponse, PriorityDeleteResponse, - PriorityUpdateResponse, + CloudforceOnePriorityItem, priority_create_params, priority_update_params, ) @@ -60,7 +58,7 @@ class Priority(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PriorityCreateResponse: + ) -> CloudforceOnePriorityItem: """ Create a New Priority Requirement @@ -103,7 +101,7 @@ class Priority(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PriorityCreateResponse], ResultWrapper[PriorityCreateResponse]), + cast_to=cast(Type[CloudforceOnePriorityItem], ResultWrapper[CloudforceOnePriorityItem]), ) def update( @@ -121,7 +119,7 @@ class Priority(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PriorityUpdateResponse: + ) -> CloudforceOneRequestItem: """ Update a Priority Intelligence Requirement @@ -168,7 +166,7 @@ class Priority(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PriorityUpdateResponse], ResultWrapper[PriorityUpdateResponse]), + cast_to=cast(Type[CloudforceOneRequestItem], ResultWrapper[CloudforceOneRequestItem]), ) def delete( @@ -231,7 +229,7 @@ class Priority(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PriorityGetResponse: + ) -> CloudforceOneRequestItem: """ Get a Priority Intelligence Requirement @@ -261,7 +259,7 @@ class Priority(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PriorityGetResponse], ResultWrapper[PriorityGetResponse]), + cast_to=cast(Type[CloudforceOneRequestItem], ResultWrapper[CloudforceOneRequestItem]), ) def quota( @@ -274,7 +272,7 @@ class Priority(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PriorityQuotaResponse: + ) -> CloudforceOneQuota: """ Get Priority Intelligence Requirement Quota @@ -300,7 +298,7 @@ class Priority(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PriorityQuotaResponse], ResultWrapper[PriorityQuotaResponse]), + cast_to=cast(Type[CloudforceOneQuota], ResultWrapper[CloudforceOneQuota]), ) @@ -327,7 +325,7 @@ class AsyncPriority(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PriorityCreateResponse: + ) -> CloudforceOnePriorityItem: """ Create a New Priority Requirement @@ -370,7 +368,7 @@ class AsyncPriority(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PriorityCreateResponse], ResultWrapper[PriorityCreateResponse]), + cast_to=cast(Type[CloudforceOnePriorityItem], ResultWrapper[CloudforceOnePriorityItem]), ) async def update( @@ -388,7 +386,7 @@ class AsyncPriority(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PriorityUpdateResponse: + ) -> CloudforceOneRequestItem: """ Update a Priority Intelligence Requirement @@ -435,7 +433,7 @@ class AsyncPriority(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PriorityUpdateResponse], ResultWrapper[PriorityUpdateResponse]), + cast_to=cast(Type[CloudforceOneRequestItem], ResultWrapper[CloudforceOneRequestItem]), ) async def delete( @@ -498,7 +496,7 @@ class AsyncPriority(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PriorityGetResponse: + ) -> CloudforceOneRequestItem: """ Get a Priority Intelligence Requirement @@ -528,7 +526,7 @@ class AsyncPriority(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PriorityGetResponse], ResultWrapper[PriorityGetResponse]), + cast_to=cast(Type[CloudforceOneRequestItem], ResultWrapper[CloudforceOneRequestItem]), ) async def quota( @@ -541,7 +539,7 @@ class AsyncPriority(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PriorityQuotaResponse: + ) -> CloudforceOneQuota: """ Get Priority Intelligence Requirement Quota @@ -567,7 +565,7 @@ class AsyncPriority(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PriorityQuotaResponse], ResultWrapper[PriorityQuotaResponse]), + cast_to=cast(Type[CloudforceOneQuota], ResultWrapper[CloudforceOneQuota]), ) diff --git a/src/cloudflare/resources/cloudforce_one/requests/requests.py b/src/cloudflare/resources/cloudforce_one/requests/requests.py index 9475e3b4c..9dfcaa954 100644 --- a/src/cloudflare/resources/cloudforce_one/requests/requests.py +++ b/src/cloudflare/resources/cloudforce_one/requests/requests.py @@ -44,14 +44,12 @@ from ...._base_client import ( make_request_options, ) from ....types.cloudforce_one import ( - RequestGetResponse, - RequestListResponse, - RequestQuotaResponse, - RequestTypesResponse, - RequestCreateResponse, + CloudforceOneQuota, RequestDeleteResponse, - RequestUpdateResponse, - RequestConstantsResponse, + CloudforceOneRequestItem, + CloudforceOneRequestTypes, + CloudforceOneRequestListItem, + CloudforceOneRequestConstants, request_list_params, request_create_params, request_update_params, @@ -92,7 +90,7 @@ class Requests(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RequestCreateResponse: + ) -> CloudforceOneRequestItem: """ Creating a request adds the request into the Cloudforce One queue for analysis. In addition to the content, a short title, type, priority, and releasability @@ -140,7 +138,7 @@ class Requests(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RequestCreateResponse], ResultWrapper[RequestCreateResponse]), + cast_to=cast(Type[CloudforceOneRequestItem], ResultWrapper[CloudforceOneRequestItem]), ) def update( @@ -159,7 +157,7 @@ class Requests(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RequestUpdateResponse: + ) -> CloudforceOneRequestItem: """Updating a request alters the request in the Cloudforce One queue. This API may @@ -212,7 +210,7 @@ class Requests(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RequestUpdateResponse], ResultWrapper[RequestUpdateResponse]), + cast_to=cast(Type[CloudforceOneRequestItem], ResultWrapper[CloudforceOneRequestItem]), ) def list( @@ -235,7 +233,7 @@ class Requests(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[RequestListResponse]: + ) -> SyncV4PagePaginationArray[CloudforceOneRequestListItem]: """ List Requests @@ -274,7 +272,7 @@ class Requests(SyncAPIResource): raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}") return self._get_api_list( f"/accounts/{account_identifier}/cloudforce-one/requests", - page=SyncV4PagePaginationArray[RequestListResponse], + page=SyncV4PagePaginationArray[CloudforceOneRequestListItem], body=maybe_transform( { "page": page, @@ -293,7 +291,7 @@ class Requests(SyncAPIResource): options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - model=RequestListResponse, + model=CloudforceOneRequestListItem, method="post", ) @@ -356,7 +354,7 @@ class Requests(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RequestConstantsResponse: + ) -> CloudforceOneRequestConstants: """ Get Request Priority, Status, and TLP constants @@ -382,7 +380,7 @@ class Requests(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RequestConstantsResponse], ResultWrapper[RequestConstantsResponse]), + cast_to=cast(Type[CloudforceOneRequestConstants], ResultWrapper[CloudforceOneRequestConstants]), ) def get( @@ -396,7 +394,7 @@ class Requests(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RequestGetResponse: + ) -> CloudforceOneRequestItem: """ Get a Request @@ -426,7 +424,7 @@ class Requests(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RequestGetResponse], ResultWrapper[RequestGetResponse]), + cast_to=cast(Type[CloudforceOneRequestItem], ResultWrapper[CloudforceOneRequestItem]), ) def quota( @@ -439,7 +437,7 @@ class Requests(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RequestQuotaResponse: + ) -> CloudforceOneQuota: """ Get Request Quota @@ -465,7 +463,7 @@ class Requests(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RequestQuotaResponse], ResultWrapper[RequestQuotaResponse]), + cast_to=cast(Type[CloudforceOneQuota], ResultWrapper[CloudforceOneQuota]), ) def types( @@ -478,7 +476,7 @@ class Requests(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RequestTypesResponse: + ) -> CloudforceOneRequestTypes: """ Get Request Types @@ -504,7 +502,7 @@ class Requests(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RequestTypesResponse], ResultWrapper[RequestTypesResponse]), + cast_to=cast(Type[CloudforceOneRequestTypes], ResultWrapper[CloudforceOneRequestTypes]), ) @@ -540,7 +538,7 @@ class AsyncRequests(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RequestCreateResponse: + ) -> CloudforceOneRequestItem: """ Creating a request adds the request into the Cloudforce One queue for analysis. In addition to the content, a short title, type, priority, and releasability @@ -588,7 +586,7 @@ class AsyncRequests(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RequestCreateResponse], ResultWrapper[RequestCreateResponse]), + cast_to=cast(Type[CloudforceOneRequestItem], ResultWrapper[CloudforceOneRequestItem]), ) async def update( @@ -607,7 +605,7 @@ class AsyncRequests(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RequestUpdateResponse: + ) -> CloudforceOneRequestItem: """Updating a request alters the request in the Cloudforce One queue. This API may @@ -660,7 +658,7 @@ class AsyncRequests(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RequestUpdateResponse], ResultWrapper[RequestUpdateResponse]), + cast_to=cast(Type[CloudforceOneRequestItem], ResultWrapper[CloudforceOneRequestItem]), ) def list( @@ -683,7 +681,7 @@ class AsyncRequests(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[RequestListResponse, AsyncV4PagePaginationArray[RequestListResponse]]: + ) -> AsyncPaginator[CloudforceOneRequestListItem, AsyncV4PagePaginationArray[CloudforceOneRequestListItem]]: """ List Requests @@ -722,7 +720,7 @@ class AsyncRequests(AsyncAPIResource): raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}") return self._get_api_list( f"/accounts/{account_identifier}/cloudforce-one/requests", - page=AsyncV4PagePaginationArray[RequestListResponse], + page=AsyncV4PagePaginationArray[CloudforceOneRequestListItem], body=maybe_transform( { "page": page, @@ -741,7 +739,7 @@ class AsyncRequests(AsyncAPIResource): options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - model=RequestListResponse, + model=CloudforceOneRequestListItem, method="post", ) @@ -804,7 +802,7 @@ class AsyncRequests(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RequestConstantsResponse: + ) -> CloudforceOneRequestConstants: """ Get Request Priority, Status, and TLP constants @@ -830,7 +828,7 @@ class AsyncRequests(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RequestConstantsResponse], ResultWrapper[RequestConstantsResponse]), + cast_to=cast(Type[CloudforceOneRequestConstants], ResultWrapper[CloudforceOneRequestConstants]), ) async def get( @@ -844,7 +842,7 @@ class AsyncRequests(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RequestGetResponse: + ) -> CloudforceOneRequestItem: """ Get a Request @@ -874,7 +872,7 @@ class AsyncRequests(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RequestGetResponse], ResultWrapper[RequestGetResponse]), + cast_to=cast(Type[CloudforceOneRequestItem], ResultWrapper[CloudforceOneRequestItem]), ) async def quota( @@ -887,7 +885,7 @@ class AsyncRequests(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RequestQuotaResponse: + ) -> CloudforceOneQuota: """ Get Request Quota @@ -913,7 +911,7 @@ class AsyncRequests(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RequestQuotaResponse], ResultWrapper[RequestQuotaResponse]), + cast_to=cast(Type[CloudforceOneQuota], ResultWrapper[CloudforceOneQuota]), ) async def types( @@ -926,7 +924,7 @@ class AsyncRequests(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RequestTypesResponse: + ) -> CloudforceOneRequestTypes: """ Get Request Types @@ -952,7 +950,7 @@ class AsyncRequests(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RequestTypesResponse], ResultWrapper[RequestTypesResponse]), + cast_to=cast(Type[CloudforceOneRequestTypes], ResultWrapper[CloudforceOneRequestTypes]), ) diff --git a/src/cloudflare/resources/custom_certificates/custom_certificates.py b/src/cloudflare/resources/custom_certificates/custom_certificates.py index a7b50886c..ff3ca90c8 100644 --- a/src/cloudflare/resources/custom_certificates/custom_certificates.py +++ b/src/cloudflare/resources/custom_certificates/custom_certificates.py @@ -10,9 +10,9 @@ import httpx from ...types import ( CustomCertificateGetResponse, CustomCertificateEditResponse, - CustomCertificateListResponse, CustomCertificateCreateResponse, CustomCertificateDeleteResponse, + TLSCertificatesAndHostnamesCustomCertificate, custom_certificate_edit_params, custom_certificate_list_params, custom_certificate_create_params, @@ -165,7 +165,7 @@ class CustomCertificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[CustomCertificateListResponse]: + ) -> SyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate]: """List, search, and filter all of your custom SSL certificates. The higher @@ -193,7 +193,7 @@ class CustomCertificates(SyncAPIResource): 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[CustomCertificateListResponse], + page=SyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -208,7 +208,7 @@ class CustomCertificates(SyncAPIResource): custom_certificate_list_params.CustomCertificateListParams, ), ), - model=CustomCertificateListResponse, + model=TLSCertificatesAndHostnamesCustomCertificate, ) def delete( @@ -522,7 +522,10 @@ class AsyncCustomCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[CustomCertificateListResponse, AsyncV4PagePaginationArray[CustomCertificateListResponse]]: + ) -> AsyncPaginator[ + TLSCertificatesAndHostnamesCustomCertificate, + AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], + ]: """List, search, and filter all of your custom SSL certificates. The higher @@ -550,7 +553,7 @@ class AsyncCustomCertificates(AsyncAPIResource): 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[CustomCertificateListResponse], + page=AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -565,7 +568,7 @@ class AsyncCustomCertificates(AsyncAPIResource): custom_certificate_list_params.CustomCertificateListParams, ), ), - model=CustomCertificateListResponse, + model=TLSCertificatesAndHostnamesCustomCertificate, ) async def delete( diff --git a/src/cloudflare/resources/custom_nameservers.py b/src/cloudflare/resources/custom_nameservers.py index f311c657c..7f7897047 100644 --- a/src/cloudflare/resources/custom_nameservers.py +++ b/src/cloudflare/resources/custom_nameservers.py @@ -8,7 +8,7 @@ import httpx from ..types import ( CustomNameserverGetResponse, - CustomNameserverCreateResponse, + DNSCustomNameserversCustomNS, CustomNameserverDeleteResponse, CustomNameserverVerifyResponse, CustomNameserverAvailabiltyResponse, @@ -56,7 +56,7 @@ class CustomNameservers(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomNameserverCreateResponse: + ) -> DNSCustomNameserversCustomNS: """ Add Account Custom Nameserver @@ -93,7 +93,7 @@ class CustomNameservers(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CustomNameserverCreateResponse], ResultWrapper[CustomNameserverCreateResponse]), + cast_to=cast(Type[DNSCustomNameserversCustomNS], ResultWrapper[DNSCustomNameserversCustomNS]), ) def delete( @@ -286,7 +286,7 @@ class AsyncCustomNameservers(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomNameserverCreateResponse: + ) -> DNSCustomNameserversCustomNS: """ Add Account Custom Nameserver @@ -323,7 +323,7 @@ class AsyncCustomNameservers(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CustomNameserverCreateResponse], ResultWrapper[CustomNameserverCreateResponse]), + cast_to=cast(Type[DNSCustomNameserversCustomNS], ResultWrapper[DNSCustomNameserversCustomNS]), ) async def delete( diff --git a/src/cloudflare/resources/d1/database.py b/src/cloudflare/resources/d1/database.py index 21cbdf211..19ad8de2e 100644 --- a/src/cloudflare/resources/d1/database.py +++ b/src/cloudflare/resources/d1/database.py @@ -13,10 +13,9 @@ from ..._utils import ( ) from ..._compat import cached_property from ...types.d1 import ( - DatabaseGetResponse, - DatabaseListResponse, + D1CreateDatabase, + D1DatabaseDetails, DatabaseQueryResponse, - DatabaseCreateResponse, DatabaseDeleteResponse, database_list_params, database_query_params, @@ -59,7 +58,7 @@ class Database(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DatabaseCreateResponse: + ) -> D1CreateDatabase: """ Returns the created D1 database. @@ -86,7 +85,7 @@ class Database(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DatabaseCreateResponse], ResultWrapper[DatabaseCreateResponse]), + cast_to=cast(Type[D1CreateDatabase], ResultWrapper[D1CreateDatabase]), ) def list( @@ -102,7 +101,7 @@ class Database(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[DatabaseListResponse]: + ) -> SyncV4PagePaginationArray[D1CreateDatabase]: """ Returns a list of D1 databases. @@ -127,7 +126,7 @@ class Database(SyncAPIResource): 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}/d1/database", - page=SyncV4PagePaginationArray[DatabaseListResponse], + page=SyncV4PagePaginationArray[D1CreateDatabase], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -142,7 +141,7 @@ class Database(SyncAPIResource): database_list_params.DatabaseListParams, ), ), - model=DatabaseListResponse, + model=D1CreateDatabase, ) def delete( @@ -205,7 +204,7 @@ class Database(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DatabaseGetResponse: + ) -> D1DatabaseDetails: """ Returns the specified D1 database. @@ -235,7 +234,7 @@ class Database(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DatabaseGetResponse], ResultWrapper[DatabaseGetResponse]), + cast_to=cast(Type[D1DatabaseDetails], ResultWrapper[D1DatabaseDetails]), ) def query( @@ -312,7 +311,7 @@ class AsyncDatabase(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DatabaseCreateResponse: + ) -> D1CreateDatabase: """ Returns the created D1 database. @@ -339,7 +338,7 @@ class AsyncDatabase(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DatabaseCreateResponse], ResultWrapper[DatabaseCreateResponse]), + cast_to=cast(Type[D1CreateDatabase], ResultWrapper[D1CreateDatabase]), ) def list( @@ -355,7 +354,7 @@ class AsyncDatabase(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[DatabaseListResponse, AsyncV4PagePaginationArray[DatabaseListResponse]]: + ) -> AsyncPaginator[D1CreateDatabase, AsyncV4PagePaginationArray[D1CreateDatabase]]: """ Returns a list of D1 databases. @@ -380,7 +379,7 @@ class AsyncDatabase(AsyncAPIResource): 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}/d1/database", - page=AsyncV4PagePaginationArray[DatabaseListResponse], + page=AsyncV4PagePaginationArray[D1CreateDatabase], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -395,7 +394,7 @@ class AsyncDatabase(AsyncAPIResource): database_list_params.DatabaseListParams, ), ), - model=DatabaseListResponse, + model=D1CreateDatabase, ) async def delete( @@ -458,7 +457,7 @@ class AsyncDatabase(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DatabaseGetResponse: + ) -> D1DatabaseDetails: """ Returns the specified D1 database. @@ -488,7 +487,7 @@ class AsyncDatabase(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DatabaseGetResponse], ResultWrapper[DatabaseGetResponse]), + cast_to=cast(Type[D1DatabaseDetails], ResultWrapper[D1DatabaseDetails]), ) async def query( diff --git a/src/cloudflare/resources/dcv_delegation/uuid.py b/src/cloudflare/resources/dcv_delegation/uuid.py index 3cf8a9c18..7fc1fa0d3 100644 --- a/src/cloudflare/resources/dcv_delegation/uuid.py +++ b/src/cloudflare/resources/dcv_delegation/uuid.py @@ -19,7 +19,7 @@ from ..._wrappers import ResultWrapper from ..._base_client import ( make_request_options, ) -from ...types.dcv_delegation import UUIDGetResponse +from ...types.dcv_delegation import TLSCertificatesAndHostnamesUUIDObject __all__ = ["UUID", "AsyncUUID"] @@ -43,7 +43,7 @@ class UUID(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> UUIDGetResponse: + ) -> TLSCertificatesAndHostnamesUUIDObject: """ Retrieve the account and zone specific unique identifier used as part of the CNAME target for DCV Delegation. @@ -70,7 +70,9 @@ class UUID(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[UUIDGetResponse], ResultWrapper[UUIDGetResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesUUIDObject], ResultWrapper[TLSCertificatesAndHostnamesUUIDObject] + ), ) @@ -93,7 +95,7 @@ class AsyncUUID(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> UUIDGetResponse: + ) -> TLSCertificatesAndHostnamesUUIDObject: """ Retrieve the account and zone specific unique identifier used as part of the CNAME target for DCV Delegation. @@ -120,7 +122,9 @@ class AsyncUUID(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[UUIDGetResponse], ResultWrapper[UUIDGetResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesUUIDObject], ResultWrapper[TLSCertificatesAndHostnamesUUIDObject] + ), ) diff --git a/src/cloudflare/resources/dns/analytics/reports/bytimes.py b/src/cloudflare/resources/dns/analytics/reports/bytimes.py index 96478c34a..5b09be21e 100644 --- a/src/cloudflare/resources/dns/analytics/reports/bytimes.py +++ b/src/cloudflare/resources/dns/analytics/reports/bytimes.py @@ -25,7 +25,7 @@ from ....._wrappers import ResultWrapper from ....._base_client import ( make_request_options, ) -from .....types.dns.analytics.reports import BytimeGetResponse, bytime_get_params +from .....types.dns.analytics.reports import DNSDNSAnalyticsAPIReportBytime, bytime_get_params __all__ = ["Bytimes", "AsyncBytimes"] @@ -58,7 +58,7 @@ class Bytimes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BytimeGetResponse: + ) -> DNSDNSAnalyticsAPIReportBytime: """ Retrieves a list of aggregate metrics grouped by time interval. @@ -118,7 +118,7 @@ class Bytimes(SyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BytimeGetResponse], ResultWrapper[BytimeGetResponse]), + cast_to=cast(Type[DNSDNSAnalyticsAPIReportBytime], ResultWrapper[DNSDNSAnalyticsAPIReportBytime]), ) @@ -150,7 +150,7 @@ class AsyncBytimes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BytimeGetResponse: + ) -> DNSDNSAnalyticsAPIReportBytime: """ Retrieves a list of aggregate metrics grouped by time interval. @@ -210,7 +210,7 @@ class AsyncBytimes(AsyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BytimeGetResponse], ResultWrapper[BytimeGetResponse]), + cast_to=cast(Type[DNSDNSAnalyticsAPIReportBytime], ResultWrapper[DNSDNSAnalyticsAPIReportBytime]), ) diff --git a/src/cloudflare/resources/dns/analytics/reports/reports.py b/src/cloudflare/resources/dns/analytics/reports/reports.py index 7b386f4f3..54d54927e 100644 --- a/src/cloudflare/resources/dns/analytics/reports/reports.py +++ b/src/cloudflare/resources/dns/analytics/reports/reports.py @@ -32,7 +32,7 @@ from ....._wrappers import ResultWrapper from ....._base_client import ( make_request_options, ) -from .....types.dns.analytics import ReportGetResponse, report_get_params +from .....types.dns.analytics import DNSDNSAnalyticsAPIReport, report_get_params __all__ = ["Reports", "AsyncReports"] @@ -67,7 +67,7 @@ class Reports(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ReportGetResponse: + ) -> DNSDNSAnalyticsAPIReport: """ Retrieves a list of summarised aggregate metrics over a given time period. @@ -124,7 +124,7 @@ class Reports(SyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ReportGetResponse], ResultWrapper[ReportGetResponse]), + cast_to=cast(Type[DNSDNSAnalyticsAPIReport], ResultWrapper[DNSDNSAnalyticsAPIReport]), ) @@ -158,7 +158,7 @@ class AsyncReports(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ReportGetResponse: + ) -> DNSDNSAnalyticsAPIReport: """ Retrieves a list of summarised aggregate metrics over a given time period. @@ -215,7 +215,7 @@ class AsyncReports(AsyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ReportGetResponse], ResultWrapper[ReportGetResponse]), + cast_to=cast(Type[DNSDNSAnalyticsAPIReport], ResultWrapper[DNSDNSAnalyticsAPIReport]), ) diff --git a/src/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py b/src/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py index 835c57a53..c51c63b54 100644 --- a/src/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py +++ b/src/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py @@ -25,7 +25,8 @@ from ......_wrappers import ResultWrapper from ......_base_client import ( make_request_options, ) -from ......types.dns.firewall.analytics.reports import BytimeGetResponse, bytime_get_params +from ......types.dns.analytics.reports import DNSDNSAnalyticsAPIReportBytime +from ......types.dns.firewall.analytics.reports import bytime_get_params __all__ = ["Bytimes", "AsyncBytimes"] @@ -59,7 +60,7 @@ class Bytimes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BytimeGetResponse: + ) -> DNSDNSAnalyticsAPIReportBytime: """ Retrieves a list of aggregate metrics grouped by time interval. @@ -123,7 +124,7 @@ class Bytimes(SyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BytimeGetResponse], ResultWrapper[BytimeGetResponse]), + cast_to=cast(Type[DNSDNSAnalyticsAPIReportBytime], ResultWrapper[DNSDNSAnalyticsAPIReportBytime]), ) @@ -156,7 +157,7 @@ class AsyncBytimes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BytimeGetResponse: + ) -> DNSDNSAnalyticsAPIReportBytime: """ Retrieves a list of aggregate metrics grouped by time interval. @@ -220,7 +221,7 @@ class AsyncBytimes(AsyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BytimeGetResponse], ResultWrapper[BytimeGetResponse]), + cast_to=cast(Type[DNSDNSAnalyticsAPIReportBytime], ResultWrapper[DNSDNSAnalyticsAPIReportBytime]), ) diff --git a/src/cloudflare/resources/dns/firewall/analytics/reports/reports.py b/src/cloudflare/resources/dns/firewall/analytics/reports/reports.py index 21efcab37..28de60b80 100644 --- a/src/cloudflare/resources/dns/firewall/analytics/reports/reports.py +++ b/src/cloudflare/resources/dns/firewall/analytics/reports/reports.py @@ -32,7 +32,8 @@ from ......_wrappers import ResultWrapper from ......_base_client import ( make_request_options, ) -from ......types.dns.firewall.analytics import ReportGetResponse, report_get_params +from ......types.dns.analytics import DNSDNSAnalyticsAPIReport +from ......types.dns.firewall.analytics import report_get_params __all__ = ["Reports", "AsyncReports"] @@ -68,7 +69,7 @@ class Reports(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ReportGetResponse: + ) -> DNSDNSAnalyticsAPIReport: """ Retrieves a list of summarised aggregate metrics over a given time period. @@ -129,7 +130,7 @@ class Reports(SyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ReportGetResponse], ResultWrapper[ReportGetResponse]), + cast_to=cast(Type[DNSDNSAnalyticsAPIReport], ResultWrapper[DNSDNSAnalyticsAPIReport]), ) @@ -164,7 +165,7 @@ class AsyncReports(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ReportGetResponse: + ) -> DNSDNSAnalyticsAPIReport: """ Retrieves a list of summarised aggregate metrics over a given time period. @@ -225,7 +226,7 @@ class AsyncReports(AsyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ReportGetResponse], ResultWrapper[ReportGetResponse]), + cast_to=cast(Type[DNSDNSAnalyticsAPIReport], ResultWrapper[DNSDNSAnalyticsAPIReport]), ) diff --git a/src/cloudflare/resources/dns/firewall/firewall.py b/src/cloudflare/resources/dns/firewall/firewall.py index f009efc9d..29068a9bc 100644 --- a/src/cloudflare/resources/dns/firewall/firewall.py +++ b/src/cloudflare/resources/dns/firewall/firewall.py @@ -29,10 +29,7 @@ from ...._response import ( ) from ...._wrappers import ResultWrapper from ....types.dns import ( - FirewallGetResponse, - FirewallEditResponse, - FirewallListResponse, - FirewallCreateResponse, + DNSFirewallDNSFirewall, FirewallDeleteResponse, firewall_edit_params, firewall_list_params, @@ -82,7 +79,7 @@ class Firewall(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FirewallCreateResponse: + ) -> DNSFirewallDNSFirewall: """ Create a configured DNS Firewall Cluster. @@ -146,7 +143,7 @@ class Firewall(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[FirewallCreateResponse], ResultWrapper[FirewallCreateResponse]), + cast_to=cast(Type[DNSFirewallDNSFirewall], ResultWrapper[DNSFirewallDNSFirewall]), ) def list( @@ -161,7 +158,7 @@ class Firewall(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[FirewallListResponse]: + ) -> SyncV4PagePaginationArray[DNSFirewallDNSFirewall]: """ List configured DNS Firewall clusters for an account. @@ -184,7 +181,7 @@ class Firewall(SyncAPIResource): 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[FirewallListResponse], + page=SyncV4PagePaginationArray[DNSFirewallDNSFirewall], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -198,7 +195,7 @@ class Firewall(SyncAPIResource): firewall_list_params.FirewallListParams, ), ), - model=FirewallListResponse, + model=DNSFirewallDNSFirewall, ) def delete( @@ -268,7 +265,7 @@ class Firewall(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FirewallEditResponse: + ) -> DNSFirewallDNSFirewall: """ Modify a DNS Firewall Cluster configuration. @@ -337,7 +334,7 @@ class Firewall(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[FirewallEditResponse], ResultWrapper[FirewallEditResponse]), + cast_to=cast(Type[DNSFirewallDNSFirewall], ResultWrapper[DNSFirewallDNSFirewall]), ) def get( @@ -351,7 +348,7 @@ class Firewall(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FirewallGetResponse: + ) -> DNSFirewallDNSFirewall: """ Show a single configured DNS Firewall cluster for an account. @@ -381,7 +378,7 @@ class Firewall(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[FirewallGetResponse], ResultWrapper[FirewallGetResponse]), + cast_to=cast(Type[DNSFirewallDNSFirewall], ResultWrapper[DNSFirewallDNSFirewall]), ) @@ -419,7 +416,7 @@ class AsyncFirewall(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FirewallCreateResponse: + ) -> DNSFirewallDNSFirewall: """ Create a configured DNS Firewall Cluster. @@ -483,7 +480,7 @@ class AsyncFirewall(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[FirewallCreateResponse], ResultWrapper[FirewallCreateResponse]), + cast_to=cast(Type[DNSFirewallDNSFirewall], ResultWrapper[DNSFirewallDNSFirewall]), ) def list( @@ -498,7 +495,7 @@ class AsyncFirewall(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[FirewallListResponse, AsyncV4PagePaginationArray[FirewallListResponse]]: + ) -> AsyncPaginator[DNSFirewallDNSFirewall, AsyncV4PagePaginationArray[DNSFirewallDNSFirewall]]: """ List configured DNS Firewall clusters for an account. @@ -521,7 +518,7 @@ class AsyncFirewall(AsyncAPIResource): 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[FirewallListResponse], + page=AsyncV4PagePaginationArray[DNSFirewallDNSFirewall], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -535,7 +532,7 @@ class AsyncFirewall(AsyncAPIResource): firewall_list_params.FirewallListParams, ), ), - model=FirewallListResponse, + model=DNSFirewallDNSFirewall, ) async def delete( @@ -605,7 +602,7 @@ class AsyncFirewall(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FirewallEditResponse: + ) -> DNSFirewallDNSFirewall: """ Modify a DNS Firewall Cluster configuration. @@ -674,7 +671,7 @@ class AsyncFirewall(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[FirewallEditResponse], ResultWrapper[FirewallEditResponse]), + cast_to=cast(Type[DNSFirewallDNSFirewall], ResultWrapper[DNSFirewallDNSFirewall]), ) async def get( @@ -688,7 +685,7 @@ class AsyncFirewall(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FirewallGetResponse: + ) -> DNSFirewallDNSFirewall: """ Show a single configured DNS Firewall cluster for an account. @@ -718,7 +715,7 @@ class AsyncFirewall(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[FirewallGetResponse], ResultWrapper[FirewallGetResponse]), + cast_to=cast(Type[DNSFirewallDNSFirewall], ResultWrapper[DNSFirewallDNSFirewall]), ) diff --git a/src/cloudflare/resources/dnssec.py b/src/cloudflare/resources/dnssec.py index 9024315c4..3cf01f0a5 100644 --- a/src/cloudflare/resources/dnssec.py +++ b/src/cloudflare/resources/dnssec.py @@ -7,7 +7,7 @@ from typing_extensions import Literal import httpx -from ..types import DNSSECGetResponse, DNSSECEditResponse, DNSSECDeleteResponse, dnssec_edit_params +from ..types import DNSSECDNSSEC, DNSSECDeleteResponse, dnssec_edit_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -95,7 +95,7 @@ class DNSSEC(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSSECEditResponse: + ) -> DNSSECDNSSEC: """ Enable or disable DNSSEC. @@ -148,7 +148,7 @@ class DNSSEC(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSSECEditResponse], ResultWrapper[DNSSECEditResponse]), + cast_to=cast(Type[DNSSECDNSSEC], ResultWrapper[DNSSECDNSSEC]), ) def get( @@ -161,7 +161,7 @@ class DNSSEC(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSSECGetResponse: + ) -> DNSSECDNSSEC: """ Details about DNSSEC status and configuration. @@ -187,7 +187,7 @@ class DNSSEC(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSSECGetResponse], ResultWrapper[DNSSECGetResponse]), + cast_to=cast(Type[DNSSECDNSSEC], ResultWrapper[DNSSECDNSSEC]), ) @@ -257,7 +257,7 @@ class AsyncDNSSEC(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSSECEditResponse: + ) -> DNSSECDNSSEC: """ Enable or disable DNSSEC. @@ -310,7 +310,7 @@ class AsyncDNSSEC(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSSECEditResponse], ResultWrapper[DNSSECEditResponse]), + cast_to=cast(Type[DNSSECDNSSEC], ResultWrapper[DNSSECDNSSEC]), ) async def get( @@ -323,7 +323,7 @@ class AsyncDNSSEC(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSSECGetResponse: + ) -> DNSSECDNSSEC: """ Details about DNSSEC status and configuration. @@ -349,7 +349,7 @@ class AsyncDNSSEC(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSSECGetResponse], ResultWrapper[DNSSECGetResponse]), + cast_to=cast(Type[DNSSECDNSSEC], ResultWrapper[DNSSECDNSSEC]), ) diff --git a/src/cloudflare/resources/email_routing/routing/rules/catch_alls.py b/src/cloudflare/resources/email_routing/routing/rules/catch_alls.py index 30bc7d5e6..541f1efbf 100644 --- a/src/cloudflare/resources/email_routing/routing/rules/catch_alls.py +++ b/src/cloudflare/resources/email_routing/routing/rules/catch_alls.py @@ -24,7 +24,7 @@ from ....._wrappers import ResultWrapper from ....._base_client import ( make_request_options, ) -from .....types.email_routing.routing.rules import CatchAllGetResponse, CatchAllUpdateResponse, catch_all_update_params +from .....types.email_routing.routing.rules import EmailCatchAllRule, catch_all_update_params __all__ = ["CatchAlls", "AsyncCatchAlls"] @@ -52,7 +52,7 @@ class CatchAlls(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CatchAllUpdateResponse: + ) -> EmailCatchAllRule: """ Enable or disable catch-all routing rule, or change action to forward to specific destination address. @@ -96,7 +96,7 @@ class CatchAlls(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CatchAllUpdateResponse], ResultWrapper[CatchAllUpdateResponse]), + cast_to=cast(Type[EmailCatchAllRule], ResultWrapper[EmailCatchAllRule]), ) def get( @@ -109,7 +109,7 @@ class CatchAlls(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CatchAllGetResponse: + ) -> EmailCatchAllRule: """ Get information on the default catch-all routing rule. @@ -135,7 +135,7 @@ class CatchAlls(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CatchAllGetResponse], ResultWrapper[CatchAllGetResponse]), + cast_to=cast(Type[EmailCatchAllRule], ResultWrapper[EmailCatchAllRule]), ) @@ -162,7 +162,7 @@ class AsyncCatchAlls(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CatchAllUpdateResponse: + ) -> EmailCatchAllRule: """ Enable or disable catch-all routing rule, or change action to forward to specific destination address. @@ -206,7 +206,7 @@ class AsyncCatchAlls(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CatchAllUpdateResponse], ResultWrapper[CatchAllUpdateResponse]), + cast_to=cast(Type[EmailCatchAllRule], ResultWrapper[EmailCatchAllRule]), ) async def get( @@ -219,7 +219,7 @@ class AsyncCatchAlls(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CatchAllGetResponse: + ) -> EmailCatchAllRule: """ Get information on the default catch-all routing rule. @@ -245,7 +245,7 @@ class AsyncCatchAlls(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CatchAllGetResponse], ResultWrapper[CatchAllGetResponse]), + cast_to=cast(Type[EmailCatchAllRule], ResultWrapper[EmailCatchAllRule]), ) diff --git a/src/cloudflare/resources/filters.py b/src/cloudflare/resources/filters.py index 61a9655d5..473d01b30 100644 --- a/src/cloudflare/resources/filters.py +++ b/src/cloudflare/resources/filters.py @@ -7,11 +7,8 @@ from typing import Type, Optional, cast import httpx from ..types import ( - FilterGetResponse, - FilterListResponse, + LegacyJhsFilter, FilterCreateResponse, - FilterDeleteResponse, - FilterUpdateResponse, filter_list_params, filter_create_params, filter_update_params, @@ -101,7 +98,7 @@ class Filters(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[FilterUpdateResponse]: + ) -> Optional[LegacyJhsFilter]: """ Updates an existing filter. @@ -132,7 +129,7 @@ class Filters(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[FilterUpdateResponse]], ResultWrapper[FilterUpdateResponse]), + cast_to=cast(Type[Optional[LegacyJhsFilter]], ResultWrapper[LegacyJhsFilter]), ) def list( @@ -151,7 +148,7 @@ class Filters(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[FilterListResponse]: + ) -> SyncV4PagePaginationArray[LegacyJhsFilter]: """Fetches filters in a zone. You can filter the results using several optional @@ -184,7 +181,7 @@ class Filters(SyncAPIResource): 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[FilterListResponse], + page=SyncV4PagePaginationArray[LegacyJhsFilter], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -202,7 +199,7 @@ class Filters(SyncAPIResource): filter_list_params.FilterListParams, ), ), - model=FilterListResponse, + model=LegacyJhsFilter, ) def delete( @@ -216,7 +213,7 @@ class Filters(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[FilterDeleteResponse]: + ) -> Optional[LegacyJhsFilter]: """ Deletes an existing filter. @@ -246,7 +243,7 @@ class Filters(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[FilterDeleteResponse]], ResultWrapper[FilterDeleteResponse]), + cast_to=cast(Type[Optional[LegacyJhsFilter]], ResultWrapper[LegacyJhsFilter]), ) def get( @@ -260,7 +257,7 @@ class Filters(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[FilterGetResponse]: + ) -> Optional[LegacyJhsFilter]: """ Fetches the details of a filter. @@ -290,7 +287,7 @@ class Filters(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[FilterGetResponse]], ResultWrapper[FilterGetResponse]), + cast_to=cast(Type[Optional[LegacyJhsFilter]], ResultWrapper[LegacyJhsFilter]), ) @@ -356,7 +353,7 @@ class AsyncFilters(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[FilterUpdateResponse]: + ) -> Optional[LegacyJhsFilter]: """ Updates an existing filter. @@ -387,7 +384,7 @@ class AsyncFilters(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[FilterUpdateResponse]], ResultWrapper[FilterUpdateResponse]), + cast_to=cast(Type[Optional[LegacyJhsFilter]], ResultWrapper[LegacyJhsFilter]), ) def list( @@ -406,7 +403,7 @@ class AsyncFilters(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[FilterListResponse, AsyncV4PagePaginationArray[FilterListResponse]]: + ) -> AsyncPaginator[LegacyJhsFilter, AsyncV4PagePaginationArray[LegacyJhsFilter]]: """Fetches filters in a zone. You can filter the results using several optional @@ -439,7 +436,7 @@ class AsyncFilters(AsyncAPIResource): 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[FilterListResponse], + page=AsyncV4PagePaginationArray[LegacyJhsFilter], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -457,7 +454,7 @@ class AsyncFilters(AsyncAPIResource): filter_list_params.FilterListParams, ), ), - model=FilterListResponse, + model=LegacyJhsFilter, ) async def delete( @@ -471,7 +468,7 @@ class AsyncFilters(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[FilterDeleteResponse]: + ) -> Optional[LegacyJhsFilter]: """ Deletes an existing filter. @@ -501,7 +498,7 @@ class AsyncFilters(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[FilterDeleteResponse]], ResultWrapper[FilterDeleteResponse]), + cast_to=cast(Type[Optional[LegacyJhsFilter]], ResultWrapper[LegacyJhsFilter]), ) async def get( @@ -515,7 +512,7 @@ class AsyncFilters(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[FilterGetResponse]: + ) -> Optional[LegacyJhsFilter]: """ Fetches the details of a filter. @@ -545,7 +542,7 @@ class AsyncFilters(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[FilterGetResponse]], ResultWrapper[FilterGetResponse]), + cast_to=cast(Type[Optional[LegacyJhsFilter]], ResultWrapper[LegacyJhsFilter]), ) diff --git a/src/cloudflare/resources/firewall/lockdowns.py b/src/cloudflare/resources/firewall/lockdowns.py index a9140c204..c52248cb5 100644 --- a/src/cloudflare/resources/firewall/lockdowns.py +++ b/src/cloudflare/resources/firewall/lockdowns.py @@ -26,11 +26,8 @@ from ..._base_client import ( make_request_options, ) from ...types.firewall import ( - LockdownGetResponse, - LockdownListResponse, - LockdownCreateResponse, + LegacyJhsZonelockdown, LockdownDeleteResponse, - LockdownUpdateResponse, lockdown_list_params, lockdown_create_params, lockdown_update_params, @@ -59,7 +56,7 @@ class Lockdowns(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LockdownCreateResponse]: + ) -> Optional[LegacyJhsZonelockdown]: """ Creates a new Zone Lockdown rule. @@ -86,7 +83,7 @@ class Lockdowns(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LockdownCreateResponse]], ResultWrapper[LockdownCreateResponse]), + cast_to=cast(Type[Optional[LegacyJhsZonelockdown]], ResultWrapper[LegacyJhsZonelockdown]), ) def update( @@ -101,7 +98,7 @@ class Lockdowns(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LockdownUpdateResponse]: + ) -> Optional[LegacyJhsZonelockdown]: """ Updates an existing Zone Lockdown rule. @@ -132,7 +129,7 @@ class Lockdowns(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LockdownUpdateResponse]], ResultWrapper[LockdownUpdateResponse]), + cast_to=cast(Type[Optional[LegacyJhsZonelockdown]], ResultWrapper[LegacyJhsZonelockdown]), ) def list( @@ -154,7 +151,7 @@ class Lockdowns(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[LockdownListResponse]: + ) -> SyncV4PagePaginationArray[LegacyJhsZonelockdown]: """Fetches Zone Lockdown rules. You can filter the results using several optional @@ -196,7 +193,7 @@ class Lockdowns(SyncAPIResource): 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[LockdownListResponse], + page=SyncV4PagePaginationArray[LegacyJhsZonelockdown], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -217,7 +214,7 @@ class Lockdowns(SyncAPIResource): lockdown_list_params.LockdownListParams, ), ), - model=LockdownListResponse, + model=LegacyJhsZonelockdown, ) def delete( @@ -275,7 +272,7 @@ class Lockdowns(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LockdownGetResponse]: + ) -> Optional[LegacyJhsZonelockdown]: """ Fetches the details of a Zone Lockdown rule. @@ -305,7 +302,7 @@ class Lockdowns(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LockdownGetResponse]], ResultWrapper[LockdownGetResponse]), + cast_to=cast(Type[Optional[LegacyJhsZonelockdown]], ResultWrapper[LegacyJhsZonelockdown]), ) @@ -329,7 +326,7 @@ class AsyncLockdowns(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LockdownCreateResponse]: + ) -> Optional[LegacyJhsZonelockdown]: """ Creates a new Zone Lockdown rule. @@ -356,7 +353,7 @@ class AsyncLockdowns(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LockdownCreateResponse]], ResultWrapper[LockdownCreateResponse]), + cast_to=cast(Type[Optional[LegacyJhsZonelockdown]], ResultWrapper[LegacyJhsZonelockdown]), ) async def update( @@ -371,7 +368,7 @@ class AsyncLockdowns(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LockdownUpdateResponse]: + ) -> Optional[LegacyJhsZonelockdown]: """ Updates an existing Zone Lockdown rule. @@ -402,7 +399,7 @@ class AsyncLockdowns(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LockdownUpdateResponse]], ResultWrapper[LockdownUpdateResponse]), + cast_to=cast(Type[Optional[LegacyJhsZonelockdown]], ResultWrapper[LegacyJhsZonelockdown]), ) def list( @@ -424,7 +421,7 @@ class AsyncLockdowns(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[LockdownListResponse, AsyncV4PagePaginationArray[LockdownListResponse]]: + ) -> AsyncPaginator[LegacyJhsZonelockdown, AsyncV4PagePaginationArray[LegacyJhsZonelockdown]]: """Fetches Zone Lockdown rules. You can filter the results using several optional @@ -466,7 +463,7 @@ class AsyncLockdowns(AsyncAPIResource): 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[LockdownListResponse], + page=AsyncV4PagePaginationArray[LegacyJhsZonelockdown], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -487,7 +484,7 @@ class AsyncLockdowns(AsyncAPIResource): lockdown_list_params.LockdownListParams, ), ), - model=LockdownListResponse, + model=LegacyJhsZonelockdown, ) async def delete( @@ -545,7 +542,7 @@ class AsyncLockdowns(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LockdownGetResponse]: + ) -> Optional[LegacyJhsZonelockdown]: """ Fetches the details of a Zone Lockdown rule. @@ -575,7 +572,7 @@ class AsyncLockdowns(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LockdownGetResponse]], ResultWrapper[LockdownGetResponse]), + cast_to=cast(Type[Optional[LegacyJhsZonelockdown]], ResultWrapper[LegacyJhsZonelockdown]), ) diff --git a/src/cloudflare/resources/firewall/rules.py b/src/cloudflare/resources/firewall/rules.py index 1f2ffbda9..7b0acbb11 100644 --- a/src/cloudflare/resources/firewall/rules.py +++ b/src/cloudflare/resources/firewall/rules.py @@ -26,12 +26,9 @@ from ..._base_client import ( make_request_options, ) from ...types.firewall import ( - RuleGetResponse, RuleEditResponse, - RuleListResponse, RuleCreateResponse, - RuleDeleteResponse, - RuleUpdateResponse, + LegacyJhsFilterRule, rule_edit_params, rule_list_params, rule_create_params, @@ -104,7 +101,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleUpdateResponse]: + ) -> Optional[LegacyJhsFilterRule]: """ Updates an existing firewall rule. @@ -135,7 +132,7 @@ class Rules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleUpdateResponse]], ResultWrapper[RuleUpdateResponse]), + cast_to=cast(Type[Optional[LegacyJhsFilterRule]], ResultWrapper[LegacyJhsFilterRule]), ) def list( @@ -153,7 +150,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[RuleListResponse]: + ) -> SyncV4PagePaginationArray[LegacyJhsFilterRule]: """Fetches firewall rules in a zone. You can filter the results using several @@ -184,7 +181,7 @@ class Rules(SyncAPIResource): 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[RuleListResponse], + page=SyncV4PagePaginationArray[LegacyJhsFilterRule], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -201,7 +198,7 @@ class Rules(SyncAPIResource): rule_list_params.RuleListParams, ), ), - model=RuleListResponse, + model=LegacyJhsFilterRule, ) def delete( @@ -216,7 +213,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleDeleteResponse]: + ) -> Optional[LegacyJhsFilterRule]: """ Deletes an existing firewall rule. @@ -252,7 +249,7 @@ class Rules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleDeleteResponse]], ResultWrapper[RuleDeleteResponse]), + cast_to=cast(Type[Optional[LegacyJhsFilterRule]], ResultWrapper[LegacyJhsFilterRule]), ) def edit( @@ -312,7 +309,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleGetResponse]: + ) -> Optional[LegacyJhsFilterRule]: """ Fetches the details of a firewall rule. @@ -342,7 +339,7 @@ class Rules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleGetResponse]], ResultWrapper[RuleGetResponse]), + cast_to=cast(Type[Optional[LegacyJhsFilterRule]], ResultWrapper[LegacyJhsFilterRule]), ) @@ -408,7 +405,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleUpdateResponse]: + ) -> Optional[LegacyJhsFilterRule]: """ Updates an existing firewall rule. @@ -439,7 +436,7 @@ class AsyncRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleUpdateResponse]], ResultWrapper[RuleUpdateResponse]), + cast_to=cast(Type[Optional[LegacyJhsFilterRule]], ResultWrapper[LegacyJhsFilterRule]), ) def list( @@ -457,7 +454,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[RuleListResponse, AsyncV4PagePaginationArray[RuleListResponse]]: + ) -> AsyncPaginator[LegacyJhsFilterRule, AsyncV4PagePaginationArray[LegacyJhsFilterRule]]: """Fetches firewall rules in a zone. You can filter the results using several @@ -488,7 +485,7 @@ class AsyncRules(AsyncAPIResource): 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[RuleListResponse], + page=AsyncV4PagePaginationArray[LegacyJhsFilterRule], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -505,7 +502,7 @@ class AsyncRules(AsyncAPIResource): rule_list_params.RuleListParams, ), ), - model=RuleListResponse, + model=LegacyJhsFilterRule, ) async def delete( @@ -520,7 +517,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleDeleteResponse]: + ) -> Optional[LegacyJhsFilterRule]: """ Deletes an existing firewall rule. @@ -556,7 +553,7 @@ class AsyncRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleDeleteResponse]], ResultWrapper[RuleDeleteResponse]), + cast_to=cast(Type[Optional[LegacyJhsFilterRule]], ResultWrapper[LegacyJhsFilterRule]), ) async def edit( @@ -616,7 +613,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleGetResponse]: + ) -> Optional[LegacyJhsFilterRule]: """ Fetches the details of a firewall rule. @@ -646,7 +643,7 @@ class AsyncRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleGetResponse]], ResultWrapper[RuleGetResponse]), + cast_to=cast(Type[Optional[LegacyJhsFilterRule]], ResultWrapper[LegacyJhsFilterRule]), ) diff --git a/src/cloudflare/resources/firewall/waf/overrides.py b/src/cloudflare/resources/firewall/waf/overrides.py index 2a718e3f4..3097533dc 100644 --- a/src/cloudflare/resources/firewall/waf/overrides.py +++ b/src/cloudflare/resources/firewall/waf/overrides.py @@ -26,11 +26,8 @@ from ...._base_client import ( make_request_options, ) from ....types.firewall.waf import ( - OverrideGetResponse, - OverrideListResponse, - OverrideCreateResponse, + LegacyJhsOverride, OverrideDeleteResponse, - OverrideUpdateResponse, override_list_params, override_create_params, override_update_params, @@ -59,7 +56,7 @@ class Overrides(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OverrideCreateResponse]: + ) -> Optional[LegacyJhsOverride]: """ Creates a URI-based WAF override for a zone. @@ -89,7 +86,7 @@ class Overrides(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[OverrideCreateResponse]], ResultWrapper[OverrideCreateResponse]), + cast_to=cast(Type[Optional[LegacyJhsOverride]], ResultWrapper[LegacyJhsOverride]), ) def update( @@ -104,7 +101,7 @@ class Overrides(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OverrideUpdateResponse]: + ) -> Optional[LegacyJhsOverride]: """ Updates an existing URI-based WAF override. @@ -138,7 +135,7 @@ class Overrides(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[OverrideUpdateResponse]], ResultWrapper[OverrideUpdateResponse]), + cast_to=cast(Type[Optional[LegacyJhsOverride]], ResultWrapper[LegacyJhsOverride]), ) def list( @@ -153,7 +150,7 @@ class Overrides(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[OverrideListResponse]: + ) -> SyncV4PagePaginationArray[LegacyJhsOverride]: """ Fetches the URI-based WAF overrides in a zone. @@ -179,7 +176,7 @@ class Overrides(SyncAPIResource): 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[OverrideListResponse], + page=SyncV4PagePaginationArray[LegacyJhsOverride], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -193,7 +190,7 @@ class Overrides(SyncAPIResource): override_list_params.OverrideListParams, ), ), - model=OverrideListResponse, + model=LegacyJhsOverride, ) def delete( @@ -254,7 +251,7 @@ class Overrides(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OverrideGetResponse]: + ) -> Optional[LegacyJhsOverride]: """ Fetches the details of a URI-based WAF override. @@ -287,7 +284,7 @@ class Overrides(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[OverrideGetResponse]], ResultWrapper[OverrideGetResponse]), + cast_to=cast(Type[Optional[LegacyJhsOverride]], ResultWrapper[LegacyJhsOverride]), ) @@ -311,7 +308,7 @@ class AsyncOverrides(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OverrideCreateResponse]: + ) -> Optional[LegacyJhsOverride]: """ Creates a URI-based WAF override for a zone. @@ -341,7 +338,7 @@ class AsyncOverrides(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[OverrideCreateResponse]], ResultWrapper[OverrideCreateResponse]), + cast_to=cast(Type[Optional[LegacyJhsOverride]], ResultWrapper[LegacyJhsOverride]), ) async def update( @@ -356,7 +353,7 @@ class AsyncOverrides(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OverrideUpdateResponse]: + ) -> Optional[LegacyJhsOverride]: """ Updates an existing URI-based WAF override. @@ -390,7 +387,7 @@ class AsyncOverrides(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[OverrideUpdateResponse]], ResultWrapper[OverrideUpdateResponse]), + cast_to=cast(Type[Optional[LegacyJhsOverride]], ResultWrapper[LegacyJhsOverride]), ) def list( @@ -405,7 +402,7 @@ class AsyncOverrides(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[OverrideListResponse, AsyncV4PagePaginationArray[OverrideListResponse]]: + ) -> AsyncPaginator[LegacyJhsOverride, AsyncV4PagePaginationArray[LegacyJhsOverride]]: """ Fetches the URI-based WAF overrides in a zone. @@ -431,7 +428,7 @@ class AsyncOverrides(AsyncAPIResource): 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[OverrideListResponse], + page=AsyncV4PagePaginationArray[LegacyJhsOverride], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -445,7 +442,7 @@ class AsyncOverrides(AsyncAPIResource): override_list_params.OverrideListParams, ), ), - model=OverrideListResponse, + model=LegacyJhsOverride, ) async def delete( @@ -506,7 +503,7 @@ class AsyncOverrides(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OverrideGetResponse]: + ) -> Optional[LegacyJhsOverride]: """ Fetches the details of a URI-based WAF override. @@ -539,7 +536,7 @@ class AsyncOverrides(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[OverrideGetResponse]], ResultWrapper[OverrideGetResponse]), + cast_to=cast(Type[Optional[LegacyJhsOverride]], ResultWrapper[LegacyJhsOverride]), ) diff --git a/src/cloudflare/resources/firewall/waf/packages/groups.py b/src/cloudflare/resources/firewall/waf/packages/groups.py index 632e75255..512a053ef 100644 --- a/src/cloudflare/resources/firewall/waf/packages/groups.py +++ b/src/cloudflare/resources/firewall/waf/packages/groups.py @@ -29,7 +29,7 @@ from ....._base_client import ( from .....types.firewall.waf.packages import ( GroupGetResponse, GroupEditResponse, - GroupListResponse, + WAFManagedRulesSchemasGroup, group_edit_params, group_list_params, ) @@ -63,7 +63,7 @@ class Groups(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[GroupListResponse]: + ) -> SyncV4PagePaginationArray[WAFManagedRulesSchemasGroup]: """ Fetches the WAF rule groups in a WAF package. @@ -103,7 +103,7 @@ class Groups(SyncAPIResource): 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[GroupListResponse], + page=SyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -121,7 +121,7 @@ class Groups(SyncAPIResource): group_list_params.GroupListParams, ), ), - model=GroupListResponse, + model=WAFManagedRulesSchemasGroup, ) def edit( @@ -272,7 +272,7 @@ class AsyncGroups(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[GroupListResponse, AsyncV4PagePaginationArray[GroupListResponse]]: + ) -> AsyncPaginator[WAFManagedRulesSchemasGroup, AsyncV4PagePaginationArray[WAFManagedRulesSchemasGroup]]: """ Fetches the WAF rule groups in a WAF package. @@ -312,7 +312,7 @@ class AsyncGroups(AsyncAPIResource): 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[GroupListResponse], + page=AsyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -330,7 +330,7 @@ class AsyncGroups(AsyncAPIResource): group_list_params.GroupListParams, ), ), - model=GroupListResponse, + model=WAFManagedRulesSchemasGroup, ) async def edit( diff --git a/src/cloudflare/resources/firewall/waf/packages/rules.py b/src/cloudflare/resources/firewall/waf/packages/rules.py index f881d07df..78b3f87c2 100644 --- a/src/cloudflare/resources/firewall/waf/packages/rules.py +++ b/src/cloudflare/resources/firewall/waf/packages/rules.py @@ -29,7 +29,7 @@ from ....._base_client import ( from .....types.firewall.waf.packages import ( RuleGetResponse, RuleEditResponse, - RuleListResponse, + WAFManagedRulesRule, rule_edit_params, rule_list_params, ) @@ -63,7 +63,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[RuleListResponse]: + ) -> SyncV4PagePaginationArray[WAFManagedRulesRule]: """ Fetches WAF rules in a WAF package. @@ -102,7 +102,7 @@ class Rules(SyncAPIResource): raise ValueError(f"Expected a non-empty value for `package_id` but received {package_id!r}") return self._get_api_list( f"/zones/{zone_id}/firewall/waf/packages/{package_id}/rules", - page=SyncV4PagePaginationArray[RuleListResponse], + page=SyncV4PagePaginationArray[WAFManagedRulesRule], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -120,7 +120,7 @@ class Rules(SyncAPIResource): rule_list_params.RuleListParams, ), ), - model=cast(Any, RuleListResponse), # Union types cannot be passed in as arguments in the type system + model=cast(Any, WAFManagedRulesRule), # Union types cannot be passed in as arguments in the type system ) def edit( @@ -270,7 +270,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[RuleListResponse, AsyncV4PagePaginationArray[RuleListResponse]]: + ) -> AsyncPaginator[WAFManagedRulesRule, AsyncV4PagePaginationArray[WAFManagedRulesRule]]: """ Fetches WAF rules in a WAF package. @@ -309,7 +309,7 @@ class AsyncRules(AsyncAPIResource): raise ValueError(f"Expected a non-empty value for `package_id` but received {package_id!r}") return self._get_api_list( f"/zones/{zone_id}/firewall/waf/packages/{package_id}/rules", - page=AsyncV4PagePaginationArray[RuleListResponse], + page=AsyncV4PagePaginationArray[WAFManagedRulesRule], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -327,7 +327,7 @@ class AsyncRules(AsyncAPIResource): rule_list_params.RuleListParams, ), ), - model=cast(Any, RuleListResponse), # Union types cannot be passed in as arguments in the type system + model=cast(Any, WAFManagedRulesRule), # Union types cannot be passed in as arguments in the type system ) async def edit( diff --git a/src/cloudflare/resources/healthchecks/healthchecks.py b/src/cloudflare/resources/healthchecks/healthchecks.py index 0021e4998..46bd9919d 100644 --- a/src/cloudflare/resources/healthchecks/healthchecks.py +++ b/src/cloudflare/resources/healthchecks/healthchecks.py @@ -8,12 +8,9 @@ from typing_extensions import Literal import httpx from ...types import ( - HealthcheckGetResponse, - HealthcheckEditResponse, HealthcheckListResponse, - HealthcheckCreateResponse, + HealthchecksHealthchecks, HealthcheckDeleteResponse, - HealthcheckUpdateResponse, healthcheck_edit_params, healthcheck_create_params, healthcheck_update_params, @@ -103,7 +100,7 @@ class Healthchecks(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthcheckCreateResponse: + ) -> HealthchecksHealthchecks: """ Create a new health check. @@ -181,7 +178,7 @@ class Healthchecks(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthcheckCreateResponse], ResultWrapper[HealthcheckCreateResponse]), + cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), ) def update( @@ -228,7 +225,7 @@ class Healthchecks(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthcheckUpdateResponse: + ) -> HealthchecksHealthchecks: """ Update a configured health check. @@ -310,7 +307,7 @@ class Healthchecks(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthcheckUpdateResponse], ResultWrapper[HealthcheckUpdateResponse]), + cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), ) def list( @@ -440,7 +437,7 @@ class Healthchecks(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthcheckEditResponse: + ) -> HealthchecksHealthchecks: """ Patch a configured health check. @@ -522,7 +519,7 @@ class Healthchecks(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthcheckEditResponse], ResultWrapper[HealthcheckEditResponse]), + cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), ) def get( @@ -536,7 +533,7 @@ class Healthchecks(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthcheckGetResponse: + ) -> HealthchecksHealthchecks: """ Fetch a single configured health check. @@ -566,7 +563,7 @@ class Healthchecks(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthcheckGetResponse], ResultWrapper[HealthcheckGetResponse]), + cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), ) @@ -626,7 +623,7 @@ class AsyncHealthchecks(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthcheckCreateResponse: + ) -> HealthchecksHealthchecks: """ Create a new health check. @@ -704,7 +701,7 @@ class AsyncHealthchecks(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthcheckCreateResponse], ResultWrapper[HealthcheckCreateResponse]), + cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), ) async def update( @@ -751,7 +748,7 @@ class AsyncHealthchecks(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthcheckUpdateResponse: + ) -> HealthchecksHealthchecks: """ Update a configured health check. @@ -833,7 +830,7 @@ class AsyncHealthchecks(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthcheckUpdateResponse], ResultWrapper[HealthcheckUpdateResponse]), + cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), ) async def list( @@ -963,7 +960,7 @@ class AsyncHealthchecks(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthcheckEditResponse: + ) -> HealthchecksHealthchecks: """ Patch a configured health check. @@ -1045,7 +1042,7 @@ class AsyncHealthchecks(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthcheckEditResponse], ResultWrapper[HealthcheckEditResponse]), + cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), ) async def get( @@ -1059,7 +1056,7 @@ class AsyncHealthchecks(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthcheckGetResponse: + ) -> HealthchecksHealthchecks: """ Fetch a single configured health check. @@ -1089,7 +1086,7 @@ class AsyncHealthchecks(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthcheckGetResponse], ResultWrapper[HealthcheckGetResponse]), + cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), ) diff --git a/src/cloudflare/resources/healthchecks/previews.py b/src/cloudflare/resources/healthchecks/previews.py index 6d228d8fe..283807cd2 100644 --- a/src/cloudflare/resources/healthchecks/previews.py +++ b/src/cloudflare/resources/healthchecks/previews.py @@ -7,6 +7,7 @@ from typing_extensions import Literal import httpx +from ...types import HealthchecksHealthchecks from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -24,12 +25,7 @@ from ..._wrappers import ResultWrapper from ..._base_client import ( make_request_options, ) -from ...types.healthchecks import ( - PreviewGetResponse, - PreviewCreateResponse, - PreviewDeleteResponse, - preview_create_params, -) +from ...types.healthchecks import PreviewDeleteResponse, preview_create_params __all__ = ["Previews", "AsyncPreviews"] @@ -86,7 +82,7 @@ class Previews(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PreviewCreateResponse: + ) -> HealthchecksHealthchecks: """ Create a new preview health check. @@ -164,7 +160,7 @@ class Previews(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PreviewCreateResponse], ResultWrapper[PreviewCreateResponse]), + cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), ) def delete( @@ -222,7 +218,7 @@ class Previews(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PreviewGetResponse: + ) -> HealthchecksHealthchecks: """ Fetch a single configured health check preview. @@ -252,7 +248,7 @@ class Previews(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PreviewGetResponse], ResultWrapper[PreviewGetResponse]), + cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), ) @@ -308,7 +304,7 @@ class AsyncPreviews(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PreviewCreateResponse: + ) -> HealthchecksHealthchecks: """ Create a new preview health check. @@ -386,7 +382,7 @@ class AsyncPreviews(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PreviewCreateResponse], ResultWrapper[PreviewCreateResponse]), + cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), ) async def delete( @@ -444,7 +440,7 @@ class AsyncPreviews(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PreviewGetResponse: + ) -> HealthchecksHealthchecks: """ Fetch a single configured health check preview. @@ -474,7 +470,7 @@ class AsyncPreviews(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PreviewGetResponse], ResultWrapper[PreviewGetResponse]), + cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), ) diff --git a/src/cloudflare/resources/hostnames/settings/tls.py b/src/cloudflare/resources/hostnames/settings/tls.py index 43a8d9fc1..3111a9c2b 100644 --- a/src/cloudflare/resources/hostnames/settings/tls.py +++ b/src/cloudflare/resources/hostnames/settings/tls.py @@ -24,7 +24,12 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.hostnames.settings import TLSGetResponse, TLSDeleteResponse, TLSUpdateResponse, tls_update_params +from ....types.hostnames.settings import ( + TLSGetResponse, + TLSCertificatesAndHostnamesSettingObject, + TLSCertificatesAndHostnamesSettingObjectDelete, + tls_update_params, +) __all__ = ["TLS", "AsyncTLS"] @@ -51,7 +56,7 @@ class TLS(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSUpdateResponse: + ) -> TLSCertificatesAndHostnamesSettingObject: """ Update the tls setting value for the hostname. @@ -88,7 +93,9 @@ class TLS(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TLSUpdateResponse], ResultWrapper[TLSUpdateResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesSettingObject], ResultWrapper[TLSCertificatesAndHostnamesSettingObject] + ), ) def delete( @@ -103,7 +110,7 @@ class TLS(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSDeleteResponse: + ) -> TLSCertificatesAndHostnamesSettingObjectDelete: """ Delete the tls setting value for the hostname. @@ -137,7 +144,10 @@ class TLS(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TLSDeleteResponse], ResultWrapper[TLSDeleteResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesSettingObjectDelete], + ResultWrapper[TLSCertificatesAndHostnamesSettingObjectDelete], + ), ) def get( @@ -207,7 +217,7 @@ class AsyncTLS(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSUpdateResponse: + ) -> TLSCertificatesAndHostnamesSettingObject: """ Update the tls setting value for the hostname. @@ -244,7 +254,9 @@ class AsyncTLS(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TLSUpdateResponse], ResultWrapper[TLSUpdateResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesSettingObject], ResultWrapper[TLSCertificatesAndHostnamesSettingObject] + ), ) async def delete( @@ -259,7 +271,7 @@ class AsyncTLS(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSDeleteResponse: + ) -> TLSCertificatesAndHostnamesSettingObjectDelete: """ Delete the tls setting value for the hostname. @@ -293,7 +305,10 @@ class AsyncTLS(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TLSDeleteResponse], ResultWrapper[TLSDeleteResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesSettingObjectDelete], + ResultWrapper[TLSCertificatesAndHostnamesSettingObjectDelete], + ), ) async def get( diff --git a/src/cloudflare/resources/images/v1/keys.py b/src/cloudflare/resources/images/v1/keys.py index 97c75a394..ed981bfc6 100644 --- a/src/cloudflare/resources/images/v1/keys.py +++ b/src/cloudflare/resources/images/v1/keys.py @@ -19,7 +19,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.images.v1 import KeyListResponse +from ....types.images.v1 import ImagesImageKeys __all__ = ["Keys", "AsyncKeys"] @@ -43,7 +43,7 @@ class Keys(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeyListResponse: + ) -> ImagesImageKeys: """Lists your signing keys. These can be found on your Cloudflare Images dashboard. @@ -70,7 +70,7 @@ class Keys(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[KeyListResponse], ResultWrapper[KeyListResponse]), + cast_to=cast(Type[ImagesImageKeys], ResultWrapper[ImagesImageKeys]), ) @@ -93,7 +93,7 @@ class AsyncKeys(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeyListResponse: + ) -> ImagesImageKeys: """Lists your signing keys. These can be found on your Cloudflare Images dashboard. @@ -120,7 +120,7 @@ class AsyncKeys(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[KeyListResponse], ResultWrapper[KeyListResponse]), + cast_to=cast(Type[ImagesImageKeys], ResultWrapper[ImagesImageKeys]), ) diff --git a/src/cloudflare/resources/images/v1/stats.py b/src/cloudflare/resources/images/v1/stats.py index 2a8a8c551..22e424220 100644 --- a/src/cloudflare/resources/images/v1/stats.py +++ b/src/cloudflare/resources/images/v1/stats.py @@ -19,7 +19,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.images.v1 import StatGetResponse +from ....types.images.v1 import ImagesImagesStats __all__ = ["Stats", "AsyncStats"] @@ -43,7 +43,7 @@ class Stats(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> StatGetResponse: + ) -> ImagesImagesStats: """ Fetch usage statistics details for Cloudflare Images. @@ -69,7 +69,7 @@ class Stats(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[StatGetResponse], ResultWrapper[StatGetResponse]), + cast_to=cast(Type[ImagesImagesStats], ResultWrapper[ImagesImagesStats]), ) @@ -92,7 +92,7 @@ class AsyncStats(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> StatGetResponse: + ) -> ImagesImagesStats: """ Fetch usage statistics details for Cloudflare Images. @@ -118,7 +118,7 @@ class AsyncStats(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[StatGetResponse], ResultWrapper[StatGetResponse]), + cast_to=cast(Type[ImagesImagesStats], ResultWrapper[ImagesImagesStats]), ) diff --git a/src/cloudflare/resources/images/v1/v1.py b/src/cloudflare/resources/images/v1/v1.py index e024dcd98..35dffc079 100644 --- a/src/cloudflare/resources/images/v1/v1.py +++ b/src/cloudflare/resources/images/v1/v1.py @@ -58,10 +58,8 @@ from ...._base_client import ( make_request_options, ) from ....types.images import ( - V1GetResponse, - V1EditResponse, + ImagesImage, V1ListResponse, - V1CreateResponse, V1DeleteResponse, v1_edit_params, v1_list_params, @@ -108,7 +106,7 @@ class V1(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> V1CreateResponse: + ) -> ImagesImage: """ 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 @@ -145,7 +143,7 @@ class V1(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[V1CreateResponse], ResultWrapper[V1CreateResponse]), + cast_to=cast(Type[ImagesImage], ResultWrapper[ImagesImage]), ) def list( @@ -266,7 +264,7 @@ class V1(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> V1EditResponse: + ) -> ImagesImage: """Update image access control. On access control change, all copies of the image @@ -312,7 +310,7 @@ class V1(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[V1EditResponse], ResultWrapper[V1EditResponse]), + cast_to=cast(Type[ImagesImage], ResultWrapper[ImagesImage]), ) def get( @@ -326,7 +324,7 @@ class V1(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> V1GetResponse: + ) -> ImagesImage: """ Fetch details for a single image. @@ -356,7 +354,7 @@ class V1(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[V1GetResponse], ResultWrapper[V1GetResponse]), + cast_to=cast(Type[ImagesImage], ResultWrapper[ImagesImage]), ) @@ -397,7 +395,7 @@ class AsyncV1(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> V1CreateResponse: + ) -> ImagesImage: """ 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 @@ -434,7 +432,7 @@ class AsyncV1(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[V1CreateResponse], ResultWrapper[V1CreateResponse]), + cast_to=cast(Type[ImagesImage], ResultWrapper[ImagesImage]), ) def list( @@ -555,7 +553,7 @@ class AsyncV1(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> V1EditResponse: + ) -> ImagesImage: """Update image access control. On access control change, all copies of the image @@ -601,7 +599,7 @@ class AsyncV1(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[V1EditResponse], ResultWrapper[V1EditResponse]), + cast_to=cast(Type[ImagesImage], ResultWrapper[ImagesImage]), ) async def get( @@ -615,7 +613,7 @@ class AsyncV1(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> V1GetResponse: + ) -> ImagesImage: """ Fetch details for a single image. @@ -645,7 +643,7 @@ class AsyncV1(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[V1GetResponse], ResultWrapper[V1GetResponse]), + cast_to=cast(Type[ImagesImage], ResultWrapper[ImagesImage]), ) diff --git a/src/cloudflare/resources/images/v1/variants.py b/src/cloudflare/resources/images/v1/variants.py index d0e01877c..502acf8c6 100644 --- a/src/cloudflare/resources/images/v1/variants.py +++ b/src/cloudflare/resources/images/v1/variants.py @@ -24,10 +24,8 @@ from ...._base_client import ( make_request_options, ) from ....types.images.v1 import ( - VariantGetResponse, - VariantEditResponse, - VariantListResponse, - VariantCreateResponse, + ImageVariant, + ImageVariants, VariantDeleteResponse, variant_edit_params, variant_create_params, @@ -58,7 +56,7 @@ class Variants(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VariantCreateResponse: + ) -> ImageVariant: """ Specify variants that allow you to resize images for different use cases. @@ -97,7 +95,7 @@ class Variants(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VariantCreateResponse], ResultWrapper[VariantCreateResponse]), + cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]), ) def list( @@ -110,7 +108,7 @@ class Variants(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VariantListResponse: + ) -> ImageVariants: """ Lists existing variants. @@ -136,7 +134,7 @@ class Variants(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VariantListResponse], ResultWrapper[VariantListResponse]), + cast_to=cast(Type[ImageVariants], ResultWrapper[ImageVariants]), ) def delete( @@ -197,7 +195,7 @@ class Variants(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VariantEditResponse: + ) -> ImageVariant: """ Updating a variant purges the cache for all images associated with the variant. @@ -235,7 +233,7 @@ class Variants(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VariantEditResponse], ResultWrapper[VariantEditResponse]), + cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]), ) def get( @@ -249,7 +247,7 @@ class Variants(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VariantGetResponse: + ) -> ImageVariant: """ Fetch details for a single variant. @@ -275,7 +273,7 @@ class Variants(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VariantGetResponse], ResultWrapper[VariantGetResponse]), + cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]), ) @@ -301,7 +299,7 @@ class AsyncVariants(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VariantCreateResponse: + ) -> ImageVariant: """ Specify variants that allow you to resize images for different use cases. @@ -340,7 +338,7 @@ class AsyncVariants(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VariantCreateResponse], ResultWrapper[VariantCreateResponse]), + cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]), ) async def list( @@ -353,7 +351,7 @@ class AsyncVariants(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VariantListResponse: + ) -> ImageVariants: """ Lists existing variants. @@ -379,7 +377,7 @@ class AsyncVariants(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VariantListResponse], ResultWrapper[VariantListResponse]), + cast_to=cast(Type[ImageVariants], ResultWrapper[ImageVariants]), ) async def delete( @@ -440,7 +438,7 @@ class AsyncVariants(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VariantEditResponse: + ) -> ImageVariant: """ Updating a variant purges the cache for all images associated with the variant. @@ -478,7 +476,7 @@ class AsyncVariants(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VariantEditResponse], ResultWrapper[VariantEditResponse]), + cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]), ) async def get( @@ -492,7 +490,7 @@ class AsyncVariants(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VariantGetResponse: + ) -> ImageVariant: """ Fetch details for a single variant. @@ -518,7 +516,7 @@ class AsyncVariants(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VariantGetResponse], ResultWrapper[VariantGetResponse]), + cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]), ) diff --git a/src/cloudflare/resources/intel/asn/asn.py b/src/cloudflare/resources/intel/asn/asn.py index a555676c3..0e7bcf275 100644 --- a/src/cloudflare/resources/intel/asn/asn.py +++ b/src/cloudflare/resources/intel/asn/asn.py @@ -24,7 +24,7 @@ from ...._response import ( async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ....types.intel import ASNGetResponse +from ....types.intel import IntelASN from ...._base_client import ( make_request_options, ) @@ -47,7 +47,7 @@ class ASN(SyncAPIResource): def get( self, - asn: int, + asn: IntelASN, *, account_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -56,7 +56,7 @@ class ASN(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ASNGetResponse: + ) -> IntelASN: """ Get ASN Overview @@ -82,7 +82,7 @@ class ASN(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ASNGetResponse], ResultWrapper[int]), + cast_to=cast(Type[IntelASN], ResultWrapper[int]), ) @@ -101,7 +101,7 @@ class AsyncASN(AsyncAPIResource): async def get( self, - asn: int, + asn: IntelASN, *, account_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -110,7 +110,7 @@ class AsyncASN(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ASNGetResponse: + ) -> IntelASN: """ Get ASN Overview @@ -136,7 +136,7 @@ class AsyncASN(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ASNGetResponse], ResultWrapper[int]), + cast_to=cast(Type[IntelASN], ResultWrapper[int]), ) diff --git a/src/cloudflare/resources/intel/asn/subnets.py b/src/cloudflare/resources/intel/asn/subnets.py index 523cf0a10..16b51a713 100644 --- a/src/cloudflare/resources/intel/asn/subnets.py +++ b/src/cloudflare/resources/intel/asn/subnets.py @@ -13,6 +13,7 @@ from ...._response import ( async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) +from ....types.intel import IntelASN from ...._base_client import ( make_request_options, ) @@ -32,7 +33,7 @@ class Subnets(SyncAPIResource): def get( self, - asn: int, + asn: IntelASN, *, account_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -78,7 +79,7 @@ class AsyncSubnets(AsyncAPIResource): async def get( self, - asn: int, + asn: IntelASN, *, account_id: str, # 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/intel/dns.py b/src/cloudflare/resources/intel/dns.py index 2dc6f434d..afcd75f76 100644 --- a/src/cloudflare/resources/intel/dns.py +++ b/src/cloudflare/resources/intel/dns.py @@ -20,7 +20,7 @@ from ..._response import ( async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ...types.intel import DNSGetResponse, dns_get_params +from ...types.intel import IntelPassiveDNSByIP, dns_get_params from ..._base_client import ( make_request_options, ) @@ -51,7 +51,7 @@ class DNS(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSGetResponse: + ) -> IntelPassiveDNSByIP: """ Get Passive DNS by IP @@ -90,7 +90,7 @@ class DNS(SyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSGetResponse], ResultWrapper[DNSGetResponse]), + cast_to=cast(Type[IntelPassiveDNSByIP], ResultWrapper[IntelPassiveDNSByIP]), ) @@ -117,7 +117,7 @@ class AsyncDNS(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSGetResponse: + ) -> IntelPassiveDNSByIP: """ Get Passive DNS by IP @@ -156,7 +156,7 @@ class AsyncDNS(AsyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSGetResponse], ResultWrapper[DNSGetResponse]), + cast_to=cast(Type[IntelPassiveDNSByIP], ResultWrapper[IntelPassiveDNSByIP]), ) diff --git a/src/cloudflare/resources/intel/domains/domains.py b/src/cloudflare/resources/intel/domains/domains.py index 5793d4bec..bf87314e3 100644 --- a/src/cloudflare/resources/intel/domains/domains.py +++ b/src/cloudflare/resources/intel/domains/domains.py @@ -28,7 +28,7 @@ from ...._response import ( async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ....types.intel import DomainGetResponse, domain_get_params +from ....types.intel import IntelDomain, domain_get_params from ...._base_client import ( make_request_options, ) @@ -60,7 +60,7 @@ class Domains(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DomainGetResponse: + ) -> IntelDomain: """ Get Domain Details @@ -87,7 +87,7 @@ class Domains(SyncAPIResource): query=maybe_transform({"domain": domain}, domain_get_params.DomainGetParams), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DomainGetResponse], ResultWrapper[DomainGetResponse]), + cast_to=cast(Type[IntelDomain], ResultWrapper[IntelDomain]), ) @@ -115,7 +115,7 @@ class AsyncDomains(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DomainGetResponse: + ) -> IntelDomain: """ Get Domain Details @@ -142,7 +142,7 @@ class AsyncDomains(AsyncAPIResource): query=await async_maybe_transform({"domain": domain}, domain_get_params.DomainGetParams), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DomainGetResponse], ResultWrapper[DomainGetResponse]), + cast_to=cast(Type[IntelDomain], ResultWrapper[IntelDomain]), ) diff --git a/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py b/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py index aa10015a3..b25834b59 100644 --- a/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py +++ b/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py @@ -29,10 +29,10 @@ from ...._response import ( ) from ...._wrappers import ResultWrapper from ....types.intel import ( - IndicatorFeedGetResponse, + IntelUpdateFeed, + IntelIndicatorFeedItem, IndicatorFeedListResponse, - IndicatorFeedCreateResponse, - IndicatorFeedUpdateResponse, + IntelIndicatorFeedMetadata, indicator_feed_create_params, indicator_feed_update_params, ) @@ -68,7 +68,7 @@ class IndicatorFeeds(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IndicatorFeedCreateResponse: + ) -> IntelIndicatorFeedItem: """ Create new indicator feed @@ -105,7 +105,7 @@ class IndicatorFeeds(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[IndicatorFeedCreateResponse], ResultWrapper[IndicatorFeedCreateResponse]), + cast_to=cast(Type[IntelIndicatorFeedItem], ResultWrapper[IntelIndicatorFeedItem]), ) def update( @@ -120,7 +120,7 @@ class IndicatorFeeds(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IndicatorFeedUpdateResponse: + ) -> IntelUpdateFeed: """ Update indicator feed data @@ -151,7 +151,7 @@ class IndicatorFeeds(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[IndicatorFeedUpdateResponse], ResultWrapper[IndicatorFeedUpdateResponse]), + cast_to=cast(Type[IntelUpdateFeed], ResultWrapper[IntelUpdateFeed]), ) def list( @@ -243,7 +243,7 @@ class IndicatorFeeds(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IndicatorFeedGetResponse: + ) -> IntelIndicatorFeedMetadata: """ Get indicator feed metadata @@ -271,7 +271,7 @@ class IndicatorFeeds(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[IndicatorFeedGetResponse], ResultWrapper[IndicatorFeedGetResponse]), + cast_to=cast(Type[IntelIndicatorFeedMetadata], ResultWrapper[IntelIndicatorFeedMetadata]), ) @@ -300,7 +300,7 @@ class AsyncIndicatorFeeds(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IndicatorFeedCreateResponse: + ) -> IntelIndicatorFeedItem: """ Create new indicator feed @@ -337,7 +337,7 @@ class AsyncIndicatorFeeds(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[IndicatorFeedCreateResponse], ResultWrapper[IndicatorFeedCreateResponse]), + cast_to=cast(Type[IntelIndicatorFeedItem], ResultWrapper[IntelIndicatorFeedItem]), ) async def update( @@ -352,7 +352,7 @@ class AsyncIndicatorFeeds(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IndicatorFeedUpdateResponse: + ) -> IntelUpdateFeed: """ Update indicator feed data @@ -385,7 +385,7 @@ class AsyncIndicatorFeeds(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[IndicatorFeedUpdateResponse], ResultWrapper[IndicatorFeedUpdateResponse]), + cast_to=cast(Type[IntelUpdateFeed], ResultWrapper[IntelUpdateFeed]), ) async def list( @@ -477,7 +477,7 @@ class AsyncIndicatorFeeds(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IndicatorFeedGetResponse: + ) -> IntelIndicatorFeedMetadata: """ Get indicator feed metadata @@ -505,7 +505,7 @@ class AsyncIndicatorFeeds(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[IndicatorFeedGetResponse], ResultWrapper[IndicatorFeedGetResponse]), + cast_to=cast(Type[IntelIndicatorFeedMetadata], ResultWrapper[IntelIndicatorFeedMetadata]), ) diff --git a/src/cloudflare/resources/intel/indicator_feeds/permissions.py b/src/cloudflare/resources/intel/indicator_feeds/permissions.py index c3e7852f9..69037ad42 100644 --- a/src/cloudflare/resources/intel/indicator_feeds/permissions.py +++ b/src/cloudflare/resources/intel/indicator_feeds/permissions.py @@ -24,9 +24,8 @@ from ...._base_client import ( make_request_options, ) from ....types.intel.indicator_feeds import ( + IntelPermissionsUpdate, PermissionListResponse, - PermissionCreateResponse, - PermissionDeleteResponse, permission_create_params, permission_delete_params, ) @@ -55,7 +54,7 @@ class Permissions(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PermissionCreateResponse: + ) -> IntelPermissionsUpdate: """ Grant permission to indicator feed @@ -92,7 +91,7 @@ class Permissions(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PermissionCreateResponse], ResultWrapper[PermissionCreateResponse]), + cast_to=cast(Type[IntelPermissionsUpdate], ResultWrapper[IntelPermissionsUpdate]), ) def list( @@ -146,7 +145,7 @@ class Permissions(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PermissionDeleteResponse: + ) -> IntelPermissionsUpdate: """ Revoke permission to indicator feed @@ -183,7 +182,7 @@ class Permissions(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PermissionDeleteResponse], ResultWrapper[PermissionDeleteResponse]), + cast_to=cast(Type[IntelPermissionsUpdate], ResultWrapper[IntelPermissionsUpdate]), ) @@ -208,7 +207,7 @@ class AsyncPermissions(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PermissionCreateResponse: + ) -> IntelPermissionsUpdate: """ Grant permission to indicator feed @@ -245,7 +244,7 @@ class AsyncPermissions(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PermissionCreateResponse], ResultWrapper[PermissionCreateResponse]), + cast_to=cast(Type[IntelPermissionsUpdate], ResultWrapper[IntelPermissionsUpdate]), ) async def list( @@ -299,7 +298,7 @@ class AsyncPermissions(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PermissionDeleteResponse: + ) -> IntelPermissionsUpdate: """ Revoke permission to indicator feed @@ -336,7 +335,7 @@ class AsyncPermissions(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PermissionDeleteResponse], ResultWrapper[PermissionDeleteResponse]), + cast_to=cast(Type[IntelPermissionsUpdate], ResultWrapper[IntelPermissionsUpdate]), ) diff --git a/src/cloudflare/resources/intel/whois.py b/src/cloudflare/resources/intel/whois.py index 63f7ec495..bd3a9fc3b 100644 --- a/src/cloudflare/resources/intel/whois.py +++ b/src/cloudflare/resources/intel/whois.py @@ -20,7 +20,7 @@ from ..._response import ( async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ...types.intel import WhoisGetResponse, whois_get_params +from ...types.intel import IntelWhois, whois_get_params from ..._base_client import ( make_request_options, ) @@ -48,7 +48,7 @@ class Whois(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WhoisGetResponse: + ) -> IntelWhois: """ Get WHOIS Record @@ -75,7 +75,7 @@ class Whois(SyncAPIResource): query=maybe_transform({"domain": domain}, whois_get_params.WhoisGetParams), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WhoisGetResponse], ResultWrapper[WhoisGetResponse]), + cast_to=cast(Type[IntelWhois], ResultWrapper[IntelWhois]), ) @@ -99,7 +99,7 @@ class AsyncWhois(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WhoisGetResponse: + ) -> IntelWhois: """ Get WHOIS Record @@ -126,7 +126,7 @@ class AsyncWhois(AsyncAPIResource): query=await async_maybe_transform({"domain": domain}, whois_get_params.WhoisGetParams), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WhoisGetResponse], ResultWrapper[WhoisGetResponse]), + cast_to=cast(Type[IntelWhois], ResultWrapper[IntelWhois]), ) diff --git a/src/cloudflare/resources/keyless_certificates.py b/src/cloudflare/resources/keyless_certificates.py index 94d88dd6e..89a06d64f 100644 --- a/src/cloudflare/resources/keyless_certificates.py +++ b/src/cloudflare/resources/keyless_certificates.py @@ -8,10 +8,8 @@ from typing_extensions import Literal import httpx from ..types import ( - KeylessCertificateGetResponse, - KeylessCertificateEditResponse, KeylessCertificateListResponse, - KeylessCertificateCreateResponse, + TLSCertificatesAndHostnamesBase, KeylessCertificateDeleteResponse, keyless_certificate_edit_params, keyless_certificate_create_params, @@ -62,7 +60,7 @@ class KeylessCertificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeylessCertificateCreateResponse: + ) -> TLSCertificatesAndHostnamesBase: """ Create Keyless SSL Configuration @@ -115,7 +113,7 @@ class KeylessCertificates(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[KeylessCertificateCreateResponse], ResultWrapper[KeylessCertificateCreateResponse]), + cast_to=cast(Type[TLSCertificatesAndHostnamesBase], ResultWrapper[TLSCertificatesAndHostnamesBase]), ) def list( @@ -219,7 +217,7 @@ class KeylessCertificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeylessCertificateEditResponse: + ) -> TLSCertificatesAndHostnamesBase: """This will update attributes of a Keyless SSL. Consists of one or more of the @@ -274,7 +272,7 @@ class KeylessCertificates(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[KeylessCertificateEditResponse], ResultWrapper[KeylessCertificateEditResponse]), + cast_to=cast(Type[TLSCertificatesAndHostnamesBase], ResultWrapper[TLSCertificatesAndHostnamesBase]), ) def get( @@ -288,7 +286,7 @@ class KeylessCertificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeylessCertificateGetResponse: + ) -> TLSCertificatesAndHostnamesBase: """ Get details for one Keyless SSL configuration. @@ -320,7 +318,7 @@ class KeylessCertificates(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[KeylessCertificateGetResponse], ResultWrapper[KeylessCertificateGetResponse]), + cast_to=cast(Type[TLSCertificatesAndHostnamesBase], ResultWrapper[TLSCertificatesAndHostnamesBase]), ) @@ -349,7 +347,7 @@ class AsyncKeylessCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeylessCertificateCreateResponse: + ) -> TLSCertificatesAndHostnamesBase: """ Create Keyless SSL Configuration @@ -402,7 +400,7 @@ class AsyncKeylessCertificates(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[KeylessCertificateCreateResponse], ResultWrapper[KeylessCertificateCreateResponse]), + cast_to=cast(Type[TLSCertificatesAndHostnamesBase], ResultWrapper[TLSCertificatesAndHostnamesBase]), ) async def list( @@ -506,7 +504,7 @@ class AsyncKeylessCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeylessCertificateEditResponse: + ) -> TLSCertificatesAndHostnamesBase: """This will update attributes of a Keyless SSL. Consists of one or more of the @@ -561,7 +559,7 @@ class AsyncKeylessCertificates(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[KeylessCertificateEditResponse], ResultWrapper[KeylessCertificateEditResponse]), + cast_to=cast(Type[TLSCertificatesAndHostnamesBase], ResultWrapper[TLSCertificatesAndHostnamesBase]), ) async def get( @@ -575,7 +573,7 @@ class AsyncKeylessCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeylessCertificateGetResponse: + ) -> TLSCertificatesAndHostnamesBase: """ Get details for one Keyless SSL configuration. @@ -607,7 +605,7 @@ class AsyncKeylessCertificates(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[KeylessCertificateGetResponse], ResultWrapper[KeylessCertificateGetResponse]), + cast_to=cast(Type[TLSCertificatesAndHostnamesBase], ResultWrapper[TLSCertificatesAndHostnamesBase]), ) diff --git a/src/cloudflare/resources/kv/namespaces/namespaces.py b/src/cloudflare/resources/kv/namespaces/namespaces.py index 0e8e01425..c3f49ecf1 100644 --- a/src/cloudflare/resources/kv/namespaces/namespaces.py +++ b/src/cloudflare/resources/kv/namespaces/namespaces.py @@ -46,8 +46,7 @@ from ...._utils import ( ) from ...._compat import cached_property from ....types.kv import ( - NamespaceListResponse, - NamespaceCreateResponse, + WorkersKVNamespace, NamespaceDeleteResponse, NamespaceUpdateResponse, namespace_list_params, @@ -107,7 +106,7 @@ class Namespaces(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> NamespaceCreateResponse: + ) -> WorkersKVNamespace: """Creates a namespace under the given title. A `400` is returned if the account @@ -139,7 +138,7 @@ class Namespaces(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[NamespaceCreateResponse], ResultWrapper[NamespaceCreateResponse]), + cast_to=cast(Type[WorkersKVNamespace], ResultWrapper[WorkersKVNamespace]), ) def update( @@ -209,7 +208,7 @@ class Namespaces(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[NamespaceListResponse]: + ) -> SyncV4PagePaginationArray[WorkersKVNamespace]: """ Returns the namespaces owned by an account. @@ -236,7 +235,7 @@ class Namespaces(SyncAPIResource): 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}/storage/kv/namespaces", - page=SyncV4PagePaginationArray[NamespaceListResponse], + page=SyncV4PagePaginationArray[WorkersKVNamespace], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -252,7 +251,7 @@ class Namespaces(SyncAPIResource): namespace_list_params.NamespaceListParams, ), ), - model=NamespaceListResponse, + model=WorkersKVNamespace, ) def delete( @@ -341,7 +340,7 @@ class AsyncNamespaces(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> NamespaceCreateResponse: + ) -> WorkersKVNamespace: """Creates a namespace under the given title. A `400` is returned if the account @@ -373,7 +372,7 @@ class AsyncNamespaces(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[NamespaceCreateResponse], ResultWrapper[NamespaceCreateResponse]), + cast_to=cast(Type[WorkersKVNamespace], ResultWrapper[WorkersKVNamespace]), ) async def update( @@ -443,7 +442,7 @@ class AsyncNamespaces(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[NamespaceListResponse, AsyncV4PagePaginationArray[NamespaceListResponse]]: + ) -> AsyncPaginator[WorkersKVNamespace, AsyncV4PagePaginationArray[WorkersKVNamespace]]: """ Returns the namespaces owned by an account. @@ -470,7 +469,7 @@ class AsyncNamespaces(AsyncAPIResource): 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}/storage/kv/namespaces", - page=AsyncV4PagePaginationArray[NamespaceListResponse], + page=AsyncV4PagePaginationArray[WorkersKVNamespace], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -486,7 +485,7 @@ class AsyncNamespaces(AsyncAPIResource): namespace_list_params.NamespaceListParams, ), ), - model=NamespaceListResponse, + model=WorkersKVNamespace, ) async def delete( diff --git a/src/cloudflare/resources/load_balancers/monitors/monitors.py b/src/cloudflare/resources/load_balancers/monitors/monitors.py index d86065a95..6725ed5e0 100644 --- a/src/cloudflare/resources/load_balancers/monitors/monitors.py +++ b/src/cloudflare/resources/load_balancers/monitors/monitors.py @@ -41,16 +41,13 @@ from ...._base_client import ( make_request_options, ) from ....types.load_balancers import ( - MonitorGetResponse, - MonitorEditResponse, MonitorListResponse, - MonitorCreateResponse, MonitorDeleteResponse, - MonitorUpdateResponse, monitor_edit_params, monitor_create_params, monitor_update_params, ) +from ....types.user.load_balancers import LoadBalancingMonitor __all__ = ["Monitors", "AsyncMonitors"] @@ -98,7 +95,7 @@ class Monitors(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MonitorCreateResponse: + ) -> LoadBalancingMonitor: """ Create a configured monitor. @@ -194,7 +191,7 @@ class Monitors(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MonitorCreateResponse], ResultWrapper[MonitorCreateResponse]), + cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) def update( @@ -224,7 +221,7 @@ class Monitors(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MonitorUpdateResponse: + ) -> LoadBalancingMonitor: """ Modify a configured monitor. @@ -322,7 +319,7 @@ class Monitors(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MonitorUpdateResponse], ResultWrapper[MonitorUpdateResponse]), + cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) def list( @@ -433,7 +430,7 @@ class Monitors(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MonitorEditResponse: + ) -> LoadBalancingMonitor: """ Apply changes to an existing monitor, overwriting the supplied properties. @@ -531,7 +528,7 @@ class Monitors(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MonitorEditResponse], ResultWrapper[MonitorEditResponse]), + cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) def get( @@ -545,7 +542,7 @@ class Monitors(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MonitorGetResponse: + ) -> LoadBalancingMonitor: """ List a single configured monitor for an account. @@ -573,7 +570,7 @@ class Monitors(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MonitorGetResponse], ResultWrapper[MonitorGetResponse]), + cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) @@ -620,7 +617,7 @@ class AsyncMonitors(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MonitorCreateResponse: + ) -> LoadBalancingMonitor: """ Create a configured monitor. @@ -716,7 +713,7 @@ class AsyncMonitors(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MonitorCreateResponse], ResultWrapper[MonitorCreateResponse]), + cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) async def update( @@ -746,7 +743,7 @@ class AsyncMonitors(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MonitorUpdateResponse: + ) -> LoadBalancingMonitor: """ Modify a configured monitor. @@ -844,7 +841,7 @@ class AsyncMonitors(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MonitorUpdateResponse], ResultWrapper[MonitorUpdateResponse]), + cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) async def list( @@ -955,7 +952,7 @@ class AsyncMonitors(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MonitorEditResponse: + ) -> LoadBalancingMonitor: """ Apply changes to an existing monitor, overwriting the supplied properties. @@ -1053,7 +1050,7 @@ class AsyncMonitors(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MonitorEditResponse], ResultWrapper[MonitorEditResponse]), + cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) async def get( @@ -1067,7 +1064,7 @@ class AsyncMonitors(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MonitorGetResponse: + ) -> LoadBalancingMonitor: """ List a single configured monitor for an account. @@ -1095,7 +1092,7 @@ class AsyncMonitors(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MonitorGetResponse], ResultWrapper[MonitorGetResponse]), + cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) diff --git a/src/cloudflare/resources/load_balancers/pools/pools.py b/src/cloudflare/resources/load_balancers/pools/pools.py index 7468951c7..dfdead475 100644 --- a/src/cloudflare/resources/load_balancers/pools/pools.py +++ b/src/cloudflare/resources/load_balancers/pools/pools.py @@ -41,17 +41,14 @@ from ...._base_client import ( make_request_options, ) from ....types.load_balancers import ( - PoolGetResponse, - PoolEditResponse, PoolListResponse, - PoolCreateResponse, PoolDeleteResponse, - PoolUpdateResponse, pool_edit_params, pool_list_params, pool_create_params, pool_update_params, ) +from ....types.user.load_balancers import LoadBalancingPool __all__ = ["Pools", "AsyncPools"] @@ -95,7 +92,7 @@ class Pools(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PoolCreateResponse: + ) -> LoadBalancingPool: """ Create a new pool. @@ -177,7 +174,7 @@ class Pools(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PoolCreateResponse], ResultWrapper[PoolCreateResponse]), + cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) def update( @@ -224,7 +221,7 @@ class Pools(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PoolUpdateResponse: + ) -> LoadBalancingPool: """ Modify a configured pool. @@ -312,7 +309,7 @@ class Pools(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PoolUpdateResponse], ResultWrapper[PoolUpdateResponse]), + cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) def list( @@ -445,7 +442,7 @@ class Pools(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PoolEditResponse: + ) -> LoadBalancingPool: """ Apply changes to an existing pool, overwriting the supplied properties. @@ -533,7 +530,7 @@ class Pools(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PoolEditResponse], ResultWrapper[PoolEditResponse]), + cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) def get( @@ -547,7 +544,7 @@ class Pools(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PoolGetResponse: + ) -> LoadBalancingPool: """ Fetch a single configured pool. @@ -575,7 +572,7 @@ class Pools(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PoolGetResponse], ResultWrapper[PoolGetResponse]), + cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) @@ -618,7 +615,7 @@ class AsyncPools(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PoolCreateResponse: + ) -> LoadBalancingPool: """ Create a new pool. @@ -700,7 +697,7 @@ class AsyncPools(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PoolCreateResponse], ResultWrapper[PoolCreateResponse]), + cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) async def update( @@ -747,7 +744,7 @@ class AsyncPools(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PoolUpdateResponse: + ) -> LoadBalancingPool: """ Modify a configured pool. @@ -835,7 +832,7 @@ class AsyncPools(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PoolUpdateResponse], ResultWrapper[PoolUpdateResponse]), + cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) async def list( @@ -968,7 +965,7 @@ class AsyncPools(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PoolEditResponse: + ) -> LoadBalancingPool: """ Apply changes to an existing pool, overwriting the supplied properties. @@ -1056,7 +1053,7 @@ class AsyncPools(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PoolEditResponse], ResultWrapper[PoolEditResponse]), + cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) async def get( @@ -1070,7 +1067,7 @@ class AsyncPools(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PoolGetResponse: + ) -> LoadBalancingPool: """ Fetch a single configured pool. @@ -1098,7 +1095,7 @@ class AsyncPools(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PoolGetResponse], ResultWrapper[PoolGetResponse]), + cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) diff --git a/src/cloudflare/resources/load_balancers/previews.py b/src/cloudflare/resources/load_balancers/previews.py index 8f6ff1714..fa142e6bf 100644 --- a/src/cloudflare/resources/load_balancers/previews.py +++ b/src/cloudflare/resources/load_balancers/previews.py @@ -19,7 +19,7 @@ from ..._wrappers import ResultWrapper from ..._base_client import ( make_request_options, ) -from ...types.load_balancers import PreviewGetResponse +from ...types.user.load_balancers import LoadBalancingPreviewResult __all__ = ["Previews", "AsyncPreviews"] @@ -44,7 +44,7 @@ class Previews(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PreviewGetResponse: + ) -> LoadBalancingPreviewResult: """ Get the result of a previous preview operation using the provided preview_id. @@ -70,7 +70,7 @@ class Previews(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PreviewGetResponse], ResultWrapper[PreviewGetResponse]), + cast_to=cast(Type[LoadBalancingPreviewResult], ResultWrapper[LoadBalancingPreviewResult]), ) @@ -94,7 +94,7 @@ class AsyncPreviews(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PreviewGetResponse: + ) -> LoadBalancingPreviewResult: """ Get the result of a previous preview operation using the provided preview_id. @@ -120,7 +120,7 @@ class AsyncPreviews(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PreviewGetResponse], ResultWrapper[PreviewGetResponse]), + cast_to=cast(Type[LoadBalancingPreviewResult], ResultWrapper[LoadBalancingPreviewResult]), ) diff --git a/src/cloudflare/resources/logpush/edge.py b/src/cloudflare/resources/logpush/edge.py index 3a7996925..53262fd15 100644 --- a/src/cloudflare/resources/logpush/edge.py +++ b/src/cloudflare/resources/logpush/edge.py @@ -23,7 +23,7 @@ from ..._wrappers import ResultWrapper from ..._base_client import ( make_request_options, ) -from ...types.logpush import EdgeGetResponse, EdgeCreateResponse, edge_create_params +from ...types.logpush import EdgeGetResponse, LogpushInstantLogsJob, edge_create_params __all__ = ["Edge", "AsyncEdge"] @@ -50,7 +50,7 @@ class Edge(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[EdgeCreateResponse]: + ) -> Optional[LogpushInstantLogsJob]: """ Creates a new Instant Logs job for a zone. @@ -92,7 +92,7 @@ class Edge(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[EdgeCreateResponse]], ResultWrapper[EdgeCreateResponse]), + cast_to=cast(Type[Optional[LogpushInstantLogsJob]], ResultWrapper[LogpushInstantLogsJob]), ) def get( @@ -157,7 +157,7 @@ class AsyncEdge(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[EdgeCreateResponse]: + ) -> Optional[LogpushInstantLogsJob]: """ Creates a new Instant Logs job for a zone. @@ -199,7 +199,7 @@ class AsyncEdge(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[EdgeCreateResponse]], ResultWrapper[EdgeCreateResponse]), + cast_to=cast(Type[Optional[LogpushInstantLogsJob]], ResultWrapper[LogpushInstantLogsJob]), ) async def get( diff --git a/src/cloudflare/resources/logpush/jobs.py b/src/cloudflare/resources/logpush/jobs.py index d0d3f8323..eae55698c 100644 --- a/src/cloudflare/resources/logpush/jobs.py +++ b/src/cloudflare/resources/logpush/jobs.py @@ -24,15 +24,8 @@ from ..._wrappers import ResultWrapper from ..._base_client import ( make_request_options, ) -from ...types.logpush import ( - JobGetResponse, - JobListResponse, - JobCreateResponse, - JobDeleteResponse, - JobUpdateResponse, - job_create_params, - job_update_params, -) +from ...types.logpush import JobListResponse, JobDeleteResponse, job_create_params, job_update_params +from ...types.logpush.datasets import LogpushLogpushJob __all__ = ["Jobs", "AsyncJobs"] @@ -65,7 +58,7 @@ class Jobs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[JobCreateResponse]: + ) -> Optional[LogpushLogpushJob]: """ Creates a new Logpush job for an account or zone. @@ -146,7 +139,7 @@ class Jobs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[JobCreateResponse]], ResultWrapper[JobCreateResponse]), + cast_to=cast(Type[Optional[LogpushLogpushJob]], ResultWrapper[LogpushLogpushJob]), ) def update( @@ -167,7 +160,7 @@ class Jobs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[JobUpdateResponse]: + ) -> Optional[LogpushLogpushJob]: """ Updates a Logpush job. @@ -242,7 +235,7 @@ class Jobs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[JobUpdateResponse]], ResultWrapper[JobUpdateResponse]), + cast_to=cast(Type[Optional[LogpushLogpushJob]], ResultWrapper[LogpushLogpushJob]), ) def list( @@ -375,7 +368,7 @@ class Jobs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[JobGetResponse]: + ) -> Optional[LogpushLogpushJob]: """ Gets the details of a Logpush job. @@ -418,7 +411,7 @@ class Jobs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[JobGetResponse]], ResultWrapper[JobGetResponse]), + cast_to=cast(Type[Optional[LogpushLogpushJob]], ResultWrapper[LogpushLogpushJob]), ) @@ -450,7 +443,7 @@ class AsyncJobs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[JobCreateResponse]: + ) -> Optional[LogpushLogpushJob]: """ Creates a new Logpush job for an account or zone. @@ -531,7 +524,7 @@ class AsyncJobs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[JobCreateResponse]], ResultWrapper[JobCreateResponse]), + cast_to=cast(Type[Optional[LogpushLogpushJob]], ResultWrapper[LogpushLogpushJob]), ) async def update( @@ -552,7 +545,7 @@ class AsyncJobs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[JobUpdateResponse]: + ) -> Optional[LogpushLogpushJob]: """ Updates a Logpush job. @@ -627,7 +620,7 @@ class AsyncJobs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[JobUpdateResponse]], ResultWrapper[JobUpdateResponse]), + cast_to=cast(Type[Optional[LogpushLogpushJob]], ResultWrapper[LogpushLogpushJob]), ) async def list( @@ -760,7 +753,7 @@ class AsyncJobs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[JobGetResponse]: + ) -> Optional[LogpushLogpushJob]: """ Gets the details of a Logpush job. @@ -803,7 +796,7 @@ class AsyncJobs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[JobGetResponse]], ResultWrapper[JobGetResponse]), + cast_to=cast(Type[Optional[LogpushLogpushJob]], ResultWrapper[LogpushLogpushJob]), ) diff --git a/src/cloudflare/resources/logs/control/cmb/config.py b/src/cloudflare/resources/logs/control/cmb/config.py index 80a7d9cf3..24b4c56bf 100644 --- a/src/cloudflare/resources/logs/control/cmb/config.py +++ b/src/cloudflare/resources/logs/control/cmb/config.py @@ -23,12 +23,7 @@ from ....._wrappers import ResultWrapper from ....._base_client import ( make_request_options, ) -from .....types.logs.control.cmb import ( - ConfigGetResponse, - ConfigCreateResponse, - ConfigDeleteResponse, - config_create_params, -) +from .....types.logs.control.cmb import LogcontrolCmbConfig, ConfigDeleteResponse, config_create_params __all__ = ["Config", "AsyncConfig"] @@ -53,7 +48,7 @@ class Config(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ConfigCreateResponse]: + ) -> Optional[LogcontrolCmbConfig]: """ Updates CMB config. @@ -82,7 +77,7 @@ class Config(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ConfigCreateResponse]], ResultWrapper[ConfigCreateResponse]), + cast_to=cast(Type[Optional[LogcontrolCmbConfig]], ResultWrapper[LogcontrolCmbConfig]), ) def delete( @@ -139,7 +134,7 @@ class Config(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ConfigGetResponse]: + ) -> Optional[LogcontrolCmbConfig]: """ Gets CMB config. @@ -165,7 +160,7 @@ class Config(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ConfigGetResponse]], ResultWrapper[ConfigGetResponse]), + cast_to=cast(Type[Optional[LogcontrolCmbConfig]], ResultWrapper[LogcontrolCmbConfig]), ) @@ -189,7 +184,7 @@ class AsyncConfig(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ConfigCreateResponse]: + ) -> Optional[LogcontrolCmbConfig]: """ Updates CMB config. @@ -218,7 +213,7 @@ class AsyncConfig(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ConfigCreateResponse]], ResultWrapper[ConfigCreateResponse]), + cast_to=cast(Type[Optional[LogcontrolCmbConfig]], ResultWrapper[LogcontrolCmbConfig]), ) async def delete( @@ -275,7 +270,7 @@ class AsyncConfig(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ConfigGetResponse]: + ) -> Optional[LogcontrolCmbConfig]: """ Gets CMB config. @@ -301,7 +296,7 @@ class AsyncConfig(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ConfigGetResponse]], ResultWrapper[ConfigGetResponse]), + cast_to=cast(Type[Optional[LogcontrolCmbConfig]], ResultWrapper[LogcontrolCmbConfig]), ) diff --git a/src/cloudflare/resources/magic_network_monitoring/configs/configs.py b/src/cloudflare/resources/magic_network_monitoring/configs/configs.py index 81fd704c0..8c4a3d2bf 100644 --- a/src/cloudflare/resources/magic_network_monitoring/configs/configs.py +++ b/src/cloudflare/resources/magic_network_monitoring/configs/configs.py @@ -27,13 +27,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.magic_network_monitoring import ( - ConfigGetResponse, - ConfigEditResponse, - ConfigCreateResponse, - ConfigDeleteResponse, - ConfigUpdateResponse, -) +from ....types.magic_network_monitoring import MagicVisibilityMNMConfig __all__ = ["Configs", "AsyncConfigs"] @@ -61,7 +55,7 @@ class Configs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConfigCreateResponse: + ) -> MagicVisibilityMNMConfig: """ Create a new network monitoring configuration. @@ -83,7 +77,7 @@ class Configs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ConfigCreateResponse], ResultWrapper[ConfigCreateResponse]), + cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), ) def update( @@ -96,7 +90,7 @@ class Configs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConfigUpdateResponse: + ) -> MagicVisibilityMNMConfig: """ Update an existing network monitoring configuration, requires the entire configuration to be updated at once. @@ -119,7 +113,7 @@ class Configs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ConfigUpdateResponse], ResultWrapper[ConfigUpdateResponse]), + cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), ) def delete( @@ -132,7 +126,7 @@ class Configs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConfigDeleteResponse: + ) -> MagicVisibilityMNMConfig: """ Delete an existing network monitoring configuration. @@ -154,7 +148,7 @@ class Configs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ConfigDeleteResponse], ResultWrapper[ConfigDeleteResponse]), + cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), ) def edit( @@ -167,7 +161,7 @@ class Configs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConfigEditResponse: + ) -> MagicVisibilityMNMConfig: """ Update fields in an existing network monitoring configuration. @@ -189,7 +183,7 @@ class Configs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ConfigEditResponse], ResultWrapper[ConfigEditResponse]), + cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), ) def get( @@ -202,7 +196,7 @@ class Configs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConfigGetResponse: + ) -> MagicVisibilityMNMConfig: """ Lists default sampling and router IPs for account. @@ -224,7 +218,7 @@ class Configs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ConfigGetResponse], ResultWrapper[ConfigGetResponse]), + cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), ) @@ -251,7 +245,7 @@ class AsyncConfigs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConfigCreateResponse: + ) -> MagicVisibilityMNMConfig: """ Create a new network monitoring configuration. @@ -273,7 +267,7 @@ class AsyncConfigs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ConfigCreateResponse], ResultWrapper[ConfigCreateResponse]), + cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), ) async def update( @@ -286,7 +280,7 @@ class AsyncConfigs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConfigUpdateResponse: + ) -> MagicVisibilityMNMConfig: """ Update an existing network monitoring configuration, requires the entire configuration to be updated at once. @@ -309,7 +303,7 @@ class AsyncConfigs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ConfigUpdateResponse], ResultWrapper[ConfigUpdateResponse]), + cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), ) async def delete( @@ -322,7 +316,7 @@ class AsyncConfigs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConfigDeleteResponse: + ) -> MagicVisibilityMNMConfig: """ Delete an existing network monitoring configuration. @@ -344,7 +338,7 @@ class AsyncConfigs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ConfigDeleteResponse], ResultWrapper[ConfigDeleteResponse]), + cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), ) async def edit( @@ -357,7 +351,7 @@ class AsyncConfigs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConfigEditResponse: + ) -> MagicVisibilityMNMConfig: """ Update fields in an existing network monitoring configuration. @@ -379,7 +373,7 @@ class AsyncConfigs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ConfigEditResponse], ResultWrapper[ConfigEditResponse]), + cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), ) async def get( @@ -392,7 +386,7 @@ class AsyncConfigs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConfigGetResponse: + ) -> MagicVisibilityMNMConfig: """ Lists default sampling and router IPs for account. @@ -414,7 +408,7 @@ class AsyncConfigs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ConfigGetResponse], ResultWrapper[ConfigGetResponse]), + cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), ) diff --git a/src/cloudflare/resources/magic_network_monitoring/configs/full.py b/src/cloudflare/resources/magic_network_monitoring/configs/full.py index 93fb33e4d..3254304d4 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 ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.magic_network_monitoring.configs import FullGetResponse +from ....types.magic_network_monitoring import MagicVisibilityMNMConfig __all__ = ["Full", "AsyncFull"] @@ -43,7 +43,7 @@ class Full(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FullGetResponse: + ) -> MagicVisibilityMNMConfig: """ Lists default sampling, router IPs, and rules for account. @@ -65,7 +65,7 @@ class Full(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[FullGetResponse], ResultWrapper[FullGetResponse]), + cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), ) @@ -88,7 +88,7 @@ class AsyncFull(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FullGetResponse: + ) -> MagicVisibilityMNMConfig: """ Lists default sampling, router IPs, and rules for account. @@ -110,7 +110,7 @@ class AsyncFull(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[FullGetResponse], ResultWrapper[FullGetResponse]), + cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), ) diff --git a/src/cloudflare/resources/magic_network_monitoring/rules/advertisements.py b/src/cloudflare/resources/magic_network_monitoring/rules/advertisements.py index 09001a797..ffea3b4a9 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 ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.magic_network_monitoring.rules import AdvertisementEditResponse +from ....types.magic_network_monitoring.rules import MagicVisibilityMNMRuleAdvertisable __all__ = ["Advertisements", "AsyncAdvertisements"] @@ -44,7 +44,7 @@ class Advertisements(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AdvertisementEditResponse]: + ) -> Optional[MagicVisibilityMNMRuleAdvertisable]: """ Update advertisement for rule. @@ -66,7 +66,9 @@ class Advertisements(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AdvertisementEditResponse]], ResultWrapper[AdvertisementEditResponse]), + cast_to=cast( + Type[Optional[MagicVisibilityMNMRuleAdvertisable]], ResultWrapper[MagicVisibilityMNMRuleAdvertisable] + ), ) @@ -90,7 +92,7 @@ class AsyncAdvertisements(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AdvertisementEditResponse]: + ) -> Optional[MagicVisibilityMNMRuleAdvertisable]: """ Update advertisement for rule. @@ -112,7 +114,9 @@ class AsyncAdvertisements(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AdvertisementEditResponse]], ResultWrapper[AdvertisementEditResponse]), + cast_to=cast( + Type[Optional[MagicVisibilityMNMRuleAdvertisable]], ResultWrapper[MagicVisibilityMNMRuleAdvertisable] + ), ) diff --git a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py index 743b7b3c4..ddbf52c85 100644 --- a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py +++ b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py @@ -27,14 +27,7 @@ from .advertisements import ( from ...._base_client import ( make_request_options, ) -from ....types.magic_network_monitoring import ( - RuleGetResponse, - RuleEditResponse, - RuleListResponse, - RuleCreateResponse, - RuleDeleteResponse, - RuleUpdateResponse, -) +from ....types.magic_network_monitoring import RuleListResponse, MagicVisibilityMNMRule __all__ = ["Rules", "AsyncRules"] @@ -62,7 +55,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleCreateResponse]: + ) -> Optional[MagicVisibilityMNMRule]: """Create network monitoring rules for account. Currently only supports creating a @@ -86,7 +79,7 @@ class Rules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleCreateResponse]], ResultWrapper[RuleCreateResponse]), + cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), ) def update( @@ -99,7 +92,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleUpdateResponse]: + ) -> Optional[MagicVisibilityMNMRule]: """ Update network monitoring rules for account. @@ -121,7 +114,7 @@ class Rules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleUpdateResponse]], ResultWrapper[RuleUpdateResponse]), + cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), ) def list( @@ -170,7 +163,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleDeleteResponse]: + ) -> Optional[MagicVisibilityMNMRule]: """ Delete a network monitoring rule for account. @@ -192,7 +185,7 @@ class Rules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleDeleteResponse]], ResultWrapper[RuleDeleteResponse]), + cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), ) def edit( @@ -206,7 +199,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleEditResponse]: + ) -> Optional[MagicVisibilityMNMRule]: """ Update a network monitoring rule for account. @@ -228,7 +221,7 @@ class Rules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleEditResponse]], ResultWrapper[RuleEditResponse]), + cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), ) def get( @@ -242,7 +235,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleGetResponse]: + ) -> Optional[MagicVisibilityMNMRule]: """ List a single network monitoring rule for account. @@ -264,7 +257,7 @@ class Rules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleGetResponse]], ResultWrapper[RuleGetResponse]), + cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), ) @@ -291,7 +284,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleCreateResponse]: + ) -> Optional[MagicVisibilityMNMRule]: """Create network monitoring rules for account. Currently only supports creating a @@ -315,7 +308,7 @@ class AsyncRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleCreateResponse]], ResultWrapper[RuleCreateResponse]), + cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), ) async def update( @@ -328,7 +321,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleUpdateResponse]: + ) -> Optional[MagicVisibilityMNMRule]: """ Update network monitoring rules for account. @@ -350,7 +343,7 @@ class AsyncRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleUpdateResponse]], ResultWrapper[RuleUpdateResponse]), + cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), ) async def list( @@ -399,7 +392,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleDeleteResponse]: + ) -> Optional[MagicVisibilityMNMRule]: """ Delete a network monitoring rule for account. @@ -421,7 +414,7 @@ class AsyncRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleDeleteResponse]], ResultWrapper[RuleDeleteResponse]), + cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), ) async def edit( @@ -435,7 +428,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleEditResponse]: + ) -> Optional[MagicVisibilityMNMRule]: """ Update a network monitoring rule for account. @@ -457,7 +450,7 @@ class AsyncRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleEditResponse]], ResultWrapper[RuleEditResponse]), + cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), ) async def get( @@ -471,7 +464,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleGetResponse]: + ) -> Optional[MagicVisibilityMNMRule]: """ List a single network monitoring rule for account. @@ -493,7 +486,7 @@ class AsyncRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleGetResponse]], ResultWrapper[RuleGetResponse]), + cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), ) diff --git a/src/cloudflare/resources/mtls_certificates/mtls_certificates.py b/src/cloudflare/resources/mtls_certificates/mtls_certificates.py index 1b6658a21..01e91b7d8 100644 --- a/src/cloudflare/resources/mtls_certificates/mtls_certificates.py +++ b/src/cloudflare/resources/mtls_certificates/mtls_certificates.py @@ -7,10 +7,9 @@ from typing import Type, Optional, cast import httpx from ...types import ( - MTLSCertificateGetResponse, MTLSCertificateListResponse, - MTLSCertificateCreateResponse, - MTLSCertificateDeleteResponse, + TLSCertificatesAndHostnamesCertificateObjectPost, + TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate_create_params, ) from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven @@ -69,7 +68,7 @@ class MTLSCertificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MTLSCertificateCreateResponse: + ) -> TLSCertificatesAndHostnamesCertificateObjectPost: """ Upload a certificate that you want to use with mTLS-enabled Cloudflare services. @@ -112,7 +111,10 @@ class MTLSCertificates(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MTLSCertificateCreateResponse], ResultWrapper[MTLSCertificateCreateResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesCertificateObjectPost], + ResultWrapper[TLSCertificatesAndHostnamesCertificateObjectPost], + ), ) def list( @@ -165,7 +167,7 @@ class MTLSCertificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MTLSCertificateDeleteResponse: + ) -> TLSCertificatesAndHostnamesComponentsSchemasCertificateObject: """ Deletes the mTLS certificate unless the certificate is in use by one or more Cloudflare services. @@ -198,7 +200,10 @@ class MTLSCertificates(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MTLSCertificateDeleteResponse], ResultWrapper[MTLSCertificateDeleteResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject], + ResultWrapper[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject], + ), ) def get( @@ -212,7 +217,7 @@ class MTLSCertificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MTLSCertificateGetResponse: + ) -> TLSCertificatesAndHostnamesComponentsSchemasCertificateObject: """ Fetches a single mTLS certificate. @@ -244,7 +249,10 @@ class MTLSCertificates(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MTLSCertificateGetResponse], ResultWrapper[MTLSCertificateGetResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject], + ResultWrapper[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject], + ), ) @@ -275,7 +283,7 @@ class AsyncMTLSCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MTLSCertificateCreateResponse: + ) -> TLSCertificatesAndHostnamesCertificateObjectPost: """ Upload a certificate that you want to use with mTLS-enabled Cloudflare services. @@ -318,7 +326,10 @@ class AsyncMTLSCertificates(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MTLSCertificateCreateResponse], ResultWrapper[MTLSCertificateCreateResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesCertificateObjectPost], + ResultWrapper[TLSCertificatesAndHostnamesCertificateObjectPost], + ), ) async def list( @@ -371,7 +382,7 @@ class AsyncMTLSCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MTLSCertificateDeleteResponse: + ) -> TLSCertificatesAndHostnamesComponentsSchemasCertificateObject: """ Deletes the mTLS certificate unless the certificate is in use by one or more Cloudflare services. @@ -404,7 +415,10 @@ class AsyncMTLSCertificates(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MTLSCertificateDeleteResponse], ResultWrapper[MTLSCertificateDeleteResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject], + ResultWrapper[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject], + ), ) async def get( @@ -418,7 +432,7 @@ class AsyncMTLSCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MTLSCertificateGetResponse: + ) -> TLSCertificatesAndHostnamesComponentsSchemasCertificateObject: """ Fetches a single mTLS certificate. @@ -450,7 +464,10 @@ class AsyncMTLSCertificates(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MTLSCertificateGetResponse], ResultWrapper[MTLSCertificateGetResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject], + ResultWrapper[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject], + ), ) 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 bbdfc8220..b190fcfd2 100644 --- a/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py +++ b/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py @@ -24,10 +24,8 @@ from ...._base_client import ( make_request_options, ) from ....types.origin_tls_client_auth.hostnames import ( - CertificateGetResponse, CertificateListResponse, - CertificateCreateResponse, - CertificateDeleteResponse, + TLSCertificatesAndHostnamesSchemasCertificateObject, certificate_create_params, ) @@ -55,7 +53,7 @@ class Certificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateCreateResponse: + ) -> TLSCertificatesAndHostnamesSchemasCertificateObject: """Upload a certificate to be used for client authentication on a hostname. 10 @@ -94,7 +92,10 @@ class Certificates(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CertificateCreateResponse], ResultWrapper[CertificateCreateResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesSchemasCertificateObject], + ResultWrapper[TLSCertificatesAndHostnamesSchemasCertificateObject], + ), ) def list( @@ -147,7 +148,7 @@ class Certificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateDeleteResponse: + ) -> TLSCertificatesAndHostnamesSchemasCertificateObject: """ Delete Hostname Client Certificate @@ -177,7 +178,10 @@ class Certificates(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CertificateDeleteResponse], ResultWrapper[CertificateDeleteResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesSchemasCertificateObject], + ResultWrapper[TLSCertificatesAndHostnamesSchemasCertificateObject], + ), ) def get( @@ -191,7 +195,7 @@ class Certificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateGetResponse: + ) -> TLSCertificatesAndHostnamesSchemasCertificateObject: """ Get the certificate by ID to be used for client authentication on a hostname. @@ -221,7 +225,10 @@ class Certificates(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CertificateGetResponse], ResultWrapper[CertificateGetResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesSchemasCertificateObject], + ResultWrapper[TLSCertificatesAndHostnamesSchemasCertificateObject], + ), ) @@ -246,7 +253,7 @@ class AsyncCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateCreateResponse: + ) -> TLSCertificatesAndHostnamesSchemasCertificateObject: """Upload a certificate to be used for client authentication on a hostname. 10 @@ -285,7 +292,10 @@ class AsyncCertificates(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CertificateCreateResponse], ResultWrapper[CertificateCreateResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesSchemasCertificateObject], + ResultWrapper[TLSCertificatesAndHostnamesSchemasCertificateObject], + ), ) async def list( @@ -338,7 +348,7 @@ class AsyncCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateDeleteResponse: + ) -> TLSCertificatesAndHostnamesSchemasCertificateObject: """ Delete Hostname Client Certificate @@ -368,7 +378,10 @@ class AsyncCertificates(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CertificateDeleteResponse], ResultWrapper[CertificateDeleteResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesSchemasCertificateObject], + ResultWrapper[TLSCertificatesAndHostnamesSchemasCertificateObject], + ), ) async def get( @@ -382,7 +395,7 @@ class AsyncCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateGetResponse: + ) -> TLSCertificatesAndHostnamesSchemasCertificateObject: """ Get the certificate by ID to be used for client authentication on a hostname. @@ -412,7 +425,10 @@ class AsyncCertificates(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CertificateGetResponse], ResultWrapper[CertificateGetResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesSchemasCertificateObject], + ResultWrapper[TLSCertificatesAndHostnamesSchemasCertificateObject], + ), ) 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 76c4e02c5..fb9275a39 100644 --- a/src/cloudflare/resources/origin_tls_client_auth/hostnames/hostnames.py +++ b/src/cloudflare/resources/origin_tls_client_auth/hostnames/hostnames.py @@ -31,7 +31,11 @@ from .certificates import ( from ...._base_client import ( make_request_options, ) -from ....types.origin_tls_client_auth import HostnameGetResponse, HostnameUpdateResponse, hostname_update_params +from ....types.origin_tls_client_auth import ( + HostnameUpdateResponse, + TLSCertificatesAndHostnamesHostnameCertidObject, + hostname_update_params, +) __all__ = ["Hostnames", "AsyncHostnames"] @@ -105,7 +109,7 @@ class Hostnames(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HostnameGetResponse: + ) -> TLSCertificatesAndHostnamesHostnameCertidObject: """ Get the Hostname Status for Client Authentication @@ -136,7 +140,10 @@ class Hostnames(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HostnameGetResponse], ResultWrapper[HostnameGetResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesHostnameCertidObject], + ResultWrapper[TLSCertificatesAndHostnamesHostnameCertidObject], + ), ) @@ -209,7 +216,7 @@ class AsyncHostnames(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HostnameGetResponse: + ) -> TLSCertificatesAndHostnamesHostnameCertidObject: """ Get the Hostname Status for Client Authentication @@ -240,7 +247,10 @@ class AsyncHostnames(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HostnameGetResponse], ResultWrapper[HostnameGetResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesHostnameCertidObject], + ResultWrapper[TLSCertificatesAndHostnamesHostnameCertidObject], + ), ) diff --git a/src/cloudflare/resources/page_shield/connections.py b/src/cloudflare/resources/page_shield/connections.py index 1a81200d2..b9e0e2ee5 100644 --- a/src/cloudflare/resources/page_shield/connections.py +++ b/src/cloudflare/resources/page_shield/connections.py @@ -24,7 +24,7 @@ from ..._wrappers import ResultWrapper from ..._base_client import ( make_request_options, ) -from ...types.page_shield import ConnectionGetResponse, ConnectionListResponse, connection_list_params +from ...types.page_shield import PageShieldConnection, ConnectionListResponse, connection_list_params __all__ = ["Connections", "AsyncConnections"] @@ -163,7 +163,7 @@ class Connections(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConnectionGetResponse: + ) -> PageShieldConnection: """ Fetches a connection detected by Page Shield by connection ID. @@ -189,7 +189,7 @@ class Connections(SyncAPIResource): options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=ConnectionGetResponse, + cast_to=PageShieldConnection, ) @@ -327,7 +327,7 @@ class AsyncConnections(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConnectionGetResponse: + ) -> PageShieldConnection: """ Fetches a connection detected by Page Shield by connection ID. @@ -353,7 +353,7 @@ class AsyncConnections(AsyncAPIResource): options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=ConnectionGetResponse, + cast_to=PageShieldConnection, ) diff --git a/src/cloudflare/resources/page_shield/page_shield.py b/src/cloudflare/resources/page_shield/page_shield.py index c8211f9b9..632dcd0d4 100644 --- a/src/cloudflare/resources/page_shield/page_shield.py +++ b/src/cloudflare/resources/page_shield/page_shield.py @@ -6,7 +6,7 @@ from typing import Type, cast import httpx -from ...types import PageShieldListResponse, PageShieldUpdateResponse, page_shield_update_params +from ...types import PageShieldGetZoneSettings, PageShieldUpdateZoneSettings, page_shield_update_params from .scripts import ( Scripts, AsyncScripts, @@ -86,7 +86,7 @@ class PageShield(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PageShieldUpdateResponse: + ) -> PageShieldUpdateZoneSettings: """ Updates Page Shield settings. @@ -127,7 +127,7 @@ class PageShield(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PageShieldUpdateResponse], ResultWrapper[PageShieldUpdateResponse]), + cast_to=cast(Type[PageShieldUpdateZoneSettings], ResultWrapper[PageShieldUpdateZoneSettings]), ) def list( @@ -140,7 +140,7 @@ class PageShield(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PageShieldListResponse: + ) -> PageShieldGetZoneSettings: """ Fetches the Page Shield settings. @@ -166,7 +166,7 @@ class PageShield(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PageShieldListResponse], ResultWrapper[PageShieldListResponse]), + cast_to=cast(Type[PageShieldGetZoneSettings], ResultWrapper[PageShieldGetZoneSettings]), ) @@ -204,7 +204,7 @@ class AsyncPageShield(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PageShieldUpdateResponse: + ) -> PageShieldUpdateZoneSettings: """ Updates Page Shield settings. @@ -245,7 +245,7 @@ class AsyncPageShield(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PageShieldUpdateResponse], ResultWrapper[PageShieldUpdateResponse]), + cast_to=cast(Type[PageShieldUpdateZoneSettings], ResultWrapper[PageShieldUpdateZoneSettings]), ) async def list( @@ -258,7 +258,7 @@ class AsyncPageShield(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PageShieldListResponse: + ) -> PageShieldGetZoneSettings: """ Fetches the Page Shield settings. @@ -284,7 +284,7 @@ class AsyncPageShield(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PageShieldListResponse], ResultWrapper[PageShieldListResponse]), + cast_to=cast(Type[PageShieldGetZoneSettings], ResultWrapper[PageShieldGetZoneSettings]), ) diff --git a/src/cloudflare/resources/page_shield/policies.py b/src/cloudflare/resources/page_shield/policies.py index 2b57b73cb..29b0d0a7c 100644 --- a/src/cloudflare/resources/page_shield/policies.py +++ b/src/cloudflare/resources/page_shield/policies.py @@ -25,10 +25,8 @@ from ..._base_client import ( make_request_options, ) from ...types.page_shield import ( - PolicyGetResponse, PolicyListResponse, - PolicyCreateResponse, - PolicyUpdateResponse, + PageShieldPageshieldPolicy, policy_create_params, policy_update_params, ) @@ -60,7 +58,7 @@ class Policies(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PolicyCreateResponse: + ) -> PageShieldPageshieldPolicy: """ Create a Page Shield policy. @@ -103,7 +101,7 @@ class Policies(SyncAPIResource): options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=PolicyCreateResponse, + cast_to=PageShieldPageshieldPolicy, ) def update( @@ -122,7 +120,7 @@ class Policies(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PolicyUpdateResponse: + ) -> PageShieldPageshieldPolicy: """ Update a Page Shield policy by ID. @@ -169,7 +167,7 @@ class Policies(SyncAPIResource): options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=PolicyUpdateResponse, + cast_to=PageShieldPageshieldPolicy, ) def list( @@ -263,7 +261,7 @@ class Policies(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PolicyGetResponse: + ) -> PageShieldPageshieldPolicy: """ Fetches a Page Shield policy by ID. @@ -289,7 +287,7 @@ class Policies(SyncAPIResource): options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=PolicyGetResponse, + cast_to=PageShieldPageshieldPolicy, ) @@ -317,7 +315,7 @@ class AsyncPolicies(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PolicyCreateResponse: + ) -> PageShieldPageshieldPolicy: """ Create a Page Shield policy. @@ -360,7 +358,7 @@ class AsyncPolicies(AsyncAPIResource): options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=PolicyCreateResponse, + cast_to=PageShieldPageshieldPolicy, ) async def update( @@ -379,7 +377,7 @@ class AsyncPolicies(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PolicyUpdateResponse: + ) -> PageShieldPageshieldPolicy: """ Update a Page Shield policy by ID. @@ -426,7 +424,7 @@ class AsyncPolicies(AsyncAPIResource): options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=PolicyUpdateResponse, + cast_to=PageShieldPageshieldPolicy, ) async def list( @@ -520,7 +518,7 @@ class AsyncPolicies(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PolicyGetResponse: + ) -> PageShieldPageshieldPolicy: """ Fetches a Page Shield policy by ID. @@ -546,7 +544,7 @@ class AsyncPolicies(AsyncAPIResource): options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=PolicyGetResponse, + cast_to=PageShieldPageshieldPolicy, ) diff --git a/src/cloudflare/resources/pagerules/settings.py b/src/cloudflare/resources/pagerules/settings.py index aac6f54ed..5851f5b2b 100644 --- a/src/cloudflare/resources/pagerules/settings.py +++ b/src/cloudflare/resources/pagerules/settings.py @@ -19,7 +19,7 @@ from ..._wrappers import ResultWrapper from ..._base_client import ( make_request_options, ) -from ...types.pagerules import SettingListResponse +from ...types.pagerules import ZonesSettings __all__ = ["Settings", "AsyncSettings"] @@ -43,7 +43,7 @@ class Settings(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SettingListResponse: + ) -> ZonesSettings: """ Returns a list of settings (and their details) that Page Rules can apply to matching requests. @@ -70,7 +70,7 @@ class Settings(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[SettingListResponse], ResultWrapper[SettingListResponse]), + cast_to=cast(Type[ZonesSettings], ResultWrapper[ZonesSettings]), ) @@ -93,7 +93,7 @@ class AsyncSettings(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SettingListResponse: + ) -> ZonesSettings: """ Returns a list of settings (and their details) that Page Rules can apply to matching requests. @@ -120,7 +120,7 @@ class AsyncSettings(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[SettingListResponse], ResultWrapper[SettingListResponse]), + cast_to=cast(Type[ZonesSettings], ResultWrapper[ZonesSettings]), ) diff --git a/src/cloudflare/resources/pages/projects/deployments/deployments.py b/src/cloudflare/resources/pages/projects/deployments/deployments.py index 92b738d0a..85fc4d85e 100644 --- a/src/cloudflare/resources/pages/projects/deployments/deployments.py +++ b/src/cloudflare/resources/pages/projects/deployments/deployments.py @@ -28,18 +28,12 @@ from ....._response import ( async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....types.pages import PagesDeployments from .history.history import History, AsyncHistory from ....._base_client import ( make_request_options, ) -from .....types.pages.projects import ( - DeploymentGetResponse, - DeploymentListResponse, - DeploymentRetryResponse, - DeploymentCreateResponse, - DeploymentRollbackResponse, - deployment_create_params, -) +from .....types.pages.projects import DeploymentListResponse, deployment_create_params __all__ = ["Deployments", "AsyncDeployments"] @@ -69,7 +63,7 @@ class Deployments(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DeploymentCreateResponse: + ) -> PagesDeployments: """Start a new deployment from production. The repository and account must have @@ -105,7 +99,7 @@ class Deployments(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DeploymentCreateResponse], ResultWrapper[DeploymentCreateResponse]), + cast_to=cast(Type[PagesDeployments], ResultWrapper[PagesDeployments]), ) def list( @@ -209,7 +203,7 @@ class Deployments(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DeploymentGetResponse: + ) -> PagesDeployments: """ Fetch information about a deployment. @@ -243,7 +237,7 @@ class Deployments(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DeploymentGetResponse], ResultWrapper[DeploymentGetResponse]), + cast_to=cast(Type[PagesDeployments], ResultWrapper[PagesDeployments]), ) def retry( @@ -258,7 +252,7 @@ class Deployments(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DeploymentRetryResponse: + ) -> PagesDeployments: """ Retry a previous deployment. @@ -292,7 +286,7 @@ class Deployments(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DeploymentRetryResponse], ResultWrapper[DeploymentRetryResponse]), + cast_to=cast(Type[PagesDeployments], ResultWrapper[PagesDeployments]), ) def rollback( @@ -307,7 +301,7 @@ class Deployments(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DeploymentRollbackResponse: + ) -> PagesDeployments: """Rollback the production deployment to a previous deployment. You can only @@ -343,7 +337,7 @@ class Deployments(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DeploymentRollbackResponse], ResultWrapper[DeploymentRollbackResponse]), + cast_to=cast(Type[PagesDeployments], ResultWrapper[PagesDeployments]), ) @@ -372,7 +366,7 @@ class AsyncDeployments(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DeploymentCreateResponse: + ) -> PagesDeployments: """Start a new deployment from production. The repository and account must have @@ -408,7 +402,7 @@ class AsyncDeployments(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DeploymentCreateResponse], ResultWrapper[DeploymentCreateResponse]), + cast_to=cast(Type[PagesDeployments], ResultWrapper[PagesDeployments]), ) async def list( @@ -512,7 +506,7 @@ class AsyncDeployments(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DeploymentGetResponse: + ) -> PagesDeployments: """ Fetch information about a deployment. @@ -546,7 +540,7 @@ class AsyncDeployments(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DeploymentGetResponse], ResultWrapper[DeploymentGetResponse]), + cast_to=cast(Type[PagesDeployments], ResultWrapper[PagesDeployments]), ) async def retry( @@ -561,7 +555,7 @@ class AsyncDeployments(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DeploymentRetryResponse: + ) -> PagesDeployments: """ Retry a previous deployment. @@ -595,7 +589,7 @@ class AsyncDeployments(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DeploymentRetryResponse], ResultWrapper[DeploymentRetryResponse]), + cast_to=cast(Type[PagesDeployments], ResultWrapper[PagesDeployments]), ) async def rollback( @@ -610,7 +604,7 @@ class AsyncDeployments(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DeploymentRollbackResponse: + ) -> PagesDeployments: """Rollback the production deployment to a previous deployment. You can only @@ -646,7 +640,7 @@ class AsyncDeployments(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DeploymentRollbackResponse], ResultWrapper[DeploymentRollbackResponse]), + cast_to=cast(Type[PagesDeployments], ResultWrapper[PagesDeployments]), ) diff --git a/src/cloudflare/resources/pages/projects/projects.py b/src/cloudflare/resources/pages/projects/projects.py index 70fc74015..ebdd22e9c 100644 --- a/src/cloudflare/resources/pages/projects/projects.py +++ b/src/cloudflare/resources/pages/projects/projects.py @@ -37,9 +37,10 @@ from ...._response import ( ) from ...._wrappers import ResultWrapper from ....types.pages import ( - ProjectGetResponse, + PagesProjects, ProjectEditResponse, ProjectListResponse, + PagesDeploymentsParam, ProjectCreateResponse, project_edit_params, project_create_params, @@ -74,9 +75,9 @@ class Projects(SyncAPIResource): *, account_id: str, build_config: project_create_params.BuildConfig | NotGiven = NOT_GIVEN, - canonical_deployment: project_create_params.CanonicalDeployment | NotGiven = NOT_GIVEN, + canonical_deployment: PagesDeploymentsParam | NotGiven = NOT_GIVEN, deployment_configs: project_create_params.DeploymentConfigs | NotGiven = NOT_GIVEN, - latest_deployment: project_create_params.LatestDeployment | NotGiven = NOT_GIVEN, + latest_deployment: PagesDeploymentsParam | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, production_branch: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -281,7 +282,7 @@ class Projects(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ProjectGetResponse: + ) -> PagesProjects: """ Fetch a project by name. @@ -311,7 +312,7 @@ class Projects(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ProjectGetResponse], ResultWrapper[ProjectGetResponse]), + cast_to=cast(Type[PagesProjects], ResultWrapper[PagesProjects]), ) def purge_build_cache( @@ -377,9 +378,9 @@ class AsyncProjects(AsyncAPIResource): *, account_id: str, build_config: project_create_params.BuildConfig | NotGiven = NOT_GIVEN, - canonical_deployment: project_create_params.CanonicalDeployment | NotGiven = NOT_GIVEN, + canonical_deployment: PagesDeploymentsParam | NotGiven = NOT_GIVEN, deployment_configs: project_create_params.DeploymentConfigs | NotGiven = NOT_GIVEN, - latest_deployment: project_create_params.LatestDeployment | NotGiven = NOT_GIVEN, + latest_deployment: PagesDeploymentsParam | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, production_branch: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -584,7 +585,7 @@ class AsyncProjects(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ProjectGetResponse: + ) -> PagesProjects: """ Fetch a project by name. @@ -614,7 +615,7 @@ class AsyncProjects(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ProjectGetResponse], ResultWrapper[ProjectGetResponse]), + cast_to=cast(Type[PagesProjects], ResultWrapper[PagesProjects]), ) async def purge_build_cache( diff --git a/src/cloudflare/resources/pcaps/ownerships.py b/src/cloudflare/resources/pcaps/ownerships.py index 51b4f237d..a9ed068cf 100644 --- a/src/cloudflare/resources/pcaps/ownerships.py +++ b/src/cloudflare/resources/pcaps/ownerships.py @@ -22,8 +22,7 @@ from ..._response import ( from ..._wrappers import ResultWrapper from ...types.pcaps import ( OwnershipGetResponse, - OwnershipCreateResponse, - OwnershipValidateResponse, + MagicVisibilityPCAPsOwnership, ownership_create_params, ownership_validate_params, ) @@ -54,7 +53,7 @@ class Ownerships(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OwnershipCreateResponse: + ) -> MagicVisibilityPCAPsOwnership: """ Adds an AWS or GCP bucket to use with full packet captures. @@ -83,7 +82,7 @@ class Ownerships(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[OwnershipCreateResponse], ResultWrapper[OwnershipCreateResponse]), + cast_to=cast(Type[MagicVisibilityPCAPsOwnership], ResultWrapper[MagicVisibilityPCAPsOwnership]), ) def delete( @@ -178,7 +177,7 @@ class Ownerships(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OwnershipValidateResponse: + ) -> MagicVisibilityPCAPsOwnership: """ Validates buckets added to the packet captures API. @@ -215,7 +214,7 @@ class Ownerships(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[OwnershipValidateResponse], ResultWrapper[OwnershipValidateResponse]), + cast_to=cast(Type[MagicVisibilityPCAPsOwnership], ResultWrapper[MagicVisibilityPCAPsOwnership]), ) @@ -239,7 +238,7 @@ class AsyncOwnerships(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OwnershipCreateResponse: + ) -> MagicVisibilityPCAPsOwnership: """ Adds an AWS or GCP bucket to use with full packet captures. @@ -270,7 +269,7 @@ class AsyncOwnerships(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[OwnershipCreateResponse], ResultWrapper[OwnershipCreateResponse]), + cast_to=cast(Type[MagicVisibilityPCAPsOwnership], ResultWrapper[MagicVisibilityPCAPsOwnership]), ) async def delete( @@ -365,7 +364,7 @@ class AsyncOwnerships(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OwnershipValidateResponse: + ) -> MagicVisibilityPCAPsOwnership: """ Validates buckets added to the packet captures API. @@ -402,7 +401,7 @@ class AsyncOwnerships(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[OwnershipValidateResponse], ResultWrapper[OwnershipValidateResponse]), + cast_to=cast(Type[MagicVisibilityPCAPsOwnership], ResultWrapper[MagicVisibilityPCAPsOwnership]), ) diff --git a/src/cloudflare/resources/queues/consumers.py b/src/cloudflare/resources/queues/consumers.py index 4fae6a4d4..57a8938cc 100644 --- a/src/cloudflare/resources/queues/consumers.py +++ b/src/cloudflare/resources/queues/consumers.py @@ -25,9 +25,9 @@ from ..._base_client import ( ) from ...types.queues import ( ConsumerGetResponse, - ConsumerCreateResponse, ConsumerDeleteResponse, - ConsumerUpdateResponse, + WorkersConsumerCreated, + WorkersConsumerUpdated, consumer_create_params, consumer_update_params, ) @@ -56,7 +56,7 @@ class Consumers(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ConsumerCreateResponse]: + ) -> Optional[WorkersConsumerCreated]: """ Creates a new consumer for a queue. @@ -85,7 +85,7 @@ class Consumers(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ConsumerCreateResponse]], ResultWrapper[ConsumerCreateResponse]), + cast_to=cast(Type[Optional[WorkersConsumerCreated]], ResultWrapper[WorkersConsumerCreated]), ) def update( @@ -101,7 +101,7 @@ class Consumers(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ConsumerUpdateResponse]: + ) -> Optional[WorkersConsumerUpdated]: """ Updates the consumer for a queue, or creates one if it does not exist. @@ -132,7 +132,7 @@ class Consumers(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ConsumerUpdateResponse]], ResultWrapper[ConsumerUpdateResponse]), + cast_to=cast(Type[Optional[WorkersConsumerUpdated]], ResultWrapper[WorkersConsumerUpdated]), ) def delete( @@ -249,7 +249,7 @@ class AsyncConsumers(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ConsumerCreateResponse]: + ) -> Optional[WorkersConsumerCreated]: """ Creates a new consumer for a queue. @@ -278,7 +278,7 @@ class AsyncConsumers(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ConsumerCreateResponse]], ResultWrapper[ConsumerCreateResponse]), + cast_to=cast(Type[Optional[WorkersConsumerCreated]], ResultWrapper[WorkersConsumerCreated]), ) async def update( @@ -294,7 +294,7 @@ class AsyncConsumers(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ConsumerUpdateResponse]: + ) -> Optional[WorkersConsumerUpdated]: """ Updates the consumer for a queue, or creates one if it does not exist. @@ -325,7 +325,7 @@ class AsyncConsumers(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ConsumerUpdateResponse]], ResultWrapper[ConsumerUpdateResponse]), + cast_to=cast(Type[Optional[WorkersConsumerUpdated]], ResultWrapper[WorkersConsumerUpdated]), ) async def delete( diff --git a/src/cloudflare/resources/queues/queues.py b/src/cloudflare/resources/queues/queues.py index 301ed4bc7..29ce172c3 100644 --- a/src/cloudflare/resources/queues/queues.py +++ b/src/cloudflare/resources/queues/queues.py @@ -7,11 +7,11 @@ from typing import Any, Type, Optional, cast import httpx from ...types import ( - QueueGetResponse, + WorkersQueue, QueueListResponse, - QueueCreateResponse, QueueDeleteResponse, - QueueUpdateResponse, + WorkersQueueCreated, + WorkersQueueUpdated, queue_create_params, queue_update_params, ) @@ -68,7 +68,7 @@ class Queues(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[QueueCreateResponse]: + ) -> Optional[WorkersQueueCreated]: """ Creates a new queue. @@ -95,7 +95,7 @@ class Queues(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[QueueCreateResponse]], ResultWrapper[QueueCreateResponse]), + cast_to=cast(Type[Optional[WorkersQueueCreated]], ResultWrapper[WorkersQueueCreated]), ) def update( @@ -110,7 +110,7 @@ class Queues(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[QueueUpdateResponse]: + ) -> Optional[WorkersQueueUpdated]: """ Updates a queue. @@ -139,7 +139,7 @@ class Queues(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[QueueUpdateResponse]], ResultWrapper[QueueUpdateResponse]), + cast_to=cast(Type[Optional[WorkersQueueUpdated]], ResultWrapper[WorkersQueueUpdated]), ) def list( @@ -239,7 +239,7 @@ class Queues(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[QueueGetResponse]: + ) -> Optional[WorkersQueue]: """ Get information about a specific queue. @@ -267,7 +267,7 @@ class Queues(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[QueueGetResponse]], ResultWrapper[QueueGetResponse]), + cast_to=cast(Type[Optional[WorkersQueue]], ResultWrapper[WorkersQueue]), ) @@ -295,7 +295,7 @@ class AsyncQueues(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[QueueCreateResponse]: + ) -> Optional[WorkersQueueCreated]: """ Creates a new queue. @@ -322,7 +322,7 @@ class AsyncQueues(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[QueueCreateResponse]], ResultWrapper[QueueCreateResponse]), + cast_to=cast(Type[Optional[WorkersQueueCreated]], ResultWrapper[WorkersQueueCreated]), ) async def update( @@ -337,7 +337,7 @@ class AsyncQueues(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[QueueUpdateResponse]: + ) -> Optional[WorkersQueueUpdated]: """ Updates a queue. @@ -366,7 +366,7 @@ class AsyncQueues(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[QueueUpdateResponse]], ResultWrapper[QueueUpdateResponse]), + cast_to=cast(Type[Optional[WorkersQueueUpdated]], ResultWrapper[WorkersQueueUpdated]), ) async def list( @@ -466,7 +466,7 @@ class AsyncQueues(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[QueueGetResponse]: + ) -> Optional[WorkersQueue]: """ Get information about a specific queue. @@ -494,7 +494,7 @@ class AsyncQueues(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[QueueGetResponse]], ResultWrapper[QueueGetResponse]), + cast_to=cast(Type[Optional[WorkersQueue]], ResultWrapper[WorkersQueue]), ) diff --git a/src/cloudflare/resources/r2/buckets.py b/src/cloudflare/resources/r2/buckets.py index b92caf2f3..98c970da3 100644 --- a/src/cloudflare/resources/r2/buckets.py +++ b/src/cloudflare/resources/r2/buckets.py @@ -13,13 +13,7 @@ from ..._utils import ( async_maybe_transform, ) from ..._compat import cached_property -from ...types.r2 import ( - BucketGetResponse, - BucketListResponse, - BucketCreateResponse, - bucket_list_params, - bucket_create_params, -) +from ...types.r2 import R2Bucket, BucketListResponse, bucket_list_params, bucket_create_params from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( to_raw_response_wrapper, @@ -56,7 +50,7 @@ class Buckets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BucketCreateResponse: + ) -> R2Bucket: """ Creates a new R2 bucket. @@ -93,7 +87,7 @@ class Buckets(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BucketCreateResponse], ResultWrapper[BucketCreateResponse]), + cast_to=cast(Type[R2Bucket], ResultWrapper[R2Bucket]), ) def list( @@ -221,7 +215,7 @@ class Buckets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BucketGetResponse: + ) -> R2Bucket: """ Gets metadata for an existing R2 bucket. @@ -251,7 +245,7 @@ class Buckets(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BucketGetResponse], ResultWrapper[BucketGetResponse]), + cast_to=cast(Type[R2Bucket], ResultWrapper[R2Bucket]), ) @@ -276,7 +270,7 @@ class AsyncBuckets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BucketCreateResponse: + ) -> R2Bucket: """ Creates a new R2 bucket. @@ -313,7 +307,7 @@ class AsyncBuckets(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BucketCreateResponse], ResultWrapper[BucketCreateResponse]), + cast_to=cast(Type[R2Bucket], ResultWrapper[R2Bucket]), ) async def list( @@ -441,7 +435,7 @@ class AsyncBuckets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BucketGetResponse: + ) -> R2Bucket: """ Gets metadata for an existing R2 bucket. @@ -471,7 +465,7 @@ class AsyncBuckets(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BucketGetResponse], ResultWrapper[BucketGetResponse]), + cast_to=cast(Type[R2Bucket], ResultWrapper[R2Bucket]), ) diff --git a/src/cloudflare/resources/r2/sippy.py b/src/cloudflare/resources/r2/sippy.py index 7e8ed116b..029f9d858 100644 --- a/src/cloudflare/resources/r2/sippy.py +++ b/src/cloudflare/resources/r2/sippy.py @@ -12,7 +12,7 @@ from ..._utils import ( async_maybe_transform, ) from ..._compat import cached_property -from ...types.r2 import SippyGetResponse, SippyDeleteResponse, SippyUpdateResponse, sippy_update_params +from ...types.r2 import R2Sippy, SippyDeleteResponse, sippy_update_params from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( to_raw_response_wrapper, @@ -50,7 +50,7 @@ class Sippy(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SippyUpdateResponse: + ) -> R2Sippy: """ Sets configuration for Sippy for an existing R2 bucket. @@ -87,7 +87,7 @@ class Sippy(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[SippyUpdateResponse], ResultWrapper[SippyUpdateResponse]), + cast_to=cast(Type[R2Sippy], ResultWrapper[R2Sippy]), ) def delete( @@ -145,7 +145,7 @@ class Sippy(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SippyGetResponse: + ) -> R2Sippy: """ Gets configuration for Sippy for an existing R2 bucket. @@ -175,7 +175,7 @@ class Sippy(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[SippyGetResponse], ResultWrapper[SippyGetResponse]), + cast_to=cast(Type[R2Sippy], ResultWrapper[R2Sippy]), ) @@ -201,7 +201,7 @@ class AsyncSippy(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SippyUpdateResponse: + ) -> R2Sippy: """ Sets configuration for Sippy for an existing R2 bucket. @@ -238,7 +238,7 @@ class AsyncSippy(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[SippyUpdateResponse], ResultWrapper[SippyUpdateResponse]), + cast_to=cast(Type[R2Sippy], ResultWrapper[R2Sippy]), ) async def delete( @@ -296,7 +296,7 @@ class AsyncSippy(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SippyGetResponse: + ) -> R2Sippy: """ Gets configuration for Sippy for an existing R2 bucket. @@ -326,7 +326,7 @@ class AsyncSippy(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[SippyGetResponse], ResultWrapper[SippyGetResponse]), + cast_to=cast(Type[R2Sippy], ResultWrapper[R2Sippy]), ) diff --git a/src/cloudflare/resources/rules/lists/lists.py b/src/cloudflare/resources/rules/lists/lists.py index 9c461bace..e09a45a3d 100644 --- a/src/cloudflare/resources/rules/lists/lists.py +++ b/src/cloudflare/resources/rules/lists/lists.py @@ -29,15 +29,7 @@ from ...._response import ( async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ....types.rules import ( - ListGetResponse, - ListListResponse, - ListCreateResponse, - ListDeleteResponse, - ListUpdateResponse, - list_create_params, - list_update_params, -) +from ....types.rules import ListsList, ListListResponse, ListDeleteResponse, list_create_params, list_update_params from ...._base_client import ( make_request_options, ) @@ -83,7 +75,7 @@ class Lists(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ListCreateResponse]: + ) -> Optional[ListsList]: """ Creates a new list of the specified type. @@ -124,7 +116,7 @@ class Lists(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ListCreateResponse]], ResultWrapper[ListCreateResponse]), + cast_to=cast(Type[Optional[ListsList]], ResultWrapper[ListsList]), ) def update( @@ -139,7 +131,7 @@ class Lists(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ListUpdateResponse]: + ) -> Optional[ListsList]: """ Updates the description of a list. @@ -172,7 +164,7 @@ class Lists(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ListUpdateResponse]], ResultWrapper[ListUpdateResponse]), + cast_to=cast(Type[Optional[ListsList]], ResultWrapper[ListsList]), ) def list( @@ -269,7 +261,7 @@ class Lists(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ListGetResponse]: + ) -> Optional[ListsList]: """ Fetches the details of a list. @@ -299,7 +291,7 @@ class Lists(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ListGetResponse]], ResultWrapper[ListGetResponse]), + cast_to=cast(Type[Optional[ListsList]], ResultWrapper[ListsList]), ) @@ -333,7 +325,7 @@ class AsyncLists(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ListCreateResponse]: + ) -> Optional[ListsList]: """ Creates a new list of the specified type. @@ -374,7 +366,7 @@ class AsyncLists(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ListCreateResponse]], ResultWrapper[ListCreateResponse]), + cast_to=cast(Type[Optional[ListsList]], ResultWrapper[ListsList]), ) async def update( @@ -389,7 +381,7 @@ class AsyncLists(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ListUpdateResponse]: + ) -> Optional[ListsList]: """ Updates the description of a list. @@ -422,7 +414,7 @@ class AsyncLists(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ListUpdateResponse]], ResultWrapper[ListUpdateResponse]), + cast_to=cast(Type[Optional[ListsList]], ResultWrapper[ListsList]), ) async def list( @@ -519,7 +511,7 @@ class AsyncLists(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ListGetResponse]: + ) -> Optional[ListsList]: """ Fetches the details of a list. @@ -549,7 +541,7 @@ class AsyncLists(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ListGetResponse]], ResultWrapper[ListGetResponse]), + cast_to=cast(Type[Optional[ListsList]], ResultWrapper[ListsList]), ) diff --git a/src/cloudflare/resources/rulesets/phases/phases.py b/src/cloudflare/resources/rulesets/phases/phases.py index a0b6dc9ea..7025122aa 100644 --- a/src/cloudflare/resources/rulesets/phases/phases.py +++ b/src/cloudflare/resources/rulesets/phases/phases.py @@ -7,6 +7,7 @@ from typing_extensions import Literal import httpx +from ....types import RulesetsRulesetResponse from .versions import ( Versions, AsyncVersions, @@ -32,7 +33,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.rulesets import PhaseGetResponse, PhaseUpdateResponse, phase_update_params +from ....types.rulesets import phase_update_params __all__ = ["Phases", "AsyncPhases"] @@ -117,7 +118,7 @@ class Phases(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PhaseUpdateResponse: + ) -> RulesetsRulesetResponse: """ Updates an account or zone entry point ruleset, creating a new version. @@ -185,7 +186,7 @@ class Phases(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PhaseUpdateResponse], ResultWrapper[PhaseUpdateResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) def get( @@ -224,7 +225,7 @@ class Phases(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PhaseGetResponse: + ) -> RulesetsRulesetResponse: """ Fetches the latest version of the account or zone entry point ruleset for a given phase. @@ -270,7 +271,7 @@ class Phases(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PhaseGetResponse], ResultWrapper[PhaseGetResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) @@ -354,7 +355,7 @@ class AsyncPhases(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PhaseUpdateResponse: + ) -> RulesetsRulesetResponse: """ Updates an account or zone entry point ruleset, creating a new version. @@ -422,7 +423,7 @@ class AsyncPhases(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PhaseUpdateResponse], ResultWrapper[PhaseUpdateResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) async def get( @@ -461,7 +462,7 @@ class AsyncPhases(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PhaseGetResponse: + ) -> RulesetsRulesetResponse: """ Fetches the latest version of the account or zone entry point ruleset for a given phase. @@ -507,7 +508,7 @@ class AsyncPhases(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PhaseGetResponse], ResultWrapper[PhaseGetResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) diff --git a/src/cloudflare/resources/rulesets/phases/versions.py b/src/cloudflare/resources/rulesets/phases/versions.py index c24dc7183..7d899ba4f 100644 --- a/src/cloudflare/resources/rulesets/phases/versions.py +++ b/src/cloudflare/resources/rulesets/phases/versions.py @@ -7,6 +7,7 @@ from typing_extensions import Literal import httpx +from ....types import RulesetsRulesetResponse, RulesetsRulesetsResponse from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -20,7 +21,6 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.rulesets.phases import VersionGetResponse, VersionListResponse __all__ = ["Versions", "AsyncVersions"] @@ -70,7 +70,7 @@ class Versions(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VersionListResponse: + ) -> RulesetsRulesetsResponse: """ Fetches the versions of an account or zone entry point ruleset. @@ -115,7 +115,7 @@ class Versions(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VersionListResponse], ResultWrapper[VersionListResponse]), + cast_to=cast(Type[RulesetsRulesetsResponse], ResultWrapper[RulesetsRulesetsResponse]), ) def get( @@ -155,7 +155,7 @@ class Versions(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VersionGetResponse: + ) -> RulesetsRulesetResponse: """ Fetches a specific version of an account or zone entry point ruleset. @@ -204,7 +204,7 @@ class Versions(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VersionGetResponse], ResultWrapper[VersionGetResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) @@ -253,7 +253,7 @@ class AsyncVersions(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VersionListResponse: + ) -> RulesetsRulesetsResponse: """ Fetches the versions of an account or zone entry point ruleset. @@ -298,7 +298,7 @@ class AsyncVersions(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VersionListResponse], ResultWrapper[VersionListResponse]), + cast_to=cast(Type[RulesetsRulesetsResponse], ResultWrapper[RulesetsRulesetsResponse]), ) async def get( @@ -338,7 +338,7 @@ class AsyncVersions(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VersionGetResponse: + ) -> RulesetsRulesetResponse: """ Fetches a specific version of an account or zone entry point ruleset. @@ -387,7 +387,7 @@ class AsyncVersions(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VersionGetResponse], ResultWrapper[VersionGetResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) diff --git a/src/cloudflare/resources/rulesets/rules.py b/src/cloudflare/resources/rulesets/rules.py index 358153959..22a6a493d 100644 --- a/src/cloudflare/resources/rulesets/rules.py +++ b/src/cloudflare/resources/rulesets/rules.py @@ -6,6 +6,7 @@ from typing import Type, cast import httpx +from ...types import RulesetsRulesetResponse from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -23,13 +24,7 @@ from ..._wrappers import ResultWrapper from ..._base_client import ( make_request_options, ) -from ...types.rulesets import ( - RuleEditResponse, - RuleCreateResponse, - RuleDeleteResponse, - rule_edit_params, - rule_create_params, -) +from ...types.rulesets import rule_edit_params, rule_create_params __all__ = ["Rules", "AsyncRules"] @@ -56,7 +51,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleCreateResponse: + ) -> RulesetsRulesetResponse: """Adds a new rule to an account or zone ruleset. The rule will be added to the end @@ -106,7 +101,7 @@ class Rules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RuleCreateResponse], ResultWrapper[RuleCreateResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) def delete( @@ -122,7 +117,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleDeleteResponse: + ) -> RulesetsRulesetResponse: """ Deletes an existing rule from an account or zone ruleset. @@ -171,7 +166,7 @@ class Rules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RuleDeleteResponse], ResultWrapper[RuleDeleteResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) def edit( @@ -188,7 +183,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleEditResponse: + ) -> RulesetsRulesetResponse: """ Updates an existing rule in an account ruleset. @@ -240,7 +235,7 @@ class Rules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RuleEditResponse], ResultWrapper[RuleEditResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) @@ -266,7 +261,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleCreateResponse: + ) -> RulesetsRulesetResponse: """Adds a new rule to an account or zone ruleset. The rule will be added to the end @@ -316,7 +311,7 @@ class AsyncRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RuleCreateResponse], ResultWrapper[RuleCreateResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) async def delete( @@ -332,7 +327,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleDeleteResponse: + ) -> RulesetsRulesetResponse: """ Deletes an existing rule from an account or zone ruleset. @@ -381,7 +376,7 @@ class AsyncRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RuleDeleteResponse], ResultWrapper[RuleDeleteResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) async def edit( @@ -398,7 +393,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleEditResponse: + ) -> RulesetsRulesetResponse: """ Updates an existing rule in an account ruleset. @@ -450,7 +445,7 @@ class AsyncRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RuleEditResponse], ResultWrapper[RuleEditResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) diff --git a/src/cloudflare/resources/rulesets/rulesets.py b/src/cloudflare/resources/rulesets/rulesets.py index 5aa35f185..45e62edc4 100644 --- a/src/cloudflare/resources/rulesets/rulesets.py +++ b/src/cloudflare/resources/rulesets/rulesets.py @@ -24,10 +24,8 @@ from .phases import ( AsyncPhasesWithStreamingResponse, ) from ...types import ( - RulesetGetResponse, - RulesetListResponse, - RulesetCreateResponse, - RulesetUpdateResponse, + RulesetsRulesetResponse, + RulesetsRulesetsResponse, ruleset_create_params, ruleset_update_params, ) @@ -123,7 +121,7 @@ class Rulesets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetCreateResponse: + ) -> RulesetsRulesetResponse: """ Creates a ruleset. @@ -184,7 +182,7 @@ class Rulesets(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetCreateResponse], ResultWrapper[RulesetCreateResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) def update( @@ -230,7 +228,7 @@ class Rulesets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetUpdateResponse: + ) -> RulesetsRulesetResponse: """ Updates an account or zone ruleset, creating a new version. @@ -298,7 +296,7 @@ class Rulesets(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetUpdateResponse], ResultWrapper[RulesetUpdateResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) def list( @@ -312,7 +310,7 @@ class Rulesets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetListResponse: + ) -> RulesetsRulesetsResponse: """ Fetches all rulesets. @@ -353,7 +351,7 @@ class Rulesets(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetListResponse], ResultWrapper[RulesetListResponse]), + cast_to=cast(Type[RulesetsRulesetsResponse], ResultWrapper[RulesetsRulesetsResponse]), ) def delete( @@ -425,7 +423,7 @@ class Rulesets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetGetResponse: + ) -> RulesetsRulesetResponse: """ Fetches the latest version of an account or zone ruleset. @@ -470,7 +468,7 @@ class Rulesets(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetGetResponse], ResultWrapper[RulesetGetResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) @@ -535,7 +533,7 @@ class AsyncRulesets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetCreateResponse: + ) -> RulesetsRulesetResponse: """ Creates a ruleset. @@ -596,7 +594,7 @@ class AsyncRulesets(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetCreateResponse], ResultWrapper[RulesetCreateResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) async def update( @@ -642,7 +640,7 @@ class AsyncRulesets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetUpdateResponse: + ) -> RulesetsRulesetResponse: """ Updates an account or zone ruleset, creating a new version. @@ -710,7 +708,7 @@ class AsyncRulesets(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetUpdateResponse], ResultWrapper[RulesetUpdateResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) async def list( @@ -724,7 +722,7 @@ class AsyncRulesets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetListResponse: + ) -> RulesetsRulesetsResponse: """ Fetches all rulesets. @@ -765,7 +763,7 @@ class AsyncRulesets(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetListResponse], ResultWrapper[RulesetListResponse]), + cast_to=cast(Type[RulesetsRulesetsResponse], ResultWrapper[RulesetsRulesetsResponse]), ) async def delete( @@ -837,7 +835,7 @@ class AsyncRulesets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetGetResponse: + ) -> RulesetsRulesetResponse: """ Fetches the latest version of an account or zone ruleset. @@ -882,7 +880,7 @@ class AsyncRulesets(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetGetResponse], ResultWrapper[RulesetGetResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) diff --git a/src/cloudflare/resources/rulesets/versions/by_tags.py b/src/cloudflare/resources/rulesets/versions/by_tags.py index 489ed61dc..8f1d14dd3 100644 --- a/src/cloudflare/resources/rulesets/versions/by_tags.py +++ b/src/cloudflare/resources/rulesets/versions/by_tags.py @@ -6,6 +6,7 @@ from typing import Type, cast import httpx +from ....types import RulesetsRulesetResponse from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -19,7 +20,6 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.rulesets.versions import ByTagGetResponse __all__ = ["ByTags", "AsyncByTags"] @@ -46,7 +46,7 @@ class ByTags(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ByTagGetResponse: + ) -> RulesetsRulesetResponse: """ Fetches the rules of a managed account ruleset version for a given tag. @@ -84,7 +84,7 @@ class ByTags(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ByTagGetResponse], ResultWrapper[ByTagGetResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) @@ -110,7 +110,7 @@ class AsyncByTags(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ByTagGetResponse: + ) -> RulesetsRulesetResponse: """ Fetches the rules of a managed account ruleset version for a given tag. @@ -148,7 +148,7 @@ class AsyncByTags(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ByTagGetResponse], ResultWrapper[ByTagGetResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) diff --git a/src/cloudflare/resources/rulesets/versions/versions.py b/src/cloudflare/resources/rulesets/versions/versions.py index f2ed9e233..4e2d79d1c 100644 --- a/src/cloudflare/resources/rulesets/versions/versions.py +++ b/src/cloudflare/resources/rulesets/versions/versions.py @@ -14,6 +14,7 @@ from .by_tags import ( ByTagsWithStreamingResponse, AsyncByTagsWithStreamingResponse, ) +from ....types import RulesetsRulesetResponse, RulesetsRulesetsResponse from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -27,7 +28,6 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.rulesets import VersionGetResponse, VersionListResponse __all__ = ["Versions", "AsyncVersions"] @@ -57,7 +57,7 @@ class Versions(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VersionListResponse: + ) -> RulesetsRulesetsResponse: """ Fetches the versions of an account or zone ruleset. @@ -102,7 +102,7 @@ class Versions(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VersionListResponse], ResultWrapper[VersionListResponse]), + cast_to=cast(Type[RulesetsRulesetsResponse], ResultWrapper[RulesetsRulesetsResponse]), ) def delete( @@ -180,7 +180,7 @@ class Versions(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VersionGetResponse: + ) -> RulesetsRulesetResponse: """ Fetches a specific version of an account or zone ruleset. @@ -229,7 +229,7 @@ class Versions(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VersionGetResponse], ResultWrapper[VersionGetResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) @@ -258,7 +258,7 @@ class AsyncVersions(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VersionListResponse: + ) -> RulesetsRulesetsResponse: """ Fetches the versions of an account or zone ruleset. @@ -303,7 +303,7 @@ class AsyncVersions(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VersionListResponse], ResultWrapper[VersionListResponse]), + cast_to=cast(Type[RulesetsRulesetsResponse], ResultWrapper[RulesetsRulesetsResponse]), ) async def delete( @@ -381,7 +381,7 @@ class AsyncVersions(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> VersionGetResponse: + ) -> RulesetsRulesetResponse: """ Fetches a specific version of an account or zone ruleset. @@ -430,7 +430,7 @@ class AsyncVersions(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[VersionGetResponse], ResultWrapper[VersionGetResponse]), + cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) diff --git a/src/cloudflare/resources/rum/rules.py b/src/cloudflare/resources/rum/rules.py index b247b3891..22f29056d 100644 --- a/src/cloudflare/resources/rum/rules.py +++ b/src/cloudflare/resources/rum/rules.py @@ -20,14 +20,7 @@ from ..._response import ( async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ...types.rum import ( - RuleListResponse, - RuleCreateResponse, - RuleDeleteResponse, - RuleUpdateResponse, - rule_create_params, - rule_update_params, -) +from ...types.rum import RUMRule, RuleListResponse, RuleDeleteResponse, rule_create_params, rule_update_params from ..._base_client import ( make_request_options, ) @@ -59,7 +52,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleCreateResponse]: + ) -> Optional[RUMRule]: """ Creates a new rule in a Web Analytics ruleset. @@ -102,7 +95,7 @@ class Rules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleCreateResponse]], ResultWrapper[RuleCreateResponse]), + cast_to=cast(Type[Optional[RUMRule]], ResultWrapper[RUMRule]), ) def update( @@ -121,7 +114,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleUpdateResponse]: + ) -> Optional[RUMRule]: """ Updates a rule in a Web Analytics ruleset. @@ -168,7 +161,7 @@ class Rules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleUpdateResponse]], ResultWrapper[RuleUpdateResponse]), + cast_to=cast(Type[Optional[RUMRule]], ResultWrapper[RUMRule]), ) def list( @@ -289,7 +282,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleCreateResponse]: + ) -> Optional[RUMRule]: """ Creates a new rule in a Web Analytics ruleset. @@ -332,7 +325,7 @@ class AsyncRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleCreateResponse]], ResultWrapper[RuleCreateResponse]), + cast_to=cast(Type[Optional[RUMRule]], ResultWrapper[RUMRule]), ) async def update( @@ -351,7 +344,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleUpdateResponse]: + ) -> Optional[RUMRule]: """ Updates a rule in a Web Analytics ruleset. @@ -398,7 +391,7 @@ class AsyncRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RuleUpdateResponse]], ResultWrapper[RuleUpdateResponse]), + cast_to=cast(Type[Optional[RUMRule]], ResultWrapper[RUMRule]), ) async def list( diff --git a/src/cloudflare/resources/rum/site_infos.py b/src/cloudflare/resources/rum/site_infos.py index 3f4cc695a..611991fbd 100644 --- a/src/cloudflare/resources/rum/site_infos.py +++ b/src/cloudflare/resources/rum/site_infos.py @@ -22,11 +22,8 @@ from ..._response import ( ) from ..._wrappers import ResultWrapper from ...types.rum import ( - SiteInfoGetResponse, - SiteInfoListResponse, - SiteInfoCreateResponse, + RUMSite, SiteInfoDeleteResponse, - SiteInfoUpdateResponse, site_info_list_params, site_info_create_params, site_info_update_params, @@ -62,7 +59,7 @@ class SiteInfos(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SiteInfoCreateResponse]: + ) -> Optional[RUMSite]: """ Creates a new Web Analytics site. @@ -103,7 +100,7 @@ class SiteInfos(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SiteInfoCreateResponse]], ResultWrapper[SiteInfoCreateResponse]), + cast_to=cast(Type[Optional[RUMSite]], ResultWrapper[RUMSite]), ) def update( @@ -120,7 +117,7 @@ class SiteInfos(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SiteInfoUpdateResponse]: + ) -> Optional[RUMSite]: """ Updates an existing Web Analytics site. @@ -165,7 +162,7 @@ class SiteInfos(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SiteInfoUpdateResponse]], ResultWrapper[SiteInfoUpdateResponse]), + cast_to=cast(Type[Optional[RUMSite]], ResultWrapper[RUMSite]), ) def list( @@ -181,7 +178,7 @@ class SiteInfos(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[SiteInfoListResponse]: + ) -> SyncV4PagePaginationArray[RUMSite]: """ Lists all Web Analytics sites of an account. @@ -206,7 +203,7 @@ class SiteInfos(SyncAPIResource): 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}/rum/site_info/list", - page=SyncV4PagePaginationArray[SiteInfoListResponse], + page=SyncV4PagePaginationArray[RUMSite], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -221,7 +218,7 @@ class SiteInfos(SyncAPIResource): site_info_list_params.SiteInfoListParams, ), ), - model=SiteInfoListResponse, + model=RUMSite, ) def delete( @@ -279,7 +276,7 @@ class SiteInfos(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SiteInfoGetResponse]: + ) -> Optional[RUMSite]: """ Retrieves a Web Analytics site. @@ -309,7 +306,7 @@ class SiteInfos(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SiteInfoGetResponse]], ResultWrapper[SiteInfoGetResponse]), + cast_to=cast(Type[Optional[RUMSite]], ResultWrapper[RUMSite]), ) @@ -335,7 +332,7 @@ class AsyncSiteInfos(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SiteInfoCreateResponse]: + ) -> Optional[RUMSite]: """ Creates a new Web Analytics site. @@ -376,7 +373,7 @@ class AsyncSiteInfos(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SiteInfoCreateResponse]], ResultWrapper[SiteInfoCreateResponse]), + cast_to=cast(Type[Optional[RUMSite]], ResultWrapper[RUMSite]), ) async def update( @@ -393,7 +390,7 @@ class AsyncSiteInfos(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SiteInfoUpdateResponse]: + ) -> Optional[RUMSite]: """ Updates an existing Web Analytics site. @@ -438,7 +435,7 @@ class AsyncSiteInfos(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SiteInfoUpdateResponse]], ResultWrapper[SiteInfoUpdateResponse]), + cast_to=cast(Type[Optional[RUMSite]], ResultWrapper[RUMSite]), ) def list( @@ -454,7 +451,7 @@ class AsyncSiteInfos(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[SiteInfoListResponse, AsyncV4PagePaginationArray[SiteInfoListResponse]]: + ) -> AsyncPaginator[RUMSite, AsyncV4PagePaginationArray[RUMSite]]: """ Lists all Web Analytics sites of an account. @@ -479,7 +476,7 @@ class AsyncSiteInfos(AsyncAPIResource): 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}/rum/site_info/list", - page=AsyncV4PagePaginationArray[SiteInfoListResponse], + page=AsyncV4PagePaginationArray[RUMSite], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -494,7 +491,7 @@ class AsyncSiteInfos(AsyncAPIResource): site_info_list_params.SiteInfoListParams, ), ), - model=SiteInfoListResponse, + model=RUMSite, ) async def delete( @@ -552,7 +549,7 @@ class AsyncSiteInfos(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SiteInfoGetResponse]: + ) -> Optional[RUMSite]: """ Retrieves a Web Analytics site. @@ -582,7 +579,7 @@ class AsyncSiteInfos(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SiteInfoGetResponse]], ResultWrapper[SiteInfoGetResponse]), + cast_to=cast(Type[Optional[RUMSite]], ResultWrapper[RUMSite]), ) diff --git a/src/cloudflare/resources/secondary_dns/acls.py b/src/cloudflare/resources/secondary_dns/acls.py index cc44ba7e6..6cb464dd5 100644 --- a/src/cloudflare/resources/secondary_dns/acls.py +++ b/src/cloudflare/resources/secondary_dns/acls.py @@ -24,11 +24,9 @@ from ..._base_client import ( make_request_options, ) from ...types.secondary_dns import ( - ACLGetResponse, ACLListResponse, - ACLCreateResponse, + SecondaryDNSACL, ACLDeleteResponse, - ACLUpdateResponse, acl_create_params, acl_update_params, ) @@ -56,7 +54,7 @@ class ACLs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ACLCreateResponse: + ) -> SecondaryDNSACL: """ Create ACL. @@ -79,7 +77,7 @@ class ACLs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ACLCreateResponse], ResultWrapper[ACLCreateResponse]), + cast_to=cast(Type[SecondaryDNSACL], ResultWrapper[SecondaryDNSACL]), ) def update( @@ -95,7 +93,7 @@ class ACLs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ACLUpdateResponse: + ) -> SecondaryDNSACL: """ Modify ACL. @@ -132,7 +130,7 @@ class ACLs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ACLUpdateResponse], ResultWrapper[ACLUpdateResponse]), + cast_to=cast(Type[SecondaryDNSACL], ResultWrapper[SecondaryDNSACL]), ) def list( @@ -217,7 +215,7 @@ class ACLs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ACLGetResponse: + ) -> SecondaryDNSACL: """ Get ACL. @@ -239,7 +237,7 @@ class ACLs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ACLGetResponse], ResultWrapper[ACLGetResponse]), + cast_to=cast(Type[SecondaryDNSACL], ResultWrapper[SecondaryDNSACL]), ) @@ -263,7 +261,7 @@ class AsyncACLs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ACLCreateResponse: + ) -> SecondaryDNSACL: """ Create ACL. @@ -286,7 +284,7 @@ class AsyncACLs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ACLCreateResponse], ResultWrapper[ACLCreateResponse]), + cast_to=cast(Type[SecondaryDNSACL], ResultWrapper[SecondaryDNSACL]), ) async def update( @@ -302,7 +300,7 @@ class AsyncACLs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ACLUpdateResponse: + ) -> SecondaryDNSACL: """ Modify ACL. @@ -339,7 +337,7 @@ class AsyncACLs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ACLUpdateResponse], ResultWrapper[ACLUpdateResponse]), + cast_to=cast(Type[SecondaryDNSACL], ResultWrapper[SecondaryDNSACL]), ) async def list( @@ -424,7 +422,7 @@ class AsyncACLs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ACLGetResponse: + ) -> SecondaryDNSACL: """ Get ACL. @@ -446,7 +444,7 @@ class AsyncACLs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ACLGetResponse], ResultWrapper[ACLGetResponse]), + cast_to=cast(Type[SecondaryDNSACL], ResultWrapper[SecondaryDNSACL]), ) diff --git a/src/cloudflare/resources/secondary_dns/peers.py b/src/cloudflare/resources/secondary_dns/peers.py index 0fec394f7..53af9fbdb 100644 --- a/src/cloudflare/resources/secondary_dns/peers.py +++ b/src/cloudflare/resources/secondary_dns/peers.py @@ -24,11 +24,9 @@ from ..._base_client import ( make_request_options, ) from ...types.secondary_dns import ( - PeerGetResponse, PeerListResponse, - PeerCreateResponse, + SecondaryDNSPeer, PeerDeleteResponse, - PeerUpdateResponse, peer_create_params, peer_update_params, ) @@ -56,7 +54,7 @@ class Peers(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PeerCreateResponse: + ) -> SecondaryDNSPeer: """ Create Peer. @@ -79,7 +77,7 @@ class Peers(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PeerCreateResponse], ResultWrapper[PeerCreateResponse]), + cast_to=cast(Type[SecondaryDNSPeer], ResultWrapper[SecondaryDNSPeer]), ) def update( @@ -98,7 +96,7 @@ class Peers(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PeerUpdateResponse: + ) -> SecondaryDNSPeer: """ Modify Peer. @@ -146,7 +144,7 @@ class Peers(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PeerUpdateResponse], ResultWrapper[PeerUpdateResponse]), + cast_to=cast(Type[SecondaryDNSPeer], ResultWrapper[SecondaryDNSPeer]), ) def list( @@ -231,7 +229,7 @@ class Peers(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PeerGetResponse: + ) -> SecondaryDNSPeer: """ Get Peer. @@ -253,7 +251,7 @@ class Peers(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PeerGetResponse], ResultWrapper[PeerGetResponse]), + cast_to=cast(Type[SecondaryDNSPeer], ResultWrapper[SecondaryDNSPeer]), ) @@ -277,7 +275,7 @@ class AsyncPeers(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PeerCreateResponse: + ) -> SecondaryDNSPeer: """ Create Peer. @@ -300,7 +298,7 @@ class AsyncPeers(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PeerCreateResponse], ResultWrapper[PeerCreateResponse]), + cast_to=cast(Type[SecondaryDNSPeer], ResultWrapper[SecondaryDNSPeer]), ) async def update( @@ -319,7 +317,7 @@ class AsyncPeers(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PeerUpdateResponse: + ) -> SecondaryDNSPeer: """ Modify Peer. @@ -367,7 +365,7 @@ class AsyncPeers(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PeerUpdateResponse], ResultWrapper[PeerUpdateResponse]), + cast_to=cast(Type[SecondaryDNSPeer], ResultWrapper[SecondaryDNSPeer]), ) async def list( @@ -452,7 +450,7 @@ class AsyncPeers(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PeerGetResponse: + ) -> SecondaryDNSPeer: """ Get Peer. @@ -474,7 +472,7 @@ class AsyncPeers(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PeerGetResponse], ResultWrapper[PeerGetResponse]), + cast_to=cast(Type[SecondaryDNSPeer], ResultWrapper[SecondaryDNSPeer]), ) diff --git a/src/cloudflare/resources/secondary_dns/tsigs.py b/src/cloudflare/resources/secondary_dns/tsigs.py index 79a0b1d68..874335f01 100644 --- a/src/cloudflare/resources/secondary_dns/tsigs.py +++ b/src/cloudflare/resources/secondary_dns/tsigs.py @@ -24,11 +24,9 @@ from ..._base_client import ( make_request_options, ) from ...types.secondary_dns import ( - TSIGGetResponse, + SecondaryDNSTSIG, TSIGListResponse, - TSIGCreateResponse, TSIGDeleteResponse, - TSIGUpdateResponse, tsig_create_params, tsig_update_params, ) @@ -58,7 +56,7 @@ class TSIGs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TSIGCreateResponse: + ) -> SecondaryDNSTSIG: """ Create TSIG. @@ -94,7 +92,7 @@ class TSIGs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TSIGCreateResponse], ResultWrapper[TSIGCreateResponse]), + cast_to=cast(Type[SecondaryDNSTSIG], ResultWrapper[SecondaryDNSTSIG]), ) def update( @@ -111,7 +109,7 @@ class TSIGs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TSIGUpdateResponse: + ) -> SecondaryDNSTSIG: """ Modify TSIG. @@ -147,7 +145,7 @@ class TSIGs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TSIGUpdateResponse], ResultWrapper[TSIGUpdateResponse]), + cast_to=cast(Type[SecondaryDNSTSIG], ResultWrapper[SecondaryDNSTSIG]), ) def list( @@ -232,7 +230,7 @@ class TSIGs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TSIGGetResponse: + ) -> SecondaryDNSTSIG: """ Get TSIG. @@ -254,7 +252,7 @@ class TSIGs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TSIGGetResponse], ResultWrapper[TSIGGetResponse]), + cast_to=cast(Type[SecondaryDNSTSIG], ResultWrapper[SecondaryDNSTSIG]), ) @@ -280,7 +278,7 @@ class AsyncTSIGs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TSIGCreateResponse: + ) -> SecondaryDNSTSIG: """ Create TSIG. @@ -316,7 +314,7 @@ class AsyncTSIGs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TSIGCreateResponse], ResultWrapper[TSIGCreateResponse]), + cast_to=cast(Type[SecondaryDNSTSIG], ResultWrapper[SecondaryDNSTSIG]), ) async def update( @@ -333,7 +331,7 @@ class AsyncTSIGs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TSIGUpdateResponse: + ) -> SecondaryDNSTSIG: """ Modify TSIG. @@ -369,7 +367,7 @@ class AsyncTSIGs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TSIGUpdateResponse], ResultWrapper[TSIGUpdateResponse]), + cast_to=cast(Type[SecondaryDNSTSIG], ResultWrapper[SecondaryDNSTSIG]), ) async def list( @@ -454,7 +452,7 @@ class AsyncTSIGs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TSIGGetResponse: + ) -> SecondaryDNSTSIG: """ Get TSIG. @@ -476,7 +474,7 @@ class AsyncTSIGs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TSIGGetResponse], ResultWrapper[TSIGGetResponse]), + cast_to=cast(Type[SecondaryDNSTSIG], ResultWrapper[SecondaryDNSTSIG]), ) diff --git a/src/cloudflare/resources/snippets/snippets.py b/src/cloudflare/resources/snippets/snippets.py index c5a95fa53..cdb8cd7c5 100644 --- a/src/cloudflare/resources/snippets/snippets.py +++ b/src/cloudflare/resources/snippets/snippets.py @@ -14,13 +14,7 @@ from .rules import ( RulesWithStreamingResponse, AsyncRulesWithStreamingResponse, ) -from ...types import ( - SnippetGetResponse, - SnippetListResponse, - SnippetDeleteResponse, - SnippetUpdateResponse, - snippet_update_params, -) +from ...types import Snippet, SnippetListResponse, SnippetDeleteResponse, snippet_update_params from .content import ( Content, AsyncContent, @@ -80,7 +74,7 @@ class Snippets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SnippetUpdateResponse: + ) -> Snippet: """ Put Snippet @@ -119,7 +113,7 @@ class Snippets(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[SnippetUpdateResponse], ResultWrapper[SnippetUpdateResponse]), + cast_to=cast(Type[Snippet], ResultWrapper[Snippet]), ) def list( @@ -221,7 +215,7 @@ class Snippets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SnippetGetResponse: + ) -> Snippet: """ Snippet @@ -251,7 +245,7 @@ class Snippets(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[SnippetGetResponse], ResultWrapper[SnippetGetResponse]), + cast_to=cast(Type[Snippet], ResultWrapper[Snippet]), ) @@ -285,7 +279,7 @@ class AsyncSnippets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SnippetUpdateResponse: + ) -> Snippet: """ Put Snippet @@ -324,7 +318,7 @@ class AsyncSnippets(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[SnippetUpdateResponse], ResultWrapper[SnippetUpdateResponse]), + cast_to=cast(Type[Snippet], ResultWrapper[Snippet]), ) async def list( @@ -426,7 +420,7 @@ class AsyncSnippets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SnippetGetResponse: + ) -> Snippet: """ Snippet @@ -456,7 +450,7 @@ class AsyncSnippets(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[SnippetGetResponse], ResultWrapper[SnippetGetResponse]), + cast_to=cast(Type[Snippet], ResultWrapper[Snippet]), ) diff --git a/src/cloudflare/resources/speed/availabilities.py b/src/cloudflare/resources/speed/availabilities.py index 6ff3ee605..f8856ff67 100644 --- a/src/cloudflare/resources/speed/availabilities.py +++ b/src/cloudflare/resources/speed/availabilities.py @@ -16,7 +16,7 @@ from ..._response import ( async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ...types.speed import AvailabilityListResponse +from ...types.speed import ObservatoryAvailabilities from ..._base_client import ( make_request_options, ) @@ -43,7 +43,7 @@ class Availabilities(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AvailabilityListResponse]: + ) -> Optional[ObservatoryAvailabilities]: """ Retrieves quota for all plans, as well as the current zone quota. @@ -69,7 +69,7 @@ class Availabilities(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AvailabilityListResponse]], ResultWrapper[AvailabilityListResponse]), + cast_to=cast(Type[Optional[ObservatoryAvailabilities]], ResultWrapper[ObservatoryAvailabilities]), ) @@ -92,7 +92,7 @@ class AsyncAvailabilities(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AvailabilityListResponse]: + ) -> Optional[ObservatoryAvailabilities]: """ Retrieves quota for all plans, as well as the current zone quota. @@ -118,7 +118,7 @@ class AsyncAvailabilities(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AvailabilityListResponse]], ResultWrapper[AvailabilityListResponse]), + cast_to=cast(Type[Optional[ObservatoryAvailabilities]], ResultWrapper[ObservatoryAvailabilities]), ) diff --git a/src/cloudflare/resources/speed/speed.py b/src/cloudflare/resources/speed/speed.py index 85e0999e6..68329d16d 100644 --- a/src/cloudflare/resources/speed/speed.py +++ b/src/cloudflare/resources/speed/speed.py @@ -24,9 +24,9 @@ from .tests import ( AsyncTestsWithStreamingResponse, ) from ...types import ( + ObservatoryTrend, + ObservatorySchedule, SpeedDeleteResponse, - SpeedTrendsListResponse, - SpeedScheduleGetResponse, speed_delete_params, speed_trends_list_params, speed_schedule_get_params, @@ -199,7 +199,7 @@ class Speed(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SpeedScheduleGetResponse]: + ) -> Optional[ObservatorySchedule]: """ Retrieves the test schedule for a page in a specific region. @@ -232,7 +232,7 @@ class Speed(SyncAPIResource): query=maybe_transform({"region": region}, speed_schedule_get_params.SpeedScheduleGetParams), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SpeedScheduleGetResponse]], ResultWrapper[SpeedScheduleGetResponse]), + cast_to=cast(Type[Optional[ObservatorySchedule]], ResultWrapper[ObservatorySchedule]), ) def trends_list( @@ -272,7 +272,7 @@ class Speed(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SpeedTrendsListResponse]: + ) -> Optional[ObservatoryTrend]: """ Lists the core web vital metrics trend over time for a specific page. @@ -319,7 +319,7 @@ class Speed(SyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SpeedTrendsListResponse]], ResultWrapper[SpeedTrendsListResponse]), + cast_to=cast(Type[Optional[ObservatoryTrend]], ResultWrapper[ObservatoryTrend]), ) @@ -454,7 +454,7 @@ class AsyncSpeed(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SpeedScheduleGetResponse]: + ) -> Optional[ObservatorySchedule]: """ Retrieves the test schedule for a page in a specific region. @@ -487,7 +487,7 @@ class AsyncSpeed(AsyncAPIResource): query=await async_maybe_transform({"region": region}, speed_schedule_get_params.SpeedScheduleGetParams), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SpeedScheduleGetResponse]], ResultWrapper[SpeedScheduleGetResponse]), + cast_to=cast(Type[Optional[ObservatorySchedule]], ResultWrapper[ObservatorySchedule]), ) async def trends_list( @@ -527,7 +527,7 @@ class AsyncSpeed(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SpeedTrendsListResponse]: + ) -> Optional[ObservatoryTrend]: """ Lists the core web vital metrics trend over time for a specific page. @@ -574,7 +574,7 @@ class AsyncSpeed(AsyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SpeedTrendsListResponse]], ResultWrapper[SpeedTrendsListResponse]), + cast_to=cast(Type[Optional[ObservatoryTrend]], ResultWrapper[ObservatoryTrend]), ) diff --git a/src/cloudflare/resources/speed/tests.py b/src/cloudflare/resources/speed/tests.py index cfeb853d7..423e049c8 100644 --- a/src/cloudflare/resources/speed/tests.py +++ b/src/cloudflare/resources/speed/tests.py @@ -22,10 +22,9 @@ from ..._response import ( ) from ..._wrappers import ResultWrapper from ...types.speed import ( - TestGetResponse, TestListResponse, - TestCreateResponse, TestDeleteResponse, + ObservatoryPageTest, test_list_params, test_create_params, test_delete_params, @@ -83,7 +82,7 @@ class Tests(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TestCreateResponse]: + ) -> Optional[ObservatoryPageTest]: """ Starts a test for a specific webpage, in a specific region. @@ -116,7 +115,7 @@ class Tests(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TestCreateResponse]], ResultWrapper[TestCreateResponse]), + cast_to=cast(Type[Optional[ObservatoryPageTest]], ResultWrapper[ObservatoryPageTest]), ) def list( @@ -283,7 +282,7 @@ class Tests(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TestGetResponse]: + ) -> Optional[ObservatoryPageTest]: """ Retrieves the result of a specific test. @@ -315,7 +314,7 @@ class Tests(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TestGetResponse]], ResultWrapper[TestGetResponse]), + cast_to=cast(Type[Optional[ObservatoryPageTest]], ResultWrapper[ObservatoryPageTest]), ) @@ -363,7 +362,7 @@ class AsyncTests(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TestCreateResponse]: + ) -> Optional[ObservatoryPageTest]: """ Starts a test for a specific webpage, in a specific region. @@ -396,7 +395,7 @@ class AsyncTests(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TestCreateResponse]], ResultWrapper[TestCreateResponse]), + cast_to=cast(Type[Optional[ObservatoryPageTest]], ResultWrapper[ObservatoryPageTest]), ) async def list( @@ -563,7 +562,7 @@ class AsyncTests(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TestGetResponse]: + ) -> Optional[ObservatoryPageTest]: """ Retrieves the result of a specific test. @@ -595,7 +594,7 @@ class AsyncTests(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TestGetResponse]], ResultWrapper[TestGetResponse]), + cast_to=cast(Type[Optional[ObservatoryPageTest]], ResultWrapper[ObservatoryPageTest]), ) diff --git a/src/cloudflare/resources/ssl/universal/settings.py b/src/cloudflare/resources/ssl/universal/settings.py index 5f05bf535..9f73ee5fe 100644 --- a/src/cloudflare/resources/ssl/universal/settings.py +++ b/src/cloudflare/resources/ssl/universal/settings.py @@ -23,7 +23,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.ssl.universal import SettingGetResponse, SettingEditResponse, setting_edit_params +from ....types.ssl.universal import TLSCertificatesAndHostnamesUniversal, setting_edit_params __all__ = ["Settings", "AsyncSettings"] @@ -48,7 +48,7 @@ class Settings(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SettingEditResponse: + ) -> TLSCertificatesAndHostnamesUniversal: """ Patch Universal SSL Settings for a Zone. @@ -101,7 +101,9 @@ class Settings(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[SettingEditResponse], ResultWrapper[SettingEditResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesUniversal], ResultWrapper[TLSCertificatesAndHostnamesUniversal] + ), ) def get( @@ -114,7 +116,7 @@ class Settings(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SettingGetResponse: + ) -> TLSCertificatesAndHostnamesUniversal: """ Get Universal SSL Settings for a Zone. @@ -140,7 +142,9 @@ class Settings(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[SettingGetResponse], ResultWrapper[SettingGetResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesUniversal], ResultWrapper[TLSCertificatesAndHostnamesUniversal] + ), ) @@ -164,7 +168,7 @@ class AsyncSettings(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SettingEditResponse: + ) -> TLSCertificatesAndHostnamesUniversal: """ Patch Universal SSL Settings for a Zone. @@ -217,7 +221,9 @@ class AsyncSettings(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[SettingEditResponse], ResultWrapper[SettingEditResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesUniversal], ResultWrapper[TLSCertificatesAndHostnamesUniversal] + ), ) async def get( @@ -230,7 +236,7 @@ class AsyncSettings(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SettingGetResponse: + ) -> TLSCertificatesAndHostnamesUniversal: """ Get Universal SSL Settings for a Zone. @@ -256,7 +262,9 @@ class AsyncSettings(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[SettingGetResponse], ResultWrapper[SettingGetResponse]), + cast_to=cast( + Type[TLSCertificatesAndHostnamesUniversal], ResultWrapper[TLSCertificatesAndHostnamesUniversal] + ), ) diff --git a/src/cloudflare/resources/storage/analytics.py b/src/cloudflare/resources/storage/analytics.py index 2a633763d..36c082a38 100644 --- a/src/cloudflare/resources/storage/analytics.py +++ b/src/cloudflare/resources/storage/analytics.py @@ -24,8 +24,8 @@ from ..._base_client import ( make_request_options, ) from ...types.storage import ( - AnalyticsListResponse, - AnalyticsStoredResponse, + WorkersKVSchemasResult, + WorkersKVComponentsSchemasResult, analytics_list_params, analytics_stored_params, ) @@ -53,7 +53,7 @@ class Analytics(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AnalyticsListResponse: + ) -> WorkersKVSchemasResult: """ Retrieves Workers KV request metrics for the given account. @@ -82,7 +82,7 @@ class Analytics(SyncAPIResource): query=maybe_transform({"query": query}, analytics_list_params.AnalyticsListParams), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AnalyticsListResponse], ResultWrapper[AnalyticsListResponse]), + cast_to=cast(Type[WorkersKVSchemasResult], ResultWrapper[WorkersKVSchemasResult]), ) def stored( @@ -96,7 +96,7 @@ class Analytics(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AnalyticsStoredResponse: + ) -> WorkersKVComponentsSchemasResult: """ Retrieves Workers KV stored data metrics for the given account. @@ -125,7 +125,7 @@ class Analytics(SyncAPIResource): query=maybe_transform({"query": query}, analytics_stored_params.AnalyticsStoredParams), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AnalyticsStoredResponse], ResultWrapper[AnalyticsStoredResponse]), + cast_to=cast(Type[WorkersKVComponentsSchemasResult], ResultWrapper[WorkersKVComponentsSchemasResult]), ) @@ -149,7 +149,7 @@ class AsyncAnalytics(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AnalyticsListResponse: + ) -> WorkersKVSchemasResult: """ Retrieves Workers KV request metrics for the given account. @@ -178,7 +178,7 @@ class AsyncAnalytics(AsyncAPIResource): query=await async_maybe_transform({"query": query}, analytics_list_params.AnalyticsListParams), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AnalyticsListResponse], ResultWrapper[AnalyticsListResponse]), + cast_to=cast(Type[WorkersKVSchemasResult], ResultWrapper[WorkersKVSchemasResult]), ) async def stored( @@ -192,7 +192,7 @@ class AsyncAnalytics(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AnalyticsStoredResponse: + ) -> WorkersKVComponentsSchemasResult: """ Retrieves Workers KV stored data metrics for the given account. @@ -221,7 +221,7 @@ class AsyncAnalytics(AsyncAPIResource): query=await async_maybe_transform({"query": query}, analytics_stored_params.AnalyticsStoredParams), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AnalyticsStoredResponse], ResultWrapper[AnalyticsStoredResponse]), + cast_to=cast(Type[WorkersKVComponentsSchemasResult], ResultWrapper[WorkersKVComponentsSchemasResult]), ) diff --git a/src/cloudflare/resources/stream/audio_tracks.py b/src/cloudflare/resources/stream/audio_tracks.py index d055ff63a..2d8ee41c2 100644 --- a/src/cloudflare/resources/stream/audio_tracks.py +++ b/src/cloudflare/resources/stream/audio_tracks.py @@ -25,8 +25,7 @@ from ..._base_client import ( ) from ...types.stream import ( AudioTrackGetResponse, - AudioTrackCopyResponse, - AudioTrackEditResponse, + StreamAdditionalAudio, AudioTrackDeleteResponse, audio_track_copy_params, audio_track_edit_params, @@ -113,7 +112,7 @@ class AudioTracks(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AudioTrackCopyResponse: + ) -> StreamAdditionalAudio: """ Adds an additional audio track to a video using the provided audio track URL. @@ -157,7 +156,7 @@ class AudioTracks(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AudioTrackCopyResponse], ResultWrapper[AudioTrackCopyResponse]), + cast_to=cast(Type[StreamAdditionalAudio], ResultWrapper[StreamAdditionalAudio]), ) def edit( @@ -174,7 +173,7 @@ class AudioTracks(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AudioTrackEditResponse: + ) -> StreamAdditionalAudio: """Edits additional audio tracks on a video. Editing the default status of an audio @@ -223,7 +222,7 @@ class AudioTracks(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AudioTrackEditResponse], ResultWrapper[AudioTrackEditResponse]), + cast_to=cast(Type[StreamAdditionalAudio], ResultWrapper[StreamAdditionalAudio]), ) def get( @@ -351,7 +350,7 @@ class AsyncAudioTracks(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AudioTrackCopyResponse: + ) -> StreamAdditionalAudio: """ Adds an additional audio track to a video using the provided audio track URL. @@ -395,7 +394,7 @@ class AsyncAudioTracks(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AudioTrackCopyResponse], ResultWrapper[AudioTrackCopyResponse]), + cast_to=cast(Type[StreamAdditionalAudio], ResultWrapper[StreamAdditionalAudio]), ) async def edit( @@ -412,7 +411,7 @@ class AsyncAudioTracks(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AudioTrackEditResponse: + ) -> StreamAdditionalAudio: """Edits additional audio tracks on a video. Editing the default status of an audio @@ -461,7 +460,7 @@ class AsyncAudioTracks(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AudioTrackEditResponse], ResultWrapper[AudioTrackEditResponse]), + cast_to=cast(Type[StreamAdditionalAudio], ResultWrapper[StreamAdditionalAudio]), ) async def get( diff --git a/src/cloudflare/resources/stream/clips.py b/src/cloudflare/resources/stream/clips.py index 65e4f1a0c..3579b12dc 100644 --- a/src/cloudflare/resources/stream/clips.py +++ b/src/cloudflare/resources/stream/clips.py @@ -23,7 +23,7 @@ from ..._wrappers import ResultWrapper from ..._base_client import ( make_request_options, ) -from ...types.stream import ClipCreateResponse, clip_create_params +from ...types.stream import StreamClipping, clip_create_params __all__ = ["Clips", "AsyncClips"] @@ -56,7 +56,7 @@ class Clips(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClipCreateResponse: + ) -> StreamClipping: """ Clips a video based on the specified start and end times provided in seconds. @@ -121,7 +121,7 @@ class Clips(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ClipCreateResponse], ResultWrapper[ClipCreateResponse]), + cast_to=cast(Type[StreamClipping], ResultWrapper[StreamClipping]), ) @@ -153,7 +153,7 @@ class AsyncClips(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ClipCreateResponse: + ) -> StreamClipping: """ Clips a video based on the specified start and end times provided in seconds. @@ -218,7 +218,7 @@ class AsyncClips(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ClipCreateResponse], ResultWrapper[ClipCreateResponse]), + cast_to=cast(Type[StreamClipping], ResultWrapper[StreamClipping]), ) diff --git a/src/cloudflare/resources/stream/copies.py b/src/cloudflare/resources/stream/copies.py index e77d6c94f..32957834e 100644 --- a/src/cloudflare/resources/stream/copies.py +++ b/src/cloudflare/resources/stream/copies.py @@ -7,6 +7,7 @@ from datetime import datetime import httpx +from ...types import StreamVideos from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -24,7 +25,7 @@ from ..._wrappers import ResultWrapper from ..._base_client import ( make_request_options, ) -from ...types.stream import CopyCreateResponse, copy_create_params +from ...types.stream import copy_create_params __all__ = ["Copies", "AsyncCopies"] @@ -56,7 +57,7 @@ class Copies(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CopyCreateResponse: + ) -> StreamVideos: """ Uploads a video to Stream from a provided URL. @@ -120,7 +121,7 @@ class Copies(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CopyCreateResponse], ResultWrapper[CopyCreateResponse]), + cast_to=cast(Type[StreamVideos], ResultWrapper[StreamVideos]), ) @@ -151,7 +152,7 @@ class AsyncCopies(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CopyCreateResponse: + ) -> StreamVideos: """ Uploads a video to Stream from a provided URL. @@ -215,7 +216,7 @@ class AsyncCopies(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CopyCreateResponse], ResultWrapper[CopyCreateResponse]), + cast_to=cast(Type[StreamVideos], ResultWrapper[StreamVideos]), ) diff --git a/src/cloudflare/resources/stream/keys.py b/src/cloudflare/resources/stream/keys.py index 4dbd81b98..2ff28c705 100644 --- a/src/cloudflare/resources/stream/keys.py +++ b/src/cloudflare/resources/stream/keys.py @@ -19,7 +19,7 @@ from ..._wrappers import ResultWrapper from ..._base_client import ( make_request_options, ) -from ...types.stream import KeyGetResponse, KeyCreateResponse, KeyDeleteResponse +from ...types.stream import StreamKeys, KeyGetResponse, KeyDeleteResponse __all__ = ["Keys", "AsyncKeys"] @@ -43,7 +43,7 @@ class Keys(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeyCreateResponse: + ) -> StreamKeys: """Creates an RSA private key in PEM and JWK formats. Key files are only displayed @@ -72,7 +72,7 @@ class Keys(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[KeyCreateResponse], ResultWrapper[KeyCreateResponse]), + cast_to=cast(Type[StreamKeys], ResultWrapper[StreamKeys]), ) def delete( @@ -183,7 +183,7 @@ class AsyncKeys(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> KeyCreateResponse: + ) -> StreamKeys: """Creates an RSA private key in PEM and JWK formats. Key files are only displayed @@ -212,7 +212,7 @@ class AsyncKeys(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[KeyCreateResponse], ResultWrapper[KeyCreateResponse]), + cast_to=cast(Type[StreamKeys], ResultWrapper[StreamKeys]), ) async def delete( diff --git a/src/cloudflare/resources/stream/live_inputs/live_inputs.py b/src/cloudflare/resources/stream/live_inputs/live_inputs.py index 9af1d9e59..a9aa70801 100644 --- a/src/cloudflare/resources/stream/live_inputs/live_inputs.py +++ b/src/cloudflare/resources/stream/live_inputs/live_inputs.py @@ -32,10 +32,8 @@ from ...._base_client import ( make_request_options, ) from ....types.stream import ( - LiveInputGetResponse, + StreamLiveInput, LiveInputListResponse, - LiveInputCreateResponse, - LiveInputUpdateResponse, live_input_list_params, live_input_create_params, live_input_update_params, @@ -71,7 +69,7 @@ class LiveInputs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LiveInputCreateResponse: + ) -> StreamLiveInput: """ Creates a live input, and returns credentials that you or your users can use to stream live video to Cloudflare Stream. @@ -122,7 +120,7 @@ class LiveInputs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LiveInputCreateResponse], ResultWrapper[LiveInputCreateResponse]), + cast_to=cast(Type[StreamLiveInput], ResultWrapper[StreamLiveInput]), ) def update( @@ -140,7 +138,7 @@ class LiveInputs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LiveInputUpdateResponse: + ) -> StreamLiveInput: """ Updates a specified live input. @@ -196,7 +194,7 @@ class LiveInputs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LiveInputUpdateResponse], ResultWrapper[LiveInputUpdateResponse]), + cast_to=cast(Type[StreamLiveInput], ResultWrapper[StreamLiveInput]), ) def list( @@ -300,7 +298,7 @@ class LiveInputs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LiveInputGetResponse: + ) -> StreamLiveInput: """ Retrieves details of an existing live input. @@ -332,7 +330,7 @@ class LiveInputs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LiveInputGetResponse], ResultWrapper[LiveInputGetResponse]), + cast_to=cast(Type[StreamLiveInput], ResultWrapper[StreamLiveInput]), ) @@ -363,7 +361,7 @@ class AsyncLiveInputs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LiveInputCreateResponse: + ) -> StreamLiveInput: """ Creates a live input, and returns credentials that you or your users can use to stream live video to Cloudflare Stream. @@ -414,7 +412,7 @@ class AsyncLiveInputs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LiveInputCreateResponse], ResultWrapper[LiveInputCreateResponse]), + cast_to=cast(Type[StreamLiveInput], ResultWrapper[StreamLiveInput]), ) async def update( @@ -432,7 +430,7 @@ class AsyncLiveInputs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LiveInputUpdateResponse: + ) -> StreamLiveInput: """ Updates a specified live input. @@ -488,7 +486,7 @@ class AsyncLiveInputs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LiveInputUpdateResponse], ResultWrapper[LiveInputUpdateResponse]), + cast_to=cast(Type[StreamLiveInput], ResultWrapper[StreamLiveInput]), ) async def list( @@ -594,7 +592,7 @@ class AsyncLiveInputs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LiveInputGetResponse: + ) -> StreamLiveInput: """ Retrieves details of an existing live input. @@ -626,7 +624,7 @@ class AsyncLiveInputs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LiveInputGetResponse], ResultWrapper[LiveInputGetResponse]), + cast_to=cast(Type[StreamLiveInput], ResultWrapper[StreamLiveInput]), ) diff --git a/src/cloudflare/resources/stream/live_inputs/outputs.py b/src/cloudflare/resources/stream/live_inputs/outputs.py index 8b9754ed9..7bf3be7b6 100644 --- a/src/cloudflare/resources/stream/live_inputs/outputs.py +++ b/src/cloudflare/resources/stream/live_inputs/outputs.py @@ -23,13 +23,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.stream.live_inputs import ( - OutputListResponse, - OutputCreateResponse, - OutputUpdateResponse, - output_create_params, - output_update_params, -) +from ....types.stream.live_inputs import StreamOutput, OutputListResponse, output_create_params, output_update_params __all__ = ["Outputs", "AsyncOutputs"] @@ -57,7 +51,7 @@ class Outputs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OutputCreateResponse: + ) -> StreamOutput: """ Creates a new output that can be used to simulcast or restream live video to other RTMP or SRT destinations. Outputs are always linked to a specific live @@ -109,7 +103,7 @@ class Outputs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[OutputCreateResponse], ResultWrapper[OutputCreateResponse]), + cast_to=cast(Type[StreamOutput], ResultWrapper[StreamOutput]), ) def update( @@ -125,7 +119,7 @@ class Outputs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OutputUpdateResponse: + ) -> StreamOutput: """ Updates the state of an output. @@ -168,7 +162,7 @@ class Outputs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[OutputUpdateResponse], ResultWrapper[OutputUpdateResponse]), + cast_to=cast(Type[StreamOutput], ResultWrapper[StreamOutput]), ) def list( @@ -289,7 +283,7 @@ class AsyncOutputs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OutputCreateResponse: + ) -> StreamOutput: """ Creates a new output that can be used to simulcast or restream live video to other RTMP or SRT destinations. Outputs are always linked to a specific live @@ -341,7 +335,7 @@ class AsyncOutputs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[OutputCreateResponse], ResultWrapper[OutputCreateResponse]), + cast_to=cast(Type[StreamOutput], ResultWrapper[StreamOutput]), ) async def update( @@ -357,7 +351,7 @@ class AsyncOutputs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OutputUpdateResponse: + ) -> StreamOutput: """ Updates the state of an output. @@ -400,7 +394,7 @@ class AsyncOutputs(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[OutputUpdateResponse], ResultWrapper[OutputUpdateResponse]), + cast_to=cast(Type[StreamOutput], ResultWrapper[StreamOutput]), ) async def list( diff --git a/src/cloudflare/resources/stream/stream.py b/src/cloudflare/resources/stream/stream.py index f9c134d18..c79288143 100644 --- a/src/cloudflare/resources/stream/stream.py +++ b/src/cloudflare/resources/stream/stream.py @@ -56,7 +56,7 @@ from .videos import ( VideosWithStreamingResponse, AsyncVideosWithStreamingResponse, ) -from ...types import StreamGetResponse, StreamListResponse, stream_list_params +from ...types import StreamVideos, StreamListResponse, stream_list_params from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven from ..._utils import ( maybe_transform, @@ -369,7 +369,7 @@ class Stream(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> StreamGetResponse: + ) -> StreamVideos: """ Fetches details for a single video. @@ -399,7 +399,7 @@ class Stream(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[StreamGetResponse], ResultWrapper[StreamGetResponse]), + cast_to=cast(Type[StreamVideos], ResultWrapper[StreamVideos]), ) @@ -637,7 +637,7 @@ class AsyncStream(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> StreamGetResponse: + ) -> StreamVideos: """ Fetches details for a single video. @@ -667,7 +667,7 @@ class AsyncStream(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[StreamGetResponse], ResultWrapper[StreamGetResponse]), + cast_to=cast(Type[StreamVideos], ResultWrapper[StreamVideos]), ) diff --git a/src/cloudflare/resources/user/firewall/access_rules.py b/src/cloudflare/resources/user/firewall/access_rules.py index 23a6c6bdf..30d93f2cf 100644 --- a/src/cloudflare/resources/user/firewall/access_rules.py +++ b/src/cloudflare/resources/user/firewall/access_rules.py @@ -27,9 +27,7 @@ from ...._base_client import ( make_request_options, ) from ....types.user.firewall import ( - AccessRuleEditResponse, - AccessRuleListResponse, - AccessRuleCreateResponse, + LegacyJhsRule, AccessRuleDeleteResponse, access_rule_edit_params, access_rule_list_params, @@ -60,7 +58,7 @@ class AccessRules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AccessRuleCreateResponse]: + ) -> Optional[LegacyJhsRule]: """ Creates a new IP Access rule for all zones owned by the current user. @@ -99,7 +97,7 @@ class AccessRules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AccessRuleCreateResponse]], ResultWrapper[AccessRuleCreateResponse]), + cast_to=cast(Type[Optional[LegacyJhsRule]], ResultWrapper[LegacyJhsRule]), ) def list( @@ -117,7 +115,7 @@ class AccessRules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[AccessRuleListResponse]: + ) -> SyncV4PagePaginationArray[LegacyJhsRule]: """Fetches IP Access rules of the user. You can filter the results using several @@ -142,7 +140,7 @@ class AccessRules(SyncAPIResource): """ return self._get_api_list( "/user/firewall/access_rules/rules", - page=SyncV4PagePaginationArray[AccessRuleListResponse], + page=SyncV4PagePaginationArray[LegacyJhsRule], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -160,7 +158,7 @@ class AccessRules(SyncAPIResource): access_rule_list_params.AccessRuleListParams, ), ), - model=AccessRuleListResponse, + model=LegacyJhsRule, ) def delete( @@ -216,7 +214,7 @@ class AccessRules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AccessRuleEditResponse]: + ) -> Optional[LegacyJhsRule]: """Updates an IP Access rule defined at the user level. You can only update the @@ -255,7 +253,7 @@ class AccessRules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AccessRuleEditResponse]], ResultWrapper[AccessRuleEditResponse]), + cast_to=cast(Type[Optional[LegacyJhsRule]], ResultWrapper[LegacyJhsRule]), ) @@ -280,7 +278,7 @@ class AsyncAccessRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AccessRuleCreateResponse]: + ) -> Optional[LegacyJhsRule]: """ Creates a new IP Access rule for all zones owned by the current user. @@ -319,7 +317,7 @@ class AsyncAccessRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AccessRuleCreateResponse]], ResultWrapper[AccessRuleCreateResponse]), + cast_to=cast(Type[Optional[LegacyJhsRule]], ResultWrapper[LegacyJhsRule]), ) def list( @@ -337,7 +335,7 @@ class AsyncAccessRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[AccessRuleListResponse, AsyncV4PagePaginationArray[AccessRuleListResponse]]: + ) -> AsyncPaginator[LegacyJhsRule, AsyncV4PagePaginationArray[LegacyJhsRule]]: """Fetches IP Access rules of the user. You can filter the results using several @@ -362,7 +360,7 @@ class AsyncAccessRules(AsyncAPIResource): """ return self._get_api_list( "/user/firewall/access_rules/rules", - page=AsyncV4PagePaginationArray[AccessRuleListResponse], + page=AsyncV4PagePaginationArray[LegacyJhsRule], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -380,7 +378,7 @@ class AsyncAccessRules(AsyncAPIResource): access_rule_list_params.AccessRuleListParams, ), ), - model=AccessRuleListResponse, + model=LegacyJhsRule, ) async def delete( @@ -436,7 +434,7 @@ class AsyncAccessRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AccessRuleEditResponse]: + ) -> Optional[LegacyJhsRule]: """Updates an IP Access rule defined at the user level. You can only update the @@ -475,7 +473,7 @@ class AsyncAccessRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AccessRuleEditResponse]], ResultWrapper[AccessRuleEditResponse]), + cast_to=cast(Type[Optional[LegacyJhsRule]], ResultWrapper[LegacyJhsRule]), ) diff --git a/src/cloudflare/resources/user/load_balancers/monitors.py b/src/cloudflare/resources/user/load_balancers/monitors.py index 063ad2012..4da14fd66 100644 --- a/src/cloudflare/resources/user/load_balancers/monitors.py +++ b/src/cloudflare/resources/user/load_balancers/monitors.py @@ -25,12 +25,9 @@ from ...._base_client import ( make_request_options, ) from ....types.user.load_balancers import ( - MonitorGetResponse, - MonitorEditResponse, MonitorListResponse, - MonitorCreateResponse, + LoadBalancingMonitor, MonitorDeleteResponse, - MonitorUpdateResponse, MonitorPreviewResponse, MonitorReferencesResponse, monitor_edit_params, @@ -76,7 +73,7 @@ class Monitors(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MonitorCreateResponse: + ) -> LoadBalancingMonitor: """ Create a configured monitor. @@ -168,7 +165,7 @@ class Monitors(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MonitorCreateResponse], ResultWrapper[MonitorCreateResponse]), + cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) def update( @@ -197,7 +194,7 @@ class Monitors(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MonitorUpdateResponse: + ) -> LoadBalancingMonitor: """ Modify a configured monitor. @@ -291,7 +288,7 @@ class Monitors(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MonitorUpdateResponse], ResultWrapper[MonitorUpdateResponse]), + cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) def list( @@ -380,7 +377,7 @@ class Monitors(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MonitorEditResponse: + ) -> LoadBalancingMonitor: """ Apply changes to an existing monitor, overwriting the supplied properties. @@ -474,7 +471,7 @@ class Monitors(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MonitorEditResponse], ResultWrapper[MonitorEditResponse]), + cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) def get( @@ -487,7 +484,7 @@ class Monitors(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MonitorGetResponse: + ) -> LoadBalancingMonitor: """ List a single configured monitor for a user. @@ -511,7 +508,7 @@ class Monitors(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MonitorGetResponse], ResultWrapper[MonitorGetResponse]), + cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) def preview( @@ -711,7 +708,7 @@ class AsyncMonitors(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MonitorCreateResponse: + ) -> LoadBalancingMonitor: """ Create a configured monitor. @@ -803,7 +800,7 @@ class AsyncMonitors(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MonitorCreateResponse], ResultWrapper[MonitorCreateResponse]), + cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) async def update( @@ -832,7 +829,7 @@ class AsyncMonitors(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MonitorUpdateResponse: + ) -> LoadBalancingMonitor: """ Modify a configured monitor. @@ -926,7 +923,7 @@ class AsyncMonitors(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MonitorUpdateResponse], ResultWrapper[MonitorUpdateResponse]), + cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) async def list( @@ -1015,7 +1012,7 @@ class AsyncMonitors(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MonitorEditResponse: + ) -> LoadBalancingMonitor: """ Apply changes to an existing monitor, overwriting the supplied properties. @@ -1109,7 +1106,7 @@ class AsyncMonitors(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MonitorEditResponse], ResultWrapper[MonitorEditResponse]), + cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) async def get( @@ -1122,7 +1119,7 @@ class AsyncMonitors(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MonitorGetResponse: + ) -> LoadBalancingMonitor: """ List a single configured monitor for a user. @@ -1146,7 +1143,7 @@ class AsyncMonitors(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MonitorGetResponse], ResultWrapper[MonitorGetResponse]), + cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) async def preview( diff --git a/src/cloudflare/resources/user/load_balancers/pools.py b/src/cloudflare/resources/user/load_balancers/pools.py index 1bcfef898..6b9a6eec2 100644 --- a/src/cloudflare/resources/user/load_balancers/pools.py +++ b/src/cloudflare/resources/user/load_balancers/pools.py @@ -25,13 +25,10 @@ from ...._base_client import ( make_request_options, ) from ....types.user.load_balancers import ( - PoolGetResponse, - PoolEditResponse, PoolListResponse, - PoolCreateResponse, + LoadBalancingPool, PoolDeleteResponse, PoolHealthResponse, - PoolUpdateResponse, PoolPreviewResponse, PoolReferencesResponse, pool_edit_params, @@ -95,7 +92,7 @@ class Pools(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PoolCreateResponse: + ) -> LoadBalancingPool: """Create a new pool. Args: @@ -178,7 +175,7 @@ class Pools(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PoolCreateResponse], ResultWrapper[PoolCreateResponse]), + cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) def update( @@ -224,7 +221,7 @@ class Pools(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PoolUpdateResponse: + ) -> LoadBalancingPool: """Modify a configured pool. Args: @@ -309,7 +306,7 @@ class Pools(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PoolUpdateResponse], ResultWrapper[PoolUpdateResponse]), + cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) def list( @@ -431,7 +428,7 @@ class Pools(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PoolEditResponse: + ) -> LoadBalancingPool: """ Apply changes to an existing pool, overwriting the supplied properties. @@ -515,7 +512,7 @@ class Pools(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PoolEditResponse], ResultWrapper[PoolEditResponse]), + cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) def get( @@ -528,7 +525,7 @@ class Pools(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PoolGetResponse: + ) -> LoadBalancingPool: """ Fetch a single configured pool. @@ -552,7 +549,7 @@ class Pools(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PoolGetResponse], ResultWrapper[PoolGetResponse]), + cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) def health( @@ -811,7 +808,7 @@ class AsyncPools(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PoolCreateResponse: + ) -> LoadBalancingPool: """Create a new pool. Args: @@ -894,7 +891,7 @@ class AsyncPools(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PoolCreateResponse], ResultWrapper[PoolCreateResponse]), + cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) async def update( @@ -940,7 +937,7 @@ class AsyncPools(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PoolUpdateResponse: + ) -> LoadBalancingPool: """Modify a configured pool. Args: @@ -1025,7 +1022,7 @@ class AsyncPools(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PoolUpdateResponse], ResultWrapper[PoolUpdateResponse]), + cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) async def list( @@ -1147,7 +1144,7 @@ class AsyncPools(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PoolEditResponse: + ) -> LoadBalancingPool: """ Apply changes to an existing pool, overwriting the supplied properties. @@ -1231,7 +1228,7 @@ class AsyncPools(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PoolEditResponse], ResultWrapper[PoolEditResponse]), + cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) async def get( @@ -1244,7 +1241,7 @@ class AsyncPools(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PoolGetResponse: + ) -> LoadBalancingPool: """ Fetch a single configured pool. @@ -1268,7 +1265,7 @@ class AsyncPools(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PoolGetResponse], ResultWrapper[PoolGetResponse]), + cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) async def health( diff --git a/src/cloudflare/resources/user/load_balancers/preview.py b/src/cloudflare/resources/user/load_balancers/preview.py index ae50a08f1..46605fda4 100644 --- a/src/cloudflare/resources/user/load_balancers/preview.py +++ b/src/cloudflare/resources/user/load_balancers/preview.py @@ -19,7 +19,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.user.load_balancers import PreviewGetResponse +from ....types.user.load_balancers import LoadBalancingPreviewResult __all__ = ["Preview", "AsyncPreview"] @@ -43,7 +43,7 @@ class Preview(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PreviewGetResponse: + ) -> LoadBalancingPreviewResult: """ Get the result of a previous preview operation using the provided preview_id. @@ -65,7 +65,7 @@ class Preview(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PreviewGetResponse], ResultWrapper[PreviewGetResponse]), + cast_to=cast(Type[LoadBalancingPreviewResult], ResultWrapper[LoadBalancingPreviewResult]), ) @@ -88,7 +88,7 @@ class AsyncPreview(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PreviewGetResponse: + ) -> LoadBalancingPreviewResult: """ Get the result of a previous preview operation using the provided preview_id. @@ -110,7 +110,7 @@ class AsyncPreview(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PreviewGetResponse], ResultWrapper[PreviewGetResponse]), + cast_to=cast(Type[LoadBalancingPreviewResult], ResultWrapper[LoadBalancingPreviewResult]), ) diff --git a/src/cloudflare/resources/user/organizations.py b/src/cloudflare/resources/user/organizations.py index cdf61f083..455466ce7 100644 --- a/src/cloudflare/resources/user/organizations.py +++ b/src/cloudflare/resources/user/organizations.py @@ -19,12 +19,7 @@ from ..._response import ( ) from ..._wrappers import ResultWrapper from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ...types.user import ( - OrganizationGetResponse, - OrganizationListResponse, - OrganizationDeleteResponse, - organization_list_params, -) +from ...types.user import IamOrganization, OrganizationGetResponse, OrganizationDeleteResponse, organization_list_params from ..._base_client import ( AsyncPaginator, make_request_options, @@ -58,7 +53,7 @@ class Organizations(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[OrganizationListResponse]: + ) -> SyncV4PagePaginationArray[IamOrganization]: """ Lists organizations the user is associated with. @@ -87,7 +82,7 @@ class Organizations(SyncAPIResource): """ return self._get_api_list( "/user/organizations", - page=SyncV4PagePaginationArray[OrganizationListResponse], + page=SyncV4PagePaginationArray[IamOrganization], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -106,7 +101,7 @@ class Organizations(SyncAPIResource): organization_list_params.OrganizationListParams, ), ), - model=OrganizationListResponse, + model=IamOrganization, ) def delete( @@ -214,7 +209,7 @@ class AsyncOrganizations(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[OrganizationListResponse, AsyncV4PagePaginationArray[OrganizationListResponse]]: + ) -> AsyncPaginator[IamOrganization, AsyncV4PagePaginationArray[IamOrganization]]: """ Lists organizations the user is associated with. @@ -243,7 +238,7 @@ class AsyncOrganizations(AsyncAPIResource): """ return self._get_api_list( "/user/organizations", - page=AsyncV4PagePaginationArray[OrganizationListResponse], + page=AsyncV4PagePaginationArray[IamOrganization], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -262,7 +257,7 @@ class AsyncOrganizations(AsyncAPIResource): organization_list_params.OrganizationListParams, ), ), - model=OrganizationListResponse, + model=IamOrganization, ) async def delete( diff --git a/src/cloudflare/resources/vectorize/indexes.py b/src/cloudflare/resources/vectorize/indexes.py index 700afc0c7..6d2c9bd32 100644 --- a/src/cloudflare/resources/vectorize/indexes.py +++ b/src/cloudflare/resources/vectorize/indexes.py @@ -24,15 +24,13 @@ from ..._base_client import ( make_request_options, ) from ...types.vectorize import ( - IndexGetResponse, IndexListResponse, - IndexQueryResponse, - IndexCreateResponse, IndexDeleteResponse, - IndexInsertResponse, - IndexUpdateResponse, - IndexUpsertResponse, - IndexDeleteByIDsResponse, + VectorizeIndexQuery, + VectorizeCreateIndex, + VectorizeIndexInsert, + VectorizeIndexUpsert, + VectorizeIndexDeleteVectorsByID, index_query_params, index_create_params, index_update_params, @@ -65,7 +63,7 @@ class Indexes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IndexCreateResponse]: + ) -> Optional[VectorizeCreateIndex]: """ Creates and returns a new Vectorize Index. @@ -103,7 +101,7 @@ class Indexes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IndexCreateResponse]], ResultWrapper[IndexCreateResponse]), + cast_to=cast(Type[Optional[VectorizeCreateIndex]], ResultWrapper[VectorizeCreateIndex]), ) def update( @@ -118,7 +116,7 @@ class Indexes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IndexUpdateResponse]: + ) -> Optional[VectorizeCreateIndex]: """ Updates and returns the specified Vectorize Index. @@ -149,7 +147,7 @@ class Indexes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IndexUpdateResponse]], ResultWrapper[IndexUpdateResponse]), + cast_to=cast(Type[Optional[VectorizeCreateIndex]], ResultWrapper[VectorizeCreateIndex]), ) def list( @@ -250,7 +248,7 @@ class Indexes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IndexDeleteByIDsResponse]: + ) -> Optional[VectorizeIndexDeleteVectorsByID]: """ Delete a set of vectors from an index by their vector identifiers. @@ -281,7 +279,9 @@ class Indexes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IndexDeleteByIDsResponse]], ResultWrapper[IndexDeleteByIDsResponse]), + cast_to=cast( + Type[Optional[VectorizeIndexDeleteVectorsByID]], ResultWrapper[VectorizeIndexDeleteVectorsByID] + ), ) def get( @@ -295,7 +295,7 @@ class Indexes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IndexGetResponse]: + ) -> Optional[VectorizeCreateIndex]: """ Returns the specified Vectorize Index. @@ -323,7 +323,7 @@ class Indexes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IndexGetResponse]], ResultWrapper[IndexGetResponse]), + cast_to=cast(Type[Optional[VectorizeCreateIndex]], ResultWrapper[VectorizeCreateIndex]), ) def get_by_ids( @@ -383,7 +383,7 @@ class Indexes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IndexInsertResponse]: + ) -> Optional[VectorizeIndexInsert]: """ Inserts vectors into the specified index and returns the count of the vectors successfully inserted. @@ -412,7 +412,7 @@ class Indexes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IndexInsertResponse]], ResultWrapper[IndexInsertResponse]), + cast_to=cast(Type[Optional[VectorizeIndexInsert]], ResultWrapper[VectorizeIndexInsert]), ) def query( @@ -430,7 +430,7 @@ class Indexes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IndexQueryResponse]: + ) -> Optional[VectorizeIndexQuery]: """ Finds vectors closest to a given vector in an index. @@ -475,7 +475,7 @@ class Indexes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IndexQueryResponse]], ResultWrapper[IndexQueryResponse]), + cast_to=cast(Type[Optional[VectorizeIndexQuery]], ResultWrapper[VectorizeIndexQuery]), ) def upsert( @@ -489,7 +489,7 @@ class Indexes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IndexUpsertResponse]: + ) -> Optional[VectorizeIndexUpsert]: """ Upserts vectors into the specified index, creating them if they do not exist and returns the count of values and ids successfully inserted. @@ -518,7 +518,7 @@ class Indexes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IndexUpsertResponse]], ResultWrapper[IndexUpsertResponse]), + cast_to=cast(Type[Optional[VectorizeIndexUpsert]], ResultWrapper[VectorizeIndexUpsert]), ) @@ -544,7 +544,7 @@ class AsyncIndexes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IndexCreateResponse]: + ) -> Optional[VectorizeCreateIndex]: """ Creates and returns a new Vectorize Index. @@ -582,7 +582,7 @@ class AsyncIndexes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IndexCreateResponse]], ResultWrapper[IndexCreateResponse]), + cast_to=cast(Type[Optional[VectorizeCreateIndex]], ResultWrapper[VectorizeCreateIndex]), ) async def update( @@ -597,7 +597,7 @@ class AsyncIndexes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IndexUpdateResponse]: + ) -> Optional[VectorizeCreateIndex]: """ Updates and returns the specified Vectorize Index. @@ -628,7 +628,7 @@ class AsyncIndexes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IndexUpdateResponse]], ResultWrapper[IndexUpdateResponse]), + cast_to=cast(Type[Optional[VectorizeCreateIndex]], ResultWrapper[VectorizeCreateIndex]), ) async def list( @@ -729,7 +729,7 @@ class AsyncIndexes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IndexDeleteByIDsResponse]: + ) -> Optional[VectorizeIndexDeleteVectorsByID]: """ Delete a set of vectors from an index by their vector identifiers. @@ -760,7 +760,9 @@ class AsyncIndexes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IndexDeleteByIDsResponse]], ResultWrapper[IndexDeleteByIDsResponse]), + cast_to=cast( + Type[Optional[VectorizeIndexDeleteVectorsByID]], ResultWrapper[VectorizeIndexDeleteVectorsByID] + ), ) async def get( @@ -774,7 +776,7 @@ class AsyncIndexes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IndexGetResponse]: + ) -> Optional[VectorizeCreateIndex]: """ Returns the specified Vectorize Index. @@ -802,7 +804,7 @@ class AsyncIndexes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IndexGetResponse]], ResultWrapper[IndexGetResponse]), + cast_to=cast(Type[Optional[VectorizeCreateIndex]], ResultWrapper[VectorizeCreateIndex]), ) async def get_by_ids( @@ -862,7 +864,7 @@ class AsyncIndexes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IndexInsertResponse]: + ) -> Optional[VectorizeIndexInsert]: """ Inserts vectors into the specified index and returns the count of the vectors successfully inserted. @@ -891,7 +893,7 @@ class AsyncIndexes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IndexInsertResponse]], ResultWrapper[IndexInsertResponse]), + cast_to=cast(Type[Optional[VectorizeIndexInsert]], ResultWrapper[VectorizeIndexInsert]), ) async def query( @@ -909,7 +911,7 @@ class AsyncIndexes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IndexQueryResponse]: + ) -> Optional[VectorizeIndexQuery]: """ Finds vectors closest to a given vector in an index. @@ -954,7 +956,7 @@ class AsyncIndexes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IndexQueryResponse]], ResultWrapper[IndexQueryResponse]), + cast_to=cast(Type[Optional[VectorizeIndexQuery]], ResultWrapper[VectorizeIndexQuery]), ) async def upsert( @@ -968,7 +970,7 @@ class AsyncIndexes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IndexUpsertResponse]: + ) -> Optional[VectorizeIndexUpsert]: """ Upserts vectors into the specified index, creating them if they do not exist and returns the count of values and ids successfully inserted. @@ -997,7 +999,7 @@ class AsyncIndexes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IndexUpsertResponse]], ResultWrapper[IndexUpsertResponse]), + cast_to=cast(Type[Optional[VectorizeIndexUpsert]], ResultWrapper[VectorizeIndexUpsert]), ) diff --git a/src/cloudflare/resources/waiting_rooms/events/details.py b/src/cloudflare/resources/waiting_rooms/events/details.py index db2e63e3f..664e6f43a 100644 --- a/src/cloudflare/resources/waiting_rooms/events/details.py +++ b/src/cloudflare/resources/waiting_rooms/events/details.py @@ -19,7 +19,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.waiting_rooms.events import DetailGetResponse +from ....types.waiting_rooms.events import WaitingroomEventDetailsResult __all__ = ["Details", "AsyncDetails"] @@ -45,7 +45,7 @@ class Details(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DetailGetResponse: + ) -> WaitingroomEventDetailsResult: """Previews an event's configuration as if it was active. Inherited fields from the @@ -73,7 +73,7 @@ class Details(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DetailGetResponse], ResultWrapper[DetailGetResponse]), + cast_to=cast(Type[WaitingroomEventDetailsResult], ResultWrapper[WaitingroomEventDetailsResult]), ) @@ -98,7 +98,7 @@ class AsyncDetails(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DetailGetResponse: + ) -> WaitingroomEventDetailsResult: """Previews an event's configuration as if it was active. Inherited fields from the @@ -126,7 +126,7 @@ class AsyncDetails(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DetailGetResponse], ResultWrapper[DetailGetResponse]), + cast_to=cast(Type[WaitingroomEventDetailsResult], ResultWrapper[WaitingroomEventDetailsResult]), ) diff --git a/src/cloudflare/resources/waiting_rooms/events/events.py b/src/cloudflare/resources/waiting_rooms/events/events.py index a6abed903..e6a794397 100644 --- a/src/cloudflare/resources/waiting_rooms/events/events.py +++ b/src/cloudflare/resources/waiting_rooms/events/events.py @@ -32,12 +32,9 @@ from ...._base_client import ( make_request_options, ) from ....types.waiting_rooms import ( - EventGetResponse, - EventEditResponse, EventListResponse, - EventCreateResponse, EventDeleteResponse, - EventUpdateResponse, + WaitingroomEventResult, event_edit_params, event_create_params, event_update_params, @@ -83,7 +80,7 @@ class Events(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EventCreateResponse: + ) -> WaitingroomEventResult: """Only available for the Waiting Room Advanced subscription. Creates an event for @@ -178,7 +175,7 @@ class Events(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[EventCreateResponse], ResultWrapper[EventCreateResponse]), + cast_to=cast(Type[WaitingroomEventResult], ResultWrapper[WaitingroomEventResult]), ) def update( @@ -206,7 +203,7 @@ class Events(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EventUpdateResponse: + ) -> WaitingroomEventResult: """ Updates a configured event for a waiting room. @@ -295,7 +292,7 @@ class Events(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[EventUpdateResponse], ResultWrapper[EventUpdateResponse]), + cast_to=cast(Type[WaitingroomEventResult], ResultWrapper[WaitingroomEventResult]), ) def list( @@ -404,7 +401,7 @@ class Events(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EventEditResponse: + ) -> WaitingroomEventResult: """ Patches a configured event for a waiting room. @@ -493,7 +490,7 @@ class Events(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[EventEditResponse], ResultWrapper[EventEditResponse]), + cast_to=cast(Type[WaitingroomEventResult], ResultWrapper[WaitingroomEventResult]), ) def get( @@ -508,7 +505,7 @@ class Events(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EventGetResponse: + ) -> WaitingroomEventResult: """ Fetches a single configured event for a waiting room. @@ -534,7 +531,7 @@ class Events(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[EventGetResponse], ResultWrapper[EventGetResponse]), + cast_to=cast(Type[WaitingroomEventResult], ResultWrapper[WaitingroomEventResult]), ) @@ -575,7 +572,7 @@ class AsyncEvents(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EventCreateResponse: + ) -> WaitingroomEventResult: """Only available for the Waiting Room Advanced subscription. Creates an event for @@ -670,7 +667,7 @@ class AsyncEvents(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[EventCreateResponse], ResultWrapper[EventCreateResponse]), + cast_to=cast(Type[WaitingroomEventResult], ResultWrapper[WaitingroomEventResult]), ) async def update( @@ -698,7 +695,7 @@ class AsyncEvents(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EventUpdateResponse: + ) -> WaitingroomEventResult: """ Updates a configured event for a waiting room. @@ -787,7 +784,7 @@ class AsyncEvents(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[EventUpdateResponse], ResultWrapper[EventUpdateResponse]), + cast_to=cast(Type[WaitingroomEventResult], ResultWrapper[WaitingroomEventResult]), ) async def list( @@ -896,7 +893,7 @@ class AsyncEvents(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EventEditResponse: + ) -> WaitingroomEventResult: """ Patches a configured event for a waiting room. @@ -985,7 +982,7 @@ class AsyncEvents(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[EventEditResponse], ResultWrapper[EventEditResponse]), + cast_to=cast(Type[WaitingroomEventResult], ResultWrapper[WaitingroomEventResult]), ) async def get( @@ -1000,7 +997,7 @@ class AsyncEvents(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EventGetResponse: + ) -> WaitingroomEventResult: """ Fetches a single configured event for a waiting room. @@ -1026,7 +1023,7 @@ class AsyncEvents(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[EventGetResponse], ResultWrapper[EventGetResponse]), + cast_to=cast(Type[WaitingroomEventResult], ResultWrapper[WaitingroomEventResult]), ) diff --git a/src/cloudflare/resources/waiting_rooms/waiting_rooms.py b/src/cloudflare/resources/waiting_rooms/waiting_rooms.py index bb735f374..084337ffa 100644 --- a/src/cloudflare/resources/waiting_rooms/waiting_rooms.py +++ b/src/cloudflare/resources/waiting_rooms/waiting_rooms.py @@ -24,12 +24,9 @@ from .events import ( AsyncEventsWithStreamingResponse, ) from ...types import ( - WaitingRoomGetResponse, - WaitingRoomEditResponse, + WaitingroomWaitingroom, WaitingRoomListResponse, - WaitingRoomCreateResponse, WaitingRoomDeleteResponse, - WaitingRoomUpdateResponse, WaitingRoomPreviewResponse, waiting_room_edit_params, waiting_room_create_params, @@ -146,7 +143,7 @@ class WaitingRooms(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingRoomCreateResponse: + ) -> WaitingroomWaitingroom: """ Creates a new waiting room. @@ -451,7 +448,7 @@ class WaitingRooms(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingRoomCreateResponse], ResultWrapper[WaitingRoomCreateResponse]), + cast_to=cast(Type[WaitingroomWaitingroom], ResultWrapper[WaitingroomWaitingroom]), ) def update( @@ -502,7 +499,7 @@ class WaitingRooms(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingRoomUpdateResponse: + ) -> WaitingroomWaitingroom: """ Updates a configured waiting room. @@ -807,7 +804,7 @@ class WaitingRooms(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingRoomUpdateResponse], ResultWrapper[WaitingRoomUpdateResponse]), + cast_to=cast(Type[WaitingroomWaitingroom], ResultWrapper[WaitingroomWaitingroom]), ) def list( @@ -937,7 +934,7 @@ class WaitingRooms(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingRoomEditResponse: + ) -> WaitingroomWaitingroom: """ Patches a configured waiting room. @@ -1242,7 +1239,7 @@ class WaitingRooms(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingRoomEditResponse], ResultWrapper[WaitingRoomEditResponse]), + cast_to=cast(Type[WaitingroomWaitingroom], ResultWrapper[WaitingroomWaitingroom]), ) def get( @@ -1256,7 +1253,7 @@ class WaitingRooms(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingRoomGetResponse: + ) -> WaitingroomWaitingroom: """ Fetches a single configured waiting room. @@ -1282,7 +1279,7 @@ class WaitingRooms(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingRoomGetResponse], ResultWrapper[WaitingRoomGetResponse]), + cast_to=cast(Type[WaitingroomWaitingroom], ResultWrapper[WaitingroomWaitingroom]), ) def preview( @@ -1457,7 +1454,7 @@ class AsyncWaitingRooms(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingRoomCreateResponse: + ) -> WaitingroomWaitingroom: """ Creates a new waiting room. @@ -1762,7 +1759,7 @@ class AsyncWaitingRooms(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingRoomCreateResponse], ResultWrapper[WaitingRoomCreateResponse]), + cast_to=cast(Type[WaitingroomWaitingroom], ResultWrapper[WaitingroomWaitingroom]), ) async def update( @@ -1813,7 +1810,7 @@ class AsyncWaitingRooms(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingRoomUpdateResponse: + ) -> WaitingroomWaitingroom: """ Updates a configured waiting room. @@ -2118,7 +2115,7 @@ class AsyncWaitingRooms(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingRoomUpdateResponse], ResultWrapper[WaitingRoomUpdateResponse]), + cast_to=cast(Type[WaitingroomWaitingroom], ResultWrapper[WaitingroomWaitingroom]), ) async def list( @@ -2248,7 +2245,7 @@ class AsyncWaitingRooms(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingRoomEditResponse: + ) -> WaitingroomWaitingroom: """ Patches a configured waiting room. @@ -2553,7 +2550,7 @@ class AsyncWaitingRooms(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingRoomEditResponse], ResultWrapper[WaitingRoomEditResponse]), + cast_to=cast(Type[WaitingroomWaitingroom], ResultWrapper[WaitingroomWaitingroom]), ) async def get( @@ -2567,7 +2564,7 @@ class AsyncWaitingRooms(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingRoomGetResponse: + ) -> WaitingroomWaitingroom: """ Fetches a single configured waiting room. @@ -2593,7 +2590,7 @@ class AsyncWaitingRooms(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingRoomGetResponse], ResultWrapper[WaitingRoomGetResponse]), + cast_to=cast(Type[WaitingroomWaitingroom], ResultWrapper[WaitingroomWaitingroom]), ) async def preview( diff --git a/src/cloudflare/resources/web3/hostnames/hostnames.py b/src/cloudflare/resources/web3/hostnames/hostnames.py index fe7109a38..a3bd275a2 100644 --- a/src/cloudflare/resources/web3/hostnames/hostnames.py +++ b/src/cloudflare/resources/web3/hostnames/hostnames.py @@ -22,10 +22,8 @@ from ...._response import ( ) from ...._wrappers import ResultWrapper from ....types.web3 import ( - HostnameGetResponse, - HostnameEditResponse, HostnameListResponse, - HostnameCreateResponse, + DwebConfigWeb3Hostname, HostnameDeleteResponse, hostname_edit_params, hostname_create_params, @@ -72,7 +70,7 @@ class Hostnames(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HostnameCreateResponse: + ) -> DwebConfigWeb3Hostname: """ Create Web3 Hostname @@ -112,7 +110,7 @@ class Hostnames(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HostnameCreateResponse], ResultWrapper[HostnameCreateResponse]), + cast_to=cast(Type[DwebConfigWeb3Hostname], ResultWrapper[DwebConfigWeb3Hostname]), ) def list( @@ -211,7 +209,7 @@ class Hostnames(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HostnameEditResponse: + ) -> DwebConfigWeb3Hostname: """ Edit Web3 Hostname @@ -252,7 +250,7 @@ class Hostnames(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HostnameEditResponse], ResultWrapper[HostnameEditResponse]), + cast_to=cast(Type[DwebConfigWeb3Hostname], ResultWrapper[DwebConfigWeb3Hostname]), ) def get( @@ -266,7 +264,7 @@ class Hostnames(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HostnameGetResponse: + ) -> DwebConfigWeb3Hostname: """ Web3 Hostname Details @@ -296,7 +294,7 @@ class Hostnames(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HostnameGetResponse], ResultWrapper[HostnameGetResponse]), + cast_to=cast(Type[DwebConfigWeb3Hostname], ResultWrapper[DwebConfigWeb3Hostname]), ) @@ -326,7 +324,7 @@ class AsyncHostnames(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HostnameCreateResponse: + ) -> DwebConfigWeb3Hostname: """ Create Web3 Hostname @@ -366,7 +364,7 @@ class AsyncHostnames(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HostnameCreateResponse], ResultWrapper[HostnameCreateResponse]), + cast_to=cast(Type[DwebConfigWeb3Hostname], ResultWrapper[DwebConfigWeb3Hostname]), ) async def list( @@ -465,7 +463,7 @@ class AsyncHostnames(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HostnameEditResponse: + ) -> DwebConfigWeb3Hostname: """ Edit Web3 Hostname @@ -506,7 +504,7 @@ class AsyncHostnames(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HostnameEditResponse], ResultWrapper[HostnameEditResponse]), + cast_to=cast(Type[DwebConfigWeb3Hostname], ResultWrapper[DwebConfigWeb3Hostname]), ) async def get( @@ -520,7 +518,7 @@ class AsyncHostnames(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HostnameGetResponse: + ) -> DwebConfigWeb3Hostname: """ Web3 Hostname Details @@ -550,7 +548,7 @@ class AsyncHostnames(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HostnameGetResponse], ResultWrapper[HostnameGetResponse]), + cast_to=cast(Type[DwebConfigWeb3Hostname], ResultWrapper[DwebConfigWeb3Hostname]), ) 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 afaf9bb75..04caf7392 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,11 +32,8 @@ from ......_wrappers import ResultWrapper from ......_base_client import ( make_request_options, ) -from ......types.web3.hostnames.ipfs_universal_paths import ( - ContentListGetResponse, - ContentListUpdateResponse, - content_list_update_params, -) +from ......types.web3.hostnames.ipfs_universal_paths import DwebConfigContentListDetails, content_list_update_params +from ......types.web3.hostnames.ipfs_universal_paths.content_lists import DwebConfigContentListEntryParam __all__ = ["ContentLists", "AsyncContentLists"] @@ -60,14 +57,14 @@ class ContentLists(SyncAPIResource): *, zone_identifier: str, action: Literal["block"], - entries: Iterable[content_list_update_params.Entry], + entries: Iterable[DwebConfigContentListEntryParam], # 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, - ) -> ContentListUpdateResponse: + ) -> DwebConfigContentListDetails: """ Update IPFS Universal Path Gateway Content List @@ -108,7 +105,7 @@ class ContentLists(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ContentListUpdateResponse], ResultWrapper[ContentListUpdateResponse]), + cast_to=cast(Type[DwebConfigContentListDetails], ResultWrapper[DwebConfigContentListDetails]), ) def get( @@ -122,7 +119,7 @@ class ContentLists(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ContentListGetResponse: + ) -> DwebConfigContentListDetails: """ IPFS Universal Path Gateway Content List Details @@ -152,7 +149,7 @@ class ContentLists(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ContentListGetResponse], ResultWrapper[ContentListGetResponse]), + cast_to=cast(Type[DwebConfigContentListDetails], ResultWrapper[DwebConfigContentListDetails]), ) @@ -175,14 +172,14 @@ class AsyncContentLists(AsyncAPIResource): *, zone_identifier: str, action: Literal["block"], - entries: Iterable[content_list_update_params.Entry], + entries: Iterable[DwebConfigContentListEntryParam], # 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, - ) -> ContentListUpdateResponse: + ) -> DwebConfigContentListDetails: """ Update IPFS Universal Path Gateway Content List @@ -223,7 +220,7 @@ class AsyncContentLists(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ContentListUpdateResponse], ResultWrapper[ContentListUpdateResponse]), + cast_to=cast(Type[DwebConfigContentListDetails], ResultWrapper[DwebConfigContentListDetails]), ) async def get( @@ -237,7 +234,7 @@ class AsyncContentLists(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ContentListGetResponse: + ) -> DwebConfigContentListDetails: """ IPFS Universal Path Gateway Content List Details @@ -267,7 +264,7 @@ class AsyncContentLists(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ContentListGetResponse], ResultWrapper[ContentListGetResponse]), + cast_to=cast(Type[DwebConfigContentListDetails], ResultWrapper[DwebConfigContentListDetails]), ) 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 34cad5d6a..ae90a3860 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 @@ -25,11 +25,9 @@ from ......_base_client import ( make_request_options, ) from ......types.web3.hostnames.ipfs_universal_paths.content_lists import ( - EntryGetResponse, EntryListResponse, - EntryCreateResponse, EntryDeleteResponse, - EntryUpdateResponse, + DwebConfigContentListEntry, entry_create_params, entry_update_params, ) @@ -60,7 +58,7 @@ class Entries(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EntryCreateResponse: + ) -> DwebConfigContentListEntry: """ Create IPFS Universal Path Gateway Content List Entry @@ -104,7 +102,7 @@ class Entries(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[EntryCreateResponse], ResultWrapper[EntryCreateResponse]), + cast_to=cast(Type[DwebConfigContentListEntry], ResultWrapper[DwebConfigContentListEntry]), ) def update( @@ -122,7 +120,7 @@ class Entries(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EntryUpdateResponse: + ) -> DwebConfigContentListEntry: """ Edit IPFS Universal Path Gateway Content List Entry @@ -172,7 +170,7 @@ class Entries(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[EntryUpdateResponse], ResultWrapper[EntryUpdateResponse]), + cast_to=cast(Type[DwebConfigContentListEntry], ResultWrapper[DwebConfigContentListEntry]), ) def list( @@ -282,7 +280,7 @@ class Entries(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EntryGetResponse: + ) -> DwebConfigContentListEntry: """ IPFS Universal Path Gateway Content List Entry Details @@ -318,7 +316,7 @@ class Entries(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[EntryGetResponse], ResultWrapper[EntryGetResponse]), + cast_to=cast(Type[DwebConfigContentListEntry], ResultWrapper[DwebConfigContentListEntry]), ) @@ -345,7 +343,7 @@ class AsyncEntries(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EntryCreateResponse: + ) -> DwebConfigContentListEntry: """ Create IPFS Universal Path Gateway Content List Entry @@ -389,7 +387,7 @@ class AsyncEntries(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[EntryCreateResponse], ResultWrapper[EntryCreateResponse]), + cast_to=cast(Type[DwebConfigContentListEntry], ResultWrapper[DwebConfigContentListEntry]), ) async def update( @@ -407,7 +405,7 @@ class AsyncEntries(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EntryUpdateResponse: + ) -> DwebConfigContentListEntry: """ Edit IPFS Universal Path Gateway Content List Entry @@ -457,7 +455,7 @@ class AsyncEntries(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[EntryUpdateResponse], ResultWrapper[EntryUpdateResponse]), + cast_to=cast(Type[DwebConfigContentListEntry], ResultWrapper[DwebConfigContentListEntry]), ) async def list( @@ -567,7 +565,7 @@ class AsyncEntries(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EntryGetResponse: + ) -> DwebConfigContentListEntry: """ IPFS Universal Path Gateway Content List Entry Details @@ -603,7 +601,7 @@ class AsyncEntries(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[EntryGetResponse], ResultWrapper[EntryGetResponse]), + cast_to=cast(Type[DwebConfigContentListEntry], ResultWrapper[DwebConfigContentListEntry]), ) diff --git a/src/cloudflare/resources/workers/domains.py b/src/cloudflare/resources/workers/domains.py index bf9c615e6..a7eb7e5a4 100644 --- a/src/cloudflare/resources/workers/domains.py +++ b/src/cloudflare/resources/workers/domains.py @@ -23,13 +23,7 @@ from ..._wrappers import ResultWrapper from ..._base_client import ( make_request_options, ) -from ...types.workers import ( - DomainGetResponse, - DomainListResponse, - DomainUpdateResponse, - domain_list_params, - domain_update_params, -) +from ...types.workers import WorkersDomain, DomainListResponse, domain_list_params, domain_update_params __all__ = ["Domains", "AsyncDomains"] @@ -57,7 +51,7 @@ class Domains(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DomainUpdateResponse: + ) -> WorkersDomain: """ Attaches a Worker to a zone and hostname. @@ -96,7 +90,7 @@ class Domains(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DomainUpdateResponse], ResultWrapper[DomainUpdateResponse]), + cast_to=cast(Type[WorkersDomain], ResultWrapper[WorkersDomain]), ) def list( @@ -205,7 +199,7 @@ class Domains(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DomainGetResponse: + ) -> WorkersDomain: """ Gets a Worker domain. @@ -229,7 +223,7 @@ class Domains(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DomainGetResponse], ResultWrapper[DomainGetResponse]), + cast_to=cast(Type[WorkersDomain], ResultWrapper[WorkersDomain]), ) @@ -256,7 +250,7 @@ class AsyncDomains(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DomainUpdateResponse: + ) -> WorkersDomain: """ Attaches a Worker to a zone and hostname. @@ -295,7 +289,7 @@ class AsyncDomains(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DomainUpdateResponse], ResultWrapper[DomainUpdateResponse]), + cast_to=cast(Type[WorkersDomain], ResultWrapper[WorkersDomain]), ) async def list( @@ -404,7 +398,7 @@ class AsyncDomains(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DomainGetResponse: + ) -> WorkersDomain: """ Gets a Worker domain. @@ -428,7 +422,7 @@ class AsyncDomains(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DomainGetResponse], ResultWrapper[DomainGetResponse]), + cast_to=cast(Type[WorkersDomain], ResultWrapper[WorkersDomain]), ) diff --git a/src/cloudflare/resources/workers/filters.py b/src/cloudflare/resources/workers/filters.py index b9a15db35..766d66ef8 100644 --- a/src/cloudflare/resources/workers/filters.py +++ b/src/cloudflare/resources/workers/filters.py @@ -24,10 +24,10 @@ from ..._base_client import ( make_request_options, ) from ...types.workers import ( + WorkersFilters, FilterListResponse, FilterCreateResponse, FilterDeleteResponse, - FilterUpdateResponse, filter_create_params, filter_update_params, ) @@ -105,7 +105,7 @@ class Filters(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FilterUpdateResponse: + ) -> WorkersFilters: """ Update Filter @@ -142,7 +142,7 @@ class Filters(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[FilterUpdateResponse], ResultWrapper[FilterUpdateResponse]), + cast_to=cast(Type[WorkersFilters], ResultWrapper[WorkersFilters]), ) def list( @@ -299,7 +299,7 @@ class AsyncFilters(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FilterUpdateResponse: + ) -> WorkersFilters: """ Update Filter @@ -336,7 +336,7 @@ class AsyncFilters(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[FilterUpdateResponse], ResultWrapper[FilterUpdateResponse]), + cast_to=cast(Type[WorkersFilters], ResultWrapper[WorkersFilters]), ) async def list( diff --git a/src/cloudflare/resources/workers/routes.py b/src/cloudflare/resources/workers/routes.py index 346f424d3..627ce654e 100644 --- a/src/cloudflare/resources/workers/routes.py +++ b/src/cloudflare/resources/workers/routes.py @@ -24,11 +24,10 @@ from ..._base_client import ( make_request_options, ) from ...types.workers import ( - RouteGetResponse, + WorkersRoutes, RouteListResponse, RouteCreateResponse, RouteDeleteResponse, - RouteUpdateResponse, route_create_params, route_update_params, ) @@ -113,7 +112,7 @@ class Routes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteUpdateResponse: + ) -> WorkersRoutes: """ Updates the URL pattern or Worker associated with a route. @@ -152,7 +151,7 @@ class Routes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RouteUpdateResponse], ResultWrapper[RouteUpdateResponse]), + cast_to=cast(Type[WorkersRoutes], ResultWrapper[WorkersRoutes]), ) def list( @@ -254,7 +253,7 @@ class Routes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteGetResponse: + ) -> WorkersRoutes: """ Returns information about a route, including URL pattern and Worker. @@ -284,7 +283,7 @@ class Routes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RouteGetResponse], ResultWrapper[RouteGetResponse]), + cast_to=cast(Type[WorkersRoutes], ResultWrapper[WorkersRoutes]), ) @@ -365,7 +364,7 @@ class AsyncRoutes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteUpdateResponse: + ) -> WorkersRoutes: """ Updates the URL pattern or Worker associated with a route. @@ -404,7 +403,7 @@ class AsyncRoutes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RouteUpdateResponse], ResultWrapper[RouteUpdateResponse]), + cast_to=cast(Type[WorkersRoutes], ResultWrapper[WorkersRoutes]), ) async def list( @@ -506,7 +505,7 @@ class AsyncRoutes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteGetResponse: + ) -> WorkersRoutes: """ Returns information about a route, including URL pattern and Worker. @@ -536,7 +535,7 @@ class AsyncRoutes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RouteGetResponse], ResultWrapper[RouteGetResponse]), + cast_to=cast(Type[WorkersRoutes], ResultWrapper[WorkersRoutes]), ) diff --git a/src/cloudflare/resources/workers/scripts/content.py b/src/cloudflare/resources/workers/scripts/content.py index 803100fa7..564a098fe 100644 --- a/src/cloudflare/resources/workers/scripts/content.py +++ b/src/cloudflare/resources/workers/scripts/content.py @@ -25,7 +25,8 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.workers.scripts import ContentUpdateResponse, content_update_params +from ....types.workers import WorkersScript +from ....types.workers.scripts import content_update_params __all__ = ["Content", "AsyncContent"] @@ -52,7 +53,7 @@ class Content(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ContentUpdateResponse: + ) -> WorkersScript: """ Put script content without touching config or metadata @@ -104,7 +105,7 @@ class Content(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ContentUpdateResponse], ResultWrapper[ContentUpdateResponse]), + cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]), ) @@ -130,7 +131,7 @@ class AsyncContent(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ContentUpdateResponse: + ) -> WorkersScript: """ Put script content without touching config or metadata @@ -182,7 +183,7 @@ class AsyncContent(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ContentUpdateResponse], ResultWrapper[ContentUpdateResponse]), + cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]), ) diff --git a/src/cloudflare/resources/workers/scripts/scripts.py b/src/cloudflare/resources/workers/scripts/scripts.py index 0b3dbfe69..3b329e1ea 100644 --- a/src/cloudflare/resources/workers/scripts/scripts.py +++ b/src/cloudflare/resources/workers/scripts/scripts.py @@ -87,7 +87,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.workers import ScriptListResponse, ScriptUpdateResponse, script_delete_params, script_update_params +from ....types.workers import WorkersScript, ScriptListResponse, script_delete_params, script_update_params __all__ = ["Scripts", "AsyncScripts"] @@ -144,7 +144,7 @@ class Scripts(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ScriptUpdateResponse: + ) -> WorkersScript: """ Upload a worker module. @@ -196,7 +196,7 @@ class Scripts(SyncAPIResource): query=maybe_transform({"rollback_to": rollback_to}, script_update_params.ScriptUpdateParams), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ScriptUpdateResponse], ResultWrapper[ScriptUpdateResponse]), + cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]), ) def list( @@ -385,7 +385,7 @@ class AsyncScripts(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ScriptUpdateResponse: + ) -> WorkersScript: """ Upload a worker module. @@ -439,7 +439,7 @@ class AsyncScripts(AsyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ScriptUpdateResponse], ResultWrapper[ScriptUpdateResponse]), + cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]), ) async def list( diff --git a/src/cloudflare/resources/workers/services/environments/content.py b/src/cloudflare/resources/workers/services/environments/content.py index 5bd979a78..c17a9d452 100644 --- a/src/cloudflare/resources/workers/services/environments/content.py +++ b/src/cloudflare/resources/workers/services/environments/content.py @@ -33,7 +33,8 @@ from ....._wrappers import ResultWrapper from ....._base_client import ( make_request_options, ) -from .....types.workers.services.environments import ContentUpdateResponse, content_update_params +from .....types.workers import WorkersScript +from .....types.workers.services.environments import content_update_params __all__ = ["Content", "AsyncContent"] @@ -61,7 +62,7 @@ class Content(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ContentUpdateResponse: + ) -> WorkersScript: """ Put script content from a worker with an environment @@ -117,7 +118,7 @@ class Content(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ContentUpdateResponse], ResultWrapper[ContentUpdateResponse]), + cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]), ) def get( @@ -190,7 +191,7 @@ class AsyncContent(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ContentUpdateResponse: + ) -> WorkersScript: """ Put script content from a worker with an environment @@ -246,7 +247,7 @@ class AsyncContent(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ContentUpdateResponse], ResultWrapper[ContentUpdateResponse]), + cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]), ) async def get( diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/scripts.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/scripts.py index f514abd34..ba431f937 100644 --- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/scripts.py +++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/scripts.py @@ -33,10 +33,8 @@ from ......._wrappers import ResultWrapper from ......._base_client import ( make_request_options, ) -from .......types.workers_for_platforms.dispatch.namespaces.scripts.content import ( - ScriptUpdateResponse, - script_update_params, -) +from .......types.workers import WorkersScript +from .......types.workers_for_platforms.dispatch.namespaces.scripts.content import script_update_params __all__ = ["Scripts", "AsyncScripts"] @@ -64,7 +62,7 @@ class Scripts(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ScriptUpdateResponse: + ) -> WorkersScript: """ Put script content for a script uploaded to a Workers for Platforms namespace. @@ -120,7 +118,7 @@ class Scripts(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ScriptUpdateResponse], ResultWrapper[ScriptUpdateResponse]), + cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]), ) def get( @@ -194,7 +192,7 @@ class AsyncScripts(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ScriptUpdateResponse: + ) -> WorkersScript: """ Put script content for a script uploaded to a Workers for Platforms namespace. @@ -250,7 +248,7 @@ class AsyncScripts(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ScriptUpdateResponse], ResultWrapper[ScriptUpdateResponse]), + cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]), ) async def get( 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 626770cfb..8364830e5 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 @@ -32,9 +32,9 @@ from .content.content import Content, AsyncContent from ......_base_client import ( make_request_options, ) +from ......types.workers import WorkersScript from ......types.workers_for_platforms.dispatch.namespaces import ( - ScriptGetResponse, - ScriptUpdateResponse, + WorkersNamespaceScript, script_delete_params, script_update_params, ) @@ -70,7 +70,7 @@ class Scripts(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ScriptUpdateResponse: + ) -> WorkersScript: """ Upload a worker module to a Workers for Platforms namespace. @@ -121,7 +121,7 @@ class Scripts(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ScriptUpdateResponse], ResultWrapper[ScriptUpdateResponse]), + cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]), ) def delete( @@ -193,7 +193,7 @@ class Scripts(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ScriptGetResponse: + ) -> WorkersNamespaceScript: """ Fetch information about a script uploaded to a Workers for Platforms namespace. @@ -227,7 +227,7 @@ class Scripts(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ScriptGetResponse], ResultWrapper[ScriptGetResponse]), + cast_to=cast(Type[WorkersNamespaceScript], ResultWrapper[WorkersNamespaceScript]), ) @@ -259,7 +259,7 @@ class AsyncScripts(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ScriptUpdateResponse: + ) -> WorkersScript: """ Upload a worker module to a Workers for Platforms namespace. @@ -310,7 +310,7 @@ class AsyncScripts(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ScriptUpdateResponse], ResultWrapper[ScriptUpdateResponse]), + cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]), ) async def delete( @@ -382,7 +382,7 @@ class AsyncScripts(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ScriptGetResponse: + ) -> WorkersNamespaceScript: """ Fetch information about a script uploaded to a Workers for Platforms namespace. @@ -416,7 +416,7 @@ class AsyncScripts(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ScriptGetResponse], ResultWrapper[ScriptGetResponse]), + cast_to=cast(Type[WorkersNamespaceScript], ResultWrapper[WorkersNamespaceScript]), ) diff --git a/src/cloudflare/resources/zero_trust/access/applications/applications.py b/src/cloudflare/resources/zero_trust/access/applications/applications.py index e22b2501d..713e0b515 100644 --- a/src/cloudflare/resources/zero_trust/access/applications/applications.py +++ b/src/cloudflare/resources/zero_trust/access/applications/applications.py @@ -48,11 +48,9 @@ from .user_policy_checks import ( AsyncUserPolicyChecksWithStreamingResponse, ) from .....types.zero_trust.access import ( - ApplicationGetResponse, + AccessApps, ApplicationListResponse, - ApplicationCreateResponse, ApplicationDeleteResponse, - ApplicationUpdateResponse, application_create_params, application_update_params, ) @@ -115,7 +113,7 @@ class Applications(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ApplicationCreateResponse: + ) -> AccessApps: """ Adds a new application to Access. @@ -203,7 +201,7 @@ class Applications(SyncAPIResource): account_or_zone = "zones" account_or_zone_id = zone_id return cast( - ApplicationCreateResponse, + AccessApps, self._post( f"/{account_or_zone}/{account_or_zone_id}/access/apps", body=maybe_transform( @@ -242,7 +240,7 @@ class Applications(SyncAPIResource): post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[ApplicationCreateResponse] + Any, ResultWrapper[AccessApps] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -282,7 +280,7 @@ class Applications(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ApplicationUpdateResponse: + ) -> AccessApps: """ Updates an Access application. @@ -372,7 +370,7 @@ class Applications(SyncAPIResource): account_or_zone = "zones" account_or_zone_id = zone_id return cast( - ApplicationUpdateResponse, + AccessApps, self._put( f"/{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}", body=maybe_transform( @@ -411,7 +409,7 @@ class Applications(SyncAPIResource): post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[ApplicationUpdateResponse] + Any, ResultWrapper[AccessApps] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -541,7 +539,7 @@ class Applications(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ApplicationGetResponse: + ) -> AccessApps: """ Fetches information about an Access application. @@ -576,7 +574,7 @@ class Applications(SyncAPIResource): account_or_zone = "zones" account_or_zone_id = zone_id return cast( - ApplicationGetResponse, + AccessApps, self._get( f"/{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}", options=make_request_options( @@ -587,7 +585,7 @@ class Applications(SyncAPIResource): post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[ApplicationGetResponse] + Any, ResultWrapper[AccessApps] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -706,7 +704,7 @@ class AsyncApplications(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ApplicationCreateResponse: + ) -> AccessApps: """ Adds a new application to Access. @@ -794,7 +792,7 @@ class AsyncApplications(AsyncAPIResource): account_or_zone = "zones" account_or_zone_id = zone_id return cast( - ApplicationCreateResponse, + AccessApps, await self._post( f"/{account_or_zone}/{account_or_zone_id}/access/apps", body=await async_maybe_transform( @@ -833,7 +831,7 @@ class AsyncApplications(AsyncAPIResource): post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[ApplicationCreateResponse] + Any, ResultWrapper[AccessApps] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -873,7 +871,7 @@ class AsyncApplications(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ApplicationUpdateResponse: + ) -> AccessApps: """ Updates an Access application. @@ -963,7 +961,7 @@ class AsyncApplications(AsyncAPIResource): account_or_zone = "zones" account_or_zone_id = zone_id return cast( - ApplicationUpdateResponse, + AccessApps, await self._put( f"/{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}", body=await async_maybe_transform( @@ -1002,7 +1000,7 @@ class AsyncApplications(AsyncAPIResource): post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[ApplicationUpdateResponse] + Any, ResultWrapper[AccessApps] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -1132,7 +1130,7 @@ class AsyncApplications(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ApplicationGetResponse: + ) -> AccessApps: """ Fetches information about an Access application. @@ -1167,7 +1165,7 @@ class AsyncApplications(AsyncAPIResource): account_or_zone = "zones" account_or_zone_id = zone_id return cast( - ApplicationGetResponse, + AccessApps, await self._get( f"/{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}", options=make_request_options( @@ -1178,7 +1176,7 @@ class AsyncApplications(AsyncAPIResource): post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[ApplicationGetResponse] + Any, ResultWrapper[AccessApps] ), # 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 7eecd36ad..c321e5ed8 100644 --- a/src/cloudflare/resources/zero_trust/access/applications/policies.py +++ b/src/cloudflare/resources/zero_trust/access/applications/policies.py @@ -25,11 +25,9 @@ from ....._base_client import ( make_request_options, ) from .....types.zero_trust.access.applications import ( - PolicyGetResponse, + AccessPolicies, PolicyListResponse, - PolicyCreateResponse, PolicyDeleteResponse, - PolicyUpdateResponse, policy_create_params, policy_update_params, ) @@ -70,7 +68,7 @@ class Policies(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PolicyCreateResponse: + ) -> AccessPolicies: """ Create a new Access policy for an application. @@ -164,7 +162,7 @@ class Policies(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PolicyCreateResponse], ResultWrapper[PolicyCreateResponse]), + cast_to=cast(Type[AccessPolicies], ResultWrapper[AccessPolicies]), ) def update( @@ -192,7 +190,7 @@ class Policies(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PolicyUpdateResponse: + ) -> AccessPolicies: """ Update a configured Access policy. @@ -290,7 +288,7 @@ class Policies(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PolicyUpdateResponse], ResultWrapper[PolicyUpdateResponse]), + cast_to=cast(Type[AccessPolicies], ResultWrapper[AccessPolicies]), ) def list( @@ -431,7 +429,7 @@ class Policies(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PolicyGetResponse: + ) -> AccessPolicies: """ Fetches a single Access policy. @@ -480,7 +478,7 @@ class Policies(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PolicyGetResponse], ResultWrapper[PolicyGetResponse]), + cast_to=cast(Type[AccessPolicies], ResultWrapper[AccessPolicies]), ) @@ -517,7 +515,7 @@ class AsyncPolicies(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PolicyCreateResponse: + ) -> AccessPolicies: """ Create a new Access policy for an application. @@ -611,7 +609,7 @@ class AsyncPolicies(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PolicyCreateResponse], ResultWrapper[PolicyCreateResponse]), + cast_to=cast(Type[AccessPolicies], ResultWrapper[AccessPolicies]), ) async def update( @@ -639,7 +637,7 @@ class AsyncPolicies(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PolicyUpdateResponse: + ) -> AccessPolicies: """ Update a configured Access policy. @@ -737,7 +735,7 @@ class AsyncPolicies(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PolicyUpdateResponse], ResultWrapper[PolicyUpdateResponse]), + cast_to=cast(Type[AccessPolicies], ResultWrapper[AccessPolicies]), ) async def list( @@ -878,7 +876,7 @@ class AsyncPolicies(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PolicyGetResponse: + ) -> AccessPolicies: """ Fetches a single Access policy. @@ -927,7 +925,7 @@ class AsyncPolicies(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PolicyGetResponse], ResultWrapper[PolicyGetResponse]), + cast_to=cast(Type[AccessPolicies], ResultWrapper[AccessPolicies]), ) diff --git a/src/cloudflare/resources/zero_trust/access/bookmarks.py b/src/cloudflare/resources/zero_trust/access/bookmarks.py index 87d0485ce..987e940bf 100644 --- a/src/cloudflare/resources/zero_trust/access/bookmarks.py +++ b/src/cloudflare/resources/zero_trust/access/bookmarks.py @@ -19,13 +19,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zero_trust.access import ( - BookmarkGetResponse, - BookmarkListResponse, - BookmarkCreateResponse, - BookmarkDeleteResponse, - BookmarkUpdateResponse, -) +from ....types.zero_trust.access import AccessBookmarks, BookmarkListResponse, BookmarkDeleteResponse __all__ = ["Bookmarks", "AsyncBookmarks"] @@ -50,7 +44,7 @@ class Bookmarks(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BookmarkCreateResponse: + ) -> AccessBookmarks: """ Create a new Bookmark application. @@ -76,7 +70,7 @@ class Bookmarks(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BookmarkCreateResponse], ResultWrapper[BookmarkCreateResponse]), + cast_to=cast(Type[AccessBookmarks], ResultWrapper[AccessBookmarks]), ) def update( @@ -90,7 +84,7 @@ class Bookmarks(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BookmarkUpdateResponse: + ) -> AccessBookmarks: """ Updates a configured Bookmark application. @@ -116,7 +110,7 @@ class Bookmarks(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BookmarkUpdateResponse], ResultWrapper[BookmarkUpdateResponse]), + cast_to=cast(Type[AccessBookmarks], ResultWrapper[AccessBookmarks]), ) def list( @@ -205,7 +199,7 @@ class Bookmarks(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BookmarkGetResponse: + ) -> AccessBookmarks: """ Fetches a single Bookmark application. @@ -231,7 +225,7 @@ class Bookmarks(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BookmarkGetResponse], ResultWrapper[BookmarkGetResponse]), + cast_to=cast(Type[AccessBookmarks], ResultWrapper[AccessBookmarks]), ) @@ -255,7 +249,7 @@ class AsyncBookmarks(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BookmarkCreateResponse: + ) -> AccessBookmarks: """ Create a new Bookmark application. @@ -281,7 +275,7 @@ class AsyncBookmarks(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BookmarkCreateResponse], ResultWrapper[BookmarkCreateResponse]), + cast_to=cast(Type[AccessBookmarks], ResultWrapper[AccessBookmarks]), ) async def update( @@ -295,7 +289,7 @@ class AsyncBookmarks(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BookmarkUpdateResponse: + ) -> AccessBookmarks: """ Updates a configured Bookmark application. @@ -321,7 +315,7 @@ class AsyncBookmarks(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BookmarkUpdateResponse], ResultWrapper[BookmarkUpdateResponse]), + cast_to=cast(Type[AccessBookmarks], ResultWrapper[AccessBookmarks]), ) async def list( @@ -410,7 +404,7 @@ class AsyncBookmarks(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BookmarkGetResponse: + ) -> AccessBookmarks: """ Fetches a single Bookmark application. @@ -436,7 +430,7 @@ class AsyncBookmarks(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BookmarkGetResponse], ResultWrapper[BookmarkGetResponse]), + cast_to=cast(Type[AccessBookmarks], ResultWrapper[AccessBookmarks]), ) diff --git a/src/cloudflare/resources/zero_trust/access/certificates/certificates.py b/src/cloudflare/resources/zero_trust/access/certificates/certificates.py index de0e71320..4922cf18c 100644 --- a/src/cloudflare/resources/zero_trust/access/certificates/certificates.py +++ b/src/cloudflare/resources/zero_trust/access/certificates/certificates.py @@ -32,11 +32,9 @@ from ....._base_client import ( make_request_options, ) from .....types.zero_trust.access import ( - CertificateGetResponse, + AccessCertificates, CertificateListResponse, - CertificateCreateResponse, CertificateDeleteResponse, - CertificateUpdateResponse, certificate_create_params, certificate_update_params, ) @@ -71,7 +69,7 @@ class Certificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateCreateResponse: + ) -> AccessCertificates: """ Adds a new mTLS root certificate to Access. @@ -126,7 +124,7 @@ class Certificates(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CertificateCreateResponse], ResultWrapper[CertificateCreateResponse]), + cast_to=cast(Type[AccessCertificates], ResultWrapper[AccessCertificates]), ) def update( @@ -143,7 +141,7 @@ class Certificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateUpdateResponse: + ) -> AccessCertificates: """ Updates a configured mTLS certificate. @@ -199,7 +197,7 @@ class Certificates(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CertificateUpdateResponse], ResultWrapper[CertificateUpdateResponse]), + cast_to=cast(Type[AccessCertificates], ResultWrapper[AccessCertificates]), ) def list( @@ -329,7 +327,7 @@ class Certificates(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateGetResponse: + ) -> AccessCertificates: """ Fetches a single mTLS certificate. @@ -374,7 +372,7 @@ class Certificates(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CertificateGetResponse], ResultWrapper[CertificateGetResponse]), + cast_to=cast(Type[AccessCertificates], ResultWrapper[AccessCertificates]), ) @@ -405,7 +403,7 @@ class AsyncCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateCreateResponse: + ) -> AccessCertificates: """ Adds a new mTLS root certificate to Access. @@ -460,7 +458,7 @@ class AsyncCertificates(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CertificateCreateResponse], ResultWrapper[CertificateCreateResponse]), + cast_to=cast(Type[AccessCertificates], ResultWrapper[AccessCertificates]), ) async def update( @@ -477,7 +475,7 @@ class AsyncCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateUpdateResponse: + ) -> AccessCertificates: """ Updates a configured mTLS certificate. @@ -533,7 +531,7 @@ class AsyncCertificates(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CertificateUpdateResponse], ResultWrapper[CertificateUpdateResponse]), + cast_to=cast(Type[AccessCertificates], ResultWrapper[AccessCertificates]), ) async def list( @@ -663,7 +661,7 @@ class AsyncCertificates(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CertificateGetResponse: + ) -> AccessCertificates: """ Fetches a single mTLS certificate. @@ -708,7 +706,7 @@ class AsyncCertificates(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CertificateGetResponse], ResultWrapper[CertificateGetResponse]), + cast_to=cast(Type[AccessCertificates], ResultWrapper[AccessCertificates]), ) diff --git a/src/cloudflare/resources/zero_trust/access/certificates/settings.py b/src/cloudflare/resources/zero_trust/access/certificates/settings.py index e93d7c693..83cad679f 100644 --- a/src/cloudflare/resources/zero_trust/access/certificates/settings.py +++ b/src/cloudflare/resources/zero_trust/access/certificates/settings.py @@ -23,7 +23,12 @@ from ....._wrappers import ResultWrapper from ....._base_client import ( make_request_options, ) -from .....types.zero_trust.access.certificates import SettingListResponse, SettingUpdateResponse, setting_update_params +from .....types.zero_trust.access.certificates import ( + AccessSettingsParam, + SettingListResponse, + SettingUpdateResponse, + setting_update_params, +) __all__ = ["Settings", "AsyncSettings"] @@ -40,7 +45,7 @@ class Settings(SyncAPIResource): def update( self, *, - settings: Iterable[setting_update_params.Setting], + settings: Iterable[AccessSettingsParam], 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. @@ -162,7 +167,7 @@ class AsyncSettings(AsyncAPIResource): async def update( self, *, - settings: Iterable[setting_update_params.Setting], + settings: Iterable[AccessSettingsParam], 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 6e42e29cf..36463e173 100644 --- a/src/cloudflare/resources/zero_trust/access/custom_pages.py +++ b/src/cloudflare/resources/zero_trust/access/custom_pages.py @@ -25,11 +25,10 @@ from ...._base_client import ( make_request_options, ) from ....types.zero_trust.access import ( - CustomPageGetResponse, + AccessCustomPage, CustomPageListResponse, - CustomPageCreateResponse, CustomPageDeleteResponse, - CustomPageUpdateResponse, + AccessCustomPageWithoutHTML, custom_page_create_params, custom_page_update_params, ) @@ -60,7 +59,7 @@ class CustomPages(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomPageCreateResponse: + ) -> AccessCustomPageWithoutHTML: """ Create a custom page @@ -103,7 +102,7 @@ class CustomPages(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CustomPageCreateResponse], ResultWrapper[CustomPageCreateResponse]), + cast_to=cast(Type[AccessCustomPageWithoutHTML], ResultWrapper[AccessCustomPageWithoutHTML]), ) def update( @@ -121,7 +120,7 @@ class CustomPages(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomPageUpdateResponse: + ) -> AccessCustomPageWithoutHTML: """ Update a custom page @@ -168,7 +167,7 @@ class CustomPages(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CustomPageUpdateResponse], ResultWrapper[CustomPageUpdateResponse]), + cast_to=cast(Type[AccessCustomPageWithoutHTML], ResultWrapper[AccessCustomPageWithoutHTML]), ) def list( @@ -265,7 +264,7 @@ class CustomPages(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomPageGetResponse: + ) -> AccessCustomPage: """ Fetches a custom page and also returns its HTML. @@ -295,7 +294,7 @@ class CustomPages(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CustomPageGetResponse], ResultWrapper[CustomPageGetResponse]), + cast_to=cast(Type[AccessCustomPage], ResultWrapper[AccessCustomPage]), ) @@ -322,7 +321,7 @@ class AsyncCustomPages(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomPageCreateResponse: + ) -> AccessCustomPageWithoutHTML: """ Create a custom page @@ -365,7 +364,7 @@ class AsyncCustomPages(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CustomPageCreateResponse], ResultWrapper[CustomPageCreateResponse]), + cast_to=cast(Type[AccessCustomPageWithoutHTML], ResultWrapper[AccessCustomPageWithoutHTML]), ) async def update( @@ -383,7 +382,7 @@ class AsyncCustomPages(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomPageUpdateResponse: + ) -> AccessCustomPageWithoutHTML: """ Update a custom page @@ -430,7 +429,7 @@ class AsyncCustomPages(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CustomPageUpdateResponse], ResultWrapper[CustomPageUpdateResponse]), + cast_to=cast(Type[AccessCustomPageWithoutHTML], ResultWrapper[AccessCustomPageWithoutHTML]), ) async def list( @@ -527,7 +526,7 @@ class AsyncCustomPages(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomPageGetResponse: + ) -> AccessCustomPage: """ Fetches a custom page and also returns its HTML. @@ -557,7 +556,7 @@ class AsyncCustomPages(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CustomPageGetResponse], ResultWrapper[CustomPageGetResponse]), + cast_to=cast(Type[AccessCustomPage], ResultWrapper[AccessCustomPage]), ) diff --git a/src/cloudflare/resources/zero_trust/access/groups.py b/src/cloudflare/resources/zero_trust/access/groups.py index b41b7a78d..025b96f76 100644 --- a/src/cloudflare/resources/zero_trust/access/groups.py +++ b/src/cloudflare/resources/zero_trust/access/groups.py @@ -24,11 +24,9 @@ from ...._base_client import ( make_request_options, ) from ....types.zero_trust.access import ( - GroupGetResponse, + AccessGroups, GroupListResponse, - GroupCreateResponse, GroupDeleteResponse, - GroupUpdateResponse, group_create_params, group_update_params, ) @@ -61,7 +59,7 @@ class Groups(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> GroupCreateResponse: + ) -> AccessGroups: """ Creates a new Access group. @@ -125,7 +123,7 @@ class Groups(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[GroupCreateResponse], ResultWrapper[GroupCreateResponse]), + cast_to=cast(Type[AccessGroups], ResultWrapper[AccessGroups]), ) def update( @@ -145,7 +143,7 @@ class Groups(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> GroupUpdateResponse: + ) -> AccessGroups: """ Updates a configured Access group. @@ -213,7 +211,7 @@ class Groups(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[GroupUpdateResponse], ResultWrapper[GroupUpdateResponse]), + cast_to=cast(Type[AccessGroups], ResultWrapper[AccessGroups]), ) def list( @@ -343,7 +341,7 @@ class Groups(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> GroupGetResponse: + ) -> AccessGroups: """ Fetches a single Access group. @@ -388,7 +386,7 @@ class Groups(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[GroupGetResponse], ResultWrapper[GroupGetResponse]), + cast_to=cast(Type[AccessGroups], ResultWrapper[AccessGroups]), ) @@ -417,7 +415,7 @@ class AsyncGroups(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> GroupCreateResponse: + ) -> AccessGroups: """ Creates a new Access group. @@ -481,7 +479,7 @@ class AsyncGroups(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[GroupCreateResponse], ResultWrapper[GroupCreateResponse]), + cast_to=cast(Type[AccessGroups], ResultWrapper[AccessGroups]), ) async def update( @@ -501,7 +499,7 @@ class AsyncGroups(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> GroupUpdateResponse: + ) -> AccessGroups: """ Updates a configured Access group. @@ -569,7 +567,7 @@ class AsyncGroups(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[GroupUpdateResponse], ResultWrapper[GroupUpdateResponse]), + cast_to=cast(Type[AccessGroups], ResultWrapper[AccessGroups]), ) async def list( @@ -699,7 +697,7 @@ class AsyncGroups(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> GroupGetResponse: + ) -> AccessGroups: """ Fetches a single Access group. @@ -744,7 +742,7 @@ class AsyncGroups(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[GroupGetResponse], ResultWrapper[GroupGetResponse]), + cast_to=cast(Type[AccessGroups], ResultWrapper[AccessGroups]), ) diff --git a/src/cloudflare/resources/zero_trust/access/service_tokens.py b/src/cloudflare/resources/zero_trust/access/service_tokens.py index 4d7854faf..a83cecfd8 100644 --- a/src/cloudflare/resources/zero_trust/access/service_tokens.py +++ b/src/cloudflare/resources/zero_trust/access/service_tokens.py @@ -24,12 +24,10 @@ from ...._base_client import ( make_request_options, ) from ....types.zero_trust.access import ( + AccessServiceTokens, ServiceTokenListResponse, ServiceTokenCreateResponse, - ServiceTokenDeleteResponse, ServiceTokenRotateResponse, - ServiceTokenUpdateResponse, - ServiceTokenRefreshResponse, service_token_create_params, service_token_update_params, ) @@ -133,7 +131,7 @@ class ServiceTokens(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ServiceTokenUpdateResponse: + ) -> AccessServiceTokens: """ Updates a configured service token. @@ -191,7 +189,7 @@ class ServiceTokens(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ServiceTokenUpdateResponse], ResultWrapper[ServiceTokenUpdateResponse]), + cast_to=cast(Type[AccessServiceTokens], ResultWrapper[AccessServiceTokens]), ) def list( @@ -261,7 +259,7 @@ class ServiceTokens(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ServiceTokenDeleteResponse: + ) -> AccessServiceTokens: """ Deletes a service token. @@ -306,7 +304,7 @@ class ServiceTokens(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ServiceTokenDeleteResponse], ResultWrapper[ServiceTokenDeleteResponse]), + cast_to=cast(Type[AccessServiceTokens], ResultWrapper[AccessServiceTokens]), ) def refresh( @@ -320,7 +318,7 @@ class ServiceTokens(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ServiceTokenRefreshResponse: + ) -> AccessServiceTokens: """ Refreshes the expiration of a service token. @@ -350,7 +348,7 @@ class ServiceTokens(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ServiceTokenRefreshResponse], ResultWrapper[ServiceTokenRefreshResponse]), + cast_to=cast(Type[AccessServiceTokens], ResultWrapper[AccessServiceTokens]), ) def rotate( @@ -494,7 +492,7 @@ class AsyncServiceTokens(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ServiceTokenUpdateResponse: + ) -> AccessServiceTokens: """ Updates a configured service token. @@ -552,7 +550,7 @@ class AsyncServiceTokens(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ServiceTokenUpdateResponse], ResultWrapper[ServiceTokenUpdateResponse]), + cast_to=cast(Type[AccessServiceTokens], ResultWrapper[AccessServiceTokens]), ) async def list( @@ -622,7 +620,7 @@ class AsyncServiceTokens(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ServiceTokenDeleteResponse: + ) -> AccessServiceTokens: """ Deletes a service token. @@ -667,7 +665,7 @@ class AsyncServiceTokens(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ServiceTokenDeleteResponse], ResultWrapper[ServiceTokenDeleteResponse]), + cast_to=cast(Type[AccessServiceTokens], ResultWrapper[AccessServiceTokens]), ) async def refresh( @@ -681,7 +679,7 @@ class AsyncServiceTokens(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ServiceTokenRefreshResponse: + ) -> AccessServiceTokens: """ Refreshes the expiration of a service token. @@ -711,7 +709,7 @@ class AsyncServiceTokens(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ServiceTokenRefreshResponse], ResultWrapper[ServiceTokenRefreshResponse]), + cast_to=cast(Type[AccessServiceTokens], ResultWrapper[AccessServiceTokens]), ) async def rotate( diff --git a/src/cloudflare/resources/zero_trust/access/tags.py b/src/cloudflare/resources/zero_trust/access/tags.py index 2c2316bba..9a7f39936 100644 --- a/src/cloudflare/resources/zero_trust/access/tags.py +++ b/src/cloudflare/resources/zero_trust/access/tags.py @@ -24,11 +24,9 @@ from ...._base_client import ( make_request_options, ) from ....types.zero_trust.access import ( - TagGetResponse, + AccessTag, TagListResponse, - TagCreateResponse, TagDeleteResponse, - TagUpdateResponse, tag_create_params, tag_update_params, ) @@ -56,7 +54,7 @@ class Tags(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TagCreateResponse: + ) -> AccessTag: """ Create a tag @@ -85,7 +83,7 @@ class Tags(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TagCreateResponse], ResultWrapper[TagCreateResponse]), + cast_to=cast(Type[AccessTag], ResultWrapper[AccessTag]), ) def update( @@ -100,7 +98,7 @@ class Tags(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TagUpdateResponse: + ) -> AccessTag: """ Update a tag @@ -133,7 +131,7 @@ class Tags(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TagUpdateResponse], ResultWrapper[TagUpdateResponse]), + cast_to=cast(Type[AccessTag], ResultWrapper[AccessTag]), ) def list( @@ -230,7 +228,7 @@ class Tags(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TagGetResponse: + ) -> AccessTag: """ Get a tag @@ -260,7 +258,7 @@ class Tags(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TagGetResponse], ResultWrapper[TagGetResponse]), + cast_to=cast(Type[AccessTag], ResultWrapper[AccessTag]), ) @@ -284,7 +282,7 @@ class AsyncTags(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TagCreateResponse: + ) -> AccessTag: """ Create a tag @@ -313,7 +311,7 @@ class AsyncTags(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TagCreateResponse], ResultWrapper[TagCreateResponse]), + cast_to=cast(Type[AccessTag], ResultWrapper[AccessTag]), ) async def update( @@ -328,7 +326,7 @@ class AsyncTags(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TagUpdateResponse: + ) -> AccessTag: """ Update a tag @@ -361,7 +359,7 @@ class AsyncTags(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TagUpdateResponse], ResultWrapper[TagUpdateResponse]), + cast_to=cast(Type[AccessTag], ResultWrapper[AccessTag]), ) async def list( @@ -458,7 +456,7 @@ class AsyncTags(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TagGetResponse: + ) -> AccessTag: """ Get a tag @@ -488,7 +486,7 @@ class AsyncTags(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TagGetResponse], ResultWrapper[TagGetResponse]), + cast_to=cast(Type[AccessTag], ResultWrapper[AccessTag]), ) 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 978c33c92..2274a150e 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 ....._wrappers import ResultWrapper from ....._base_client import ( make_request_options, ) -from .....types.zero_trust.access.users import LastSeenIdentityGetResponse +from .....types.zero_trust.access.users import AccessIdentity __all__ = ["LastSeenIdentity", "AsyncLastSeenIdentity"] @@ -44,7 +44,7 @@ class LastSeenIdentity(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LastSeenIdentityGetResponse: + ) -> AccessIdentity: """ Get last seen identity for a single user. @@ -74,7 +74,7 @@ class LastSeenIdentity(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LastSeenIdentityGetResponse], ResultWrapper[LastSeenIdentityGetResponse]), + cast_to=cast(Type[AccessIdentity], ResultWrapper[AccessIdentity]), ) @@ -98,7 +98,7 @@ class AsyncLastSeenIdentity(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LastSeenIdentityGetResponse: + ) -> AccessIdentity: """ Get last seen identity for a single user. @@ -128,7 +128,7 @@ class AsyncLastSeenIdentity(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LastSeenIdentityGetResponse], ResultWrapper[LastSeenIdentityGetResponse]), + cast_to=cast(Type[AccessIdentity], ResultWrapper[AccessIdentity]), ) diff --git a/src/cloudflare/resources/zero_trust/devices/dex_tests.py b/src/cloudflare/resources/zero_trust/devices/dex_tests.py index bb326dccd..adbb9f200 100644 --- a/src/cloudflare/resources/zero_trust/devices/dex_tests.py +++ b/src/cloudflare/resources/zero_trust/devices/dex_tests.py @@ -24,11 +24,9 @@ from ...._base_client import ( make_request_options, ) from ....types.zero_trust.devices import ( - DEXTestGetResponse, DEXTestListResponse, - DEXTestCreateResponse, DEXTestDeleteResponse, - DEXTestUpdateResponse, + TeamsDevicesDeviceDEXTestSchemasHTTP, dex_test_create_params, dex_test_update_params, ) @@ -60,7 +58,7 @@ class DEXTests(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DEXTestCreateResponse]: + ) -> Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]: """ Create a DEX test. @@ -103,7 +101,10 @@ class DEXTests(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DEXTestCreateResponse]], ResultWrapper[DEXTestCreateResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]], + ResultWrapper[TeamsDevicesDeviceDEXTestSchemasHTTP], + ), ) def update( @@ -122,7 +123,7 @@ class DEXTests(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DEXTestUpdateResponse]: + ) -> Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]: """ Update a DEX test. @@ -169,7 +170,10 @@ class DEXTests(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DEXTestUpdateResponse]], ResultWrapper[DEXTestUpdateResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]], + ResultWrapper[TeamsDevicesDeviceDEXTestSchemasHTTP], + ), ) def list( @@ -260,7 +264,7 @@ class DEXTests(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DEXTestGetResponse]: + ) -> Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]: """ Fetch a single DEX test. @@ -286,7 +290,10 @@ class DEXTests(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DEXTestGetResponse]], ResultWrapper[DEXTestGetResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]], + ResultWrapper[TeamsDevicesDeviceDEXTestSchemasHTTP], + ), ) @@ -314,7 +321,7 @@ class AsyncDEXTests(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DEXTestCreateResponse]: + ) -> Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]: """ Create a DEX test. @@ -357,7 +364,10 @@ class AsyncDEXTests(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DEXTestCreateResponse]], ResultWrapper[DEXTestCreateResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]], + ResultWrapper[TeamsDevicesDeviceDEXTestSchemasHTTP], + ), ) async def update( @@ -376,7 +386,7 @@ class AsyncDEXTests(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DEXTestUpdateResponse]: + ) -> Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]: """ Update a DEX test. @@ -423,7 +433,10 @@ class AsyncDEXTests(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DEXTestUpdateResponse]], ResultWrapper[DEXTestUpdateResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]], + ResultWrapper[TeamsDevicesDeviceDEXTestSchemasHTTP], + ), ) async def list( @@ -514,7 +527,7 @@ class AsyncDEXTests(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DEXTestGetResponse]: + ) -> Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]: """ Fetch a single DEX test. @@ -540,7 +553,10 @@ class AsyncDEXTests(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DEXTestGetResponse]], ResultWrapper[DEXTestGetResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]], + ResultWrapper[TeamsDevicesDeviceDEXTestSchemasHTTP], + ), ) diff --git a/src/cloudflare/resources/zero_trust/devices/networks.py b/src/cloudflare/resources/zero_trust/devices/networks.py index aeefd8da6..a30362056 100644 --- a/src/cloudflare/resources/zero_trust/devices/networks.py +++ b/src/cloudflare/resources/zero_trust/devices/networks.py @@ -25,11 +25,9 @@ from ...._base_client import ( make_request_options, ) from ....types.zero_trust.devices import ( - NetworkGetResponse, NetworkListResponse, - NetworkCreateResponse, NetworkDeleteResponse, - NetworkUpdateResponse, + TeamsDevicesDeviceManagedNetworks, network_create_params, network_update_params, ) @@ -59,7 +57,7 @@ class Networks(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NetworkCreateResponse]: + ) -> Optional[TeamsDevicesDeviceManagedNetworks]: """ Creates a new device managed network. @@ -96,7 +94,9 @@ class Networks(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NetworkCreateResponse]], ResultWrapper[NetworkCreateResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceManagedNetworks]], ResultWrapper[TeamsDevicesDeviceManagedNetworks] + ), ) def update( @@ -113,7 +113,7 @@ class Networks(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NetworkUpdateResponse]: + ) -> Optional[TeamsDevicesDeviceManagedNetworks]: """ Updates a configured device managed network. @@ -154,7 +154,9 @@ class Networks(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NetworkUpdateResponse]], ResultWrapper[NetworkUpdateResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceManagedNetworks]], ResultWrapper[TeamsDevicesDeviceManagedNetworks] + ), ) def list( @@ -244,7 +246,7 @@ class Networks(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NetworkGetResponse]: + ) -> Optional[TeamsDevicesDeviceManagedNetworks]: """ Fetches details for a single managed network. @@ -270,7 +272,9 @@ class Networks(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NetworkGetResponse]], ResultWrapper[NetworkGetResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceManagedNetworks]], ResultWrapper[TeamsDevicesDeviceManagedNetworks] + ), ) @@ -296,7 +300,7 @@ class AsyncNetworks(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NetworkCreateResponse]: + ) -> Optional[TeamsDevicesDeviceManagedNetworks]: """ Creates a new device managed network. @@ -333,7 +337,9 @@ class AsyncNetworks(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NetworkCreateResponse]], ResultWrapper[NetworkCreateResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceManagedNetworks]], ResultWrapper[TeamsDevicesDeviceManagedNetworks] + ), ) async def update( @@ -350,7 +356,7 @@ class AsyncNetworks(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NetworkUpdateResponse]: + ) -> Optional[TeamsDevicesDeviceManagedNetworks]: """ Updates a configured device managed network. @@ -391,7 +397,9 @@ class AsyncNetworks(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NetworkUpdateResponse]], ResultWrapper[NetworkUpdateResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceManagedNetworks]], ResultWrapper[TeamsDevicesDeviceManagedNetworks] + ), ) async def list( @@ -481,7 +489,7 @@ class AsyncNetworks(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NetworkGetResponse]: + ) -> Optional[TeamsDevicesDeviceManagedNetworks]: """ Fetches details for a single managed network. @@ -507,7 +515,9 @@ class AsyncNetworks(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NetworkGetResponse]], ResultWrapper[NetworkGetResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceManagedNetworks]], ResultWrapper[TeamsDevicesDeviceManagedNetworks] + ), ) diff --git a/src/cloudflare/resources/zero_trust/devices/policies/excludes.py b/src/cloudflare/resources/zero_trust/devices/policies/excludes.py index af34fe6a5..d02015777 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/excludes.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/excludes.py @@ -27,6 +27,7 @@ from .....types.zero_trust.devices.policies import ( ExcludeGetResponse, ExcludeListResponse, ExcludeUpdateResponse, + TeamsDevicesSplitTunnelParam, exclude_update_params, ) @@ -46,7 +47,7 @@ class Excludes(SyncAPIResource): self, *, account_id: object, - body: Iterable[exclude_update_params.Body], + body: Iterable[TeamsDevicesSplitTunnelParam], # 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, @@ -169,7 +170,7 @@ class AsyncExcludes(AsyncAPIResource): self, *, account_id: object, - body: Iterable[exclude_update_params.Body], + body: Iterable[TeamsDevicesSplitTunnelParam], # 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 c535ce691..49c0888aa 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/fallback_domains.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/fallback_domains.py @@ -27,6 +27,7 @@ from .....types.zero_trust.devices.policies import ( FallbackDomainGetResponse, FallbackDomainListResponse, FallbackDomainUpdateResponse, + TeamsDevicesFallbackDomainParam, fallback_domain_update_params, ) @@ -47,7 +48,7 @@ class FallbackDomains(SyncAPIResource): policy_id: str, *, account_id: object, - body: Iterable[fallback_domain_update_params.Body], + body: Iterable[TeamsDevicesFallbackDomainParam], # 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, @@ -181,7 +182,7 @@ class AsyncFallbackDomains(AsyncAPIResource): policy_id: str, *, account_id: object, - body: Iterable[fallback_domain_update_params.Body], + body: Iterable[TeamsDevicesFallbackDomainParam], # 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 a468ce5f0..af8dd9139 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/includes.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/includes.py @@ -27,6 +27,7 @@ from .....types.zero_trust.devices.policies import ( IncludeGetResponse, IncludeListResponse, IncludeUpdateResponse, + TeamsDevicesSplitTunnelIncludeParam, include_update_params, ) @@ -46,7 +47,7 @@ class Includes(SyncAPIResource): self, *, account_id: object, - body: Iterable[include_update_params.Body], + body: Iterable[TeamsDevicesSplitTunnelIncludeParam], # 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, @@ -169,7 +170,7 @@ class AsyncIncludes(AsyncAPIResource): self, *, account_id: object, - body: Iterable[include_update_params.Body], + body: Iterable[TeamsDevicesSplitTunnelIncludeParam], # 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 24776e510..73627c2f3 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/policies.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/policies.py @@ -56,11 +56,9 @@ from .fallback_domains import ( AsyncFallbackDomainsWithStreamingResponse, ) from .....types.zero_trust.devices import ( - PolicyGetResponse, - PolicyEditResponse, PolicyListResponse, - PolicyCreateResponse, PolicyDeleteResponse, + TeamsDevicesDeviceSettingsPolicy, policy_edit_params, policy_create_params, ) @@ -120,7 +118,7 @@ class Policies(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PolicyCreateResponse]: + ) -> Optional[TeamsDevicesDeviceSettingsPolicy]: """ Creates a device settings profile to be applied to certain devices matching the criteria. @@ -205,7 +203,9 @@ class Policies(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PolicyCreateResponse]], ResultWrapper[PolicyCreateResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceSettingsPolicy]], ResultWrapper[TeamsDevicesDeviceSettingsPolicy] + ), ) def list( @@ -310,7 +310,7 @@ class Policies(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PolicyEditResponse]: + ) -> Optional[TeamsDevicesDeviceSettingsPolicy]: """ Updates a configured device settings profile. @@ -388,7 +388,9 @@ class Policies(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PolicyEditResponse]], ResultWrapper[PolicyEditResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceSettingsPolicy]], ResultWrapper[TeamsDevicesDeviceSettingsPolicy] + ), ) def get( @@ -402,7 +404,7 @@ class Policies(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PolicyGetResponse]: + ) -> Optional[TeamsDevicesDeviceSettingsPolicy]: """ Fetches a device settings profile by ID. @@ -428,7 +430,9 @@ class Policies(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PolicyGetResponse]], ResultWrapper[PolicyGetResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceSettingsPolicy]], ResultWrapper[TeamsDevicesDeviceSettingsPolicy] + ), ) @@ -484,7 +488,7 @@ class AsyncPolicies(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PolicyCreateResponse]: + ) -> Optional[TeamsDevicesDeviceSettingsPolicy]: """ Creates a device settings profile to be applied to certain devices matching the criteria. @@ -569,7 +573,9 @@ class AsyncPolicies(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PolicyCreateResponse]], ResultWrapper[PolicyCreateResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceSettingsPolicy]], ResultWrapper[TeamsDevicesDeviceSettingsPolicy] + ), ) async def list( @@ -674,7 +680,7 @@ class AsyncPolicies(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PolicyEditResponse]: + ) -> Optional[TeamsDevicesDeviceSettingsPolicy]: """ Updates a configured device settings profile. @@ -752,7 +758,9 @@ class AsyncPolicies(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PolicyEditResponse]], ResultWrapper[PolicyEditResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceSettingsPolicy]], ResultWrapper[TeamsDevicesDeviceSettingsPolicy] + ), ) async def get( @@ -766,7 +774,7 @@ class AsyncPolicies(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PolicyGetResponse]: + ) -> Optional[TeamsDevicesDeviceSettingsPolicy]: """ Fetches a device settings profile by ID. @@ -792,7 +800,9 @@ class AsyncPolicies(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PolicyGetResponse]], ResultWrapper[PolicyGetResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDeviceSettingsPolicy]], ResultWrapper[TeamsDevicesDeviceSettingsPolicy] + ), ) diff --git a/src/cloudflare/resources/zero_trust/devices/postures/integrations.py b/src/cloudflare/resources/zero_trust/devices/postures/integrations.py index 06a7a711f..75411a555 100644 --- a/src/cloudflare/resources/zero_trust/devices/postures/integrations.py +++ b/src/cloudflare/resources/zero_trust/devices/postures/integrations.py @@ -25,11 +25,9 @@ from ....._base_client import ( make_request_options, ) from .....types.zero_trust.devices.postures import ( - IntegrationGetResponse, - IntegrationEditResponse, IntegrationListResponse, - IntegrationCreateResponse, IntegrationDeleteResponse, + TeamsDevicesDevicePostureIntegrations, integration_edit_params, integration_create_params, ) @@ -60,7 +58,7 @@ class Integrations(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IntegrationCreateResponse]: + ) -> Optional[TeamsDevicesDevicePostureIntegrations]: """ Create a new device posture integration. @@ -100,7 +98,10 @@ class Integrations(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IntegrationCreateResponse]], ResultWrapper[IntegrationCreateResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDevicePostureIntegrations]], + ResultWrapper[TeamsDevicesDevicePostureIntegrations], + ), ) def list( @@ -199,7 +200,7 @@ class Integrations(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IntegrationEditResponse]: + ) -> Optional[TeamsDevicesDevicePostureIntegrations]: """ Updates a configured device posture integration. @@ -243,7 +244,10 @@ class Integrations(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IntegrationEditResponse]], ResultWrapper[IntegrationEditResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDevicePostureIntegrations]], + ResultWrapper[TeamsDevicesDevicePostureIntegrations], + ), ) def get( @@ -257,7 +261,7 @@ class Integrations(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IntegrationGetResponse]: + ) -> Optional[TeamsDevicesDevicePostureIntegrations]: """ Fetches details for a single device posture integration. @@ -283,7 +287,10 @@ class Integrations(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IntegrationGetResponse]], ResultWrapper[IntegrationGetResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDevicePostureIntegrations]], + ResultWrapper[TeamsDevicesDevicePostureIntegrations], + ), ) @@ -310,7 +317,7 @@ class AsyncIntegrations(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IntegrationCreateResponse]: + ) -> Optional[TeamsDevicesDevicePostureIntegrations]: """ Create a new device posture integration. @@ -350,7 +357,10 @@ class AsyncIntegrations(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IntegrationCreateResponse]], ResultWrapper[IntegrationCreateResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDevicePostureIntegrations]], + ResultWrapper[TeamsDevicesDevicePostureIntegrations], + ), ) async def list( @@ -449,7 +459,7 @@ class AsyncIntegrations(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IntegrationEditResponse]: + ) -> Optional[TeamsDevicesDevicePostureIntegrations]: """ Updates a configured device posture integration. @@ -493,7 +503,10 @@ class AsyncIntegrations(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IntegrationEditResponse]], ResultWrapper[IntegrationEditResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDevicePostureIntegrations]], + ResultWrapper[TeamsDevicesDevicePostureIntegrations], + ), ) async def get( @@ -507,7 +520,7 @@ class AsyncIntegrations(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IntegrationGetResponse]: + ) -> Optional[TeamsDevicesDevicePostureIntegrations]: """ Fetches details for a single device posture integration. @@ -533,7 +546,10 @@ class AsyncIntegrations(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IntegrationGetResponse]], ResultWrapper[IntegrationGetResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesDevicePostureIntegrations]], + ResultWrapper[TeamsDevicesDevicePostureIntegrations], + ), ) diff --git a/src/cloudflare/resources/zero_trust/devices/postures/postures.py b/src/cloudflare/resources/zero_trust/devices/postures/postures.py index 8201dcb48..cf412d44a 100644 --- a/src/cloudflare/resources/zero_trust/devices/postures/postures.py +++ b/src/cloudflare/resources/zero_trust/devices/postures/postures.py @@ -33,11 +33,9 @@ from ....._base_client import ( make_request_options, ) from .....types.zero_trust.devices import ( - PostureGetResponse, PostureListResponse, - PostureCreateResponse, PostureDeleteResponse, - PostureUpdateResponse, + TeamsDevicesDevicePostureRules, posture_create_params, posture_update_params, ) @@ -95,7 +93,7 @@ class Postures(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PostureCreateResponse]: + ) -> Optional[TeamsDevicesDevicePostureRules]: """ Creates a new device posture rule. @@ -145,7 +143,7 @@ class Postures(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PostureCreateResponse]], ResultWrapper[PostureCreateResponse]), + cast_to=cast(Type[Optional[TeamsDevicesDevicePostureRules]], ResultWrapper[TeamsDevicesDevicePostureRules]), ) def update( @@ -186,7 +184,7 @@ class Postures(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PostureUpdateResponse]: + ) -> Optional[TeamsDevicesDevicePostureRules]: """ Updates a device posture rule. @@ -240,7 +238,7 @@ class Postures(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PostureUpdateResponse]], ResultWrapper[PostureUpdateResponse]), + cast_to=cast(Type[Optional[TeamsDevicesDevicePostureRules]], ResultWrapper[TeamsDevicesDevicePostureRules]), ) def list( @@ -329,7 +327,7 @@ class Postures(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PostureGetResponse]: + ) -> Optional[TeamsDevicesDevicePostureRules]: """ Fetches a single device posture rule. @@ -355,7 +353,7 @@ class Postures(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PostureGetResponse]], ResultWrapper[PostureGetResponse]), + cast_to=cast(Type[Optional[TeamsDevicesDevicePostureRules]], ResultWrapper[TeamsDevicesDevicePostureRules]), ) @@ -409,7 +407,7 @@ class AsyncPostures(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PostureCreateResponse]: + ) -> Optional[TeamsDevicesDevicePostureRules]: """ Creates a new device posture rule. @@ -459,7 +457,7 @@ class AsyncPostures(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PostureCreateResponse]], ResultWrapper[PostureCreateResponse]), + cast_to=cast(Type[Optional[TeamsDevicesDevicePostureRules]], ResultWrapper[TeamsDevicesDevicePostureRules]), ) async def update( @@ -500,7 +498,7 @@ class AsyncPostures(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PostureUpdateResponse]: + ) -> Optional[TeamsDevicesDevicePostureRules]: """ Updates a device posture rule. @@ -554,7 +552,7 @@ class AsyncPostures(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PostureUpdateResponse]], ResultWrapper[PostureUpdateResponse]), + cast_to=cast(Type[Optional[TeamsDevicesDevicePostureRules]], ResultWrapper[TeamsDevicesDevicePostureRules]), ) async def list( @@ -643,7 +641,7 @@ class AsyncPostures(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PostureGetResponse]: + ) -> Optional[TeamsDevicesDevicePostureRules]: """ Fetches a single device posture rule. @@ -669,7 +667,7 @@ class AsyncPostures(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PostureGetResponse]], ResultWrapper[PostureGetResponse]), + cast_to=cast(Type[Optional[TeamsDevicesDevicePostureRules]], ResultWrapper[TeamsDevicesDevicePostureRules]), ) diff --git a/src/cloudflare/resources/zero_trust/devices/settings.py b/src/cloudflare/resources/zero_trust/devices/settings.py index 09c6e1f87..03efb2b8b 100644 --- a/src/cloudflare/resources/zero_trust/devices/settings.py +++ b/src/cloudflare/resources/zero_trust/devices/settings.py @@ -23,7 +23,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zero_trust.devices import SettingListResponse, SettingUpdateResponse, setting_update_params +from ....types.zero_trust.devices import TeamsDevicesZeroTrustAccountDeviceSettings, setting_update_params __all__ = ["Settings", "AsyncSettings"] @@ -51,7 +51,7 @@ class Settings(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SettingUpdateResponse]: + ) -> Optional[TeamsDevicesZeroTrustAccountDeviceSettings]: """ Updates the current device settings for a Zero Trust account. @@ -90,7 +90,10 @@ class Settings(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SettingUpdateResponse]], ResultWrapper[SettingUpdateResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesZeroTrustAccountDeviceSettings]], + ResultWrapper[TeamsDevicesZeroTrustAccountDeviceSettings], + ), ) def list( @@ -103,7 +106,7 @@ class Settings(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SettingListResponse]: + ) -> Optional[TeamsDevicesZeroTrustAccountDeviceSettings]: """ Describes the current device settings for a Zero Trust account. @@ -125,7 +128,10 @@ class Settings(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SettingListResponse]], ResultWrapper[SettingListResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesZeroTrustAccountDeviceSettings]], + ResultWrapper[TeamsDevicesZeroTrustAccountDeviceSettings], + ), ) @@ -152,7 +158,7 @@ class AsyncSettings(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SettingUpdateResponse]: + ) -> Optional[TeamsDevicesZeroTrustAccountDeviceSettings]: """ Updates the current device settings for a Zero Trust account. @@ -191,7 +197,10 @@ class AsyncSettings(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SettingUpdateResponse]], ResultWrapper[SettingUpdateResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesZeroTrustAccountDeviceSettings]], + ResultWrapper[TeamsDevicesZeroTrustAccountDeviceSettings], + ), ) async def list( @@ -204,7 +213,7 @@ class AsyncSettings(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SettingListResponse]: + ) -> Optional[TeamsDevicesZeroTrustAccountDeviceSettings]: """ Describes the current device settings for a Zero Trust account. @@ -226,7 +235,10 @@ class AsyncSettings(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SettingListResponse]], ResultWrapper[SettingListResponse]), + cast_to=cast( + Type[Optional[TeamsDevicesZeroTrustAccountDeviceSettings]], + ResultWrapper[TeamsDevicesZeroTrustAccountDeviceSettings], + ), ) diff --git a/src/cloudflare/resources/zero_trust/dex/fleet_status/devices.py b/src/cloudflare/resources/zero_trust/dex/fleet_status/devices.py index c18942fa0..69b9fef43 100644 --- a/src/cloudflare/resources/zero_trust/dex/fleet_status/devices.py +++ b/src/cloudflare/resources/zero_trust/dex/fleet_status/devices.py @@ -21,7 +21,7 @@ from ....._base_client import ( AsyncPaginator, make_request_options, ) -from .....types.zero_trust.dex.fleet_status import DeviceListResponse, device_list_params +from .....types.zero_trust.dex.fleet_status import DigitalExperienceMonitoringDevice, device_list_params __all__ = ["Devices", "AsyncDevices"] @@ -57,7 +57,7 @@ class Devices(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[DeviceListResponse]: + ) -> SyncV4PagePaginationArray[DigitalExperienceMonitoringDevice]: """ List details for devices using WARP @@ -96,7 +96,7 @@ class Devices(SyncAPIResource): 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}/dex/fleet-status/devices", - page=SyncV4PagePaginationArray[DeviceListResponse], + page=SyncV4PagePaginationArray[DigitalExperienceMonitoringDevice], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -119,7 +119,7 @@ class Devices(SyncAPIResource): device_list_params.DeviceListParams, ), ), - model=DeviceListResponse, + model=DigitalExperienceMonitoringDevice, ) @@ -154,7 +154,9 @@ class AsyncDevices(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[DeviceListResponse, AsyncV4PagePaginationArray[DeviceListResponse]]: + ) -> AsyncPaginator[ + DigitalExperienceMonitoringDevice, AsyncV4PagePaginationArray[DigitalExperienceMonitoringDevice] + ]: """ List details for devices using WARP @@ -193,7 +195,7 @@ class AsyncDevices(AsyncAPIResource): 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}/dex/fleet-status/devices", - page=AsyncV4PagePaginationArray[DeviceListResponse], + page=AsyncV4PagePaginationArray[DigitalExperienceMonitoringDevice], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -216,7 +218,7 @@ class AsyncDevices(AsyncAPIResource): device_list_params.DeviceListParams, ), ), - model=DeviceListResponse, + model=DigitalExperienceMonitoringDevice, ) diff --git a/src/cloudflare/resources/zero_trust/dex/http_tests/http_tests.py b/src/cloudflare/resources/zero_trust/dex/http_tests/http_tests.py index 682f8896c..9dd209721 100644 --- a/src/cloudflare/resources/zero_trust/dex/http_tests/http_tests.py +++ b/src/cloudflare/resources/zero_trust/dex/http_tests/http_tests.py @@ -32,7 +32,7 @@ from ....._wrappers import ResultWrapper from ....._base_client import ( make_request_options, ) -from .....types.zero_trust.dex import HTTPTestGetResponse, http_test_get_params +from .....types.zero_trust.dex import DigitalExperienceMonitoringHTTPDetails, http_test_get_params __all__ = ["HTTPTests", "AsyncHTTPTests"] @@ -66,7 +66,7 @@ class HTTPTests(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HTTPTestGetResponse: + ) -> DigitalExperienceMonitoringHTTPDetails: """ Get test details and aggregate performance metrics for an http test for a given time period between 1 hour and 7 days. @@ -117,7 +117,9 @@ class HTTPTests(SyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HTTPTestGetResponse], ResultWrapper[HTTPTestGetResponse]), + cast_to=cast( + Type[DigitalExperienceMonitoringHTTPDetails], ResultWrapper[DigitalExperienceMonitoringHTTPDetails] + ), ) @@ -150,7 +152,7 @@ class AsyncHTTPTests(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HTTPTestGetResponse: + ) -> DigitalExperienceMonitoringHTTPDetails: """ Get test details and aggregate performance metrics for an http test for a given time period between 1 hour and 7 days. @@ -201,7 +203,9 @@ class AsyncHTTPTests(AsyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HTTPTestGetResponse], ResultWrapper[HTTPTestGetResponse]), + cast_to=cast( + Type[DigitalExperienceMonitoringHTTPDetails], ResultWrapper[DigitalExperienceMonitoringHTTPDetails] + ), ) diff --git a/src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py b/src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py index 7f0221dec..2c4482f89 100644 --- a/src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py +++ b/src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py @@ -23,7 +23,10 @@ from ....._wrappers import ResultWrapper from ....._base_client import ( make_request_options, ) -from .....types.zero_trust.dex.http_tests import PercentileListResponse, percentile_list_params +from .....types.zero_trust.dex.http_tests import ( + DigitalExperienceMonitoringHTTPDetailsPercentiles, + percentile_list_params, +) __all__ = ["Percentiles", "AsyncPercentiles"] @@ -52,7 +55,7 @@ class Percentiles(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PercentileListResponse: + ) -> DigitalExperienceMonitoringHTTPDetailsPercentiles: """ Get percentiles for an http test for a given time period between 1 hour and 7 days. @@ -100,7 +103,10 @@ class Percentiles(SyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PercentileListResponse], ResultWrapper[PercentileListResponse]), + cast_to=cast( + Type[DigitalExperienceMonitoringHTTPDetailsPercentiles], + ResultWrapper[DigitalExperienceMonitoringHTTPDetailsPercentiles], + ), ) @@ -128,7 +134,7 @@ class AsyncPercentiles(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PercentileListResponse: + ) -> DigitalExperienceMonitoringHTTPDetailsPercentiles: """ Get percentiles for an http test for a given time period between 1 hour and 7 days. @@ -176,7 +182,10 @@ class AsyncPercentiles(AsyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PercentileListResponse], ResultWrapper[PercentileListResponse]), + cast_to=cast( + Type[DigitalExperienceMonitoringHTTPDetailsPercentiles], + ResultWrapper[DigitalExperienceMonitoringHTTPDetailsPercentiles], + ), ) diff --git a/src/cloudflare/resources/zero_trust/dex/tests/unique_devices.py b/src/cloudflare/resources/zero_trust/dex/tests/unique_devices.py index 04a2f7746..d94007ebe 100644 --- a/src/cloudflare/resources/zero_trust/dex/tests/unique_devices.py +++ b/src/cloudflare/resources/zero_trust/dex/tests/unique_devices.py @@ -23,7 +23,7 @@ from ....._wrappers import ResultWrapper from ....._base_client import ( make_request_options, ) -from .....types.zero_trust.dex.tests import UniqueDeviceListResponse, unique_device_list_params +from .....types.zero_trust.dex.tests import DigitalExperienceMonitoringUniqueDevices, unique_device_list_params __all__ = ["UniqueDevices", "AsyncUniqueDevices"] @@ -49,7 +49,7 @@ class UniqueDevices(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> UniqueDeviceListResponse: + ) -> DigitalExperienceMonitoringUniqueDevices: """ Returns unique count of devices that have run synthetic application monitoring tests in the past 7 days. @@ -86,7 +86,9 @@ class UniqueDevices(SyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[UniqueDeviceListResponse], ResultWrapper[UniqueDeviceListResponse]), + cast_to=cast( + Type[DigitalExperienceMonitoringUniqueDevices], ResultWrapper[DigitalExperienceMonitoringUniqueDevices] + ), ) @@ -111,7 +113,7 @@ class AsyncUniqueDevices(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> UniqueDeviceListResponse: + ) -> DigitalExperienceMonitoringUniqueDevices: """ Returns unique count of devices that have run synthetic application monitoring tests in the past 7 days. @@ -148,7 +150,9 @@ class AsyncUniqueDevices(AsyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[UniqueDeviceListResponse], ResultWrapper[UniqueDeviceListResponse]), + cast_to=cast( + Type[DigitalExperienceMonitoringUniqueDevices], ResultWrapper[DigitalExperienceMonitoringUniqueDevices] + ), ) diff --git a/src/cloudflare/resources/zero_trust/dex/traceroute_test_results/network_path.py b/src/cloudflare/resources/zero_trust/dex/traceroute_test_results/network_path.py index 5de43ccc3..beebf6ca2 100644 --- a/src/cloudflare/resources/zero_trust/dex/traceroute_test_results/network_path.py +++ b/src/cloudflare/resources/zero_trust/dex/traceroute_test_results/network_path.py @@ -19,7 +19,7 @@ from ....._wrappers import ResultWrapper from ....._base_client import ( make_request_options, ) -from .....types.zero_trust.dex.traceroute_test_results import NetworkPathListResponse +from .....types.zero_trust.dex.traceroute_test_results import DigitalExperienceMonitoringTracerouteTestResultNetworkPath __all__ = ["NetworkPath", "AsyncNetworkPath"] @@ -44,7 +44,7 @@ class NetworkPath(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> NetworkPathListResponse: + ) -> DigitalExperienceMonitoringTracerouteTestResultNetworkPath: """ Get a breakdown of hops and performance metrics for a specific traceroute test run @@ -73,7 +73,10 @@ class NetworkPath(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[NetworkPathListResponse], ResultWrapper[NetworkPathListResponse]), + cast_to=cast( + Type[DigitalExperienceMonitoringTracerouteTestResultNetworkPath], + ResultWrapper[DigitalExperienceMonitoringTracerouteTestResultNetworkPath], + ), ) @@ -97,7 +100,7 @@ class AsyncNetworkPath(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> NetworkPathListResponse: + ) -> DigitalExperienceMonitoringTracerouteTestResultNetworkPath: """ Get a breakdown of hops and performance metrics for a specific traceroute test run @@ -126,7 +129,10 @@ class AsyncNetworkPath(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[NetworkPathListResponse], ResultWrapper[NetworkPathListResponse]), + cast_to=cast( + Type[DigitalExperienceMonitoringTracerouteTestResultNetworkPath], + ResultWrapper[DigitalExperienceMonitoringTracerouteTestResultNetworkPath], + ), ) diff --git a/src/cloudflare/resources/zero_trust/dex/traceroute_tests.py b/src/cloudflare/resources/zero_trust/dex/traceroute_tests.py index a72836f1c..9639775aa 100644 --- a/src/cloudflare/resources/zero_trust/dex/traceroute_tests.py +++ b/src/cloudflare/resources/zero_trust/dex/traceroute_tests.py @@ -25,9 +25,9 @@ from ...._base_client import ( make_request_options, ) from ....types.zero_trust.dex import ( - TracerouteTestGetResponse, - TracerouteTestNetworkPathResponse, - TracerouteTestPercentilesResponse, + DigitalExperienceMonitoringTracerouteDetails, + DigitalExperienceMonitoringTracerouteTestNetworkPath, + DigitalExperienceMonitoringTracerouteDetailsPercentiles, traceroute_test_get_params, traceroute_test_percentiles_params, traceroute_test_network_path_params, @@ -61,7 +61,7 @@ class TracerouteTests(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TracerouteTestGetResponse: + ) -> DigitalExperienceMonitoringTracerouteDetails: """ Get test details and aggregate performance metrics for an traceroute test for a given time period between 1 hour and 7 days. @@ -112,7 +112,10 @@ class TracerouteTests(SyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TracerouteTestGetResponse], ResultWrapper[TracerouteTestGetResponse]), + cast_to=cast( + Type[DigitalExperienceMonitoringTracerouteDetails], + ResultWrapper[DigitalExperienceMonitoringTracerouteDetails], + ), ) def network_path( @@ -130,7 +133,7 @@ class TracerouteTests(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TracerouteTestNetworkPathResponse: + ) -> DigitalExperienceMonitoringTracerouteTestNetworkPath: """ Get a breakdown of metrics by hop for individual traceroute test runs @@ -175,7 +178,10 @@ class TracerouteTests(SyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TracerouteTestNetworkPathResponse], ResultWrapper[TracerouteTestNetworkPathResponse]), + cast_to=cast( + Type[DigitalExperienceMonitoringTracerouteTestNetworkPath], + ResultWrapper[DigitalExperienceMonitoringTracerouteTestNetworkPath], + ), ) def percentiles( @@ -193,7 +199,7 @@ class TracerouteTests(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TracerouteTestPercentilesResponse: + ) -> DigitalExperienceMonitoringTracerouteDetailsPercentiles: """ Get percentiles for a traceroute test for a given time period between 1 hour and 7 days. @@ -241,7 +247,10 @@ class TracerouteTests(SyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TracerouteTestPercentilesResponse], ResultWrapper[TracerouteTestPercentilesResponse]), + cast_to=cast( + Type[DigitalExperienceMonitoringTracerouteDetailsPercentiles], + ResultWrapper[DigitalExperienceMonitoringTracerouteDetailsPercentiles], + ), ) @@ -270,7 +279,7 @@ class AsyncTracerouteTests(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TracerouteTestGetResponse: + ) -> DigitalExperienceMonitoringTracerouteDetails: """ Get test details and aggregate performance metrics for an traceroute test for a given time period between 1 hour and 7 days. @@ -321,7 +330,10 @@ class AsyncTracerouteTests(AsyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TracerouteTestGetResponse], ResultWrapper[TracerouteTestGetResponse]), + cast_to=cast( + Type[DigitalExperienceMonitoringTracerouteDetails], + ResultWrapper[DigitalExperienceMonitoringTracerouteDetails], + ), ) async def network_path( @@ -339,7 +351,7 @@ class AsyncTracerouteTests(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TracerouteTestNetworkPathResponse: + ) -> DigitalExperienceMonitoringTracerouteTestNetworkPath: """ Get a breakdown of metrics by hop for individual traceroute test runs @@ -384,7 +396,10 @@ class AsyncTracerouteTests(AsyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TracerouteTestNetworkPathResponse], ResultWrapper[TracerouteTestNetworkPathResponse]), + cast_to=cast( + Type[DigitalExperienceMonitoringTracerouteTestNetworkPath], + ResultWrapper[DigitalExperienceMonitoringTracerouteTestNetworkPath], + ), ) async def percentiles( @@ -402,7 +417,7 @@ class AsyncTracerouteTests(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TracerouteTestPercentilesResponse: + ) -> DigitalExperienceMonitoringTracerouteDetailsPercentiles: """ Get percentiles for a traceroute test for a given time period between 1 hour and 7 days. @@ -450,7 +465,10 @@ class AsyncTracerouteTests(AsyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TracerouteTestPercentilesResponse], ResultWrapper[TracerouteTestPercentilesResponse]), + cast_to=cast( + Type[DigitalExperienceMonitoringTracerouteDetailsPercentiles], + ResultWrapper[DigitalExperienceMonitoringTracerouteDetailsPercentiles], + ), ) diff --git a/src/cloudflare/resources/zero_trust/dlp/datasets/datasets.py b/src/cloudflare/resources/zero_trust/dlp/datasets/datasets.py index 596fb9e97..e6d15b029 100644 --- a/src/cloudflare/resources/zero_trust/dlp/datasets/datasets.py +++ b/src/cloudflare/resources/zero_trust/dlp/datasets/datasets.py @@ -32,10 +32,9 @@ from ....._base_client import ( make_request_options, ) from .....types.zero_trust.dlp import ( - DatasetGetResponse, - DatasetListResponse, - DatasetCreateResponse, - DatasetUpdateResponse, + DLPDataset, + DLPDatasetArray, + DLPDatasetCreation, dataset_create_params, dataset_update_params, ) @@ -69,7 +68,7 @@ class Datasets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DatasetCreateResponse]: + ) -> Optional[DLPDatasetCreation]: """ Create a new dataset. @@ -106,7 +105,7 @@ class Datasets(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DatasetCreateResponse]], ResultWrapper[DatasetCreateResponse]), + cast_to=cast(Type[Optional[DLPDatasetCreation]], ResultWrapper[DLPDatasetCreation]), ) def update( @@ -122,7 +121,7 @@ class Datasets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DatasetUpdateResponse]: + ) -> Optional[DLPDataset]: """ Update details about a dataset. @@ -155,7 +154,7 @@ class Datasets(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DatasetUpdateResponse]], ResultWrapper[DatasetUpdateResponse]), + cast_to=cast(Type[Optional[DLPDataset]], ResultWrapper[DLPDataset]), ) def list( @@ -168,7 +167,7 @@ class Datasets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DatasetListResponse]: + ) -> Optional[DLPDatasetArray]: """ Fetch all datasets with information about available versions. @@ -192,7 +191,7 @@ class Datasets(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DatasetListResponse]], ResultWrapper[DatasetListResponse]), + cast_to=cast(Type[Optional[DLPDatasetArray]], ResultWrapper[DLPDatasetArray]), ) def delete( @@ -245,7 +244,7 @@ class Datasets(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DatasetGetResponse]: + ) -> Optional[DLPDataset]: """ Fetch a specific dataset with information about available versions. @@ -271,7 +270,7 @@ class Datasets(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DatasetGetResponse]], ResultWrapper[DatasetGetResponse]), + cast_to=cast(Type[Optional[DLPDataset]], ResultWrapper[DLPDataset]), ) @@ -301,7 +300,7 @@ class AsyncDatasets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DatasetCreateResponse]: + ) -> Optional[DLPDatasetCreation]: """ Create a new dataset. @@ -338,7 +337,7 @@ class AsyncDatasets(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DatasetCreateResponse]], ResultWrapper[DatasetCreateResponse]), + cast_to=cast(Type[Optional[DLPDatasetCreation]], ResultWrapper[DLPDatasetCreation]), ) async def update( @@ -354,7 +353,7 @@ class AsyncDatasets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DatasetUpdateResponse]: + ) -> Optional[DLPDataset]: """ Update details about a dataset. @@ -387,7 +386,7 @@ class AsyncDatasets(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DatasetUpdateResponse]], ResultWrapper[DatasetUpdateResponse]), + cast_to=cast(Type[Optional[DLPDataset]], ResultWrapper[DLPDataset]), ) async def list( @@ -400,7 +399,7 @@ class AsyncDatasets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DatasetListResponse]: + ) -> Optional[DLPDatasetArray]: """ Fetch all datasets with information about available versions. @@ -424,7 +423,7 @@ class AsyncDatasets(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DatasetListResponse]], ResultWrapper[DatasetListResponse]), + cast_to=cast(Type[Optional[DLPDatasetArray]], ResultWrapper[DLPDatasetArray]), ) async def delete( @@ -477,7 +476,7 @@ class AsyncDatasets(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DatasetGetResponse]: + ) -> Optional[DLPDataset]: """ Fetch a specific dataset with information about available versions. @@ -503,7 +502,7 @@ class AsyncDatasets(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DatasetGetResponse]], ResultWrapper[DatasetGetResponse]), + cast_to=cast(Type[Optional[DLPDataset]], ResultWrapper[DLPDataset]), ) diff --git a/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py b/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py index 5e6e78e85..b13a99329 100644 --- a/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py +++ b/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py @@ -19,7 +19,8 @@ from ....._wrappers import ResultWrapper from ....._base_client import ( make_request_options, ) -from .....types.zero_trust.dlp.datasets import UploadEditResponse, UploadCreateResponse +from .....types.zero_trust.dlp import DLPDataset +from .....types.zero_trust.dlp.datasets import DLPDatasetNewVersion __all__ = ["Upload", "AsyncUpload"] @@ -44,7 +45,7 @@ class Upload(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[UploadCreateResponse]: + ) -> Optional[DLPDatasetNewVersion]: """ Prepare to upload a new version of a dataset. @@ -70,7 +71,7 @@ class Upload(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[UploadCreateResponse]], ResultWrapper[UploadCreateResponse]), + cast_to=cast(Type[Optional[DLPDatasetNewVersion]], ResultWrapper[DLPDatasetNewVersion]), ) def edit( @@ -85,7 +86,7 @@ class Upload(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[UploadEditResponse]: + ) -> Optional[DLPDataset]: """ Upload a new version of a dataset. @@ -111,7 +112,7 @@ class Upload(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[UploadEditResponse]], ResultWrapper[UploadEditResponse]), + cast_to=cast(Type[Optional[DLPDataset]], ResultWrapper[DLPDataset]), ) @@ -135,7 +136,7 @@ class AsyncUpload(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[UploadCreateResponse]: + ) -> Optional[DLPDatasetNewVersion]: """ Prepare to upload a new version of a dataset. @@ -161,7 +162,7 @@ class AsyncUpload(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[UploadCreateResponse]], ResultWrapper[UploadCreateResponse]), + cast_to=cast(Type[Optional[DLPDatasetNewVersion]], ResultWrapper[DLPDatasetNewVersion]), ) async def edit( @@ -176,7 +177,7 @@ class AsyncUpload(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[UploadEditResponse]: + ) -> Optional[DLPDataset]: """ Upload a new version of a dataset. @@ -202,7 +203,7 @@ class AsyncUpload(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[UploadEditResponse]], ResultWrapper[UploadEditResponse]), + cast_to=cast(Type[Optional[DLPDataset]], ResultWrapper[DLPDataset]), ) diff --git a/src/cloudflare/resources/zero_trust/dlp/profiles/customs.py b/src/cloudflare/resources/zero_trust/dlp/profiles/customs.py index 869eac02f..8255b5aa8 100644 --- a/src/cloudflare/resources/zero_trust/dlp/profiles/customs.py +++ b/src/cloudflare/resources/zero_trust/dlp/profiles/customs.py @@ -24,10 +24,9 @@ from ....._base_client import ( make_request_options, ) from .....types.zero_trust.dlp.profiles import ( - CustomGetResponse, + DLPCustomProfile, CustomCreateResponse, CustomDeleteResponse, - CustomUpdateResponse, custom_create_params, custom_update_params, ) @@ -102,7 +101,7 @@ class Customs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomUpdateResponse: + ) -> DLPCustomProfile: """ Updates a DLP custom profile. @@ -155,7 +154,7 @@ class Customs(SyncAPIResource): options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=CustomUpdateResponse, + cast_to=DLPCustomProfile, ) def delete( @@ -218,7 +217,7 @@ class Customs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomGetResponse: + ) -> DLPCustomProfile: """ Fetches a custom DLP profile. @@ -248,7 +247,7 @@ class Customs(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CustomGetResponse], ResultWrapper[CustomGetResponse]), + cast_to=cast(Type[DLPCustomProfile], ResultWrapper[DLPCustomProfile]), ) @@ -319,7 +318,7 @@ class AsyncCustoms(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomUpdateResponse: + ) -> DLPCustomProfile: """ Updates a DLP custom profile. @@ -372,7 +371,7 @@ class AsyncCustoms(AsyncAPIResource): options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=CustomUpdateResponse, + cast_to=DLPCustomProfile, ) async def delete( @@ -435,7 +434,7 @@ class AsyncCustoms(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CustomGetResponse: + ) -> DLPCustomProfile: """ Fetches a custom DLP profile. @@ -465,7 +464,7 @@ class AsyncCustoms(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[CustomGetResponse], ResultWrapper[CustomGetResponse]), + cast_to=cast(Type[DLPCustomProfile], ResultWrapper[DLPCustomProfile]), ) diff --git a/src/cloudflare/resources/zero_trust/dlp/profiles/predefineds.py b/src/cloudflare/resources/zero_trust/dlp/profiles/predefineds.py index ed5994c8d..7dc973574 100644 --- a/src/cloudflare/resources/zero_trust/dlp/profiles/predefineds.py +++ b/src/cloudflare/resources/zero_trust/dlp/profiles/predefineds.py @@ -23,7 +23,7 @@ from ....._wrappers import ResultWrapper from ....._base_client import ( make_request_options, ) -from .....types.zero_trust.dlp.profiles import PredefinedGetResponse, PredefinedUpdateResponse, predefined_update_params +from .....types.zero_trust.dlp.profiles import DLPPredefinedProfile, predefined_update_params __all__ = ["Predefineds", "AsyncPredefineds"] @@ -51,7 +51,7 @@ class Predefineds(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PredefinedUpdateResponse: + ) -> DLPPredefinedProfile: """Updates a DLP predefined profile. Only supports enabling/disabling entries. @@ -93,7 +93,7 @@ class Predefineds(SyncAPIResource): options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=PredefinedUpdateResponse, + cast_to=DLPPredefinedProfile, ) def get( @@ -107,7 +107,7 @@ class Predefineds(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PredefinedGetResponse: + ) -> DLPPredefinedProfile: """ Fetches a predefined DLP profile. @@ -137,7 +137,7 @@ class Predefineds(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PredefinedGetResponse], ResultWrapper[PredefinedGetResponse]), + cast_to=cast(Type[DLPPredefinedProfile], ResultWrapper[DLPPredefinedProfile]), ) @@ -164,7 +164,7 @@ class AsyncPredefineds(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PredefinedUpdateResponse: + ) -> DLPPredefinedProfile: """Updates a DLP predefined profile. Only supports enabling/disabling entries. @@ -206,7 +206,7 @@ class AsyncPredefineds(AsyncAPIResource): options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=PredefinedUpdateResponse, + cast_to=DLPPredefinedProfile, ) async def get( @@ -220,7 +220,7 @@ class AsyncPredefineds(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PredefinedGetResponse: + ) -> DLPPredefinedProfile: """ Fetches a predefined DLP profile. @@ -250,7 +250,7 @@ class AsyncPredefineds(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PredefinedGetResponse], ResultWrapper[PredefinedGetResponse]), + cast_to=cast(Type[DLPPredefinedProfile], ResultWrapper[DLPPredefinedProfile]), ) diff --git a/src/cloudflare/resources/zero_trust/gateway/audit_ssh_settings.py b/src/cloudflare/resources/zero_trust/gateway/audit_ssh_settings.py index 8bbe2f7ad..7f553b250 100644 --- a/src/cloudflare/resources/zero_trust/gateway/audit_ssh_settings.py +++ b/src/cloudflare/resources/zero_trust/gateway/audit_ssh_settings.py @@ -23,11 +23,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zero_trust.gateway import ( - AuditSSHSettingGetResponse, - AuditSSHSettingUpdateResponse, - audit_ssh_setting_update_params, -) +from ....types.zero_trust.gateway import ZeroTrustGatewaySettings, audit_ssh_setting_update_params __all__ = ["AuditSSHSettings", "AsyncAuditSSHSettings"] @@ -53,7 +49,7 @@ class AuditSSHSettings(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AuditSSHSettingUpdateResponse: + ) -> ZeroTrustGatewaySettings: """ Updates Zero Trust Audit SSH settings. @@ -86,7 +82,7 @@ class AuditSSHSettings(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AuditSSHSettingUpdateResponse], ResultWrapper[AuditSSHSettingUpdateResponse]), + cast_to=cast(Type[ZeroTrustGatewaySettings], ResultWrapper[ZeroTrustGatewaySettings]), ) def get( @@ -99,7 +95,7 @@ class AuditSSHSettings(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AuditSSHSettingGetResponse: + ) -> ZeroTrustGatewaySettings: """ Get all Zero Trust Audit SSH settings for an account. @@ -121,7 +117,7 @@ class AuditSSHSettings(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AuditSSHSettingGetResponse], ResultWrapper[AuditSSHSettingGetResponse]), + cast_to=cast(Type[ZeroTrustGatewaySettings], ResultWrapper[ZeroTrustGatewaySettings]), ) @@ -146,7 +142,7 @@ class AsyncAuditSSHSettings(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AuditSSHSettingUpdateResponse: + ) -> ZeroTrustGatewaySettings: """ Updates Zero Trust Audit SSH settings. @@ -179,7 +175,7 @@ class AsyncAuditSSHSettings(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AuditSSHSettingUpdateResponse], ResultWrapper[AuditSSHSettingUpdateResponse]), + cast_to=cast(Type[ZeroTrustGatewaySettings], ResultWrapper[ZeroTrustGatewaySettings]), ) async def get( @@ -192,7 +188,7 @@ class AsyncAuditSSHSettings(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AuditSSHSettingGetResponse: + ) -> ZeroTrustGatewaySettings: """ Get all Zero Trust Audit SSH settings for an account. @@ -214,7 +210,7 @@ class AsyncAuditSSHSettings(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AuditSSHSettingGetResponse], ResultWrapper[AuditSSHSettingGetResponse]), + cast_to=cast(Type[ZeroTrustGatewaySettings], ResultWrapper[ZeroTrustGatewaySettings]), ) diff --git a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py index 4091af266..63b7e2cbb 100644 --- a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py +++ b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py @@ -33,12 +33,10 @@ from ....._base_client import ( make_request_options, ) from .....types.zero_trust.gateway import ( - ListGetResponse, - ListEditResponse, ListListResponse, ListCreateResponse, ListDeleteResponse, - ListUpdateResponse, + ZeroTrustGatewayLists, list_edit_params, list_create_params, list_update_params, @@ -129,7 +127,7 @@ class Lists(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ListUpdateResponse: + ) -> ZeroTrustGatewayLists: """ Updates a configured Zero Trust list. @@ -166,7 +164,7 @@ class Lists(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ListUpdateResponse], ResultWrapper[ListUpdateResponse]), + cast_to=cast(Type[ZeroTrustGatewayLists], ResultWrapper[ZeroTrustGatewayLists]), ) def list( @@ -262,7 +260,7 @@ class Lists(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ListEditResponse: + ) -> ZeroTrustGatewayLists: """ Appends or removes an item from a configured Zero Trust list. @@ -299,7 +297,7 @@ class Lists(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ListEditResponse], ResultWrapper[ListEditResponse]), + cast_to=cast(Type[ZeroTrustGatewayLists], ResultWrapper[ZeroTrustGatewayLists]), ) def get( @@ -313,7 +311,7 @@ class Lists(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ListGetResponse: + ) -> ZeroTrustGatewayLists: """ Fetches a single Zero Trust list. @@ -339,7 +337,7 @@ class Lists(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ListGetResponse], ResultWrapper[ListGetResponse]), + cast_to=cast(Type[ZeroTrustGatewayLists], ResultWrapper[ZeroTrustGatewayLists]), ) @@ -425,7 +423,7 @@ class AsyncLists(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ListUpdateResponse: + ) -> ZeroTrustGatewayLists: """ Updates a configured Zero Trust list. @@ -462,7 +460,7 @@ class AsyncLists(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ListUpdateResponse], ResultWrapper[ListUpdateResponse]), + cast_to=cast(Type[ZeroTrustGatewayLists], ResultWrapper[ZeroTrustGatewayLists]), ) async def list( @@ -558,7 +556,7 @@ class AsyncLists(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ListEditResponse: + ) -> ZeroTrustGatewayLists: """ Appends or removes an item from a configured Zero Trust list. @@ -595,7 +593,7 @@ class AsyncLists(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ListEditResponse], ResultWrapper[ListEditResponse]), + cast_to=cast(Type[ZeroTrustGatewayLists], ResultWrapper[ZeroTrustGatewayLists]), ) async def get( @@ -609,7 +607,7 @@ class AsyncLists(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ListGetResponse: + ) -> ZeroTrustGatewayLists: """ Fetches a single Zero Trust list. @@ -635,7 +633,7 @@ class AsyncLists(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ListGetResponse], ResultWrapper[ListGetResponse]), + cast_to=cast(Type[ZeroTrustGatewayLists], ResultWrapper[ZeroTrustGatewayLists]), ) diff --git a/src/cloudflare/resources/zero_trust/gateway/locations.py b/src/cloudflare/resources/zero_trust/gateway/locations.py index c774b9a60..47c67073f 100644 --- a/src/cloudflare/resources/zero_trust/gateway/locations.py +++ b/src/cloudflare/resources/zero_trust/gateway/locations.py @@ -24,11 +24,9 @@ from ...._base_client import ( make_request_options, ) from ....types.zero_trust.gateway import ( - LocationGetResponse, LocationListResponse, - LocationCreateResponse, LocationDeleteResponse, - LocationUpdateResponse, + ZeroTrustGatewayLocations, location_create_params, location_update_params, ) @@ -59,7 +57,7 @@ class Locations(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LocationCreateResponse: + ) -> ZeroTrustGatewayLocations: """ Creates a new Zero Trust Gateway location. @@ -98,7 +96,7 @@ class Locations(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LocationCreateResponse], ResultWrapper[LocationCreateResponse]), + cast_to=cast(Type[ZeroTrustGatewayLocations], ResultWrapper[ZeroTrustGatewayLocations]), ) def update( @@ -116,7 +114,7 @@ class Locations(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LocationUpdateResponse: + ) -> ZeroTrustGatewayLocations: """ Updates a configured Zero Trust Gateway location. @@ -155,7 +153,7 @@ class Locations(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LocationUpdateResponse], ResultWrapper[LocationUpdateResponse]), + cast_to=cast(Type[ZeroTrustGatewayLocations], ResultWrapper[ZeroTrustGatewayLocations]), ) def list( @@ -245,7 +243,7 @@ class Locations(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LocationGetResponse: + ) -> ZeroTrustGatewayLocations: """ Fetches a single Zero Trust Gateway location. @@ -267,7 +265,7 @@ class Locations(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LocationGetResponse], ResultWrapper[LocationGetResponse]), + cast_to=cast(Type[ZeroTrustGatewayLocations], ResultWrapper[ZeroTrustGatewayLocations]), ) @@ -294,7 +292,7 @@ class AsyncLocations(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LocationCreateResponse: + ) -> ZeroTrustGatewayLocations: """ Creates a new Zero Trust Gateway location. @@ -333,7 +331,7 @@ class AsyncLocations(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LocationCreateResponse], ResultWrapper[LocationCreateResponse]), + cast_to=cast(Type[ZeroTrustGatewayLocations], ResultWrapper[ZeroTrustGatewayLocations]), ) async def update( @@ -351,7 +349,7 @@ class AsyncLocations(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LocationUpdateResponse: + ) -> ZeroTrustGatewayLocations: """ Updates a configured Zero Trust Gateway location. @@ -390,7 +388,7 @@ class AsyncLocations(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LocationUpdateResponse], ResultWrapper[LocationUpdateResponse]), + cast_to=cast(Type[ZeroTrustGatewayLocations], ResultWrapper[ZeroTrustGatewayLocations]), ) async def list( @@ -480,7 +478,7 @@ class AsyncLocations(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LocationGetResponse: + ) -> ZeroTrustGatewayLocations: """ Fetches a single Zero Trust Gateway location. @@ -502,7 +500,7 @@ class AsyncLocations(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LocationGetResponse], ResultWrapper[LocationGetResponse]), + cast_to=cast(Type[ZeroTrustGatewayLocations], ResultWrapper[ZeroTrustGatewayLocations]), ) diff --git a/src/cloudflare/resources/zero_trust/gateway/loggings.py b/src/cloudflare/resources/zero_trust/gateway/loggings.py index b30843d79..62aa0cc82 100644 --- a/src/cloudflare/resources/zero_trust/gateway/loggings.py +++ b/src/cloudflare/resources/zero_trust/gateway/loggings.py @@ -23,7 +23,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zero_trust.gateway import LoggingGetResponse, LoggingUpdateResponse, logging_update_params +from ....types.zero_trust.gateway import ZeroTrustGatewayGatewayAccountLoggingSettings, logging_update_params __all__ = ["Loggings", "AsyncLoggings"] @@ -49,7 +49,7 @@ class Loggings(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LoggingUpdateResponse: + ) -> ZeroTrustGatewayGatewayAccountLoggingSettings: """ Updates logging settings for the current Zero Trust account. @@ -83,7 +83,10 @@ class Loggings(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LoggingUpdateResponse], ResultWrapper[LoggingUpdateResponse]), + cast_to=cast( + Type[ZeroTrustGatewayGatewayAccountLoggingSettings], + ResultWrapper[ZeroTrustGatewayGatewayAccountLoggingSettings], + ), ) def get( @@ -96,7 +99,7 @@ class Loggings(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LoggingGetResponse: + ) -> ZeroTrustGatewayGatewayAccountLoggingSettings: """ Fetches the current logging settings for Zero Trust account. @@ -118,7 +121,10 @@ class Loggings(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LoggingGetResponse], ResultWrapper[LoggingGetResponse]), + cast_to=cast( + Type[ZeroTrustGatewayGatewayAccountLoggingSettings], + ResultWrapper[ZeroTrustGatewayGatewayAccountLoggingSettings], + ), ) @@ -143,7 +149,7 @@ class AsyncLoggings(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LoggingUpdateResponse: + ) -> ZeroTrustGatewayGatewayAccountLoggingSettings: """ Updates logging settings for the current Zero Trust account. @@ -177,7 +183,10 @@ class AsyncLoggings(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LoggingUpdateResponse], ResultWrapper[LoggingUpdateResponse]), + cast_to=cast( + Type[ZeroTrustGatewayGatewayAccountLoggingSettings], + ResultWrapper[ZeroTrustGatewayGatewayAccountLoggingSettings], + ), ) async def get( @@ -190,7 +199,7 @@ class AsyncLoggings(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LoggingGetResponse: + ) -> ZeroTrustGatewayGatewayAccountLoggingSettings: """ Fetches the current logging settings for Zero Trust account. @@ -212,7 +221,10 @@ class AsyncLoggings(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LoggingGetResponse], ResultWrapper[LoggingGetResponse]), + cast_to=cast( + Type[ZeroTrustGatewayGatewayAccountLoggingSettings], + ResultWrapper[ZeroTrustGatewayGatewayAccountLoggingSettings], + ), ) diff --git a/src/cloudflare/resources/zero_trust/gateway/proxy_endpoints.py b/src/cloudflare/resources/zero_trust/gateway/proxy_endpoints.py index 47581319e..4250404e4 100644 --- a/src/cloudflare/resources/zero_trust/gateway/proxy_endpoints.py +++ b/src/cloudflare/resources/zero_trust/gateway/proxy_endpoints.py @@ -24,11 +24,9 @@ from ...._base_client import ( make_request_options, ) from ....types.zero_trust.gateway import ( - ProxyEndpointGetResponse, - ProxyEndpointEditResponse, ProxyEndpointListResponse, - ProxyEndpointCreateResponse, ProxyEndpointDeleteResponse, + ZeroTrustGatewayProxyEndpoints, proxy_endpoint_edit_params, proxy_endpoint_create_params, ) @@ -58,7 +56,7 @@ class ProxyEndpoints(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ProxyEndpointCreateResponse: + ) -> ZeroTrustGatewayProxyEndpoints: """ Creates a new Zero Trust Gateway proxy endpoint. @@ -94,7 +92,7 @@ class ProxyEndpoints(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ProxyEndpointCreateResponse], ResultWrapper[ProxyEndpointCreateResponse]), + cast_to=cast(Type[ZeroTrustGatewayProxyEndpoints], ResultWrapper[ZeroTrustGatewayProxyEndpoints]), ) def list( @@ -187,7 +185,7 @@ class ProxyEndpoints(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ProxyEndpointEditResponse: + ) -> ZeroTrustGatewayProxyEndpoints: """ Updates a configured Zero Trust Gateway proxy endpoint. @@ -223,7 +221,7 @@ class ProxyEndpoints(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ProxyEndpointEditResponse], ResultWrapper[ProxyEndpointEditResponse]), + cast_to=cast(Type[ZeroTrustGatewayProxyEndpoints], ResultWrapper[ZeroTrustGatewayProxyEndpoints]), ) def get( @@ -237,7 +235,7 @@ class ProxyEndpoints(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ProxyEndpointGetResponse: + ) -> ZeroTrustGatewayProxyEndpoints: """ Fetches all Zero Trust Gateway proxy endpoints for an account. @@ -259,7 +257,7 @@ class ProxyEndpoints(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ProxyEndpointGetResponse], ResultWrapper[ProxyEndpointGetResponse]), + cast_to=cast(Type[ZeroTrustGatewayProxyEndpoints], ResultWrapper[ZeroTrustGatewayProxyEndpoints]), ) @@ -285,7 +283,7 @@ class AsyncProxyEndpoints(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ProxyEndpointCreateResponse: + ) -> ZeroTrustGatewayProxyEndpoints: """ Creates a new Zero Trust Gateway proxy endpoint. @@ -321,7 +319,7 @@ class AsyncProxyEndpoints(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ProxyEndpointCreateResponse], ResultWrapper[ProxyEndpointCreateResponse]), + cast_to=cast(Type[ZeroTrustGatewayProxyEndpoints], ResultWrapper[ZeroTrustGatewayProxyEndpoints]), ) async def list( @@ -414,7 +412,7 @@ class AsyncProxyEndpoints(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ProxyEndpointEditResponse: + ) -> ZeroTrustGatewayProxyEndpoints: """ Updates a configured Zero Trust Gateway proxy endpoint. @@ -450,7 +448,7 @@ class AsyncProxyEndpoints(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ProxyEndpointEditResponse], ResultWrapper[ProxyEndpointEditResponse]), + cast_to=cast(Type[ZeroTrustGatewayProxyEndpoints], ResultWrapper[ZeroTrustGatewayProxyEndpoints]), ) async def get( @@ -464,7 +462,7 @@ class AsyncProxyEndpoints(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ProxyEndpointGetResponse: + ) -> ZeroTrustGatewayProxyEndpoints: """ Fetches all Zero Trust Gateway proxy endpoints for an account. @@ -486,7 +484,7 @@ class AsyncProxyEndpoints(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ProxyEndpointGetResponse], ResultWrapper[ProxyEndpointGetResponse]), + cast_to=cast(Type[ZeroTrustGatewayProxyEndpoints], ResultWrapper[ZeroTrustGatewayProxyEndpoints]), ) diff --git a/src/cloudflare/resources/zero_trust/gateway/rules.py b/src/cloudflare/resources/zero_trust/gateway/rules.py index ffefe07fc..06a9c5aba 100644 --- a/src/cloudflare/resources/zero_trust/gateway/rules.py +++ b/src/cloudflare/resources/zero_trust/gateway/rules.py @@ -25,11 +25,9 @@ from ...._base_client import ( make_request_options, ) from ....types.zero_trust.gateway import ( - RuleGetResponse, RuleListResponse, - RuleCreateResponse, RuleDeleteResponse, - RuleUpdateResponse, + ZeroTrustGatewayRules, rule_create_params, rule_update_params, ) @@ -82,7 +80,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleCreateResponse: + ) -> ZeroTrustGatewayRules: """ Creates a new Zero Trust Gateway rule. @@ -147,7 +145,7 @@ class Rules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RuleCreateResponse], ResultWrapper[RuleCreateResponse]), + cast_to=cast(Type[ZeroTrustGatewayRules], ResultWrapper[ZeroTrustGatewayRules]), ) def update( @@ -187,7 +185,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleUpdateResponse: + ) -> ZeroTrustGatewayRules: """ Updates a configured Zero Trust Gateway rule. @@ -256,7 +254,7 @@ class Rules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RuleUpdateResponse], ResultWrapper[RuleUpdateResponse]), + cast_to=cast(Type[ZeroTrustGatewayRules], ResultWrapper[ZeroTrustGatewayRules]), ) def list( @@ -350,7 +348,7 @@ class Rules(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleGetResponse: + ) -> ZeroTrustGatewayRules: """ Fetches a single Zero Trust Gateway rule. @@ -376,7 +374,7 @@ class Rules(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RuleGetResponse], ResultWrapper[RuleGetResponse]), + cast_to=cast(Type[ZeroTrustGatewayRules], ResultWrapper[ZeroTrustGatewayRules]), ) @@ -425,7 +423,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleCreateResponse: + ) -> ZeroTrustGatewayRules: """ Creates a new Zero Trust Gateway rule. @@ -490,7 +488,7 @@ class AsyncRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RuleCreateResponse], ResultWrapper[RuleCreateResponse]), + cast_to=cast(Type[ZeroTrustGatewayRules], ResultWrapper[ZeroTrustGatewayRules]), ) async def update( @@ -530,7 +528,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleUpdateResponse: + ) -> ZeroTrustGatewayRules: """ Updates a configured Zero Trust Gateway rule. @@ -599,7 +597,7 @@ class AsyncRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RuleUpdateResponse], ResultWrapper[RuleUpdateResponse]), + cast_to=cast(Type[ZeroTrustGatewayRules], ResultWrapper[ZeroTrustGatewayRules]), ) async def list( @@ -693,7 +691,7 @@ class AsyncRules(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleGetResponse: + ) -> ZeroTrustGatewayRules: """ Fetches a single Zero Trust Gateway rule. @@ -719,7 +717,7 @@ class AsyncRules(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RuleGetResponse], ResultWrapper[RuleGetResponse]), + cast_to=cast(Type[ZeroTrustGatewayRules], ResultWrapper[ZeroTrustGatewayRules]), ) diff --git a/src/cloudflare/resources/zero_trust/identity_providers.py b/src/cloudflare/resources/zero_trust/identity_providers.py index 5e31d8799..1aceecb7a 100644 --- a/src/cloudflare/resources/zero_trust/identity_providers.py +++ b/src/cloudflare/resources/zero_trust/identity_providers.py @@ -25,11 +25,9 @@ from ..._base_client import ( make_request_options, ) from ...types.zero_trust import ( - IdentityProviderGetResponse, + AccessIdentityProviders, IdentityProviderListResponse, - IdentityProviderCreateResponse, IdentityProviderDeleteResponse, - IdentityProviderUpdateResponse, identity_provider_create_params, identity_provider_update_params, ) @@ -76,7 +74,7 @@ class IdentityProviders(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IdentityProviderCreateResponse: + ) -> AccessIdentityProviders: """ Adds a new identity provider to Access. @@ -115,7 +113,7 @@ class IdentityProviders(SyncAPIResource): account_or_zone = "zones" account_or_zone_id = zone_id return cast( - IdentityProviderCreateResponse, + AccessIdentityProviders, self._post( f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers", body=maybe_transform( @@ -135,7 +133,7 @@ class IdentityProviders(SyncAPIResource): post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[IdentityProviderCreateResponse] + Any, ResultWrapper[AccessIdentityProviders] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -171,7 +169,7 @@ class IdentityProviders(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IdentityProviderUpdateResponse: + ) -> AccessIdentityProviders: """ Updates a configured identity provider. @@ -214,7 +212,7 @@ class IdentityProviders(SyncAPIResource): account_or_zone = "zones" account_or_zone_id = zone_id return cast( - IdentityProviderUpdateResponse, + AccessIdentityProviders, self._put( f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers/{uuid}", body=maybe_transform( @@ -234,7 +232,7 @@ class IdentityProviders(SyncAPIResource): post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[IdentityProviderUpdateResponse] + Any, ResultWrapper[AccessIdentityProviders] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -366,7 +364,7 @@ class IdentityProviders(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IdentityProviderGetResponse: + ) -> AccessIdentityProviders: """ Fetches a configured identity provider. @@ -403,7 +401,7 @@ class IdentityProviders(SyncAPIResource): account_or_zone = "zones" account_or_zone_id = zone_id return cast( - IdentityProviderGetResponse, + AccessIdentityProviders, self._get( f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers/{uuid}", options=make_request_options( @@ -414,7 +412,7 @@ class IdentityProviders(SyncAPIResource): post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[IdentityProviderGetResponse] + Any, ResultWrapper[AccessIdentityProviders] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -459,7 +457,7 @@ class AsyncIdentityProviders(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IdentityProviderCreateResponse: + ) -> AccessIdentityProviders: """ Adds a new identity provider to Access. @@ -498,7 +496,7 @@ class AsyncIdentityProviders(AsyncAPIResource): account_or_zone = "zones" account_or_zone_id = zone_id return cast( - IdentityProviderCreateResponse, + AccessIdentityProviders, await self._post( f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers", body=await async_maybe_transform( @@ -518,7 +516,7 @@ class AsyncIdentityProviders(AsyncAPIResource): post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[IdentityProviderCreateResponse] + Any, ResultWrapper[AccessIdentityProviders] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -554,7 +552,7 @@ class AsyncIdentityProviders(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IdentityProviderUpdateResponse: + ) -> AccessIdentityProviders: """ Updates a configured identity provider. @@ -597,7 +595,7 @@ class AsyncIdentityProviders(AsyncAPIResource): account_or_zone = "zones" account_or_zone_id = zone_id return cast( - IdentityProviderUpdateResponse, + AccessIdentityProviders, await self._put( f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers/{uuid}", body=await async_maybe_transform( @@ -617,7 +615,7 @@ class AsyncIdentityProviders(AsyncAPIResource): post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[IdentityProviderUpdateResponse] + Any, ResultWrapper[AccessIdentityProviders] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -749,7 +747,7 @@ class AsyncIdentityProviders(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IdentityProviderGetResponse: + ) -> AccessIdentityProviders: """ Fetches a configured identity provider. @@ -786,7 +784,7 @@ class AsyncIdentityProviders(AsyncAPIResource): account_or_zone = "zones" account_or_zone_id = zone_id return cast( - IdentityProviderGetResponse, + AccessIdentityProviders, await self._get( f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers/{uuid}", options=make_request_options( @@ -797,7 +795,7 @@ class AsyncIdentityProviders(AsyncAPIResource): post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[IdentityProviderGetResponse] + Any, ResultWrapper[AccessIdentityProviders] ), # Union types cannot be passed in as arguments in the type system ), ) diff --git a/src/cloudflare/resources/zero_trust/networks/routes/ips.py b/src/cloudflare/resources/zero_trust/networks/routes/ips.py index ffbbb99ec..244154f89 100644 --- a/src/cloudflare/resources/zero_trust/networks/routes/ips.py +++ b/src/cloudflare/resources/zero_trust/networks/routes/ips.py @@ -23,7 +23,8 @@ from ....._wrappers import ResultWrapper from ....._base_client import ( make_request_options, ) -from .....types.zero_trust.networks.routes import IPGetResponse, ip_get_params +from .....types.zero_trust.networks import TunnelTeamnet +from .....types.zero_trust.networks.routes import ip_get_params __all__ = ["IPs", "AsyncIPs"] @@ -49,7 +50,7 @@ class IPs(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IPGetResponse: + ) -> TunnelTeamnet: """ Fetches routes that contain the given IP address. @@ -82,7 +83,7 @@ class IPs(SyncAPIResource): query=maybe_transform({"virtual_network_id": virtual_network_id}, ip_get_params.IPGetParams), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[IPGetResponse], ResultWrapper[IPGetResponse]), + cast_to=cast(Type[TunnelTeamnet], ResultWrapper[TunnelTeamnet]), ) @@ -107,7 +108,7 @@ class AsyncIPs(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IPGetResponse: + ) -> TunnelTeamnet: """ Fetches routes that contain the given IP address. @@ -142,7 +143,7 @@ class AsyncIPs(AsyncAPIResource): ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[IPGetResponse], ResultWrapper[IPGetResponse]), + cast_to=cast(Type[TunnelTeamnet], ResultWrapper[TunnelTeamnet]), ) diff --git a/src/cloudflare/resources/zero_trust/networks/routes/networks.py b/src/cloudflare/resources/zero_trust/networks/routes/networks.py index 42f778391..dcae13549 100644 --- a/src/cloudflare/resources/zero_trust/networks/routes/networks.py +++ b/src/cloudflare/resources/zero_trust/networks/routes/networks.py @@ -24,13 +24,8 @@ from ....._wrappers import ResultWrapper from ....._base_client import ( make_request_options, ) -from .....types.zero_trust.networks.routes import ( - NetworkEditResponse, - NetworkCreateResponse, - NetworkDeleteResponse, - network_create_params, - network_delete_params, -) +from .....types.zero_trust.networks import TunnelRoute +from .....types.zero_trust.networks.routes import network_create_params, network_delete_params __all__ = ["Networks", "AsyncNetworks"] @@ -57,7 +52,7 @@ class Networks(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> NetworkCreateResponse: + ) -> TunnelRoute: """Routes a private network through a Cloudflare Tunnel. The CIDR in @@ -102,7 +97,7 @@ class Networks(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[NetworkCreateResponse], ResultWrapper[NetworkCreateResponse]), + cast_to=cast(Type[TunnelRoute], ResultWrapper[TunnelRoute]), ) def delete( @@ -117,7 +112,7 @@ class Networks(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> NetworkDeleteResponse: + ) -> TunnelRoute: """Deletes a private network route from an account. The CIDR in @@ -157,7 +152,7 @@ class Networks(SyncAPIResource): query=maybe_transform({"tun_type": tun_type}, network_delete_params.NetworkDeleteParams), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[NetworkDeleteResponse], ResultWrapper[NetworkDeleteResponse]), + cast_to=cast(Type[TunnelRoute], ResultWrapper[TunnelRoute]), ) def edit( @@ -171,7 +166,7 @@ class Networks(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> NetworkEditResponse: + ) -> TunnelRoute: """Updates an existing private network route in an account. The CIDR in @@ -203,7 +198,7 @@ class Networks(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[NetworkEditResponse], ResultWrapper[NetworkEditResponse]), + cast_to=cast(Type[TunnelRoute], ResultWrapper[TunnelRoute]), ) @@ -229,7 +224,7 @@ class AsyncNetworks(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> NetworkCreateResponse: + ) -> TunnelRoute: """Routes a private network through a Cloudflare Tunnel. The CIDR in @@ -274,7 +269,7 @@ class AsyncNetworks(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[NetworkCreateResponse], ResultWrapper[NetworkCreateResponse]), + cast_to=cast(Type[TunnelRoute], ResultWrapper[TunnelRoute]), ) async def delete( @@ -289,7 +284,7 @@ class AsyncNetworks(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> NetworkDeleteResponse: + ) -> TunnelRoute: """Deletes a private network route from an account. The CIDR in @@ -329,7 +324,7 @@ class AsyncNetworks(AsyncAPIResource): query=await async_maybe_transform({"tun_type": tun_type}, network_delete_params.NetworkDeleteParams), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[NetworkDeleteResponse], ResultWrapper[NetworkDeleteResponse]), + cast_to=cast(Type[TunnelRoute], ResultWrapper[TunnelRoute]), ) async def edit( @@ -343,7 +338,7 @@ class AsyncNetworks(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> NetworkEditResponse: + ) -> TunnelRoute: """Updates an existing private network route in an account. The CIDR in @@ -375,7 +370,7 @@ class AsyncNetworks(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[NetworkEditResponse], ResultWrapper[NetworkEditResponse]), + cast_to=cast(Type[TunnelRoute], ResultWrapper[TunnelRoute]), ) diff --git a/src/cloudflare/resources/zero_trust/networks/routes/routes.py b/src/cloudflare/resources/zero_trust/networks/routes/routes.py index 4fa90d9a4..2e70c69c2 100644 --- a/src/cloudflare/resources/zero_trust/networks/routes/routes.py +++ b/src/cloudflare/resources/zero_trust/networks/routes/routes.py @@ -43,10 +43,8 @@ from ....._base_client import ( make_request_options, ) from .....types.zero_trust.networks import ( - RouteEditResponse, - RouteListResponse, - RouteCreateResponse, - RouteDeleteResponse, + TunnelRoute, + TunnelTeamnet, route_edit_params, route_list_params, route_create_params, @@ -85,7 +83,7 @@ class Routes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteCreateResponse: + ) -> TunnelRoute: """ Routes a private network through a Cloudflare Tunnel. @@ -127,7 +125,7 @@ class Routes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RouteCreateResponse], ResultWrapper[RouteCreateResponse]), + cast_to=cast(Type[TunnelRoute], ResultWrapper[TunnelRoute]), ) def list( @@ -150,7 +148,7 @@ class Routes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[RouteListResponse]: + ) -> SyncV4PagePaginationArray[TunnelTeamnet]: """ Lists and filters private network routes in an account. @@ -193,7 +191,7 @@ class Routes(SyncAPIResource): 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}/teamnet/routes", - page=SyncV4PagePaginationArray[RouteListResponse], + page=SyncV4PagePaginationArray[TunnelTeamnet], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -215,7 +213,7 @@ class Routes(SyncAPIResource): route_list_params.RouteListParams, ), ), - model=RouteListResponse, + model=TunnelTeamnet, ) def delete( @@ -229,7 +227,7 @@ class Routes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteDeleteResponse: + ) -> TunnelRoute: """ Deletes a private network route from an account. @@ -259,7 +257,7 @@ class Routes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RouteDeleteResponse], ResultWrapper[RouteDeleteResponse]), + cast_to=cast(Type[TunnelRoute], ResultWrapper[TunnelRoute]), ) def edit( @@ -278,7 +276,7 @@ class Routes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteEditResponse: + ) -> TunnelRoute: """Updates an existing private network route in an account. The fields that are @@ -332,7 +330,7 @@ class Routes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RouteEditResponse], ResultWrapper[RouteEditResponse]), + cast_to=cast(Type[TunnelRoute], ResultWrapper[TunnelRoute]), ) @@ -366,7 +364,7 @@ class AsyncRoutes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteCreateResponse: + ) -> TunnelRoute: """ Routes a private network through a Cloudflare Tunnel. @@ -408,7 +406,7 @@ class AsyncRoutes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RouteCreateResponse], ResultWrapper[RouteCreateResponse]), + cast_to=cast(Type[TunnelRoute], ResultWrapper[TunnelRoute]), ) def list( @@ -431,7 +429,7 @@ class AsyncRoutes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[RouteListResponse, AsyncV4PagePaginationArray[RouteListResponse]]: + ) -> AsyncPaginator[TunnelTeamnet, AsyncV4PagePaginationArray[TunnelTeamnet]]: """ Lists and filters private network routes in an account. @@ -474,7 +472,7 @@ class AsyncRoutes(AsyncAPIResource): 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}/teamnet/routes", - page=AsyncV4PagePaginationArray[RouteListResponse], + page=AsyncV4PagePaginationArray[TunnelTeamnet], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -496,7 +494,7 @@ class AsyncRoutes(AsyncAPIResource): route_list_params.RouteListParams, ), ), - model=RouteListResponse, + model=TunnelTeamnet, ) async def delete( @@ -510,7 +508,7 @@ class AsyncRoutes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteDeleteResponse: + ) -> TunnelRoute: """ Deletes a private network route from an account. @@ -540,7 +538,7 @@ class AsyncRoutes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RouteDeleteResponse], ResultWrapper[RouteDeleteResponse]), + cast_to=cast(Type[TunnelRoute], ResultWrapper[TunnelRoute]), ) async def edit( @@ -559,7 +557,7 @@ class AsyncRoutes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteEditResponse: + ) -> TunnelRoute: """Updates an existing private network route in an account. The fields that are @@ -613,7 +611,7 @@ class AsyncRoutes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RouteEditResponse], ResultWrapper[RouteEditResponse]), + cast_to=cast(Type[TunnelRoute], ResultWrapper[TunnelRoute]), ) diff --git a/src/cloudflare/resources/zero_trust/organizations.py b/src/cloudflare/resources/zero_trust/organizations.py index 2550b2aa5..c6f107b09 100644 --- a/src/cloudflare/resources/zero_trust/organizations.py +++ b/src/cloudflare/resources/zero_trust/organizations.py @@ -24,9 +24,7 @@ from ..._base_client import ( make_request_options, ) from ...types.zero_trust import ( - OrganizationListResponse, - OrganizationCreateResponse, - OrganizationUpdateResponse, + AccessOrganizations, OrganizationRevokeUsersResponse, organization_create_params, organization_update_params, @@ -66,7 +64,7 @@ class Organizations(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OrganizationCreateResponse: + ) -> AccessOrganizations: """ Sets up a Zero Trust organization for your account or zone. @@ -149,7 +147,7 @@ class Organizations(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[OrganizationCreateResponse], ResultWrapper[OrganizationCreateResponse]), + cast_to=cast(Type[AccessOrganizations], ResultWrapper[AccessOrganizations]), ) def update( @@ -174,7 +172,7 @@ class Organizations(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OrganizationUpdateResponse: + ) -> AccessOrganizations: """ Updates the configuration for your Zero Trust organization. @@ -258,7 +256,7 @@ class Organizations(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[OrganizationUpdateResponse], ResultWrapper[OrganizationUpdateResponse]), + cast_to=cast(Type[AccessOrganizations], ResultWrapper[AccessOrganizations]), ) def list( @@ -272,7 +270,7 @@ class Organizations(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OrganizationListResponse: + ) -> AccessOrganizations: """ Returns the configuration for your Zero Trust organization. @@ -313,7 +311,7 @@ class Organizations(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[OrganizationListResponse], ResultWrapper[OrganizationListResponse]), + cast_to=cast(Type[AccessOrganizations], ResultWrapper[AccessOrganizations]), ) def revoke_users( @@ -408,7 +406,7 @@ class AsyncOrganizations(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OrganizationCreateResponse: + ) -> AccessOrganizations: """ Sets up a Zero Trust organization for your account or zone. @@ -491,7 +489,7 @@ class AsyncOrganizations(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[OrganizationCreateResponse], ResultWrapper[OrganizationCreateResponse]), + cast_to=cast(Type[AccessOrganizations], ResultWrapper[AccessOrganizations]), ) async def update( @@ -516,7 +514,7 @@ class AsyncOrganizations(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OrganizationUpdateResponse: + ) -> AccessOrganizations: """ Updates the configuration for your Zero Trust organization. @@ -600,7 +598,7 @@ class AsyncOrganizations(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[OrganizationUpdateResponse], ResultWrapper[OrganizationUpdateResponse]), + cast_to=cast(Type[AccessOrganizations], ResultWrapper[AccessOrganizations]), ) async def list( @@ -614,7 +612,7 @@ class AsyncOrganizations(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OrganizationListResponse: + ) -> AccessOrganizations: """ Returns the configuration for your Zero Trust organization. @@ -655,7 +653,7 @@ class AsyncOrganizations(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[OrganizationListResponse], ResultWrapper[OrganizationListResponse]), + cast_to=cast(Type[AccessOrganizations], ResultWrapper[AccessOrganizations]), ) async def revoke_users( diff --git a/src/cloudflare/resources/zero_trust/tunnels/connectors.py b/src/cloudflare/resources/zero_trust/tunnels/connectors.py index 2ef466431..fba0a02e9 100644 --- a/src/cloudflare/resources/zero_trust/tunnels/connectors.py +++ b/src/cloudflare/resources/zero_trust/tunnels/connectors.py @@ -19,7 +19,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zero_trust.tunnels import ConnectorGetResponse +from ....types.zero_trust.tunnels import TunnelTunnelClient __all__ = ["Connectors", "AsyncConnectors"] @@ -45,7 +45,7 @@ class Connectors(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConnectorGetResponse: + ) -> TunnelTunnelClient: """ Fetches connector and connection details for a Cloudflare Tunnel. @@ -79,7 +79,7 @@ class Connectors(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ConnectorGetResponse], ResultWrapper[ConnectorGetResponse]), + cast_to=cast(Type[TunnelTunnelClient], ResultWrapper[TunnelTunnelClient]), ) @@ -104,7 +104,7 @@ class AsyncConnectors(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConnectorGetResponse: + ) -> TunnelTunnelClient: """ Fetches connector and connection details for a Cloudflare Tunnel. @@ -138,7 +138,7 @@ class AsyncConnectors(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ConnectorGetResponse], ResultWrapper[ConnectorGetResponse]), + cast_to=cast(Type[TunnelTunnelClient], ResultWrapper[TunnelTunnelClient]), ) diff --git a/src/cloudflare/resources/zero_trust/tunnels/tunnels.py b/src/cloudflare/resources/zero_trust/tunnels/tunnels.py index a57e8b09c..cac8df538 100644 --- a/src/cloudflare/resources/zero_trust/tunnels/tunnels.py +++ b/src/cloudflare/resources/zero_trust/tunnels/tunnels.py @@ -67,11 +67,9 @@ from ...._base_client import ( make_request_options, ) from ....types.zero_trust import ( - TunnelGetResponse, + TunnelArgoTunnel, TunnelEditResponse, TunnelListResponse, - TunnelCreateResponse, - TunnelDeleteResponse, tunnel_edit_params, tunnel_list_params, tunnel_create_params, @@ -122,7 +120,7 @@ class Tunnels(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TunnelCreateResponse: + ) -> TunnelArgoTunnel: """ Creates a new Argo Tunnel in an account. @@ -160,7 +158,7 @@ class Tunnels(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TunnelCreateResponse], ResultWrapper[TunnelCreateResponse]), + cast_to=cast(Type[TunnelArgoTunnel], ResultWrapper[TunnelArgoTunnel]), ) def list( @@ -253,7 +251,7 @@ class Tunnels(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TunnelDeleteResponse: + ) -> TunnelArgoTunnel: """ Deletes an Argo Tunnel from an account. @@ -284,7 +282,7 @@ class Tunnels(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TunnelDeleteResponse], ResultWrapper[TunnelDeleteResponse]), + cast_to=cast(Type[TunnelArgoTunnel], ResultWrapper[TunnelArgoTunnel]), ) def edit( @@ -361,7 +359,7 @@ class Tunnels(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TunnelGetResponse: + ) -> TunnelArgoTunnel: """ Fetches a single Argo Tunnel. @@ -391,7 +389,7 @@ class Tunnels(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TunnelGetResponse], ResultWrapper[TunnelGetResponse]), + cast_to=cast(Type[TunnelArgoTunnel], ResultWrapper[TunnelArgoTunnel]), ) @@ -436,7 +434,7 @@ class AsyncTunnels(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TunnelCreateResponse: + ) -> TunnelArgoTunnel: """ Creates a new Argo Tunnel in an account. @@ -474,7 +472,7 @@ class AsyncTunnels(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TunnelCreateResponse], ResultWrapper[TunnelCreateResponse]), + cast_to=cast(Type[TunnelArgoTunnel], ResultWrapper[TunnelArgoTunnel]), ) def list( @@ -567,7 +565,7 @@ class AsyncTunnels(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TunnelDeleteResponse: + ) -> TunnelArgoTunnel: """ Deletes an Argo Tunnel from an account. @@ -598,7 +596,7 @@ class AsyncTunnels(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TunnelDeleteResponse], ResultWrapper[TunnelDeleteResponse]), + cast_to=cast(Type[TunnelArgoTunnel], ResultWrapper[TunnelArgoTunnel]), ) async def edit( @@ -675,7 +673,7 @@ class AsyncTunnels(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TunnelGetResponse: + ) -> TunnelArgoTunnel: """ Fetches a single Argo Tunnel. @@ -705,7 +703,7 @@ class AsyncTunnels(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TunnelGetResponse], ResultWrapper[TunnelGetResponse]), + cast_to=cast(Type[TunnelArgoTunnel], ResultWrapper[TunnelArgoTunnel]), ) diff --git a/src/cloudflare/resources/zones/settings/advanced_ddos.py b/src/cloudflare/resources/zones/settings/advanced_ddos.py index ceb038040..d849165e5 100644 --- a/src/cloudflare/resources/zones/settings/advanced_ddos.py +++ b/src/cloudflare/resources/zones/settings/advanced_ddos.py @@ -19,7 +19,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import AdvancedDDOSGetResponse +from ....types.zones.settings import ZonesAdvancedDDOS __all__ = ["AdvancedDDOS", "AsyncAdvancedDDOS"] @@ -43,7 +43,7 @@ class AdvancedDDOS(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AdvancedDDOSGetResponse]: + ) -> Optional[ZonesAdvancedDDOS]: """ 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 @@ class AdvancedDDOS(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AdvancedDDOSGetResponse]], ResultWrapper[AdvancedDDOSGetResponse]), + cast_to=cast(Type[Optional[ZonesAdvancedDDOS]], ResultWrapper[ZonesAdvancedDDOS]), ) @@ -94,7 +94,7 @@ class AsyncAdvancedDDOS(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AdvancedDDOSGetResponse]: + ) -> Optional[ZonesAdvancedDDOS]: """ 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 @@ class AsyncAdvancedDDOS(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AdvancedDDOSGetResponse]], ResultWrapper[AdvancedDDOSGetResponse]), + cast_to=cast(Type[Optional[ZonesAdvancedDDOS]], ResultWrapper[ZonesAdvancedDDOS]), ) diff --git a/src/cloudflare/resources/zones/settings/always_online.py b/src/cloudflare/resources/zones/settings/always_online.py index be2e18277..c5367069b 100644 --- a/src/cloudflare/resources/zones/settings/always_online.py +++ b/src/cloudflare/resources/zones/settings/always_online.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import AlwaysOnlineGetResponse, AlwaysOnlineEditResponse, always_online_edit_params +from ....types.zones.settings import ZonesAlwaysOnline, always_online_edit_params __all__ = ["AlwaysOnline", "AsyncAlwaysOnline"] @@ -49,7 +49,7 @@ class AlwaysOnline(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AlwaysOnlineEditResponse]: + ) -> Optional[ZonesAlwaysOnline]: """ 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 @@ class AlwaysOnline(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AlwaysOnlineEditResponse]], ResultWrapper[AlwaysOnlineEditResponse]), + cast_to=cast(Type[Optional[ZonesAlwaysOnline]], ResultWrapper[ZonesAlwaysOnline]), ) def get( @@ -95,7 +95,7 @@ class AlwaysOnline(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AlwaysOnlineGetResponse]: + ) -> Optional[ZonesAlwaysOnline]: """ 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 @@ class AlwaysOnline(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AlwaysOnlineGetResponse]], ResultWrapper[AlwaysOnlineGetResponse]), + cast_to=cast(Type[Optional[ZonesAlwaysOnline]], ResultWrapper[ZonesAlwaysOnline]), ) @@ -149,7 +149,7 @@ class AsyncAlwaysOnline(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AlwaysOnlineEditResponse]: + ) -> Optional[ZonesAlwaysOnline]: """ 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 @@ class AsyncAlwaysOnline(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AlwaysOnlineEditResponse]], ResultWrapper[AlwaysOnlineEditResponse]), + cast_to=cast(Type[Optional[ZonesAlwaysOnline]], ResultWrapper[ZonesAlwaysOnline]), ) async def get( @@ -195,7 +195,7 @@ class AsyncAlwaysOnline(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AlwaysOnlineGetResponse]: + ) -> Optional[ZonesAlwaysOnline]: """ 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 @@ class AsyncAlwaysOnline(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AlwaysOnlineGetResponse]], ResultWrapper[AlwaysOnlineGetResponse]), + cast_to=cast(Type[Optional[ZonesAlwaysOnline]], ResultWrapper[ZonesAlwaysOnline]), ) diff --git a/src/cloudflare/resources/zones/settings/always_use_https.py b/src/cloudflare/resources/zones/settings/always_use_https.py index c9ee3b4c4..af258062c 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 ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import AlwaysUseHTTPSGetResponse, AlwaysUseHTTPSEditResponse, always_use_https_edit_params +from ....types.zones.settings import ZonesAlwaysUseHTTPS, always_use_https_edit_params __all__ = ["AlwaysUseHTTPS", "AsyncAlwaysUseHTTPS"] @@ -49,7 +49,7 @@ class AlwaysUseHTTPS(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AlwaysUseHTTPSEditResponse]: + ) -> Optional[ZonesAlwaysUseHTTPS]: """ 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 @@ class AlwaysUseHTTPS(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AlwaysUseHTTPSEditResponse]], ResultWrapper[AlwaysUseHTTPSEditResponse]), + cast_to=cast(Type[Optional[ZonesAlwaysUseHTTPS]], ResultWrapper[ZonesAlwaysUseHTTPS]), ) def get( @@ -93,7 +93,7 @@ class AlwaysUseHTTPS(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AlwaysUseHTTPSGetResponse]: + ) -> Optional[ZonesAlwaysUseHTTPS]: """ 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 @@ class AlwaysUseHTTPS(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AlwaysUseHTTPSGetResponse]], ResultWrapper[AlwaysUseHTTPSGetResponse]), + cast_to=cast(Type[Optional[ZonesAlwaysUseHTTPS]], ResultWrapper[ZonesAlwaysUseHTTPS]), ) @@ -145,7 +145,7 @@ class AsyncAlwaysUseHTTPS(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AlwaysUseHTTPSEditResponse]: + ) -> Optional[ZonesAlwaysUseHTTPS]: """ 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 @@ class AsyncAlwaysUseHTTPS(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AlwaysUseHTTPSEditResponse]], ResultWrapper[AlwaysUseHTTPSEditResponse]), + cast_to=cast(Type[Optional[ZonesAlwaysUseHTTPS]], ResultWrapper[ZonesAlwaysUseHTTPS]), ) async def get( @@ -189,7 +189,7 @@ class AsyncAlwaysUseHTTPS(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AlwaysUseHTTPSGetResponse]: + ) -> Optional[ZonesAlwaysUseHTTPS]: """ 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 @@ class AsyncAlwaysUseHTTPS(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[AlwaysUseHTTPSGetResponse]], ResultWrapper[AlwaysUseHTTPSGetResponse]), + cast_to=cast(Type[Optional[ZonesAlwaysUseHTTPS]], ResultWrapper[ZonesAlwaysUseHTTPS]), ) diff --git a/src/cloudflare/resources/zones/settings/automatic_https_rewrites.py b/src/cloudflare/resources/zones/settings/automatic_https_rewrites.py index efd1e78d1..4610a99c6 100644 --- a/src/cloudflare/resources/zones/settings/automatic_https_rewrites.py +++ b/src/cloudflare/resources/zones/settings/automatic_https_rewrites.py @@ -24,11 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ( - AutomaticHTTPSRewriteGetResponse, - AutomaticHTTPSRewriteEditResponse, - automatic_https_rewrite_edit_params, -) +from ....types.zones.settings import ZonesAutomaticHTTPSRewrites, automatic_https_rewrite_edit_params __all__ = ["AutomaticHTTPSRewrites", "AsyncAutomaticHTTPSRewrites"] @@ -53,7 +49,7 @@ class AutomaticHTTPSRewrites(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AutomaticHTTPSRewriteEditResponse]: + ) -> Optional[ZonesAutomaticHTTPSRewrites]: """ Enable the Automatic HTTPS Rewrites feature for this zone. @@ -83,9 +79,7 @@ class AutomaticHTTPSRewrites(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[AutomaticHTTPSRewriteEditResponse]], ResultWrapper[AutomaticHTTPSRewriteEditResponse] - ), + cast_to=cast(Type[Optional[ZonesAutomaticHTTPSRewrites]], ResultWrapper[ZonesAutomaticHTTPSRewrites]), ) def get( @@ -98,7 +92,7 @@ class AutomaticHTTPSRewrites(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AutomaticHTTPSRewriteGetResponse]: + ) -> Optional[ZonesAutomaticHTTPSRewrites]: """ Enable the Automatic HTTPS Rewrites feature for this zone. @@ -124,9 +118,7 @@ class AutomaticHTTPSRewrites(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[AutomaticHTTPSRewriteGetResponse]], ResultWrapper[AutomaticHTTPSRewriteGetResponse] - ), + cast_to=cast(Type[Optional[ZonesAutomaticHTTPSRewrites]], ResultWrapper[ZonesAutomaticHTTPSRewrites]), ) @@ -150,7 +142,7 @@ class AsyncAutomaticHTTPSRewrites(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AutomaticHTTPSRewriteEditResponse]: + ) -> Optional[ZonesAutomaticHTTPSRewrites]: """ Enable the Automatic HTTPS Rewrites feature for this zone. @@ -182,9 +174,7 @@ class AsyncAutomaticHTTPSRewrites(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[AutomaticHTTPSRewriteEditResponse]], ResultWrapper[AutomaticHTTPSRewriteEditResponse] - ), + cast_to=cast(Type[Optional[ZonesAutomaticHTTPSRewrites]], ResultWrapper[ZonesAutomaticHTTPSRewrites]), ) async def get( @@ -197,7 +187,7 @@ class AsyncAutomaticHTTPSRewrites(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AutomaticHTTPSRewriteGetResponse]: + ) -> Optional[ZonesAutomaticHTTPSRewrites]: """ Enable the Automatic HTTPS Rewrites feature for this zone. @@ -223,9 +213,7 @@ class AsyncAutomaticHTTPSRewrites(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[AutomaticHTTPSRewriteGetResponse]], ResultWrapper[AutomaticHTTPSRewriteGetResponse] - ), + cast_to=cast(Type[Optional[ZonesAutomaticHTTPSRewrites]], ResultWrapper[ZonesAutomaticHTTPSRewrites]), ) diff --git a/src/cloudflare/resources/zones/settings/automatic_platform_optimization.py b/src/cloudflare/resources/zones/settings/automatic_platform_optimization.py index 63016526a..3403954bf 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 @@ from ...._base_client import ( make_request_options, ) from ....types.zones.settings import ( - AutomaticPlatformOptimizationGetResponse, - AutomaticPlatformOptimizationEditResponse, + ZonesAutomaticPlatformOptimization, + ZonesAutomaticPlatformOptimizationParam, automatic_platform_optimization_edit_params, ) @@ -45,14 +45,14 @@ class AutomaticPlatformOptimization(SyncAPIResource): self, *, zone_id: str, - value: automatic_platform_optimization_edit_params.Value, + value: ZonesAutomaticPlatformOptimizationParam, # 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[AutomaticPlatformOptimizationEditResponse]: + ) -> Optional[ZonesAutomaticPlatformOptimization]: """ [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,8 +84,7 @@ class AutomaticPlatformOptimization(SyncAPIResource): post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Type[Optional[AutomaticPlatformOptimizationEditResponse]], - ResultWrapper[AutomaticPlatformOptimizationEditResponse], + Type[Optional[ZonesAutomaticPlatformOptimization]], ResultWrapper[ZonesAutomaticPlatformOptimization] ), ) @@ -99,7 +98,7 @@ class AutomaticPlatformOptimization(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AutomaticPlatformOptimizationGetResponse]: + ) -> Optional[ZonesAutomaticPlatformOptimization]: """ [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 @@ -128,8 +127,7 @@ class AutomaticPlatformOptimization(SyncAPIResource): post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Type[Optional[AutomaticPlatformOptimizationGetResponse]], - ResultWrapper[AutomaticPlatformOptimizationGetResponse], + Type[Optional[ZonesAutomaticPlatformOptimization]], ResultWrapper[ZonesAutomaticPlatformOptimization] ), ) @@ -147,14 +145,14 @@ class AsyncAutomaticPlatformOptimization(AsyncAPIResource): self, *, zone_id: str, - value: automatic_platform_optimization_edit_params.Value, + value: ZonesAutomaticPlatformOptimizationParam, # 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[AutomaticPlatformOptimizationEditResponse]: + ) -> Optional[ZonesAutomaticPlatformOptimization]: """ [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 @@ -186,8 +184,7 @@ class AsyncAutomaticPlatformOptimization(AsyncAPIResource): post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Type[Optional[AutomaticPlatformOptimizationEditResponse]], - ResultWrapper[AutomaticPlatformOptimizationEditResponse], + Type[Optional[ZonesAutomaticPlatformOptimization]], ResultWrapper[ZonesAutomaticPlatformOptimization] ), ) @@ -201,7 +198,7 @@ class AsyncAutomaticPlatformOptimization(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AutomaticPlatformOptimizationGetResponse]: + ) -> Optional[ZonesAutomaticPlatformOptimization]: """ [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 @@ -230,8 +227,7 @@ class AsyncAutomaticPlatformOptimization(AsyncAPIResource): post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Type[Optional[AutomaticPlatformOptimizationGetResponse]], - ResultWrapper[AutomaticPlatformOptimizationGetResponse], + Type[Optional[ZonesAutomaticPlatformOptimization]], ResultWrapper[ZonesAutomaticPlatformOptimization] ), ) diff --git a/src/cloudflare/resources/zones/settings/brotli.py b/src/cloudflare/resources/zones/settings/brotli.py index 0166dff49..e1ac6048e 100644 --- a/src/cloudflare/resources/zones/settings/brotli.py +++ b/src/cloudflare/resources/zones/settings/brotli.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import BrotliGetResponse, BrotliEditResponse, brotli_edit_params +from ....types.zones.settings import ZonesBrotli, brotli_edit_params __all__ = ["Brotli", "AsyncBrotli"] @@ -49,7 +49,7 @@ class Brotli(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[BrotliEditResponse]: + ) -> Optional[ZonesBrotli]: """ 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 @@ class Brotli(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[BrotliEditResponse]], ResultWrapper[BrotliEditResponse]), + cast_to=cast(Type[Optional[ZonesBrotli]], ResultWrapper[ZonesBrotli]), ) def get( @@ -92,7 +92,7 @@ class Brotli(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[BrotliGetResponse]: + ) -> Optional[ZonesBrotli]: """ 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 @@ class Brotli(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[BrotliGetResponse]], ResultWrapper[BrotliGetResponse]), + cast_to=cast(Type[Optional[ZonesBrotli]], ResultWrapper[ZonesBrotli]), ) @@ -143,7 +143,7 @@ class AsyncBrotli(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[BrotliEditResponse]: + ) -> Optional[ZonesBrotli]: """ 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 @@ class AsyncBrotli(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[BrotliEditResponse]], ResultWrapper[BrotliEditResponse]), + cast_to=cast(Type[Optional[ZonesBrotli]], ResultWrapper[ZonesBrotli]), ) async def get( @@ -186,7 +186,7 @@ class AsyncBrotli(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[BrotliGetResponse]: + ) -> Optional[ZonesBrotli]: """ 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 @@ class AsyncBrotli(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[BrotliGetResponse]], ResultWrapper[BrotliGetResponse]), + cast_to=cast(Type[Optional[ZonesBrotli]], ResultWrapper[ZonesBrotli]), ) diff --git a/src/cloudflare/resources/zones/settings/browser_cache_ttl.py b/src/cloudflare/resources/zones/settings/browser_cache_ttl.py index 09ae8b78e..4e06b9a1f 100644 --- a/src/cloudflare/resources/zones/settings/browser_cache_ttl.py +++ b/src/cloudflare/resources/zones/settings/browser_cache_ttl.py @@ -24,11 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ( - BrowserCacheTTLGetResponse, - BrowserCacheTTLEditResponse, - browser_cache_ttl_edit_params, -) +from ....types.zones.settings import ZonesBrowserCacheTTL, browser_cache_ttl_edit_params __all__ = ["BrowserCacheTTL", "AsyncBrowserCacheTTL"] @@ -82,7 +78,7 @@ class BrowserCacheTTL(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[BrowserCacheTTLEditResponse]: + ) -> Optional[ZonesBrowserCacheTTL]: """ Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources will remain on your visitors' computers. Cloudflare will honor any larger times @@ -115,7 +111,7 @@ class BrowserCacheTTL(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[BrowserCacheTTLEditResponse]], ResultWrapper[BrowserCacheTTLEditResponse]), + cast_to=cast(Type[Optional[ZonesBrowserCacheTTL]], ResultWrapper[ZonesBrowserCacheTTL]), ) def get( @@ -128,7 +124,7 @@ class BrowserCacheTTL(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[BrowserCacheTTLGetResponse]: + ) -> Optional[ZonesBrowserCacheTTL]: """ Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources will remain on your visitors' computers. Cloudflare will honor any larger times @@ -157,7 +153,7 @@ class BrowserCacheTTL(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[BrowserCacheTTLGetResponse]], ResultWrapper[BrowserCacheTTLGetResponse]), + cast_to=cast(Type[Optional[ZonesBrowserCacheTTL]], ResultWrapper[ZonesBrowserCacheTTL]), ) @@ -210,7 +206,7 @@ class AsyncBrowserCacheTTL(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[BrowserCacheTTLEditResponse]: + ) -> Optional[ZonesBrowserCacheTTL]: """ Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources will remain on your visitors' computers. Cloudflare will honor any larger times @@ -243,7 +239,7 @@ class AsyncBrowserCacheTTL(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[BrowserCacheTTLEditResponse]], ResultWrapper[BrowserCacheTTLEditResponse]), + cast_to=cast(Type[Optional[ZonesBrowserCacheTTL]], ResultWrapper[ZonesBrowserCacheTTL]), ) async def get( @@ -256,7 +252,7 @@ class AsyncBrowserCacheTTL(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[BrowserCacheTTLGetResponse]: + ) -> Optional[ZonesBrowserCacheTTL]: """ Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources will remain on your visitors' computers. Cloudflare will honor any larger times @@ -285,7 +281,7 @@ class AsyncBrowserCacheTTL(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[BrowserCacheTTLGetResponse]], ResultWrapper[BrowserCacheTTLGetResponse]), + cast_to=cast(Type[Optional[ZonesBrowserCacheTTL]], ResultWrapper[ZonesBrowserCacheTTL]), ) diff --git a/src/cloudflare/resources/zones/settings/browser_check.py b/src/cloudflare/resources/zones/settings/browser_check.py index be88625c0..5d1011707 100644 --- a/src/cloudflare/resources/zones/settings/browser_check.py +++ b/src/cloudflare/resources/zones/settings/browser_check.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import BrowserCheckGetResponse, BrowserCheckEditResponse, browser_check_edit_params +from ....types.zones.settings import ZonesBrowserCheck, browser_check_edit_params __all__ = ["BrowserCheck", "AsyncBrowserCheck"] @@ -49,7 +49,7 @@ class BrowserCheck(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[BrowserCheckEditResponse]: + ) -> Optional[ZonesBrowserCheck]: """ 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 @@ class BrowserCheck(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[BrowserCheckEditResponse]], ResultWrapper[BrowserCheckEditResponse]), + cast_to=cast(Type[Optional[ZonesBrowserCheck]], ResultWrapper[ZonesBrowserCheck]), ) def get( @@ -95,7 +95,7 @@ class BrowserCheck(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[BrowserCheckGetResponse]: + ) -> Optional[ZonesBrowserCheck]: """ 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 @@ class BrowserCheck(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[BrowserCheckGetResponse]], ResultWrapper[BrowserCheckGetResponse]), + cast_to=cast(Type[Optional[ZonesBrowserCheck]], ResultWrapper[ZonesBrowserCheck]), ) @@ -149,7 +149,7 @@ class AsyncBrowserCheck(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[BrowserCheckEditResponse]: + ) -> Optional[ZonesBrowserCheck]: """ 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 @@ class AsyncBrowserCheck(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[BrowserCheckEditResponse]], ResultWrapper[BrowserCheckEditResponse]), + cast_to=cast(Type[Optional[ZonesBrowserCheck]], ResultWrapper[ZonesBrowserCheck]), ) async def get( @@ -195,7 +195,7 @@ class AsyncBrowserCheck(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[BrowserCheckGetResponse]: + ) -> Optional[ZonesBrowserCheck]: """ 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 @@ class AsyncBrowserCheck(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[BrowserCheckGetResponse]], ResultWrapper[BrowserCheckGetResponse]), + cast_to=cast(Type[Optional[ZonesBrowserCheck]], ResultWrapper[ZonesBrowserCheck]), ) diff --git a/src/cloudflare/resources/zones/settings/cache_level.py b/src/cloudflare/resources/zones/settings/cache_level.py index 2137e6e1f..64aacfefb 100644 --- a/src/cloudflare/resources/zones/settings/cache_level.py +++ b/src/cloudflare/resources/zones/settings/cache_level.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import CacheLevelGetResponse, CacheLevelEditResponse, cache_level_edit_params +from ....types.zones.settings import ZonesCacheLevel, cache_level_edit_params __all__ = ["CacheLevel", "AsyncCacheLevel"] @@ -49,7 +49,7 @@ class CacheLevel(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CacheLevelEditResponse]: + ) -> Optional[ZonesCacheLevel]: """Cache Level functions based off the setting level. The basic setting will cache @@ -83,7 +83,7 @@ class CacheLevel(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[CacheLevelEditResponse]], ResultWrapper[CacheLevelEditResponse]), + cast_to=cast(Type[Optional[ZonesCacheLevel]], ResultWrapper[ZonesCacheLevel]), ) def get( @@ -96,7 +96,7 @@ class CacheLevel(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CacheLevelGetResponse]: + ) -> Optional[ZonesCacheLevel]: """Cache Level functions based off the setting level. The basic setting will cache @@ -127,7 +127,7 @@ class CacheLevel(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[CacheLevelGetResponse]], ResultWrapper[CacheLevelGetResponse]), + cast_to=cast(Type[Optional[ZonesCacheLevel]], ResultWrapper[ZonesCacheLevel]), ) @@ -151,7 +151,7 @@ class AsyncCacheLevel(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CacheLevelEditResponse]: + ) -> Optional[ZonesCacheLevel]: """Cache Level functions based off the setting level. The basic setting will cache @@ -185,7 +185,7 @@ class AsyncCacheLevel(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[CacheLevelEditResponse]], ResultWrapper[CacheLevelEditResponse]), + cast_to=cast(Type[Optional[ZonesCacheLevel]], ResultWrapper[ZonesCacheLevel]), ) async def get( @@ -198,7 +198,7 @@ class AsyncCacheLevel(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CacheLevelGetResponse]: + ) -> Optional[ZonesCacheLevel]: """Cache Level functions based off the setting level. The basic setting will cache @@ -229,7 +229,7 @@ class AsyncCacheLevel(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[CacheLevelGetResponse]], ResultWrapper[CacheLevelGetResponse]), + cast_to=cast(Type[Optional[ZonesCacheLevel]], ResultWrapper[ZonesCacheLevel]), ) diff --git a/src/cloudflare/resources/zones/settings/challenge_ttl.py b/src/cloudflare/resources/zones/settings/challenge_ttl.py index 50c8483ae..786f99857 100644 --- a/src/cloudflare/resources/zones/settings/challenge_ttl.py +++ b/src/cloudflare/resources/zones/settings/challenge_ttl.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ChallengeTTLGetResponse, ChallengeTTLEditResponse, challenge_ttl_edit_params +from ....types.zones.settings import ZonesChallengeTTL, challenge_ttl_edit_params __all__ = ["ChallengeTTL", "AsyncChallengeTTL"] @@ -49,7 +49,7 @@ class ChallengeTTL(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ChallengeTTLEditResponse]: + ) -> Optional[ZonesChallengeTTL]: """ 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 @@ class ChallengeTTL(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ChallengeTTLEditResponse]], ResultWrapper[ChallengeTTLEditResponse]), + cast_to=cast(Type[Optional[ZonesChallengeTTL]], ResultWrapper[ZonesChallengeTTL]), ) def get( @@ -95,7 +95,7 @@ class ChallengeTTL(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ChallengeTTLGetResponse]: + ) -> Optional[ZonesChallengeTTL]: """ 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 @@ class ChallengeTTL(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ChallengeTTLGetResponse]], ResultWrapper[ChallengeTTLGetResponse]), + cast_to=cast(Type[Optional[ZonesChallengeTTL]], ResultWrapper[ZonesChallengeTTL]), ) @@ -149,7 +149,7 @@ class AsyncChallengeTTL(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ChallengeTTLEditResponse]: + ) -> Optional[ZonesChallengeTTL]: """ 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 @@ class AsyncChallengeTTL(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ChallengeTTLEditResponse]], ResultWrapper[ChallengeTTLEditResponse]), + cast_to=cast(Type[Optional[ZonesChallengeTTL]], ResultWrapper[ZonesChallengeTTL]), ) async def get( @@ -195,7 +195,7 @@ class AsyncChallengeTTL(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ChallengeTTLGetResponse]: + ) -> Optional[ZonesChallengeTTL]: """ 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 @@ class AsyncChallengeTTL(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ChallengeTTLGetResponse]], ResultWrapper[ChallengeTTLGetResponse]), + cast_to=cast(Type[Optional[ZonesChallengeTTL]], ResultWrapper[ZonesChallengeTTL]), ) diff --git a/src/cloudflare/resources/zones/settings/ciphers.py b/src/cloudflare/resources/zones/settings/ciphers.py index b8b265752..b5b4e1473 100644 --- a/src/cloudflare/resources/zones/settings/ciphers.py +++ b/src/cloudflare/resources/zones/settings/ciphers.py @@ -23,7 +23,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import CipherGetResponse, CipherEditResponse, cipher_edit_params +from ....types.zones.settings import ZonesCiphers, cipher_edit_params __all__ = ["Ciphers", "AsyncCiphers"] @@ -48,7 +48,7 @@ class Ciphers(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CipherEditResponse]: + ) -> Optional[ZonesCiphers]: """ Changes ciphers setting. @@ -77,7 +77,7 @@ class Ciphers(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[CipherEditResponse]], ResultWrapper[CipherEditResponse]), + cast_to=cast(Type[Optional[ZonesCiphers]], ResultWrapper[ZonesCiphers]), ) def get( @@ -90,7 +90,7 @@ class Ciphers(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CipherGetResponse]: + ) -> Optional[ZonesCiphers]: """ Gets ciphers setting. @@ -116,7 +116,7 @@ class Ciphers(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[CipherGetResponse]], ResultWrapper[CipherGetResponse]), + cast_to=cast(Type[Optional[ZonesCiphers]], ResultWrapper[ZonesCiphers]), ) @@ -140,7 +140,7 @@ class AsyncCiphers(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CipherEditResponse]: + ) -> Optional[ZonesCiphers]: """ Changes ciphers setting. @@ -169,7 +169,7 @@ class AsyncCiphers(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[CipherEditResponse]], ResultWrapper[CipherEditResponse]), + cast_to=cast(Type[Optional[ZonesCiphers]], ResultWrapper[ZonesCiphers]), ) async def get( @@ -182,7 +182,7 @@ class AsyncCiphers(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CipherGetResponse]: + ) -> Optional[ZonesCiphers]: """ Gets ciphers setting. @@ -208,7 +208,7 @@ class AsyncCiphers(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[CipherGetResponse]], ResultWrapper[CipherGetResponse]), + cast_to=cast(Type[Optional[ZonesCiphers]], ResultWrapper[ZonesCiphers]), ) diff --git a/src/cloudflare/resources/zones/settings/development_mode.py b/src/cloudflare/resources/zones/settings/development_mode.py index b5710fdc7..9ada2ea34 100644 --- a/src/cloudflare/resources/zones/settings/development_mode.py +++ b/src/cloudflare/resources/zones/settings/development_mode.py @@ -24,11 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ( - DevelopmentModeGetResponse, - DevelopmentModeEditResponse, - development_mode_edit_params, -) +from ....types.zones.settings import ZonesDevelopmentMode, development_mode_edit_params __all__ = ["DevelopmentMode", "AsyncDevelopmentMode"] @@ -53,7 +49,7 @@ class DevelopmentMode(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DevelopmentModeEditResponse]: + ) -> Optional[ZonesDevelopmentMode]: """ 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 @@ -87,7 +83,7 @@ class DevelopmentMode(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DevelopmentModeEditResponse]], ResultWrapper[DevelopmentModeEditResponse]), + cast_to=cast(Type[Optional[ZonesDevelopmentMode]], ResultWrapper[ZonesDevelopmentMode]), ) def get( @@ -100,7 +96,7 @@ class DevelopmentMode(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DevelopmentModeGetResponse]: + ) -> Optional[ZonesDevelopmentMode]: """ 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 @@ -131,7 +127,7 @@ class DevelopmentMode(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DevelopmentModeGetResponse]], ResultWrapper[DevelopmentModeGetResponse]), + cast_to=cast(Type[Optional[ZonesDevelopmentMode]], ResultWrapper[ZonesDevelopmentMode]), ) @@ -155,7 +151,7 @@ class AsyncDevelopmentMode(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DevelopmentModeEditResponse]: + ) -> Optional[ZonesDevelopmentMode]: """ 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 @@ -189,7 +185,7 @@ class AsyncDevelopmentMode(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DevelopmentModeEditResponse]], ResultWrapper[DevelopmentModeEditResponse]), + cast_to=cast(Type[Optional[ZonesDevelopmentMode]], ResultWrapper[ZonesDevelopmentMode]), ) async def get( @@ -202,7 +198,7 @@ class AsyncDevelopmentMode(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DevelopmentModeGetResponse]: + ) -> Optional[ZonesDevelopmentMode]: """ 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 @@ -233,7 +229,7 @@ class AsyncDevelopmentMode(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[DevelopmentModeGetResponse]], ResultWrapper[DevelopmentModeGetResponse]), + cast_to=cast(Type[Optional[ZonesDevelopmentMode]], ResultWrapper[ZonesDevelopmentMode]), ) diff --git a/src/cloudflare/resources/zones/settings/early_hints.py b/src/cloudflare/resources/zones/settings/early_hints.py index ee66c8c7b..7444d9ed0 100644 --- a/src/cloudflare/resources/zones/settings/early_hints.py +++ b/src/cloudflare/resources/zones/settings/early_hints.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import EarlyHintGetResponse, EarlyHintEditResponse, early_hint_edit_params +from ....types.zones.settings import ZonesEarlyHints, early_hint_edit_params __all__ = ["EarlyHints", "AsyncEarlyHints"] @@ -49,7 +49,7 @@ class EarlyHints(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[EarlyHintEditResponse]: + ) -> Optional[ZonesEarlyHints]: """ 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 @@ class EarlyHints(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[EarlyHintEditResponse]], ResultWrapper[EarlyHintEditResponse]), + cast_to=cast(Type[Optional[ZonesEarlyHints]], ResultWrapper[ZonesEarlyHints]), ) def get( @@ -94,7 +94,7 @@ class EarlyHints(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[EarlyHintGetResponse]: + ) -> Optional[ZonesEarlyHints]: """ 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 @@ class EarlyHints(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[EarlyHintGetResponse]], ResultWrapper[EarlyHintGetResponse]), + cast_to=cast(Type[Optional[ZonesEarlyHints]], ResultWrapper[ZonesEarlyHints]), ) @@ -147,7 +147,7 @@ class AsyncEarlyHints(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[EarlyHintEditResponse]: + ) -> Optional[ZonesEarlyHints]: """ 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 @@ class AsyncEarlyHints(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[EarlyHintEditResponse]], ResultWrapper[EarlyHintEditResponse]), + cast_to=cast(Type[Optional[ZonesEarlyHints]], ResultWrapper[ZonesEarlyHints]), ) async def get( @@ -192,7 +192,7 @@ class AsyncEarlyHints(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[EarlyHintGetResponse]: + ) -> Optional[ZonesEarlyHints]: """ 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 @@ class AsyncEarlyHints(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[EarlyHintGetResponse]], ResultWrapper[EarlyHintGetResponse]), + cast_to=cast(Type[Optional[ZonesEarlyHints]], ResultWrapper[ZonesEarlyHints]), ) diff --git a/src/cloudflare/resources/zones/settings/email_obfuscation.py b/src/cloudflare/resources/zones/settings/email_obfuscation.py index 8a88a5dd0..ff149dc4b 100644 --- a/src/cloudflare/resources/zones/settings/email_obfuscation.py +++ b/src/cloudflare/resources/zones/settings/email_obfuscation.py @@ -24,11 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ( - EmailObfuscationGetResponse, - EmailObfuscationEditResponse, - email_obfuscation_edit_params, -) +from ....types.zones.settings import ZonesEmailObfuscation, email_obfuscation_edit_params __all__ = ["EmailObfuscation", "AsyncEmailObfuscation"] @@ -53,7 +49,7 @@ class EmailObfuscation(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[EmailObfuscationEditResponse]: + ) -> Optional[ZonesEmailObfuscation]: """ Encrypt email adresses on your web page from bots, while keeping them visible to humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). @@ -83,7 +79,7 @@ class EmailObfuscation(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[EmailObfuscationEditResponse]], ResultWrapper[EmailObfuscationEditResponse]), + cast_to=cast(Type[Optional[ZonesEmailObfuscation]], ResultWrapper[ZonesEmailObfuscation]), ) def get( @@ -96,7 +92,7 @@ class EmailObfuscation(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[EmailObfuscationGetResponse]: + ) -> Optional[ZonesEmailObfuscation]: """ Encrypt email adresses on your web page from bots, while keeping them visible to humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). @@ -123,7 +119,7 @@ class EmailObfuscation(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[EmailObfuscationGetResponse]], ResultWrapper[EmailObfuscationGetResponse]), + cast_to=cast(Type[Optional[ZonesEmailObfuscation]], ResultWrapper[ZonesEmailObfuscation]), ) @@ -147,7 +143,7 @@ class AsyncEmailObfuscation(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[EmailObfuscationEditResponse]: + ) -> Optional[ZonesEmailObfuscation]: """ Encrypt email adresses on your web page from bots, while keeping them visible to humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). @@ -179,7 +175,7 @@ class AsyncEmailObfuscation(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[EmailObfuscationEditResponse]], ResultWrapper[EmailObfuscationEditResponse]), + cast_to=cast(Type[Optional[ZonesEmailObfuscation]], ResultWrapper[ZonesEmailObfuscation]), ) async def get( @@ -192,7 +188,7 @@ class AsyncEmailObfuscation(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[EmailObfuscationGetResponse]: + ) -> Optional[ZonesEmailObfuscation]: """ Encrypt email adresses on your web page from bots, while keeping them visible to humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). @@ -219,7 +215,7 @@ class AsyncEmailObfuscation(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[EmailObfuscationGetResponse]], ResultWrapper[EmailObfuscationGetResponse]), + cast_to=cast(Type[Optional[ZonesEmailObfuscation]], ResultWrapper[ZonesEmailObfuscation]), ) diff --git a/src/cloudflare/resources/zones/settings/font_settings.py b/src/cloudflare/resources/zones/settings/font_settings.py index d9b599e33..74284103d 100644 --- a/src/cloudflare/resources/zones/settings/font_settings.py +++ b/src/cloudflare/resources/zones/settings/font_settings.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import FontSettingGetResponse, FontSettingEditResponse, font_setting_edit_params +from ....types.zones.settings import SpeedCloudflareFonts, font_setting_edit_params __all__ = ["FontSettings", "AsyncFontSettings"] @@ -49,7 +49,7 @@ class FontSettings(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[FontSettingEditResponse]: + ) -> Optional[SpeedCloudflareFonts]: """Enhance your website's font delivery with Cloudflare Fonts. Deliver Google @@ -81,7 +81,7 @@ class FontSettings(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[FontSettingEditResponse]], ResultWrapper[FontSettingEditResponse]), + cast_to=cast(Type[Optional[SpeedCloudflareFonts]], ResultWrapper[SpeedCloudflareFonts]), ) def get( @@ -94,7 +94,7 @@ class FontSettings(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[FontSettingGetResponse]: + ) -> Optional[SpeedCloudflareFonts]: """Enhance your website's font delivery with Cloudflare Fonts. Deliver Google @@ -123,7 +123,7 @@ class FontSettings(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[FontSettingGetResponse]], ResultWrapper[FontSettingGetResponse]), + cast_to=cast(Type[Optional[SpeedCloudflareFonts]], ResultWrapper[SpeedCloudflareFonts]), ) @@ -147,7 +147,7 @@ class AsyncFontSettings(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[FontSettingEditResponse]: + ) -> Optional[SpeedCloudflareFonts]: """Enhance your website's font delivery with Cloudflare Fonts. Deliver Google @@ -179,7 +179,7 @@ class AsyncFontSettings(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[FontSettingEditResponse]], ResultWrapper[FontSettingEditResponse]), + cast_to=cast(Type[Optional[SpeedCloudflareFonts]], ResultWrapper[SpeedCloudflareFonts]), ) async def get( @@ -192,7 +192,7 @@ class AsyncFontSettings(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[FontSettingGetResponse]: + ) -> Optional[SpeedCloudflareFonts]: """Enhance your website's font delivery with Cloudflare Fonts. Deliver Google @@ -221,7 +221,7 @@ class AsyncFontSettings(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[FontSettingGetResponse]], ResultWrapper[FontSettingGetResponse]), + cast_to=cast(Type[Optional[SpeedCloudflareFonts]], ResultWrapper[SpeedCloudflareFonts]), ) diff --git a/src/cloudflare/resources/zones/settings/h2_prioritization.py b/src/cloudflare/resources/zones/settings/h2_prioritization.py index ce9953bdd..88db1f719 100644 --- a/src/cloudflare/resources/zones/settings/h2_prioritization.py +++ b/src/cloudflare/resources/zones/settings/h2_prioritization.py @@ -23,11 +23,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ( - H2PrioritizationGetResponse, - H2PrioritizationEditResponse, - h2_prioritization_edit_params, -) +from ....types.zones.settings import ZonesH2Prioritization, ZonesH2PrioritizationParam, h2_prioritization_edit_params __all__ = ["H2Prioritization", "AsyncH2Prioritization"] @@ -45,14 +41,14 @@ class H2Prioritization(SyncAPIResource): self, *, zone_id: str, - value: h2_prioritization_edit_params.Value, + value: ZonesH2PrioritizationParam, # 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[H2PrioritizationEditResponse]: + ) -> Optional[ZonesH2Prioritization]: """ Gets HTTP/2 Edge Prioritization setting. @@ -83,7 +79,7 @@ class H2Prioritization(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[H2PrioritizationEditResponse]], ResultWrapper[H2PrioritizationEditResponse]), + cast_to=cast(Type[Optional[ZonesH2Prioritization]], ResultWrapper[ZonesH2Prioritization]), ) def get( @@ -96,7 +92,7 @@ class H2Prioritization(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[H2PrioritizationGetResponse]: + ) -> Optional[ZonesH2Prioritization]: """ Gets HTTP/2 Edge Prioritization setting. @@ -122,7 +118,7 @@ class H2Prioritization(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[H2PrioritizationGetResponse]], ResultWrapper[H2PrioritizationGetResponse]), + cast_to=cast(Type[Optional[ZonesH2Prioritization]], ResultWrapper[ZonesH2Prioritization]), ) @@ -139,14 +135,14 @@ class AsyncH2Prioritization(AsyncAPIResource): self, *, zone_id: str, - value: h2_prioritization_edit_params.Value, + value: ZonesH2PrioritizationParam, # 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[H2PrioritizationEditResponse]: + ) -> Optional[ZonesH2Prioritization]: """ Gets HTTP/2 Edge Prioritization setting. @@ -179,7 +175,7 @@ class AsyncH2Prioritization(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[H2PrioritizationEditResponse]], ResultWrapper[H2PrioritizationEditResponse]), + cast_to=cast(Type[Optional[ZonesH2Prioritization]], ResultWrapper[ZonesH2Prioritization]), ) async def get( @@ -192,7 +188,7 @@ class AsyncH2Prioritization(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[H2PrioritizationGetResponse]: + ) -> Optional[ZonesH2Prioritization]: """ Gets HTTP/2 Edge Prioritization setting. @@ -218,7 +214,7 @@ class AsyncH2Prioritization(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[H2PrioritizationGetResponse]], ResultWrapper[H2PrioritizationGetResponse]), + cast_to=cast(Type[Optional[ZonesH2Prioritization]], ResultWrapper[ZonesH2Prioritization]), ) diff --git a/src/cloudflare/resources/zones/settings/hotlink_protection.py b/src/cloudflare/resources/zones/settings/hotlink_protection.py index 411d3f6f1..f2bc1d7a7 100644 --- a/src/cloudflare/resources/zones/settings/hotlink_protection.py +++ b/src/cloudflare/resources/zones/settings/hotlink_protection.py @@ -24,11 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ( - HotlinkProtectionGetResponse, - HotlinkProtectionEditResponse, - hotlink_protection_edit_params, -) +from ....types.zones.settings import ZonesHotlinkProtection, hotlink_protection_edit_params __all__ = ["HotlinkProtection", "AsyncHotlinkProtection"] @@ -53,7 +49,7 @@ class HotlinkProtection(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[HotlinkProtectionEditResponse]: + ) -> Optional[ZonesHotlinkProtection]: """ 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 @@ -88,7 +84,7 @@ class HotlinkProtection(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[HotlinkProtectionEditResponse]], ResultWrapper[HotlinkProtectionEditResponse]), + cast_to=cast(Type[Optional[ZonesHotlinkProtection]], ResultWrapper[ZonesHotlinkProtection]), ) def get( @@ -101,7 +97,7 @@ class HotlinkProtection(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[HotlinkProtectionGetResponse]: + ) -> Optional[ZonesHotlinkProtection]: """ 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 @@ -133,7 +129,7 @@ class HotlinkProtection(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[HotlinkProtectionGetResponse]], ResultWrapper[HotlinkProtectionGetResponse]), + cast_to=cast(Type[Optional[ZonesHotlinkProtection]], ResultWrapper[ZonesHotlinkProtection]), ) @@ -157,7 +153,7 @@ class AsyncHotlinkProtection(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[HotlinkProtectionEditResponse]: + ) -> Optional[ZonesHotlinkProtection]: """ 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 @@ -194,7 +190,7 @@ class AsyncHotlinkProtection(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[HotlinkProtectionEditResponse]], ResultWrapper[HotlinkProtectionEditResponse]), + cast_to=cast(Type[Optional[ZonesHotlinkProtection]], ResultWrapper[ZonesHotlinkProtection]), ) async def get( @@ -207,7 +203,7 @@ class AsyncHotlinkProtection(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[HotlinkProtectionGetResponse]: + ) -> Optional[ZonesHotlinkProtection]: """ 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 @@ -239,7 +235,7 @@ class AsyncHotlinkProtection(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[HotlinkProtectionGetResponse]], ResultWrapper[HotlinkProtectionGetResponse]), + cast_to=cast(Type[Optional[ZonesHotlinkProtection]], ResultWrapper[ZonesHotlinkProtection]), ) diff --git a/src/cloudflare/resources/zones/settings/http2.py b/src/cloudflare/resources/zones/settings/http2.py index 8bf62327c..e59352c18 100644 --- a/src/cloudflare/resources/zones/settings/http2.py +++ b/src/cloudflare/resources/zones/settings/http2.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import HTTP2GetResponse, HTTP2EditResponse, http2_edit_params +from ....types.zones.settings import ZonesHTTP2, http2_edit_params __all__ = ["HTTP2", "AsyncHTTP2"] @@ -49,7 +49,7 @@ class HTTP2(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[HTTP2EditResponse]: + ) -> Optional[ZonesHTTP2]: """ Value of the HTTP2 setting. @@ -78,7 +78,7 @@ class HTTP2(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[HTTP2EditResponse]], ResultWrapper[HTTP2EditResponse]), + cast_to=cast(Type[Optional[ZonesHTTP2]], ResultWrapper[ZonesHTTP2]), ) def get( @@ -91,7 +91,7 @@ class HTTP2(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[HTTP2GetResponse]: + ) -> Optional[ZonesHTTP2]: """ Value of the HTTP2 setting. @@ -117,7 +117,7 @@ class HTTP2(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[HTTP2GetResponse]], ResultWrapper[HTTP2GetResponse]), + cast_to=cast(Type[Optional[ZonesHTTP2]], ResultWrapper[ZonesHTTP2]), ) @@ -141,7 +141,7 @@ class AsyncHTTP2(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[HTTP2EditResponse]: + ) -> Optional[ZonesHTTP2]: """ Value of the HTTP2 setting. @@ -170,7 +170,7 @@ class AsyncHTTP2(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[HTTP2EditResponse]], ResultWrapper[HTTP2EditResponse]), + cast_to=cast(Type[Optional[ZonesHTTP2]], ResultWrapper[ZonesHTTP2]), ) async def get( @@ -183,7 +183,7 @@ class AsyncHTTP2(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[HTTP2GetResponse]: + ) -> Optional[ZonesHTTP2]: """ Value of the HTTP2 setting. @@ -209,7 +209,7 @@ class AsyncHTTP2(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[HTTP2GetResponse]], ResultWrapper[HTTP2GetResponse]), + cast_to=cast(Type[Optional[ZonesHTTP2]], ResultWrapper[ZonesHTTP2]), ) diff --git a/src/cloudflare/resources/zones/settings/http3.py b/src/cloudflare/resources/zones/settings/http3.py index 7fa63d32a..35f674e67 100644 --- a/src/cloudflare/resources/zones/settings/http3.py +++ b/src/cloudflare/resources/zones/settings/http3.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import HTTP3GetResponse, HTTP3EditResponse, http3_edit_params +from ....types.zones.settings import ZonesHTTP3, http3_edit_params __all__ = ["HTTP3", "AsyncHTTP3"] @@ -49,7 +49,7 @@ class HTTP3(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[HTTP3EditResponse]: + ) -> Optional[ZonesHTTP3]: """ Value of the HTTP3 setting. @@ -78,7 +78,7 @@ class HTTP3(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[HTTP3EditResponse]], ResultWrapper[HTTP3EditResponse]), + cast_to=cast(Type[Optional[ZonesHTTP3]], ResultWrapper[ZonesHTTP3]), ) def get( @@ -91,7 +91,7 @@ class HTTP3(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[HTTP3GetResponse]: + ) -> Optional[ZonesHTTP3]: """ Value of the HTTP3 setting. @@ -117,7 +117,7 @@ class HTTP3(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[HTTP3GetResponse]], ResultWrapper[HTTP3GetResponse]), + cast_to=cast(Type[Optional[ZonesHTTP3]], ResultWrapper[ZonesHTTP3]), ) @@ -141,7 +141,7 @@ class AsyncHTTP3(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[HTTP3EditResponse]: + ) -> Optional[ZonesHTTP3]: """ Value of the HTTP3 setting. @@ -170,7 +170,7 @@ class AsyncHTTP3(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[HTTP3EditResponse]], ResultWrapper[HTTP3EditResponse]), + cast_to=cast(Type[Optional[ZonesHTTP3]], ResultWrapper[ZonesHTTP3]), ) async def get( @@ -183,7 +183,7 @@ class AsyncHTTP3(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[HTTP3GetResponse]: + ) -> Optional[ZonesHTTP3]: """ Value of the HTTP3 setting. @@ -209,7 +209,7 @@ class AsyncHTTP3(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[HTTP3GetResponse]], ResultWrapper[HTTP3GetResponse]), + cast_to=cast(Type[Optional[ZonesHTTP3]], ResultWrapper[ZonesHTTP3]), ) diff --git a/src/cloudflare/resources/zones/settings/image_resizing.py b/src/cloudflare/resources/zones/settings/image_resizing.py index bd29a3f41..32dd09cbe 100644 --- a/src/cloudflare/resources/zones/settings/image_resizing.py +++ b/src/cloudflare/resources/zones/settings/image_resizing.py @@ -23,7 +23,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ImageResizingGetResponse, ImageResizingEditResponse, image_resizing_edit_params +from ....types.zones.settings import ZonesImageResizing, ZonesImageResizingParam, image_resizing_edit_params __all__ = ["ImageResizing", "AsyncImageResizing"] @@ -41,14 +41,14 @@ class ImageResizing(SyncAPIResource): self, *, zone_id: str, - value: image_resizing_edit_params.Value, + value: ZonesImageResizingParam, # 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[ImageResizingEditResponse]: + ) -> Optional[ZonesImageResizing]: """ Image Resizing provides on-demand resizing, conversion and optimisation for images served through Cloudflare's network. Refer to the @@ -83,7 +83,7 @@ class ImageResizing(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ImageResizingEditResponse]], ResultWrapper[ImageResizingEditResponse]), + cast_to=cast(Type[Optional[ZonesImageResizing]], ResultWrapper[ZonesImageResizing]), ) def get( @@ -96,7 +96,7 @@ class ImageResizing(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ImageResizingGetResponse]: + ) -> Optional[ZonesImageResizing]: """ Image Resizing provides on-demand resizing, conversion and optimisation for images served through Cloudflare's network. Refer to the @@ -125,7 +125,7 @@ class ImageResizing(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ImageResizingGetResponse]], ResultWrapper[ImageResizingGetResponse]), + cast_to=cast(Type[Optional[ZonesImageResizing]], ResultWrapper[ZonesImageResizing]), ) @@ -142,14 +142,14 @@ class AsyncImageResizing(AsyncAPIResource): self, *, zone_id: str, - value: image_resizing_edit_params.Value, + value: ZonesImageResizingParam, # 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[ImageResizingEditResponse]: + ) -> Optional[ZonesImageResizing]: """ Image Resizing provides on-demand resizing, conversion and optimisation for images served through Cloudflare's network. Refer to the @@ -184,7 +184,7 @@ class AsyncImageResizing(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ImageResizingEditResponse]], ResultWrapper[ImageResizingEditResponse]), + cast_to=cast(Type[Optional[ZonesImageResizing]], ResultWrapper[ZonesImageResizing]), ) async def get( @@ -197,7 +197,7 @@ class AsyncImageResizing(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ImageResizingGetResponse]: + ) -> Optional[ZonesImageResizing]: """ Image Resizing provides on-demand resizing, conversion and optimisation for images served through Cloudflare's network. Refer to the @@ -226,7 +226,7 @@ class AsyncImageResizing(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ImageResizingGetResponse]], ResultWrapper[ImageResizingGetResponse]), + cast_to=cast(Type[Optional[ZonesImageResizing]], ResultWrapper[ZonesImageResizing]), ) diff --git a/src/cloudflare/resources/zones/settings/ip_geolocation.py b/src/cloudflare/resources/zones/settings/ip_geolocation.py index 46a4bbf21..7376eab71 100644 --- a/src/cloudflare/resources/zones/settings/ip_geolocation.py +++ b/src/cloudflare/resources/zones/settings/ip_geolocation.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import IPGeolocationGetResponse, IPGeolocationEditResponse, ip_geolocation_edit_params +from ....types.zones.settings import ZonesIPGeolocation, ip_geolocation_edit_params __all__ = ["IPGeolocation", "AsyncIPGeolocation"] @@ -49,7 +49,7 @@ class IPGeolocation(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IPGeolocationEditResponse]: + ) -> Optional[ZonesIPGeolocation]: """ Enable IP Geolocation to have Cloudflare geolocate visitors to your website and pass the country code to you. @@ -80,7 +80,7 @@ class IPGeolocation(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IPGeolocationEditResponse]], ResultWrapper[IPGeolocationEditResponse]), + cast_to=cast(Type[Optional[ZonesIPGeolocation]], ResultWrapper[ZonesIPGeolocation]), ) def get( @@ -93,7 +93,7 @@ class IPGeolocation(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IPGeolocationGetResponse]: + ) -> Optional[ZonesIPGeolocation]: """ Enable IP Geolocation to have Cloudflare geolocate visitors to your website and pass the country code to you. @@ -121,7 +121,7 @@ class IPGeolocation(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IPGeolocationGetResponse]], ResultWrapper[IPGeolocationGetResponse]), + cast_to=cast(Type[Optional[ZonesIPGeolocation]], ResultWrapper[ZonesIPGeolocation]), ) @@ -145,7 +145,7 @@ class AsyncIPGeolocation(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IPGeolocationEditResponse]: + ) -> Optional[ZonesIPGeolocation]: """ Enable IP Geolocation to have Cloudflare geolocate visitors to your website and pass the country code to you. @@ -176,7 +176,7 @@ class AsyncIPGeolocation(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IPGeolocationEditResponse]], ResultWrapper[IPGeolocationEditResponse]), + cast_to=cast(Type[Optional[ZonesIPGeolocation]], ResultWrapper[ZonesIPGeolocation]), ) async def get( @@ -189,7 +189,7 @@ class AsyncIPGeolocation(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IPGeolocationGetResponse]: + ) -> Optional[ZonesIPGeolocation]: """ Enable IP Geolocation to have Cloudflare geolocate visitors to your website and pass the country code to you. @@ -217,7 +217,7 @@ class AsyncIPGeolocation(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IPGeolocationGetResponse]], ResultWrapper[IPGeolocationGetResponse]), + cast_to=cast(Type[Optional[ZonesIPGeolocation]], ResultWrapper[ZonesIPGeolocation]), ) diff --git a/src/cloudflare/resources/zones/settings/ipv6.py b/src/cloudflare/resources/zones/settings/ipv6.py index f6b21109a..9c4dcca97 100644 --- a/src/cloudflare/resources/zones/settings/ipv6.py +++ b/src/cloudflare/resources/zones/settings/ipv6.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import IPV6GetResponse, IPV6EditResponse, ipv6_edit_params +from ....types.zones.settings import ZonesIPV6, ipv6_edit_params __all__ = ["IPV6", "AsyncIPV6"] @@ -49,7 +49,7 @@ class IPV6(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IPV6EditResponse]: + ) -> Optional[ZonesIPV6]: """ Enable IPv6 on all subdomains that are Cloudflare enabled. (https://support.cloudflare.com/hc/en-us/articles/200168586). @@ -79,7 +79,7 @@ class IPV6(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IPV6EditResponse]], ResultWrapper[IPV6EditResponse]), + cast_to=cast(Type[Optional[ZonesIPV6]], ResultWrapper[ZonesIPV6]), ) def get( @@ -92,7 +92,7 @@ class IPV6(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IPV6GetResponse]: + ) -> Optional[ZonesIPV6]: """ Enable IPv6 on all subdomains that are Cloudflare enabled. (https://support.cloudflare.com/hc/en-us/articles/200168586). @@ -119,7 +119,7 @@ class IPV6(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IPV6GetResponse]], ResultWrapper[IPV6GetResponse]), + cast_to=cast(Type[Optional[ZonesIPV6]], ResultWrapper[ZonesIPV6]), ) @@ -143,7 +143,7 @@ class AsyncIPV6(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IPV6EditResponse]: + ) -> Optional[ZonesIPV6]: """ Enable IPv6 on all subdomains that are Cloudflare enabled. (https://support.cloudflare.com/hc/en-us/articles/200168586). @@ -173,7 +173,7 @@ class AsyncIPV6(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IPV6EditResponse]], ResultWrapper[IPV6EditResponse]), + cast_to=cast(Type[Optional[ZonesIPV6]], ResultWrapper[ZonesIPV6]), ) async def get( @@ -186,7 +186,7 @@ class AsyncIPV6(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IPV6GetResponse]: + ) -> Optional[ZonesIPV6]: """ Enable IPv6 on all subdomains that are Cloudflare enabled. (https://support.cloudflare.com/hc/en-us/articles/200168586). @@ -213,7 +213,7 @@ class AsyncIPV6(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[IPV6GetResponse]], ResultWrapper[IPV6GetResponse]), + cast_to=cast(Type[Optional[ZonesIPV6]], ResultWrapper[ZonesIPV6]), ) diff --git a/src/cloudflare/resources/zones/settings/min_tls_version.py b/src/cloudflare/resources/zones/settings/min_tls_version.py index 318c5f9e1..44f24a03d 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 ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import MinTLSVersionGetResponse, MinTLSVersionEditResponse, min_tls_version_edit_params +from ....types.zones.settings import ZonesMinTLSVersion, min_tls_version_edit_params __all__ = ["MinTLSVersion", "AsyncMinTLSVersion"] @@ -49,7 +49,7 @@ class MinTLSVersion(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MinTLSVersionEditResponse]: + ) -> Optional[ZonesMinTLSVersion]: """ Changes Minimum TLS Version setting. @@ -78,7 +78,7 @@ class MinTLSVersion(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MinTLSVersionEditResponse]], ResultWrapper[MinTLSVersionEditResponse]), + cast_to=cast(Type[Optional[ZonesMinTLSVersion]], ResultWrapper[ZonesMinTLSVersion]), ) def get( @@ -91,7 +91,7 @@ class MinTLSVersion(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MinTLSVersionGetResponse]: + ) -> Optional[ZonesMinTLSVersion]: """ Gets Minimum TLS Version setting. @@ -117,7 +117,7 @@ class MinTLSVersion(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MinTLSVersionGetResponse]], ResultWrapper[MinTLSVersionGetResponse]), + cast_to=cast(Type[Optional[ZonesMinTLSVersion]], ResultWrapper[ZonesMinTLSVersion]), ) @@ -141,7 +141,7 @@ class AsyncMinTLSVersion(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MinTLSVersionEditResponse]: + ) -> Optional[ZonesMinTLSVersion]: """ Changes Minimum TLS Version setting. @@ -170,7 +170,7 @@ class AsyncMinTLSVersion(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MinTLSVersionEditResponse]], ResultWrapper[MinTLSVersionEditResponse]), + cast_to=cast(Type[Optional[ZonesMinTLSVersion]], ResultWrapper[ZonesMinTLSVersion]), ) async def get( @@ -183,7 +183,7 @@ class AsyncMinTLSVersion(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MinTLSVersionGetResponse]: + ) -> Optional[ZonesMinTLSVersion]: """ Gets Minimum TLS Version setting. @@ -209,7 +209,7 @@ class AsyncMinTLSVersion(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MinTLSVersionGetResponse]], ResultWrapper[MinTLSVersionGetResponse]), + cast_to=cast(Type[Optional[ZonesMinTLSVersion]], ResultWrapper[ZonesMinTLSVersion]), ) diff --git a/src/cloudflare/resources/zones/settings/minify.py b/src/cloudflare/resources/zones/settings/minify.py index fab611b69..c97a87add 100644 --- a/src/cloudflare/resources/zones/settings/minify.py +++ b/src/cloudflare/resources/zones/settings/minify.py @@ -23,7 +23,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import MinifyGetResponse, MinifyEditResponse, minify_edit_params +from ....types.zones.settings import ZonesMinify, minify_edit_params __all__ = ["Minify", "AsyncMinify"] @@ -48,7 +48,7 @@ class Minify(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MinifyEditResponse]: + ) -> Optional[ZonesMinify]: """Automatically minify certain assets for your website. Refer to @@ -80,7 +80,7 @@ class Minify(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MinifyEditResponse]], ResultWrapper[MinifyEditResponse]), + cast_to=cast(Type[Optional[ZonesMinify]], ResultWrapper[ZonesMinify]), ) def get( @@ -93,7 +93,7 @@ class Minify(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MinifyGetResponse]: + ) -> Optional[ZonesMinify]: """Automatically minify certain assets for your website. Refer to @@ -122,7 +122,7 @@ class Minify(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MinifyGetResponse]], ResultWrapper[MinifyGetResponse]), + cast_to=cast(Type[Optional[ZonesMinify]], ResultWrapper[ZonesMinify]), ) @@ -146,7 +146,7 @@ class AsyncMinify(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MinifyEditResponse]: + ) -> Optional[ZonesMinify]: """Automatically minify certain assets for your website. Refer to @@ -178,7 +178,7 @@ class AsyncMinify(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MinifyEditResponse]], ResultWrapper[MinifyEditResponse]), + cast_to=cast(Type[Optional[ZonesMinify]], ResultWrapper[ZonesMinify]), ) async def get( @@ -191,7 +191,7 @@ class AsyncMinify(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MinifyGetResponse]: + ) -> Optional[ZonesMinify]: """Automatically minify certain assets for your website. Refer to @@ -220,7 +220,7 @@ class AsyncMinify(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MinifyGetResponse]], ResultWrapper[MinifyGetResponse]), + cast_to=cast(Type[Optional[ZonesMinify]], ResultWrapper[ZonesMinify]), ) diff --git a/src/cloudflare/resources/zones/settings/mirage.py b/src/cloudflare/resources/zones/settings/mirage.py index aac654415..580df2cc7 100644 --- a/src/cloudflare/resources/zones/settings/mirage.py +++ b/src/cloudflare/resources/zones/settings/mirage.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import MirageGetResponse, MirageEditResponse, mirage_edit_params +from ....types.zones.settings import ZonesMirage, mirage_edit_params __all__ = ["Mirage", "AsyncMirage"] @@ -49,7 +49,7 @@ class Mirage(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MirageEditResponse]: + ) -> Optional[ZonesMirage]: """ Automatically optimize image loading for website visitors on mobile devices. Refer to our @@ -81,7 +81,7 @@ class Mirage(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MirageEditResponse]], ResultWrapper[MirageEditResponse]), + cast_to=cast(Type[Optional[ZonesMirage]], ResultWrapper[ZonesMirage]), ) def get( @@ -94,7 +94,7 @@ class Mirage(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MirageGetResponse]: + ) -> Optional[ZonesMirage]: """ Automatically optimize image loading for website visitors on mobile devices. Refer to our @@ -123,7 +123,7 @@ class Mirage(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MirageGetResponse]], ResultWrapper[MirageGetResponse]), + cast_to=cast(Type[Optional[ZonesMirage]], ResultWrapper[ZonesMirage]), ) @@ -147,7 +147,7 @@ class AsyncMirage(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MirageEditResponse]: + ) -> Optional[ZonesMirage]: """ Automatically optimize image loading for website visitors on mobile devices. Refer to our @@ -179,7 +179,7 @@ class AsyncMirage(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MirageEditResponse]], ResultWrapper[MirageEditResponse]), + cast_to=cast(Type[Optional[ZonesMirage]], ResultWrapper[ZonesMirage]), ) async def get( @@ -192,7 +192,7 @@ class AsyncMirage(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MirageGetResponse]: + ) -> Optional[ZonesMirage]: """ Automatically optimize image loading for website visitors on mobile devices. Refer to our @@ -221,7 +221,7 @@ class AsyncMirage(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MirageGetResponse]], ResultWrapper[MirageGetResponse]), + cast_to=cast(Type[Optional[ZonesMirage]], ResultWrapper[ZonesMirage]), ) diff --git a/src/cloudflare/resources/zones/settings/mobile_redirect.py b/src/cloudflare/resources/zones/settings/mobile_redirect.py index ad1b5a6ef..4c830d4fe 100644 --- a/src/cloudflare/resources/zones/settings/mobile_redirect.py +++ b/src/cloudflare/resources/zones/settings/mobile_redirect.py @@ -23,7 +23,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import MobileRedirectGetResponse, MobileRedirectEditResponse, mobile_redirect_edit_params +from ....types.zones.settings import ZonesMobileRedirect, mobile_redirect_edit_params __all__ = ["MobileRedirect", "AsyncMobileRedirect"] @@ -48,7 +48,7 @@ class MobileRedirect(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MobileRedirectEditResponse]: + ) -> Optional[ZonesMobileRedirect]: """ Automatically redirect visitors on mobile devices to a mobile-optimized subdomain. Refer to @@ -80,7 +80,7 @@ class MobileRedirect(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MobileRedirectEditResponse]], ResultWrapper[MobileRedirectEditResponse]), + cast_to=cast(Type[Optional[ZonesMobileRedirect]], ResultWrapper[ZonesMobileRedirect]), ) def get( @@ -93,7 +93,7 @@ class MobileRedirect(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MobileRedirectGetResponse]: + ) -> Optional[ZonesMobileRedirect]: """ Automatically redirect visitors on mobile devices to a mobile-optimized subdomain. Refer to @@ -122,7 +122,7 @@ class MobileRedirect(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MobileRedirectGetResponse]], ResultWrapper[MobileRedirectGetResponse]), + cast_to=cast(Type[Optional[ZonesMobileRedirect]], ResultWrapper[ZonesMobileRedirect]), ) @@ -146,7 +146,7 @@ class AsyncMobileRedirect(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MobileRedirectEditResponse]: + ) -> Optional[ZonesMobileRedirect]: """ Automatically redirect visitors on mobile devices to a mobile-optimized subdomain. Refer to @@ -178,7 +178,7 @@ class AsyncMobileRedirect(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MobileRedirectEditResponse]], ResultWrapper[MobileRedirectEditResponse]), + cast_to=cast(Type[Optional[ZonesMobileRedirect]], ResultWrapper[ZonesMobileRedirect]), ) async def get( @@ -191,7 +191,7 @@ class AsyncMobileRedirect(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MobileRedirectGetResponse]: + ) -> Optional[ZonesMobileRedirect]: """ Automatically redirect visitors on mobile devices to a mobile-optimized subdomain. Refer to @@ -220,7 +220,7 @@ class AsyncMobileRedirect(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MobileRedirectGetResponse]], ResultWrapper[MobileRedirectGetResponse]), + cast_to=cast(Type[Optional[ZonesMobileRedirect]], ResultWrapper[ZonesMobileRedirect]), ) diff --git a/src/cloudflare/resources/zones/settings/nel.py b/src/cloudflare/resources/zones/settings/nel.py index 5072c826d..06ef3a5ca 100644 --- a/src/cloudflare/resources/zones/settings/nel.py +++ b/src/cloudflare/resources/zones/settings/nel.py @@ -23,7 +23,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import NELGetResponse, NELEditResponse, nel_edit_params +from ....types.zones.settings import ZonesNEL, ZonesNELParam, nel_edit_params __all__ = ["NEL", "AsyncNEL"] @@ -41,14 +41,14 @@ class NEL(SyncAPIResource): self, *, zone_id: str, - value: nel_edit_params.Value, + value: ZonesNELParam, # 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[NELEditResponse]: + ) -> Optional[ZonesNEL]: """ 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 @@ class NEL(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NELEditResponse]], ResultWrapper[NELEditResponse]), + cast_to=cast(Type[Optional[ZonesNEL]], ResultWrapper[ZonesNEL]), ) def get( @@ -92,7 +92,7 @@ class NEL(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NELGetResponse]: + ) -> Optional[ZonesNEL]: """Enable Network Error Logging reporting on your zone. (Beta) @@ -119,7 +119,7 @@ class NEL(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NELGetResponse]], ResultWrapper[NELGetResponse]), + cast_to=cast(Type[Optional[ZonesNEL]], ResultWrapper[ZonesNEL]), ) @@ -136,14 +136,14 @@ class AsyncNEL(AsyncAPIResource): self, *, zone_id: str, - value: nel_edit_params.Value, + value: ZonesNELParam, # 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[NELEditResponse]: + ) -> Optional[ZonesNEL]: """ 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 @@ class AsyncNEL(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NELEditResponse]], ResultWrapper[NELEditResponse]), + cast_to=cast(Type[Optional[ZonesNEL]], ResultWrapper[ZonesNEL]), ) async def get( @@ -187,7 +187,7 @@ class AsyncNEL(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NELGetResponse]: + ) -> Optional[ZonesNEL]: """Enable Network Error Logging reporting on your zone. (Beta) @@ -214,7 +214,7 @@ class AsyncNEL(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NELGetResponse]], ResultWrapper[NELGetResponse]), + cast_to=cast(Type[Optional[ZonesNEL]], ResultWrapper[ZonesNEL]), ) diff --git a/src/cloudflare/resources/zones/settings/opportunistic_encryption.py b/src/cloudflare/resources/zones/settings/opportunistic_encryption.py index e2d2019e0..165f069df 100644 --- a/src/cloudflare/resources/zones/settings/opportunistic_encryption.py +++ b/src/cloudflare/resources/zones/settings/opportunistic_encryption.py @@ -24,11 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ( - OpportunisticEncryptionGetResponse, - OpportunisticEncryptionEditResponse, - opportunistic_encryption_edit_params, -) +from ....types.zones.settings import ZonesOpportunisticEncryption, opportunistic_encryption_edit_params __all__ = ["OpportunisticEncryption", "AsyncOpportunisticEncryption"] @@ -53,7 +49,7 @@ class OpportunisticEncryption(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OpportunisticEncryptionEditResponse]: + ) -> Optional[ZonesOpportunisticEncryption]: """ Changes Opportunistic Encryption setting. @@ -85,9 +81,7 @@ class OpportunisticEncryption(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[OpportunisticEncryptionEditResponse]], ResultWrapper[OpportunisticEncryptionEditResponse] - ), + cast_to=cast(Type[Optional[ZonesOpportunisticEncryption]], ResultWrapper[ZonesOpportunisticEncryption]), ) def get( @@ -100,7 +94,7 @@ class OpportunisticEncryption(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OpportunisticEncryptionGetResponse]: + ) -> Optional[ZonesOpportunisticEncryption]: """ Gets Opportunistic Encryption setting. @@ -126,9 +120,7 @@ class OpportunisticEncryption(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[OpportunisticEncryptionGetResponse]], ResultWrapper[OpportunisticEncryptionGetResponse] - ), + cast_to=cast(Type[Optional[ZonesOpportunisticEncryption]], ResultWrapper[ZonesOpportunisticEncryption]), ) @@ -152,7 +144,7 @@ class AsyncOpportunisticEncryption(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OpportunisticEncryptionEditResponse]: + ) -> Optional[ZonesOpportunisticEncryption]: """ Changes Opportunistic Encryption setting. @@ -184,9 +176,7 @@ class AsyncOpportunisticEncryption(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[OpportunisticEncryptionEditResponse]], ResultWrapper[OpportunisticEncryptionEditResponse] - ), + cast_to=cast(Type[Optional[ZonesOpportunisticEncryption]], ResultWrapper[ZonesOpportunisticEncryption]), ) async def get( @@ -199,7 +189,7 @@ class AsyncOpportunisticEncryption(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OpportunisticEncryptionGetResponse]: + ) -> Optional[ZonesOpportunisticEncryption]: """ Gets Opportunistic Encryption setting. @@ -225,9 +215,7 @@ class AsyncOpportunisticEncryption(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[OpportunisticEncryptionGetResponse]], ResultWrapper[OpportunisticEncryptionGetResponse] - ), + cast_to=cast(Type[Optional[ZonesOpportunisticEncryption]], ResultWrapper[ZonesOpportunisticEncryption]), ) diff --git a/src/cloudflare/resources/zones/settings/opportunistic_onion.py b/src/cloudflare/resources/zones/settings/opportunistic_onion.py index b9f656c71..4fb0db622 100644 --- a/src/cloudflare/resources/zones/settings/opportunistic_onion.py +++ b/src/cloudflare/resources/zones/settings/opportunistic_onion.py @@ -24,11 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ( - OpportunisticOnionGetResponse, - OpportunisticOnionEditResponse, - opportunistic_onion_edit_params, -) +from ....types.zones.settings import ZonesOpportunisticOnion, opportunistic_onion_edit_params __all__ = ["OpportunisticOnion", "AsyncOpportunisticOnion"] @@ -53,7 +49,7 @@ class OpportunisticOnion(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OpportunisticOnionEditResponse]: + ) -> Optional[ZonesOpportunisticOnion]: """ Add an Alt-Svc header to all legitimate requests from Tor, allowing the connection to use our onion services instead of exit nodes. @@ -84,7 +80,7 @@ class OpportunisticOnion(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[OpportunisticOnionEditResponse]], ResultWrapper[OpportunisticOnionEditResponse]), + cast_to=cast(Type[Optional[ZonesOpportunisticOnion]], ResultWrapper[ZonesOpportunisticOnion]), ) def get( @@ -97,7 +93,7 @@ class OpportunisticOnion(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OpportunisticOnionGetResponse]: + ) -> Optional[ZonesOpportunisticOnion]: """ Add an Alt-Svc header to all legitimate requests from Tor, allowing the connection to use our onion services instead of exit nodes. @@ -124,7 +120,7 @@ class OpportunisticOnion(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[OpportunisticOnionGetResponse]], ResultWrapper[OpportunisticOnionGetResponse]), + cast_to=cast(Type[Optional[ZonesOpportunisticOnion]], ResultWrapper[ZonesOpportunisticOnion]), ) @@ -148,7 +144,7 @@ class AsyncOpportunisticOnion(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OpportunisticOnionEditResponse]: + ) -> Optional[ZonesOpportunisticOnion]: """ Add an Alt-Svc header to all legitimate requests from Tor, allowing the connection to use our onion services instead of exit nodes. @@ -181,7 +177,7 @@ class AsyncOpportunisticOnion(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[OpportunisticOnionEditResponse]], ResultWrapper[OpportunisticOnionEditResponse]), + cast_to=cast(Type[Optional[ZonesOpportunisticOnion]], ResultWrapper[ZonesOpportunisticOnion]), ) async def get( @@ -194,7 +190,7 @@ class AsyncOpportunisticOnion(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OpportunisticOnionGetResponse]: + ) -> Optional[ZonesOpportunisticOnion]: """ Add an Alt-Svc header to all legitimate requests from Tor, allowing the connection to use our onion services instead of exit nodes. @@ -221,7 +217,7 @@ class AsyncOpportunisticOnion(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[OpportunisticOnionGetResponse]], ResultWrapper[OpportunisticOnionGetResponse]), + cast_to=cast(Type[Optional[ZonesOpportunisticOnion]], ResultWrapper[ZonesOpportunisticOnion]), ) diff --git a/src/cloudflare/resources/zones/settings/orange_to_orange.py b/src/cloudflare/resources/zones/settings/orange_to_orange.py index 9e00a784d..53c32c13d 100644 --- a/src/cloudflare/resources/zones/settings/orange_to_orange.py +++ b/src/cloudflare/resources/zones/settings/orange_to_orange.py @@ -23,7 +23,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import OrangeToOrangeGetResponse, OrangeToOrangeEditResponse, orange_to_orange_edit_params +from ....types.zones.settings import ZonesOrangeToOrange, ZonesOrangeToOrangeParam, orange_to_orange_edit_params __all__ = ["OrangeToOrange", "AsyncOrangeToOrange"] @@ -41,14 +41,14 @@ class OrangeToOrange(SyncAPIResource): self, *, zone_id: str, - value: orange_to_orange_edit_params.Value, + value: ZonesOrangeToOrangeParam, # 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[OrangeToOrangeEditResponse]: + ) -> Optional[ZonesOrangeToOrange]: """ Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also on Cloudflare. @@ -79,7 +79,7 @@ class OrangeToOrange(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[OrangeToOrangeEditResponse]], ResultWrapper[OrangeToOrangeEditResponse]), + cast_to=cast(Type[Optional[ZonesOrangeToOrange]], ResultWrapper[ZonesOrangeToOrange]), ) def get( @@ -92,7 +92,7 @@ class OrangeToOrange(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OrangeToOrangeGetResponse]: + ) -> Optional[ZonesOrangeToOrange]: """ Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also on Cloudflare. @@ -119,7 +119,7 @@ class OrangeToOrange(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[OrangeToOrangeGetResponse]], ResultWrapper[OrangeToOrangeGetResponse]), + cast_to=cast(Type[Optional[ZonesOrangeToOrange]], ResultWrapper[ZonesOrangeToOrange]), ) @@ -136,14 +136,14 @@ class AsyncOrangeToOrange(AsyncAPIResource): self, *, zone_id: str, - value: orange_to_orange_edit_params.Value, + value: ZonesOrangeToOrangeParam, # 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[OrangeToOrangeEditResponse]: + ) -> Optional[ZonesOrangeToOrange]: """ Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also on Cloudflare. @@ -174,7 +174,7 @@ class AsyncOrangeToOrange(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[OrangeToOrangeEditResponse]], ResultWrapper[OrangeToOrangeEditResponse]), + cast_to=cast(Type[Optional[ZonesOrangeToOrange]], ResultWrapper[ZonesOrangeToOrange]), ) async def get( @@ -187,7 +187,7 @@ class AsyncOrangeToOrange(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OrangeToOrangeGetResponse]: + ) -> Optional[ZonesOrangeToOrange]: """ Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also on Cloudflare. @@ -214,7 +214,7 @@ class AsyncOrangeToOrange(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[OrangeToOrangeGetResponse]], ResultWrapper[OrangeToOrangeGetResponse]), + cast_to=cast(Type[Optional[ZonesOrangeToOrange]], ResultWrapper[ZonesOrangeToOrange]), ) 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 2cf9b6df6..4382a3024 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,11 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ( - OriginErrorPagePassThruGetResponse, - OriginErrorPagePassThruEditResponse, - origin_error_page_pass_thru_edit_params, -) +from ....types.zones.settings import ZonesOriginErrorPagePassThru, origin_error_page_pass_thru_edit_params __all__ = ["OriginErrorPagePassThru", "AsyncOriginErrorPagePassThru"] @@ -53,7 +49,7 @@ class OriginErrorPagePassThru(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OriginErrorPagePassThruEditResponse]: + ) -> Optional[ZonesOriginErrorPagePassThru]: """ 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 @@ -86,9 +82,7 @@ class OriginErrorPagePassThru(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[OriginErrorPagePassThruEditResponse]], ResultWrapper[OriginErrorPagePassThruEditResponse] - ), + cast_to=cast(Type[Optional[ZonesOriginErrorPagePassThru]], ResultWrapper[ZonesOriginErrorPagePassThru]), ) def get( @@ -101,7 +95,7 @@ class OriginErrorPagePassThru(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OriginErrorPagePassThruGetResponse]: + ) -> Optional[ZonesOriginErrorPagePassThru]: """ 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 @@ -129,9 +123,7 @@ class OriginErrorPagePassThru(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[OriginErrorPagePassThruGetResponse]], ResultWrapper[OriginErrorPagePassThruGetResponse] - ), + cast_to=cast(Type[Optional[ZonesOriginErrorPagePassThru]], ResultWrapper[ZonesOriginErrorPagePassThru]), ) @@ -155,7 +147,7 @@ class AsyncOriginErrorPagePassThru(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OriginErrorPagePassThruEditResponse]: + ) -> Optional[ZonesOriginErrorPagePassThru]: """ 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 @@ -188,9 +180,7 @@ class AsyncOriginErrorPagePassThru(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[OriginErrorPagePassThruEditResponse]], ResultWrapper[OriginErrorPagePassThruEditResponse] - ), + cast_to=cast(Type[Optional[ZonesOriginErrorPagePassThru]], ResultWrapper[ZonesOriginErrorPagePassThru]), ) async def get( @@ -203,7 +193,7 @@ class AsyncOriginErrorPagePassThru(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OriginErrorPagePassThruGetResponse]: + ) -> Optional[ZonesOriginErrorPagePassThru]: """ 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 @@ -231,9 +221,7 @@ class AsyncOriginErrorPagePassThru(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[OriginErrorPagePassThruGetResponse]], ResultWrapper[OriginErrorPagePassThruGetResponse] - ), + cast_to=cast(Type[Optional[ZonesOriginErrorPagePassThru]], ResultWrapper[ZonesOriginErrorPagePassThru]), ) diff --git a/src/cloudflare/resources/zones/settings/polish.py b/src/cloudflare/resources/zones/settings/polish.py index d9caa04ad..a4d34d6f2 100644 --- a/src/cloudflare/resources/zones/settings/polish.py +++ b/src/cloudflare/resources/zones/settings/polish.py @@ -23,7 +23,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import PolishGetResponse, PolishEditResponse, polish_edit_params +from ....types.zones.settings import ZonesPolish, ZonesPolishParam, polish_edit_params __all__ = ["Polish", "AsyncPolish"] @@ -41,14 +41,14 @@ class Polish(SyncAPIResource): self, *, zone_id: str, - value: polish_edit_params.Value, + value: ZonesPolishParam, # 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[PolishEditResponse]: + ) -> Optional[ZonesPolish]: """ 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 @@ class Polish(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PolishEditResponse]], ResultWrapper[PolishEditResponse]), + cast_to=cast(Type[Optional[ZonesPolish]], ResultWrapper[ZonesPolish]), ) def get( @@ -97,7 +97,7 @@ class Polish(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PolishGetResponse]: + ) -> Optional[ZonesPolish]: """ 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 @@ class Polish(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PolishGetResponse]], ResultWrapper[PolishGetResponse]), + cast_to=cast(Type[Optional[ZonesPolish]], ResultWrapper[ZonesPolish]), ) @@ -142,14 +142,14 @@ class AsyncPolish(AsyncAPIResource): self, *, zone_id: str, - value: polish_edit_params.Value, + value: ZonesPolishParam, # 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[PolishEditResponse]: + ) -> Optional[ZonesPolish]: """ 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 @@ class AsyncPolish(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PolishEditResponse]], ResultWrapper[PolishEditResponse]), + cast_to=cast(Type[Optional[ZonesPolish]], ResultWrapper[ZonesPolish]), ) async def get( @@ -198,7 +198,7 @@ class AsyncPolish(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PolishGetResponse]: + ) -> Optional[ZonesPolish]: """ 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 @@ class AsyncPolish(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PolishGetResponse]], ResultWrapper[PolishGetResponse]), + cast_to=cast(Type[Optional[ZonesPolish]], ResultWrapper[ZonesPolish]), ) diff --git a/src/cloudflare/resources/zones/settings/prefetch_preload.py b/src/cloudflare/resources/zones/settings/prefetch_preload.py index d74c3a085..35a6f901d 100644 --- a/src/cloudflare/resources/zones/settings/prefetch_preload.py +++ b/src/cloudflare/resources/zones/settings/prefetch_preload.py @@ -24,11 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ( - PrefetchPreloadGetResponse, - PrefetchPreloadEditResponse, - prefetch_preload_edit_params, -) +from ....types.zones.settings import ZonesPrefetchPreload, prefetch_preload_edit_params __all__ = ["PrefetchPreload", "AsyncPrefetchPreload"] @@ -53,7 +49,7 @@ class PrefetchPreload(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PrefetchPreloadEditResponse]: + ) -> Optional[ZonesPrefetchPreload]: """ Cloudflare will prefetch any URLs that are included in the response headers. This is limited to Enterprise Zones. @@ -83,7 +79,7 @@ class PrefetchPreload(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PrefetchPreloadEditResponse]], ResultWrapper[PrefetchPreloadEditResponse]), + cast_to=cast(Type[Optional[ZonesPrefetchPreload]], ResultWrapper[ZonesPrefetchPreload]), ) def get( @@ -96,7 +92,7 @@ class PrefetchPreload(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PrefetchPreloadGetResponse]: + ) -> Optional[ZonesPrefetchPreload]: """ Cloudflare will prefetch any URLs that are included in the response headers. This is limited to Enterprise Zones. @@ -123,7 +119,7 @@ class PrefetchPreload(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PrefetchPreloadGetResponse]], ResultWrapper[PrefetchPreloadGetResponse]), + cast_to=cast(Type[Optional[ZonesPrefetchPreload]], ResultWrapper[ZonesPrefetchPreload]), ) @@ -147,7 +143,7 @@ class AsyncPrefetchPreload(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PrefetchPreloadEditResponse]: + ) -> Optional[ZonesPrefetchPreload]: """ Cloudflare will prefetch any URLs that are included in the response headers. This is limited to Enterprise Zones. @@ -177,7 +173,7 @@ class AsyncPrefetchPreload(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PrefetchPreloadEditResponse]], ResultWrapper[PrefetchPreloadEditResponse]), + cast_to=cast(Type[Optional[ZonesPrefetchPreload]], ResultWrapper[ZonesPrefetchPreload]), ) async def get( @@ -190,7 +186,7 @@ class AsyncPrefetchPreload(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PrefetchPreloadGetResponse]: + ) -> Optional[ZonesPrefetchPreload]: """ Cloudflare will prefetch any URLs that are included in the response headers. This is limited to Enterprise Zones. @@ -217,7 +213,7 @@ class AsyncPrefetchPreload(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PrefetchPreloadGetResponse]], ResultWrapper[PrefetchPreloadGetResponse]), + cast_to=cast(Type[Optional[ZonesPrefetchPreload]], ResultWrapper[ZonesPrefetchPreload]), ) diff --git a/src/cloudflare/resources/zones/settings/proxy_read_timeout.py b/src/cloudflare/resources/zones/settings/proxy_read_timeout.py index 0956e4480..fceed818a 100644 --- a/src/cloudflare/resources/zones/settings/proxy_read_timeout.py +++ b/src/cloudflare/resources/zones/settings/proxy_read_timeout.py @@ -23,11 +23,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ( - ProxyReadTimeoutGetResponse, - ProxyReadTimeoutEditResponse, - proxy_read_timeout_edit_params, -) +from ....types.zones.settings import ZonesProxyReadTimeout, ZonesProxyReadTimeoutParam, proxy_read_timeout_edit_params __all__ = ["ProxyReadTimeout", "AsyncProxyReadTimeout"] @@ -45,14 +41,14 @@ class ProxyReadTimeout(SyncAPIResource): self, *, zone_id: str, - value: proxy_read_timeout_edit_params.Value, + value: ZonesProxyReadTimeoutParam, # 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[ProxyReadTimeoutEditResponse]: + ) -> Optional[ZonesProxyReadTimeout]: """ Maximum time between two read operations from origin. @@ -81,7 +77,7 @@ class ProxyReadTimeout(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ProxyReadTimeoutEditResponse]], ResultWrapper[ProxyReadTimeoutEditResponse]), + cast_to=cast(Type[Optional[ZonesProxyReadTimeout]], ResultWrapper[ZonesProxyReadTimeout]), ) def get( @@ -94,7 +90,7 @@ class ProxyReadTimeout(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ProxyReadTimeoutGetResponse]: + ) -> Optional[ZonesProxyReadTimeout]: """ Maximum time between two read operations from origin. @@ -120,7 +116,7 @@ class ProxyReadTimeout(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ProxyReadTimeoutGetResponse]], ResultWrapper[ProxyReadTimeoutGetResponse]), + cast_to=cast(Type[Optional[ZonesProxyReadTimeout]], ResultWrapper[ZonesProxyReadTimeout]), ) @@ -137,14 +133,14 @@ class AsyncProxyReadTimeout(AsyncAPIResource): self, *, zone_id: str, - value: proxy_read_timeout_edit_params.Value, + value: ZonesProxyReadTimeoutParam, # 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[ProxyReadTimeoutEditResponse]: + ) -> Optional[ZonesProxyReadTimeout]: """ Maximum time between two read operations from origin. @@ -175,7 +171,7 @@ class AsyncProxyReadTimeout(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ProxyReadTimeoutEditResponse]], ResultWrapper[ProxyReadTimeoutEditResponse]), + cast_to=cast(Type[Optional[ZonesProxyReadTimeout]], ResultWrapper[ZonesProxyReadTimeout]), ) async def get( @@ -188,7 +184,7 @@ class AsyncProxyReadTimeout(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ProxyReadTimeoutGetResponse]: + ) -> Optional[ZonesProxyReadTimeout]: """ Maximum time between two read operations from origin. @@ -214,7 +210,7 @@ class AsyncProxyReadTimeout(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ProxyReadTimeoutGetResponse]], ResultWrapper[ProxyReadTimeoutGetResponse]), + cast_to=cast(Type[Optional[ZonesProxyReadTimeout]], ResultWrapper[ZonesProxyReadTimeout]), ) diff --git a/src/cloudflare/resources/zones/settings/pseudo_ipv4.py b/src/cloudflare/resources/zones/settings/pseudo_ipv4.py index fe2148d35..5b5fa63df 100644 --- a/src/cloudflare/resources/zones/settings/pseudo_ipv4.py +++ b/src/cloudflare/resources/zones/settings/pseudo_ipv4.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import PseudoIPV4GetResponse, PseudoIPV4EditResponse, pseudo_ipv4_edit_params +from ....types.zones.settings import ZonesPseudoIPV4, pseudo_ipv4_edit_params __all__ = ["PseudoIPV4", "AsyncPseudoIPV4"] @@ -49,7 +49,7 @@ class PseudoIPV4(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PseudoIPV4EditResponse]: + ) -> Optional[ZonesPseudoIPV4]: """ Value of the Pseudo IPv4 setting. @@ -78,7 +78,7 @@ class PseudoIPV4(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PseudoIPV4EditResponse]], ResultWrapper[PseudoIPV4EditResponse]), + cast_to=cast(Type[Optional[ZonesPseudoIPV4]], ResultWrapper[ZonesPseudoIPV4]), ) def get( @@ -91,7 +91,7 @@ class PseudoIPV4(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PseudoIPV4GetResponse]: + ) -> Optional[ZonesPseudoIPV4]: """ Value of the Pseudo IPv4 setting. @@ -117,7 +117,7 @@ class PseudoIPV4(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PseudoIPV4GetResponse]], ResultWrapper[PseudoIPV4GetResponse]), + cast_to=cast(Type[Optional[ZonesPseudoIPV4]], ResultWrapper[ZonesPseudoIPV4]), ) @@ -141,7 +141,7 @@ class AsyncPseudoIPV4(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PseudoIPV4EditResponse]: + ) -> Optional[ZonesPseudoIPV4]: """ Value of the Pseudo IPv4 setting. @@ -170,7 +170,7 @@ class AsyncPseudoIPV4(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PseudoIPV4EditResponse]], ResultWrapper[PseudoIPV4EditResponse]), + cast_to=cast(Type[Optional[ZonesPseudoIPV4]], ResultWrapper[ZonesPseudoIPV4]), ) async def get( @@ -183,7 +183,7 @@ class AsyncPseudoIPV4(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PseudoIPV4GetResponse]: + ) -> Optional[ZonesPseudoIPV4]: """ Value of the Pseudo IPv4 setting. @@ -209,7 +209,7 @@ class AsyncPseudoIPV4(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PseudoIPV4GetResponse]], ResultWrapper[PseudoIPV4GetResponse]), + cast_to=cast(Type[Optional[ZonesPseudoIPV4]], ResultWrapper[ZonesPseudoIPV4]), ) diff --git a/src/cloudflare/resources/zones/settings/response_buffering.py b/src/cloudflare/resources/zones/settings/response_buffering.py index d29757b69..a0f72a935 100644 --- a/src/cloudflare/resources/zones/settings/response_buffering.py +++ b/src/cloudflare/resources/zones/settings/response_buffering.py @@ -24,11 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ( - ResponseBufferingGetResponse, - ResponseBufferingEditResponse, - response_buffering_edit_params, -) +from ....types.zones.settings import ZonesBuffering, response_buffering_edit_params __all__ = ["ResponseBuffering", "AsyncResponseBuffering"] @@ -53,7 +49,7 @@ class ResponseBuffering(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ResponseBufferingEditResponse]: + ) -> Optional[ZonesBuffering]: """Enables or disables buffering of responses from the proxied server. Cloudflare @@ -86,7 +82,7 @@ class ResponseBuffering(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ResponseBufferingEditResponse]], ResultWrapper[ResponseBufferingEditResponse]), + cast_to=cast(Type[Optional[ZonesBuffering]], ResultWrapper[ZonesBuffering]), ) def get( @@ -99,7 +95,7 @@ class ResponseBuffering(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ResponseBufferingGetResponse]: + ) -> Optional[ZonesBuffering]: """Enables or disables buffering of responses from the proxied server. Cloudflare @@ -129,7 +125,7 @@ class ResponseBuffering(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ResponseBufferingGetResponse]], ResultWrapper[ResponseBufferingGetResponse]), + cast_to=cast(Type[Optional[ZonesBuffering]], ResultWrapper[ZonesBuffering]), ) @@ -153,7 +149,7 @@ class AsyncResponseBuffering(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ResponseBufferingEditResponse]: + ) -> Optional[ZonesBuffering]: """Enables or disables buffering of responses from the proxied server. Cloudflare @@ -188,7 +184,7 @@ class AsyncResponseBuffering(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ResponseBufferingEditResponse]], ResultWrapper[ResponseBufferingEditResponse]), + cast_to=cast(Type[Optional[ZonesBuffering]], ResultWrapper[ZonesBuffering]), ) async def get( @@ -201,7 +197,7 @@ class AsyncResponseBuffering(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ResponseBufferingGetResponse]: + ) -> Optional[ZonesBuffering]: """Enables or disables buffering of responses from the proxied server. Cloudflare @@ -231,7 +227,7 @@ class AsyncResponseBuffering(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ResponseBufferingGetResponse]], ResultWrapper[ResponseBufferingGetResponse]), + cast_to=cast(Type[Optional[ZonesBuffering]], ResultWrapper[ZonesBuffering]), ) diff --git a/src/cloudflare/resources/zones/settings/rocket_loader.py b/src/cloudflare/resources/zones/settings/rocket_loader.py index 597df5488..962232e5b 100644 --- a/src/cloudflare/resources/zones/settings/rocket_loader.py +++ b/src/cloudflare/resources/zones/settings/rocket_loader.py @@ -23,7 +23,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import RocketLoaderGetResponse, RocketLoaderEditResponse, rocket_loader_edit_params +from ....types.zones.settings import ZonesRocketLoader, ZonesRocketLoaderParam, rocket_loader_edit_params __all__ = ["RocketLoader", "AsyncRocketLoader"] @@ -41,14 +41,14 @@ class RocketLoader(SyncAPIResource): self, *, zone_id: str, - value: rocket_loader_edit_params.Value, + value: ZonesRocketLoaderParam, # 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[RocketLoaderEditResponse]: + ) -> Optional[ZonesRocketLoader]: """ Rocket Loader is a general-purpose asynchronous JavaScript optimisation that prioritises rendering your content while loading your site's Javascript @@ -95,7 +95,7 @@ class RocketLoader(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RocketLoaderEditResponse]], ResultWrapper[RocketLoaderEditResponse]), + cast_to=cast(Type[Optional[ZonesRocketLoader]], ResultWrapper[ZonesRocketLoader]), ) def get( @@ -108,7 +108,7 @@ class RocketLoader(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RocketLoaderGetResponse]: + ) -> Optional[ZonesRocketLoader]: """ Rocket Loader is a general-purpose asynchronous JavaScript optimisation that prioritises rendering your content while loading your site's Javascript @@ -143,7 +143,7 @@ class RocketLoader(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RocketLoaderGetResponse]], ResultWrapper[RocketLoaderGetResponse]), + cast_to=cast(Type[Optional[ZonesRocketLoader]], ResultWrapper[ZonesRocketLoader]), ) @@ -160,14 +160,14 @@ class AsyncRocketLoader(AsyncAPIResource): self, *, zone_id: str, - value: rocket_loader_edit_params.Value, + value: ZonesRocketLoaderParam, # 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[RocketLoaderEditResponse]: + ) -> Optional[ZonesRocketLoader]: """ Rocket Loader is a general-purpose asynchronous JavaScript optimisation that prioritises rendering your content while loading your site's Javascript @@ -214,7 +214,7 @@ class AsyncRocketLoader(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RocketLoaderEditResponse]], ResultWrapper[RocketLoaderEditResponse]), + cast_to=cast(Type[Optional[ZonesRocketLoader]], ResultWrapper[ZonesRocketLoader]), ) async def get( @@ -227,7 +227,7 @@ class AsyncRocketLoader(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RocketLoaderGetResponse]: + ) -> Optional[ZonesRocketLoader]: """ Rocket Loader is a general-purpose asynchronous JavaScript optimisation that prioritises rendering your content while loading your site's Javascript @@ -262,7 +262,7 @@ class AsyncRocketLoader(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[RocketLoaderGetResponse]], ResultWrapper[RocketLoaderGetResponse]), + cast_to=cast(Type[Optional[ZonesRocketLoader]], ResultWrapper[ZonesRocketLoader]), ) diff --git a/src/cloudflare/resources/zones/settings/security_headers.py b/src/cloudflare/resources/zones/settings/security_headers.py index 4e8b404ff..6dfb04867 100644 --- a/src/cloudflare/resources/zones/settings/security_headers.py +++ b/src/cloudflare/resources/zones/settings/security_headers.py @@ -23,7 +23,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import SecurityHeaderGetResponse, SecurityHeaderEditResponse, security_header_edit_params +from ....types.zones.settings import ZonesSecurityHeader, security_header_edit_params __all__ = ["SecurityHeaders", "AsyncSecurityHeaders"] @@ -48,7 +48,7 @@ class SecurityHeaders(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SecurityHeaderEditResponse]: + ) -> Optional[ZonesSecurityHeader]: """ Cloudflare security header for a zone. @@ -75,7 +75,7 @@ class SecurityHeaders(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SecurityHeaderEditResponse]], ResultWrapper[SecurityHeaderEditResponse]), + cast_to=cast(Type[Optional[ZonesSecurityHeader]], ResultWrapper[ZonesSecurityHeader]), ) def get( @@ -88,7 +88,7 @@ class SecurityHeaders(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SecurityHeaderGetResponse]: + ) -> Optional[ZonesSecurityHeader]: """ Cloudflare security header for a zone. @@ -114,7 +114,7 @@ class SecurityHeaders(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SecurityHeaderGetResponse]], ResultWrapper[SecurityHeaderGetResponse]), + cast_to=cast(Type[Optional[ZonesSecurityHeader]], ResultWrapper[ZonesSecurityHeader]), ) @@ -138,7 +138,7 @@ class AsyncSecurityHeaders(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SecurityHeaderEditResponse]: + ) -> Optional[ZonesSecurityHeader]: """ Cloudflare security header for a zone. @@ -165,7 +165,7 @@ class AsyncSecurityHeaders(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SecurityHeaderEditResponse]], ResultWrapper[SecurityHeaderEditResponse]), + cast_to=cast(Type[Optional[ZonesSecurityHeader]], ResultWrapper[ZonesSecurityHeader]), ) async def get( @@ -178,7 +178,7 @@ class AsyncSecurityHeaders(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SecurityHeaderGetResponse]: + ) -> Optional[ZonesSecurityHeader]: """ Cloudflare security header for a zone. @@ -204,7 +204,7 @@ class AsyncSecurityHeaders(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SecurityHeaderGetResponse]], ResultWrapper[SecurityHeaderGetResponse]), + cast_to=cast(Type[Optional[ZonesSecurityHeader]], ResultWrapper[ZonesSecurityHeader]), ) diff --git a/src/cloudflare/resources/zones/settings/security_level.py b/src/cloudflare/resources/zones/settings/security_level.py index 641e13a46..d56bb544c 100644 --- a/src/cloudflare/resources/zones/settings/security_level.py +++ b/src/cloudflare/resources/zones/settings/security_level.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import SecurityLevelGetResponse, SecurityLevelEditResponse, security_level_edit_params +from ....types.zones.settings import ZonesSecurityLevel, security_level_edit_params __all__ = ["SecurityLevel", "AsyncSecurityLevel"] @@ -49,7 +49,7 @@ class SecurityLevel(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SecurityLevelEditResponse]: + ) -> Optional[ZonesSecurityLevel]: """ 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 @@ class SecurityLevel(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SecurityLevelEditResponse]], ResultWrapper[SecurityLevelEditResponse]), + cast_to=cast(Type[Optional[ZonesSecurityLevel]], ResultWrapper[ZonesSecurityLevel]), ) def get( @@ -94,7 +94,7 @@ class SecurityLevel(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SecurityLevelGetResponse]: + ) -> Optional[ZonesSecurityLevel]: """ 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 @@ class SecurityLevel(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SecurityLevelGetResponse]], ResultWrapper[SecurityLevelGetResponse]), + cast_to=cast(Type[Optional[ZonesSecurityLevel]], ResultWrapper[ZonesSecurityLevel]), ) @@ -147,7 +147,7 @@ class AsyncSecurityLevel(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SecurityLevelEditResponse]: + ) -> Optional[ZonesSecurityLevel]: """ 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 @@ class AsyncSecurityLevel(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SecurityLevelEditResponse]], ResultWrapper[SecurityLevelEditResponse]), + cast_to=cast(Type[Optional[ZonesSecurityLevel]], ResultWrapper[ZonesSecurityLevel]), ) async def get( @@ -192,7 +192,7 @@ class AsyncSecurityLevel(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SecurityLevelGetResponse]: + ) -> Optional[ZonesSecurityLevel]: """ 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 @@ class AsyncSecurityLevel(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SecurityLevelGetResponse]], ResultWrapper[SecurityLevelGetResponse]), + cast_to=cast(Type[Optional[ZonesSecurityLevel]], ResultWrapper[ZonesSecurityLevel]), ) diff --git a/src/cloudflare/resources/zones/settings/server_side_excludes.py b/src/cloudflare/resources/zones/settings/server_side_excludes.py index bd49fc851..6975d6b97 100644 --- a/src/cloudflare/resources/zones/settings/server_side_excludes.py +++ b/src/cloudflare/resources/zones/settings/server_side_excludes.py @@ -24,11 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ( - ServerSideExcludeGetResponse, - ServerSideExcludeEditResponse, - server_side_exclude_edit_params, -) +from ....types.zones.settings import ZonesServerSideExclude, server_side_exclude_edit_params __all__ = ["ServerSideExcludes", "AsyncServerSideExcludes"] @@ -53,7 +49,7 @@ class ServerSideExcludes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ServerSideExcludeEditResponse]: + ) -> Optional[ZonesServerSideExclude]: """ 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 @@ -92,7 +88,7 @@ class ServerSideExcludes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ServerSideExcludeEditResponse]], ResultWrapper[ServerSideExcludeEditResponse]), + cast_to=cast(Type[Optional[ZonesServerSideExclude]], ResultWrapper[ZonesServerSideExclude]), ) def get( @@ -105,7 +101,7 @@ class ServerSideExcludes(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ServerSideExcludeGetResponse]: + ) -> Optional[ZonesServerSideExclude]: """ 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 @@ -141,7 +137,7 @@ class ServerSideExcludes(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ServerSideExcludeGetResponse]], ResultWrapper[ServerSideExcludeGetResponse]), + cast_to=cast(Type[Optional[ZonesServerSideExclude]], ResultWrapper[ZonesServerSideExclude]), ) @@ -165,7 +161,7 @@ class AsyncServerSideExcludes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ServerSideExcludeEditResponse]: + ) -> Optional[ZonesServerSideExclude]: """ 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 @@ -206,7 +202,7 @@ class AsyncServerSideExcludes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ServerSideExcludeEditResponse]], ResultWrapper[ServerSideExcludeEditResponse]), + cast_to=cast(Type[Optional[ZonesServerSideExclude]], ResultWrapper[ZonesServerSideExclude]), ) async def get( @@ -219,7 +215,7 @@ class AsyncServerSideExcludes(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ServerSideExcludeGetResponse]: + ) -> Optional[ZonesServerSideExclude]: """ 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 @@ -255,7 +251,7 @@ class AsyncServerSideExcludes(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ServerSideExcludeGetResponse]], ResultWrapper[ServerSideExcludeGetResponse]), + cast_to=cast(Type[Optional[ZonesServerSideExclude]], ResultWrapper[ZonesServerSideExclude]), ) 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 e82ac8701..49cb15b73 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,11 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ( - SortQueryStringForCacheGetResponse, - SortQueryStringForCacheEditResponse, - sort_query_string_for_cache_edit_params, -) +from ....types.zones.settings import ZonesSortQueryStringForCache, sort_query_string_for_cache_edit_params __all__ = ["SortQueryStringForCache", "AsyncSortQueryStringForCache"] @@ -53,7 +49,7 @@ class SortQueryStringForCache(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SortQueryStringForCacheEditResponse]: + ) -> Optional[ZonesSortQueryStringForCache]: """ 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 @@ -86,9 +82,7 @@ class SortQueryStringForCache(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[SortQueryStringForCacheEditResponse]], ResultWrapper[SortQueryStringForCacheEditResponse] - ), + cast_to=cast(Type[Optional[ZonesSortQueryStringForCache]], ResultWrapper[ZonesSortQueryStringForCache]), ) def get( @@ -101,7 +95,7 @@ class SortQueryStringForCache(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SortQueryStringForCacheGetResponse]: + ) -> Optional[ZonesSortQueryStringForCache]: """ 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 @@ -129,9 +123,7 @@ class SortQueryStringForCache(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[SortQueryStringForCacheGetResponse]], ResultWrapper[SortQueryStringForCacheGetResponse] - ), + cast_to=cast(Type[Optional[ZonesSortQueryStringForCache]], ResultWrapper[ZonesSortQueryStringForCache]), ) @@ -155,7 +147,7 @@ class AsyncSortQueryStringForCache(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SortQueryStringForCacheEditResponse]: + ) -> Optional[ZonesSortQueryStringForCache]: """ 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 @@ -188,9 +180,7 @@ class AsyncSortQueryStringForCache(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[SortQueryStringForCacheEditResponse]], ResultWrapper[SortQueryStringForCacheEditResponse] - ), + cast_to=cast(Type[Optional[ZonesSortQueryStringForCache]], ResultWrapper[ZonesSortQueryStringForCache]), ) async def get( @@ -203,7 +193,7 @@ class AsyncSortQueryStringForCache(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SortQueryStringForCacheGetResponse]: + ) -> Optional[ZonesSortQueryStringForCache]: """ 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 @@ -231,9 +221,7 @@ class AsyncSortQueryStringForCache(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[SortQueryStringForCacheGetResponse]], ResultWrapper[SortQueryStringForCacheGetResponse] - ), + cast_to=cast(Type[Optional[ZonesSortQueryStringForCache]], ResultWrapper[ZonesSortQueryStringForCache]), ) diff --git a/src/cloudflare/resources/zones/settings/ssl.py b/src/cloudflare/resources/zones/settings/ssl.py index b41ca7784..9099eae9a 100644 --- a/src/cloudflare/resources/zones/settings/ssl.py +++ b/src/cloudflare/resources/zones/settings/ssl.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import SSLGetResponse, SSLEditResponse, ssl_edit_params +from ....types.zones.settings import ZonesSSL, ssl_edit_params __all__ = ["SSL", "AsyncSSL"] @@ -49,7 +49,7 @@ class SSL(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SSLEditResponse]: + ) -> Optional[ZonesSSL]: """ 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 @@ class SSL(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SSLEditResponse]], ResultWrapper[SSLEditResponse]), + cast_to=cast(Type[Optional[ZonesSSL]], ResultWrapper[ZonesSSL]), ) def get( @@ -106,7 +106,7 @@ class SSL(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SSLGetResponse]: + ) -> Optional[ZonesSSL]: """ 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 @@ class SSL(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SSLGetResponse]], ResultWrapper[SSLGetResponse]), + cast_to=cast(Type[Optional[ZonesSSL]], ResultWrapper[ZonesSSL]), ) @@ -171,7 +171,7 @@ class AsyncSSL(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SSLEditResponse]: + ) -> Optional[ZonesSSL]: """ 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 @@ class AsyncSSL(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SSLEditResponse]], ResultWrapper[SSLEditResponse]), + cast_to=cast(Type[Optional[ZonesSSL]], ResultWrapper[ZonesSSL]), ) async def get( @@ -228,7 +228,7 @@ class AsyncSSL(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SSLGetResponse]: + ) -> Optional[ZonesSSL]: """ 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 @@ class AsyncSSL(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SSLGetResponse]], ResultWrapper[SSLGetResponse]), + cast_to=cast(Type[Optional[ZonesSSL]], ResultWrapper[ZonesSSL]), ) diff --git a/src/cloudflare/resources/zones/settings/ssl_recommender.py b/src/cloudflare/resources/zones/settings/ssl_recommender.py index b35a4e31f..a261b814c 100644 --- a/src/cloudflare/resources/zones/settings/ssl_recommender.py +++ b/src/cloudflare/resources/zones/settings/ssl_recommender.py @@ -23,7 +23,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import SSLRecommenderGetResponse, SSLRecommenderEditResponse, ssl_recommender_edit_params +from ....types.zones.settings import ZonesSSLRecommender, ZonesSSLRecommenderParam, ssl_recommender_edit_params __all__ = ["SSLRecommender", "AsyncSSLRecommender"] @@ -41,14 +41,14 @@ class SSLRecommender(SyncAPIResource): self, *, zone_id: str, - value: ssl_recommender_edit_params.Value, + value: ZonesSSLRecommenderParam, # 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[SSLRecommenderEditResponse]: + ) -> Optional[ZonesSSLRecommender]: """ 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 +81,7 @@ class SSLRecommender(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SSLRecommenderEditResponse]], ResultWrapper[SSLRecommenderEditResponse]), + cast_to=cast(Type[Optional[ZonesSSLRecommender]], ResultWrapper[ZonesSSLRecommender]), ) def get( @@ -94,7 +94,7 @@ class SSLRecommender(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SSLRecommenderGetResponse]: + ) -> Optional[ZonesSSLRecommender]: """ 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 +122,7 @@ class SSLRecommender(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SSLRecommenderGetResponse]], ResultWrapper[SSLRecommenderGetResponse]), + cast_to=cast(Type[Optional[ZonesSSLRecommender]], ResultWrapper[ZonesSSLRecommender]), ) @@ -139,14 +139,14 @@ class AsyncSSLRecommender(AsyncAPIResource): self, *, zone_id: str, - value: ssl_recommender_edit_params.Value, + value: ZonesSSLRecommenderParam, # 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[SSLRecommenderEditResponse]: + ) -> Optional[ZonesSSLRecommender]: """ 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 +179,7 @@ class AsyncSSLRecommender(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SSLRecommenderEditResponse]], ResultWrapper[SSLRecommenderEditResponse]), + cast_to=cast(Type[Optional[ZonesSSLRecommender]], ResultWrapper[ZonesSSLRecommender]), ) async def get( @@ -192,7 +192,7 @@ class AsyncSSLRecommender(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SSLRecommenderGetResponse]: + ) -> Optional[ZonesSSLRecommender]: """ 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 +220,7 @@ class AsyncSSLRecommender(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SSLRecommenderGetResponse]], ResultWrapper[SSLRecommenderGetResponse]), + cast_to=cast(Type[Optional[ZonesSSLRecommender]], ResultWrapper[ZonesSSLRecommender]), ) diff --git a/src/cloudflare/resources/zones/settings/tls_1_3.py b/src/cloudflare/resources/zones/settings/tls_1_3.py index 8ca3215d1..b81b26d3f 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 ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import TLS1_3GetResponse, TLS1_3EditResponse, tls_1_3_edit_params +from ....types.zones.settings import ZonesTLS1_3, tls_1_3_edit_params __all__ = ["TLS1_3", "AsyncTLS1_3"] @@ -49,7 +49,7 @@ class TLS1_3(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TLS1_3EditResponse]: + ) -> Optional[ZonesTLS1_3]: """ Changes TLS 1.3 setting. @@ -79,7 +79,7 @@ class TLS1_3(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TLS1_3EditResponse]], ResultWrapper[TLS1_3EditResponse]), + cast_to=cast(Type[Optional[ZonesTLS1_3]], ResultWrapper[ZonesTLS1_3]), ) def get( @@ -92,7 +92,7 @@ class TLS1_3(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TLS1_3GetResponse]: + ) -> Optional[ZonesTLS1_3]: """ Gets TLS 1.3 setting enabled for a zone. @@ -118,7 +118,7 @@ class TLS1_3(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TLS1_3GetResponse]], ResultWrapper[TLS1_3GetResponse]), + cast_to=cast(Type[Optional[ZonesTLS1_3]], ResultWrapper[ZonesTLS1_3]), ) @@ -142,7 +142,7 @@ class AsyncTLS1_3(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TLS1_3EditResponse]: + ) -> Optional[ZonesTLS1_3]: """ Changes TLS 1.3 setting. @@ -172,7 +172,7 @@ class AsyncTLS1_3(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TLS1_3EditResponse]], ResultWrapper[TLS1_3EditResponse]), + cast_to=cast(Type[Optional[ZonesTLS1_3]], ResultWrapper[ZonesTLS1_3]), ) async def get( @@ -185,7 +185,7 @@ class AsyncTLS1_3(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TLS1_3GetResponse]: + ) -> Optional[ZonesTLS1_3]: """ Gets TLS 1.3 setting enabled for a zone. @@ -211,7 +211,7 @@ class AsyncTLS1_3(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TLS1_3GetResponse]], ResultWrapper[TLS1_3GetResponse]), + cast_to=cast(Type[Optional[ZonesTLS1_3]], ResultWrapper[ZonesTLS1_3]), ) diff --git a/src/cloudflare/resources/zones/settings/tls_client_auth.py b/src/cloudflare/resources/zones/settings/tls_client_auth.py index 322f5d376..44731b4c7 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 ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import TLSClientAuthGetResponse, TLSClientAuthEditResponse, tls_client_auth_edit_params +from ....types.zones.settings import ZonesTLSClientAuth, tls_client_auth_edit_params __all__ = ["TLSClientAuth", "AsyncTLSClientAuth"] @@ -49,7 +49,7 @@ class TLSClientAuth(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TLSClientAuthEditResponse]: + ) -> Optional[ZonesTLSClientAuth]: """ TLS Client Auth requires Cloudflare to connect to your origin server using a client certificate (Enterprise Only). @@ -79,7 +79,7 @@ class TLSClientAuth(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TLSClientAuthEditResponse]], ResultWrapper[TLSClientAuthEditResponse]), + cast_to=cast(Type[Optional[ZonesTLSClientAuth]], ResultWrapper[ZonesTLSClientAuth]), ) def get( @@ -92,7 +92,7 @@ class TLSClientAuth(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TLSClientAuthGetResponse]: + ) -> Optional[ZonesTLSClientAuth]: """ TLS Client Auth requires Cloudflare to connect to your origin server using a client certificate (Enterprise Only). @@ -119,7 +119,7 @@ class TLSClientAuth(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TLSClientAuthGetResponse]], ResultWrapper[TLSClientAuthGetResponse]), + cast_to=cast(Type[Optional[ZonesTLSClientAuth]], ResultWrapper[ZonesTLSClientAuth]), ) @@ -143,7 +143,7 @@ class AsyncTLSClientAuth(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TLSClientAuthEditResponse]: + ) -> Optional[ZonesTLSClientAuth]: """ TLS Client Auth requires Cloudflare to connect to your origin server using a client certificate (Enterprise Only). @@ -173,7 +173,7 @@ class AsyncTLSClientAuth(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TLSClientAuthEditResponse]], ResultWrapper[TLSClientAuthEditResponse]), + cast_to=cast(Type[Optional[ZonesTLSClientAuth]], ResultWrapper[ZonesTLSClientAuth]), ) async def get( @@ -186,7 +186,7 @@ class AsyncTLSClientAuth(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TLSClientAuthGetResponse]: + ) -> Optional[ZonesTLSClientAuth]: """ TLS Client Auth requires Cloudflare to connect to your origin server using a client certificate (Enterprise Only). @@ -213,7 +213,7 @@ class AsyncTLSClientAuth(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TLSClientAuthGetResponse]], ResultWrapper[TLSClientAuthGetResponse]), + cast_to=cast(Type[Optional[ZonesTLSClientAuth]], ResultWrapper[ZonesTLSClientAuth]), ) 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 586c5e63c..462d6ed9f 100644 --- a/src/cloudflare/resources/zones/settings/true_client_ip_header.py +++ b/src/cloudflare/resources/zones/settings/true_client_ip_header.py @@ -24,11 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ( - TrueClientIPHeaderGetResponse, - TrueClientIPHeaderEditResponse, - true_client_ip_header_edit_params, -) +from ....types.zones.settings import ZonesTrueClientIPHeader, true_client_ip_header_edit_params __all__ = ["TrueClientIPHeader", "AsyncTrueClientIPHeader"] @@ -53,7 +49,7 @@ class TrueClientIPHeader(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TrueClientIPHeaderEditResponse]: + ) -> Optional[ZonesTrueClientIPHeader]: """ 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. @@ -83,7 +79,7 @@ class TrueClientIPHeader(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TrueClientIPHeaderEditResponse]], ResultWrapper[TrueClientIPHeaderEditResponse]), + cast_to=cast(Type[Optional[ZonesTrueClientIPHeader]], ResultWrapper[ZonesTrueClientIPHeader]), ) def get( @@ -96,7 +92,7 @@ class TrueClientIPHeader(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TrueClientIPHeaderGetResponse]: + ) -> Optional[ZonesTrueClientIPHeader]: """ 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. @@ -123,7 +119,7 @@ class TrueClientIPHeader(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TrueClientIPHeaderGetResponse]], ResultWrapper[TrueClientIPHeaderGetResponse]), + cast_to=cast(Type[Optional[ZonesTrueClientIPHeader]], ResultWrapper[ZonesTrueClientIPHeader]), ) @@ -147,7 +143,7 @@ class AsyncTrueClientIPHeader(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TrueClientIPHeaderEditResponse]: + ) -> Optional[ZonesTrueClientIPHeader]: """ 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. @@ -179,7 +175,7 @@ class AsyncTrueClientIPHeader(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TrueClientIPHeaderEditResponse]], ResultWrapper[TrueClientIPHeaderEditResponse]), + cast_to=cast(Type[Optional[ZonesTrueClientIPHeader]], ResultWrapper[ZonesTrueClientIPHeader]), ) async def get( @@ -192,7 +188,7 @@ class AsyncTrueClientIPHeader(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TrueClientIPHeaderGetResponse]: + ) -> Optional[ZonesTrueClientIPHeader]: """ 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. @@ -219,7 +215,7 @@ class AsyncTrueClientIPHeader(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TrueClientIPHeaderGetResponse]], ResultWrapper[TrueClientIPHeaderGetResponse]), + cast_to=cast(Type[Optional[ZonesTrueClientIPHeader]], ResultWrapper[ZonesTrueClientIPHeader]), ) diff --git a/src/cloudflare/resources/zones/settings/waf.py b/src/cloudflare/resources/zones/settings/waf.py index c58c523f6..bd69abaf2 100644 --- a/src/cloudflare/resources/zones/settings/waf.py +++ b/src/cloudflare/resources/zones/settings/waf.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import WAFGetResponse, WAFEditResponse, waf_edit_params +from ....types.zones.settings import ZonesWAF, waf_edit_params __all__ = ["WAF", "AsyncWAF"] @@ -49,7 +49,7 @@ class WAF(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WAFEditResponse]: + ) -> Optional[ZonesWAF]: """The WAF examines HTTP requests to your website. It inspects both GET and POST @@ -88,7 +88,7 @@ class WAF(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WAFEditResponse]], ResultWrapper[WAFEditResponse]), + cast_to=cast(Type[Optional[ZonesWAF]], ResultWrapper[ZonesWAF]), ) def get( @@ -101,7 +101,7 @@ class WAF(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WAFGetResponse]: + ) -> Optional[ZonesWAF]: """The WAF examines HTTP requests to your website. It inspects both GET and POST @@ -137,7 +137,7 @@ class WAF(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WAFGetResponse]], ResultWrapper[WAFGetResponse]), + cast_to=cast(Type[Optional[ZonesWAF]], ResultWrapper[ZonesWAF]), ) @@ -161,7 +161,7 @@ class AsyncWAF(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WAFEditResponse]: + ) -> Optional[ZonesWAF]: """The WAF examines HTTP requests to your website. It inspects both GET and POST @@ -200,7 +200,7 @@ class AsyncWAF(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WAFEditResponse]], ResultWrapper[WAFEditResponse]), + cast_to=cast(Type[Optional[ZonesWAF]], ResultWrapper[ZonesWAF]), ) async def get( @@ -213,7 +213,7 @@ class AsyncWAF(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WAFGetResponse]: + ) -> Optional[ZonesWAF]: """The WAF examines HTTP requests to your website. It inspects both GET and POST @@ -249,7 +249,7 @@ class AsyncWAF(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WAFGetResponse]], ResultWrapper[WAFGetResponse]), + cast_to=cast(Type[Optional[ZonesWAF]], ResultWrapper[ZonesWAF]), ) diff --git a/src/cloudflare/resources/zones/settings/webp.py b/src/cloudflare/resources/zones/settings/webp.py index 99cbf2624..6950a20c6 100644 --- a/src/cloudflare/resources/zones/settings/webp.py +++ b/src/cloudflare/resources/zones/settings/webp.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import WebpGetResponse, WebpEditResponse, webp_edit_params +from ....types.zones.settings import ZonesWebp, webp_edit_params __all__ = ["Webp", "AsyncWebp"] @@ -49,7 +49,7 @@ class Webp(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WebpEditResponse]: + ) -> Optional[ZonesWebp]: """ When the client requesting the image supports the WebP image codec, and WebP offers a performance advantage over the original image format, Cloudflare will @@ -80,7 +80,7 @@ class Webp(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WebpEditResponse]], ResultWrapper[WebpEditResponse]), + cast_to=cast(Type[Optional[ZonesWebp]], ResultWrapper[ZonesWebp]), ) def get( @@ -93,7 +93,7 @@ class Webp(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WebpGetResponse]: + ) -> Optional[ZonesWebp]: """ When the client requesting the image supports the WebP image codec, and WebP offers a performance advantage over the original image format, Cloudflare will @@ -121,7 +121,7 @@ class Webp(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WebpGetResponse]], ResultWrapper[WebpGetResponse]), + cast_to=cast(Type[Optional[ZonesWebp]], ResultWrapper[ZonesWebp]), ) @@ -145,7 +145,7 @@ class AsyncWebp(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WebpEditResponse]: + ) -> Optional[ZonesWebp]: """ When the client requesting the image supports the WebP image codec, and WebP offers a performance advantage over the original image format, Cloudflare will @@ -176,7 +176,7 @@ class AsyncWebp(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WebpEditResponse]], ResultWrapper[WebpEditResponse]), + cast_to=cast(Type[Optional[ZonesWebp]], ResultWrapper[ZonesWebp]), ) async def get( @@ -189,7 +189,7 @@ class AsyncWebp(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WebpGetResponse]: + ) -> Optional[ZonesWebp]: """ When the client requesting the image supports the WebP image codec, and WebP offers a performance advantage over the original image format, Cloudflare will @@ -217,7 +217,7 @@ class AsyncWebp(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WebpGetResponse]], ResultWrapper[WebpGetResponse]), + cast_to=cast(Type[Optional[ZonesWebp]], ResultWrapper[ZonesWebp]), ) diff --git a/src/cloudflare/resources/zones/settings/websocket.py b/src/cloudflare/resources/zones/settings/websocket.py index 483670b86..f1852dfec 100644 --- a/src/cloudflare/resources/zones/settings/websocket.py +++ b/src/cloudflare/resources/zones/settings/websocket.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import WebsocketGetResponse, WebsocketEditResponse, websocket_edit_params +from ....types.zones.settings import ZonesWebsockets, websocket_edit_params __all__ = ["Websocket", "AsyncWebsocket"] @@ -49,7 +49,7 @@ class Websocket(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WebsocketEditResponse]: + ) -> Optional[ZonesWebsockets]: """Changes Websockets setting. For more information about Websockets, please refer @@ -81,7 +81,7 @@ class Websocket(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WebsocketEditResponse]], ResultWrapper[WebsocketEditResponse]), + cast_to=cast(Type[Optional[ZonesWebsockets]], ResultWrapper[ZonesWebsockets]), ) def get( @@ -94,7 +94,7 @@ class Websocket(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WebsocketGetResponse]: + ) -> Optional[ZonesWebsockets]: """Gets Websockets setting. For more information about Websockets, please refer to @@ -122,7 +122,7 @@ class Websocket(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WebsocketGetResponse]], ResultWrapper[WebsocketGetResponse]), + cast_to=cast(Type[Optional[ZonesWebsockets]], ResultWrapper[ZonesWebsockets]), ) @@ -146,7 +146,7 @@ class AsyncWebsocket(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WebsocketEditResponse]: + ) -> Optional[ZonesWebsockets]: """Changes Websockets setting. For more information about Websockets, please refer @@ -178,7 +178,7 @@ class AsyncWebsocket(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WebsocketEditResponse]], ResultWrapper[WebsocketEditResponse]), + cast_to=cast(Type[Optional[ZonesWebsockets]], ResultWrapper[ZonesWebsockets]), ) async def get( @@ -191,7 +191,7 @@ class AsyncWebsocket(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WebsocketGetResponse]: + ) -> Optional[ZonesWebsockets]: """Gets Websockets setting. For more information about Websockets, please refer to @@ -219,7 +219,7 @@ class AsyncWebsocket(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[WebsocketGetResponse]], ResultWrapper[WebsocketGetResponse]), + cast_to=cast(Type[Optional[ZonesWebsockets]], ResultWrapper[ZonesWebsockets]), ) diff --git a/src/cloudflare/resources/zones/settings/zero_rtt.py b/src/cloudflare/resources/zones/settings/zero_rtt.py index 2e3753e29..a1ef38dee 100644 --- a/src/cloudflare/resources/zones/settings/zero_rtt.py +++ b/src/cloudflare/resources/zones/settings/zero_rtt.py @@ -24,7 +24,7 @@ from ...._wrappers import ResultWrapper from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZeroRTTGetResponse, ZeroRTTEditResponse, zero_rtt_edit_params +from ....types.zones.settings import Zones0rtt, zero_rtt_edit_params __all__ = ["ZeroRTT", "AsyncZeroRTT"] @@ -49,7 +49,7 @@ class ZeroRTT(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZeroRTTEditResponse]: + ) -> Optional[Zones0rtt]: """ Changes the 0-RTT session resumption setting. @@ -78,7 +78,7 @@ class ZeroRTT(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZeroRTTEditResponse]], ResultWrapper[ZeroRTTEditResponse]), + cast_to=cast(Type[Optional[Zones0rtt]], ResultWrapper[Zones0rtt]), ) def get( @@ -91,7 +91,7 @@ class ZeroRTT(SyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZeroRTTGetResponse]: + ) -> Optional[Zones0rtt]: """ Gets 0-RTT session resumption setting. @@ -117,7 +117,7 @@ class ZeroRTT(SyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZeroRTTGetResponse]], ResultWrapper[ZeroRTTGetResponse]), + cast_to=cast(Type[Optional[Zones0rtt]], ResultWrapper[Zones0rtt]), ) @@ -141,7 +141,7 @@ class AsyncZeroRTT(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZeroRTTEditResponse]: + ) -> Optional[Zones0rtt]: """ Changes the 0-RTT session resumption setting. @@ -170,7 +170,7 @@ class AsyncZeroRTT(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZeroRTTEditResponse]], ResultWrapper[ZeroRTTEditResponse]), + cast_to=cast(Type[Optional[Zones0rtt]], ResultWrapper[Zones0rtt]), ) async def get( @@ -183,7 +183,7 @@ class AsyncZeroRTT(AsyncAPIResource): extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZeroRTTGetResponse]: + ) -> Optional[Zones0rtt]: """ Gets 0-RTT session resumption setting. @@ -209,7 +209,7 @@ class AsyncZeroRTT(AsyncAPIResource): timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZeroRTTGetResponse]], ResultWrapper[ZeroRTTGetResponse]), + cast_to=cast(Type[Optional[Zones0rtt]], ResultWrapper[Zones0rtt]), ) diff --git a/src/cloudflare/types/__init__.py b/src/cloudflare/types/__init__.py index 5e67eba2d..ab606de81 100644 --- a/src/cloudflare/types/__init__.py +++ b/src/cloudflare/types/__init__.py @@ -4,15 +4,22 @@ from __future__ import annotations from .ips import IPs as IPs 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 .jdcloud_ips import JdcloudIPs as JdcloudIPs +from .dnssec_dnssec import DNSSECDNSSEC as DNSSECDNSSEC from .load_balancer import LoadBalancer as LoadBalancer +from .stream_videos import StreamVideos as StreamVideos +from .workers_queue import WorkersQueue as WorkersQueue from .ip_list_params import IPListParams as IPListParams +from .zones_page_rule import ZonesPageRule as ZonesPageRule from .ip_list_response import IPListResponse as IPListResponse 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 .call_get_response import CallGetResponse as CallGetResponse +from .legacy_jhs_filter import LegacyJhsFilter as LegacyJhsFilter +from .observatory_trend import ObservatoryTrend as ObservatoryTrend from .pcap_get_response import PCAPGetResponse as PCAPGetResponse from .user_get_response import UserGetResponse as UserGetResponse from .zone_get_response import ZoneGetResponse as ZoneGetResponse @@ -24,54 +31,42 @@ from .dnssec_edit_params import DNSSECEditParams as DNSSECEditParams 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 .queue_get_response import QueueGetResponse as QueueGetResponse from .stream_list_params import StreamListParams as StreamListParams from .user_edit_response import UserEditResponse as UserEditResponse from .zone_create_params import ZoneCreateParams as ZoneCreateParams from .zone_edit_response import ZoneEditResponse as ZoneEditResponse from .zone_list_response import ZoneListResponse as ZoneListResponse from .account_list_params import AccountListParams as AccountListParams -from .dnssec_get_response import DNSSECGetResponse as DNSSECGetResponse -from .filter_get_response import FilterGetResponse as FilterGetResponse from .queue_create_params import QueueCreateParams as QueueCreateParams from .queue_list_response import QueueListResponse as QueueListResponse from .queue_update_params import QueueUpdateParams as QueueUpdateParams from .speed_delete_params import SpeedDeleteParams as SpeedDeleteParams -from .stream_get_response import StreamGetResponse as StreamGetResponse from .account_get_response import AccountGetResponse as AccountGetResponse from .cache_purge_response import CachePurgeResponse as CachePurgeResponse -from .call_create_response import CallCreateResponse as CallCreateResponse -from .call_delete_response import CallDeleteResponse as CallDeleteResponse -from .call_update_response import CallUpdateResponse as CallUpdateResponse -from .dnssec_edit_response import DNSSECEditResponse as DNSSECEditResponse 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 .observatory_schedule import ObservatorySchedule as ObservatorySchedule 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 .ruleset_get_response import RulesetGetResponse as RulesetGetResponse -from .snippet_get_response import SnippetGetResponse as SnippetGetResponse from .stream_list_response import StreamListResponse as StreamListResponse from .zone_create_response import ZoneCreateResponse as ZoneCreateResponse 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 +from .calls_app_with_secret import CallsAppWithSecret as CallsAppWithSecret from .origin_ca_certificate import OriginCACertificate as OriginCACertificate from .pagerule_get_response import PageruleGetResponse as PageruleGetResponse -from .queue_create_response import QueueCreateResponse as QueueCreateResponse 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 .workers_queue_created import WorkersQueueCreated as WorkersQueueCreated +from .workers_queue_updated import WorkersQueueUpdated as WorkersQueueUpdated from .dnssec_delete_response import DNSSECDeleteResponse as DNSSECDeleteResponse from .filter_create_response import FilterCreateResponse as FilterCreateResponse -from .filter_delete_response import FilterDeleteResponse as FilterDeleteResponse -from .filter_update_response import FilterUpdateResponse as FilterUpdateResponse from .membership_list_params import MembershipListParams as MembershipListParams from .pagerule_create_params import PageruleCreateParams as PageruleCreateParams from .pagerule_edit_response import PageruleEditResponse as PageruleEditResponse @@ -82,15 +77,13 @@ from .rate_limit_list_params import RateLimitListParams as RateLimitListParams from .account_update_response import AccountUpdateResponse as AccountUpdateResponse from .audit_log_list_response import AuditLogListResponse as AuditLogListResponse from .healthcheck_edit_params import HealthcheckEditParams as HealthcheckEditParams +from .intel_phishing_url_info import IntelPhishingURLInfo as IntelPhishingURLInfo from .membership_get_response import MembershipGetResponse as MembershipGetResponse from .rate_limit_get_response import RateLimitGetResponse as RateLimitGetResponse -from .ruleset_create_response import RulesetCreateResponse as RulesetCreateResponse -from .ruleset_update_response import RulesetUpdateResponse as RulesetUpdateResponse from .snippet_delete_response import SnippetDeleteResponse as SnippetDeleteResponse -from .snippet_update_response import SnippetUpdateResponse as SnippetUpdateResponse from .url_scanner_scan_params import URLScannerScanParams as URLScannerScanParams +from .waitingroom_waitingroom import WaitingroomWaitingroom as WaitingroomWaitingroom from .certificate_get_response import CertificateGetResponse as CertificateGetResponse -from .healthcheck_get_response import HealthcheckGetResponse as HealthcheckGetResponse from .membership_update_params import MembershipUpdateParams as MembershipUpdateParams from .pagerule_create_response import PageruleCreateResponse as PageruleCreateResponse from .pagerule_delete_response import PageruleDeleteResponse as PageruleDeleteResponse @@ -103,45 +96,39 @@ from .waiting_room_edit_params import WaitingRoomEditParams as WaitingRoomEditPa from .certificate_create_params import CertificateCreateParams as CertificateCreateParams from .certificate_list_response import CertificateListResponse as CertificateListResponse from .healthcheck_create_params import HealthcheckCreateParams as HealthcheckCreateParams -from .healthcheck_edit_response import HealthcheckEditResponse as HealthcheckEditResponse 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_list_response import PageShieldListResponse as PageShieldListResponse 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 -from .waiting_room_get_response import WaitingRoomGetResponse as WaitingRoomGetResponse from .managed_header_edit_params import ManagedHeaderEditParams as ManagedHeaderEditParams from .membership_delete_response import MembershipDeleteResponse as MembershipDeleteResponse from .membership_update_response import MembershipUpdateResponse as MembershipUpdateResponse from .rate_limit_create_response import RateLimitCreateResponse as RateLimitCreateResponse from .rate_limit_delete_response import RateLimitDeleteResponse as RateLimitDeleteResponse -from .speed_trends_list_response import SpeedTrendsListResponse as SpeedTrendsListResponse +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 from .waiting_room_create_params import WaitingRoomCreateParams as WaitingRoomCreateParams -from .waiting_room_edit_response import WaitingRoomEditResponse as WaitingRoomEditResponse 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 -from .available_plan_get_response import AvailablePlanGetResponse as AvailablePlanGetResponse from .bot_management_get_response import BotManagementGetResponse as BotManagementGetResponse from .certificate_create_response import CertificateCreateResponse as CertificateCreateResponse from .certificate_delete_response import CertificateDeleteResponse as CertificateDeleteResponse from .custom_hostname_edit_params import CustomHostnameEditParams as CustomHostnameEditParams from .custom_hostname_list_params import CustomHostnameListParams as CustomHostnameListParams -from .healthcheck_create_response import HealthcheckCreateResponse as HealthcheckCreateResponse from .healthcheck_delete_response import HealthcheckDeleteResponse as HealthcheckDeleteResponse -from .healthcheck_update_response import HealthcheckUpdateResponse as HealthcheckUpdateResponse 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 .speed_schedule_get_response import SpeedScheduleGetResponse as SpeedScheduleGetResponse from .waiting_room_preview_params import WaitingRoomPreviewParams as WaitingRoomPreviewParams from .warp_connector_get_response import WARPConnectorGetResponse as WARPConnectorGetResponse from .available_plan_list_response import AvailablePlanListResponse as AvailablePlanListResponse @@ -152,9 +139,7 @@ from .managed_header_list_response import ManagedHeaderListResponse as ManagedHe from .subscription_create_response import SubscriptionCreateResponse as SubscriptionCreateResponse from .subscription_delete_response import SubscriptionDeleteResponse as SubscriptionDeleteResponse from .subscription_update_response import SubscriptionUpdateResponse as SubscriptionUpdateResponse -from .waiting_room_create_response import WaitingRoomCreateResponse as WaitingRoomCreateResponse from .waiting_room_delete_response import WaitingRoomDeleteResponse as WaitingRoomDeleteResponse -from .waiting_room_update_response import WaitingRoomUpdateResponse as WaitingRoomUpdateResponse from .warp_connector_create_params import WARPConnectorCreateParams as WARPConnectorCreateParams from .warp_connector_delete_params import WARPConnectorDeleteParams as WARPConnectorDeleteParams from .warp_connector_edit_response import WARPConnectorEditResponse as WARPConnectorEditResponse @@ -163,7 +148,7 @@ from .custom_hostname_create_params import CustomHostnameCreateParams as CustomH from .custom_hostname_edit_response import CustomHostnameEditResponse as CustomHostnameEditResponse from .custom_hostname_list_response import CustomHostnameListResponse as CustomHostnameListResponse from .load_balancer_delete_response import LoadBalancerDeleteResponse as LoadBalancerDeleteResponse -from .mtls_certificate_get_response import MTLSCertificateGetResponse as MTLSCertificateGetResponse +from .page_shield_get_zone_settings import PageShieldGetZoneSettings as PageShieldGetZoneSettings from .waiting_room_preview_response import WaitingRoomPreviewResponse as WaitingRoomPreviewResponse from .warp_connector_token_response import WARPConnectorTokenResponse as WARPConnectorTokenResponse from .bot_management_update_response import BotManagementUpdateResponse as BotManagementUpdateResponse @@ -177,7 +162,6 @@ from .mtls_certificate_list_response import MTLSCertificateListResponse as MTLSC 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 -from .client_certificate_get_response import ClientCertificateGetResponse as ClientCertificateGetResponse from .custom_certificate_get_response import CustomCertificateGetResponse as CustomCertificateGetResponse from .custom_hostname_create_response import CustomHostnameCreateResponse as CustomHostnameCreateResponse from .custom_hostname_delete_response import CustomHostnameDeleteResponse as CustomHostnameDeleteResponse @@ -185,32 +169,23 @@ from .custom_nameserver_create_params import CustomNameserverCreateParams as Cus from .keyless_certificate_edit_params import KeylessCertificateEditParams as KeylessCertificateEditParams from .url_normalization_update_params import URLNormalizationUpdateParams as URLNormalizationUpdateParams from .available_rate_plan_get_response import AvailableRatePlanGetResponse as AvailableRatePlanGetResponse -from .brand_protection_submit_response import BrandProtectionSubmitResponse as BrandProtectionSubmitResponse from .brand_protection_url_info_params import BrandProtectionURLInfoParams as BrandProtectionURLInfoParams from .client_certificate_create_params import ClientCertificateCreateParams as ClientCertificateCreateParams -from .client_certificate_edit_response import ClientCertificateEditResponse as ClientCertificateEditResponse -from .client_certificate_list_response import ClientCertificateListResponse as ClientCertificateListResponse from .custom_certificate_create_params import CustomCertificateCreateParams as CustomCertificateCreateParams from .custom_certificate_edit_response import CustomCertificateEditResponse as CustomCertificateEditResponse -from .custom_certificate_list_response import CustomCertificateListResponse as CustomCertificateListResponse -from .keyless_certificate_get_response import KeylessCertificateGetResponse as KeylessCertificateGetResponse -from .mtls_certificate_create_response import MTLSCertificateCreateResponse as MTLSCertificateCreateResponse -from .mtls_certificate_delete_response import MTLSCertificateDeleteResponse as MTLSCertificateDeleteResponse -from .custom_nameserver_create_response import CustomNameserverCreateResponse as CustomNameserverCreateResponse +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 -from .keyless_certificate_edit_response import KeylessCertificateEditResponse as KeylessCertificateEditResponse from .keyless_certificate_list_response import KeylessCertificateListResponse as KeylessCertificateListResponse from .url_normalization_update_response import URLNormalizationUpdateResponse as URLNormalizationUpdateResponse -from .brand_protection_url_info_response import BrandProtectionURLInfoResponse as BrandProtectionURLInfoResponse -from .client_certificate_create_response import ClientCertificateCreateResponse as ClientCertificateCreateResponse -from .client_certificate_delete_response import ClientCertificateDeleteResponse as ClientCertificateDeleteResponse from .custom_certificate_create_response import CustomCertificateCreateResponse as CustomCertificateCreateResponse from .custom_certificate_delete_response import CustomCertificateDeleteResponse as CustomCertificateDeleteResponse -from .keyless_certificate_create_response import KeylessCertificateCreateResponse as KeylessCertificateCreateResponse from .keyless_certificate_delete_response import KeylessCertificateDeleteResponse as KeylessCertificateDeleteResponse 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 .custom_nameserver_availabilty_response import ( @@ -231,3 +206,15 @@ from .origin_post_quantum_encryption_update_params import ( 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 ae564dbd9..8ab8d25cb 100644 --- a/src/cloudflare/types/accounts/__init__.py +++ b/src/cloudflare/types/accounts/__init__.py @@ -3,6 +3,7 @@ from __future__ import annotations 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/iam_schemas_role.py b/src/cloudflare/types/accounts/iam_schemas_role.py new file mode 100644 index 000000000..5a02be185 --- /dev/null +++ b/src/cloudflare/types/accounts/iam_schemas_role.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import List + +from ..._models import BaseModel + +__all__ = ["IamSchemasRole"] + + +class IamSchemasRole(BaseModel): + id: str + """Role identifier tag.""" + + description: str + """Description of role's permissions.""" + + name: str + """Role Name.""" + + permissions: List[str] + """Access permissions for this User.""" diff --git a/src/cloudflare/types/accounts/member_list_response.py b/src/cloudflare/types/accounts/member_list_response.py index ff7262a31..10f8a3bde 100644 --- a/src/cloudflare/types/accounts/member_list_response.py +++ b/src/cloudflare/types/accounts/member_list_response.py @@ -4,22 +4,9 @@ from typing import List, Optional from typing_extensions import Literal from ..._models import BaseModel +from .iam_schemas_role import IamSchemasRole -__all__ = ["MemberListResponse", "Role"] - - -class Role(BaseModel): - id: str - """Role identifier tag.""" - - description: str - """Description of role's permissions.""" - - name: str - """Role Name.""" - - permissions: List[str] - """Access permissions for this User.""" +__all__ = ["MemberListResponse"] class MemberListResponse(BaseModel): @@ -32,7 +19,7 @@ class MemberListResponse(BaseModel): name: Optional[str] = None """Member Name.""" - roles: List[Role] + roles: List[IamSchemasRole] """Roles assigned to this Member.""" status: Literal["accepted", "invited"] diff --git a/src/cloudflare/types/accounts/role_list_response.py b/src/cloudflare/types/accounts/role_list_response.py index d48603b57..bc4662883 100644 --- a/src/cloudflare/types/accounts/role_list_response.py +++ b/src/cloudflare/types/accounts/role_list_response.py @@ -2,23 +2,8 @@ from typing import List -from ..._models import BaseModel +from .iam_schemas_role import IamSchemasRole -__all__ = ["RoleListResponse", "RoleListResponseItem"] +__all__ = ["RoleListResponse"] - -class RoleListResponseItem(BaseModel): - id: str - """Role identifier tag.""" - - description: str - """Description of role's permissions.""" - - name: str - """Role Name.""" - - permissions: List[str] - """Access permissions for this User.""" - - -RoleListResponse = List[RoleListResponseItem] +RoleListResponse = List[IamSchemasRole] diff --git a/src/cloudflare/types/addressing/__init__.py b/src/cloudflare/types/addressing/__init__.py index 3787b1a8b..cba70fa75 100644 --- a/src/cloudflare/types/addressing/__init__.py +++ b/src/cloudflare/types/addressing/__init__.py @@ -3,17 +3,15 @@ from __future__ import annotations from .prefix_edit_params import PrefixEditParams as PrefixEditParams -from .prefix_get_response import PrefixGetResponse as PrefixGetResponse from .prefix_create_params import PrefixCreateParams as PrefixCreateParams -from .prefix_edit_response import PrefixEditResponse as PrefixEditResponse from .prefix_list_response import PrefixListResponse as PrefixListResponse from .service_list_response import ServiceListResponse as ServiceListResponse -from .prefix_create_response import PrefixCreateResponse as PrefixCreateResponse from .prefix_delete_response import PrefixDeleteResponse as PrefixDeleteResponse from .address_map_edit_params import AddressMapEditParams as AddressMapEditParams +from .addressing_address_maps import AddressingAddressMaps as AddressingAddressMaps 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_edit_response import AddressMapEditResponse as AddressMapEditResponse 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 diff --git a/src/cloudflare/types/addressing/address_map_list_response.py b/src/cloudflare/types/addressing/address_map_list_response.py index 93cc94f71..fa8ad930f 100644 --- a/src/cloudflare/types/addressing/address_map_list_response.py +++ b/src/cloudflare/types/addressing/address_map_list_response.py @@ -1,54 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ..._models import BaseModel +from .addressing_address_maps import AddressingAddressMaps -__all__ = ["AddressMapListResponse", "AddressMapListResponseItem"] +__all__ = ["AddressMapListResponse"] - -class AddressMapListResponseItem(BaseModel): - id: Optional[str] = None - """Identifier""" - - can_delete: Optional[bool] = None - """If set to false, then the Address Map cannot be deleted via API. - - This is true for Cloudflare-managed maps. - """ - - can_modify_ips: Optional[bool] = None - """If set to false, then the IPs on the Address Map cannot be modified via the API. - - This is true for Cloudflare-managed maps. - """ - - created_at: Optional[datetime] = None - - default_sni: Optional[str] = None - """ - If you have legacy TLS clients which do not send the TLS server name indicator, - then you can specify one default SNI on the map. If Cloudflare receives a TLS - handshake from a client without an SNI, it will respond with the default SNI on - those IPs. The default SNI can be any valid zone or subdomain owned by the - account. - """ - - description: Optional[str] = None - """ - An optional description field which may be used to describe the types of IPs or - zones on the map. - """ - - enabled: Optional[bool] = None - """Whether the Address Map is enabled or not. - - Cloudflare's DNS will not respond with IP addresses on an Address Map until the - map is enabled. - """ - - modified_at: Optional[datetime] = None - - -AddressMapListResponse = List[AddressMapListResponseItem] +AddressMapListResponse = List[AddressingAddressMaps] diff --git a/src/cloudflare/types/addressing/address_map_edit_response.py b/src/cloudflare/types/addressing/addressing_address_maps.py similarity index 94% rename from src/cloudflare/types/addressing/address_map_edit_response.py rename to src/cloudflare/types/addressing/addressing_address_maps.py index 6f041292a..bec3a58ef 100644 --- a/src/cloudflare/types/addressing/address_map_edit_response.py +++ b/src/cloudflare/types/addressing/addressing_address_maps.py @@ -5,10 +5,10 @@ from datetime import datetime from ..._models import BaseModel -__all__ = ["AddressMapEditResponse"] +__all__ = ["AddressingAddressMaps"] -class AddressMapEditResponse(BaseModel): +class AddressingAddressMaps(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/addressing/prefix_create_response.py b/src/cloudflare/types/addressing/addressing_ipam_prefixes.py similarity index 94% rename from src/cloudflare/types/addressing/prefix_create_response.py rename to src/cloudflare/types/addressing/addressing_ipam_prefixes.py index 9ebe5ef0e..887ed9ab5 100644 --- a/src/cloudflare/types/addressing/prefix_create_response.py +++ b/src/cloudflare/types/addressing/addressing_ipam_prefixes.py @@ -5,10 +5,10 @@ from datetime import datetime from ..._models import BaseModel -__all__ = ["PrefixCreateResponse"] +__all__ = ["AddressingIpamPrefixes"] -class PrefixCreateResponse(BaseModel): +class AddressingIpamPrefixes(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/addressing/prefix_edit_response.py b/src/cloudflare/types/addressing/prefix_edit_response.py deleted file mode 100644 index db429ae98..000000000 --- a/src/cloudflare/types/addressing/prefix_edit_response.py +++ /dev/null @@ -1,59 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["PrefixEditResponse"] - - -class PrefixEditResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - account_id: Optional[str] = None - """Identifier""" - - advertised: Optional[bool] = None - """Prefix advertisement status to the Internet. - - This field is only not 'null' if on demand is enabled. - """ - - advertised_modified_at: Optional[datetime] = None - """Last time the advertisement status was changed. - - This field is only not 'null' if on demand is enabled. - """ - - approved: Optional[str] = None - """Approval state of the prefix (P = pending, V = active).""" - - asn: Optional[int] = None - """Autonomous System Number (ASN) the prefix will be advertised under.""" - - cidr: Optional[str] = None - """IP Prefix in Classless Inter-Domain Routing format.""" - - created_at: Optional[datetime] = None - - description: Optional[str] = None - """Description of the prefix.""" - - loa_document_id: Optional[str] = None - """Identifier for the uploaded LOA document.""" - - modified_at: Optional[datetime] = None - - on_demand_enabled: Optional[bool] = None - """ - Whether advertisement of the prefix to the Internet may be dynamically enabled - or disabled. - """ - - on_demand_locked: Optional[bool] = None - """ - Whether advertisement status of the prefix is locked, meaning it cannot be - changed. - """ diff --git a/src/cloudflare/types/addressing/prefix_get_response.py b/src/cloudflare/types/addressing/prefix_get_response.py deleted file mode 100644 index d00d16988..000000000 --- a/src/cloudflare/types/addressing/prefix_get_response.py +++ /dev/null @@ -1,59 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["PrefixGetResponse"] - - -class PrefixGetResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - account_id: Optional[str] = None - """Identifier""" - - advertised: Optional[bool] = None - """Prefix advertisement status to the Internet. - - This field is only not 'null' if on demand is enabled. - """ - - advertised_modified_at: Optional[datetime] = None - """Last time the advertisement status was changed. - - This field is only not 'null' if on demand is enabled. - """ - - approved: Optional[str] = None - """Approval state of the prefix (P = pending, V = active).""" - - asn: Optional[int] = None - """Autonomous System Number (ASN) the prefix will be advertised under.""" - - cidr: Optional[str] = None - """IP Prefix in Classless Inter-Domain Routing format.""" - - created_at: Optional[datetime] = None - - description: Optional[str] = None - """Description of the prefix.""" - - loa_document_id: Optional[str] = None - """Identifier for the uploaded LOA document.""" - - modified_at: Optional[datetime] = None - - on_demand_enabled: Optional[bool] = None - """ - Whether advertisement of the prefix to the Internet may be dynamically enabled - or disabled. - """ - - on_demand_locked: Optional[bool] = None - """ - Whether advertisement status of the prefix is locked, meaning it cannot be - changed. - """ diff --git a/src/cloudflare/types/addressing/prefix_list_response.py b/src/cloudflare/types/addressing/prefix_list_response.py index f05c7b471..164ddc3a0 100644 --- a/src/cloudflare/types/addressing/prefix_list_response.py +++ b/src/cloudflare/types/addressing/prefix_list_response.py @@ -1,62 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ..._models import BaseModel +from .addressing_ipam_prefixes import AddressingIpamPrefixes -__all__ = ["PrefixListResponse", "PrefixListResponseItem"] +__all__ = ["PrefixListResponse"] - -class PrefixListResponseItem(BaseModel): - id: Optional[str] = None - """Identifier""" - - account_id: Optional[str] = None - """Identifier""" - - advertised: Optional[bool] = None - """Prefix advertisement status to the Internet. - - This field is only not 'null' if on demand is enabled. - """ - - advertised_modified_at: Optional[datetime] = None - """Last time the advertisement status was changed. - - This field is only not 'null' if on demand is enabled. - """ - - approved: Optional[str] = None - """Approval state of the prefix (P = pending, V = active).""" - - asn: Optional[int] = None - """Autonomous System Number (ASN) the prefix will be advertised under.""" - - cidr: Optional[str] = None - """IP Prefix in Classless Inter-Domain Routing format.""" - - created_at: Optional[datetime] = None - - description: Optional[str] = None - """Description of the prefix.""" - - loa_document_id: Optional[str] = None - """Identifier for the uploaded LOA document.""" - - modified_at: Optional[datetime] = None - - on_demand_enabled: Optional[bool] = None - """ - Whether advertisement of the prefix to the Internet may be dynamically enabled - or disabled. - """ - - on_demand_locked: Optional[bool] = None - """ - Whether advertisement status of the prefix is locked, meaning it cannot be - changed. - """ - - -PrefixListResponse = List[PrefixListResponseItem] +PrefixListResponse = List[AddressingIpamPrefixes] diff --git a/src/cloudflare/types/addressing/prefixes/__init__.py b/src/cloudflare/types/addressing/prefixes/__init__.py index 31a1f2d19..4ee29b9bd 100644 --- a/src/cloudflare/types/addressing/prefixes/__init__.py +++ b/src/cloudflare/types/addressing/prefixes/__init__.py @@ -4,5 +4,5 @@ from __future__ import annotations from .delegation_create_params import DelegationCreateParams as DelegationCreateParams from .delegation_list_response import DelegationListResponse as DelegationListResponse -from .delegation_create_response import DelegationCreateResponse as DelegationCreateResponse from .delegation_delete_response import DelegationDeleteResponse as DelegationDeleteResponse +from .addressing_ipam_delegations import AddressingIpamDelegations as AddressingIpamDelegations diff --git a/src/cloudflare/types/addressing/prefixes/delegation_create_response.py b/src/cloudflare/types/addressing/prefixes/addressing_ipam_delegations.py similarity index 87% rename from src/cloudflare/types/addressing/prefixes/delegation_create_response.py rename to src/cloudflare/types/addressing/prefixes/addressing_ipam_delegations.py index 3ee6b4864..e0f517f54 100644 --- a/src/cloudflare/types/addressing/prefixes/delegation_create_response.py +++ b/src/cloudflare/types/addressing/prefixes/addressing_ipam_delegations.py @@ -5,10 +5,10 @@ from datetime import datetime from ...._models import BaseModel -__all__ = ["DelegationCreateResponse"] +__all__ = ["AddressingIpamDelegations"] -class DelegationCreateResponse(BaseModel): +class AddressingIpamDelegations(BaseModel): id: Optional[str] = None """Delegation identifier tag.""" diff --git a/src/cloudflare/types/addressing/prefixes/bgp/__init__.py b/src/cloudflare/types/addressing/prefixes/bgp/__init__.py index 498a8fec5..cd1e149c7 100644 --- a/src/cloudflare/types/addressing/prefixes/bgp/__init__.py +++ b/src/cloudflare/types/addressing/prefixes/bgp/__init__.py @@ -4,13 +4,11 @@ from __future__ import annotations from .prefix_edit_params import PrefixEditParams as PrefixEditParams from .status_edit_params import StatusEditParams as StatusEditParams -from .prefix_get_response import PrefixGetResponse as PrefixGetResponse from .status_get_response import StatusGetResponse as StatusGetResponse -from .binding_get_response import BindingGetResponse as BindingGetResponse -from .prefix_edit_response import PrefixEditResponse as PrefixEditResponse 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_create_response import BindingCreateResponse as BindingCreateResponse 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/prefix_edit_response.py b/src/cloudflare/types/addressing/prefixes/bgp/addressing_ipam_bgp_prefixes.py similarity index 93% rename from src/cloudflare/types/addressing/prefixes/bgp/prefix_edit_response.py rename to src/cloudflare/types/addressing/prefixes/bgp/addressing_ipam_bgp_prefixes.py index 6e2769481..1cedfc97d 100644 --- a/src/cloudflare/types/addressing/prefixes/bgp/prefix_edit_response.py +++ b/src/cloudflare/types/addressing/prefixes/bgp/addressing_ipam_bgp_prefixes.py @@ -5,7 +5,7 @@ from datetime import datetime from ....._models import BaseModel -__all__ = ["PrefixEditResponse", "BGPSignalOpts", "OnDemand"] +__all__ = ["AddressingIpamBGPPrefixes", "BGPSignalOpts", "OnDemand"] class BGPSignalOpts(BaseModel): @@ -48,7 +48,7 @@ class OnDemand(BaseModel): """ -class PrefixEditResponse(BaseModel): +class AddressingIpamBGPPrefixes(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/addressing/prefixes/bgp/binding_create_response.py b/src/cloudflare/types/addressing/prefixes/bgp/addressing_service_binding.py similarity index 89% rename from src/cloudflare/types/addressing/prefixes/bgp/binding_create_response.py rename to src/cloudflare/types/addressing/prefixes/bgp/addressing_service_binding.py index 80716b961..a309fa260 100644 --- a/src/cloudflare/types/addressing/prefixes/bgp/binding_create_response.py +++ b/src/cloudflare/types/addressing/prefixes/bgp/addressing_service_binding.py @@ -5,7 +5,7 @@ from typing_extensions import Literal from ....._models import BaseModel -__all__ = ["BindingCreateResponse", "Provisioning"] +__all__ = ["AddressingServiceBinding", "Provisioning"] class Provisioning(BaseModel): @@ -16,7 +16,7 @@ class Provisioning(BaseModel): """ -class BindingCreateResponse(BaseModel): +class AddressingServiceBinding(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/addressing/prefixes/bgp/binding_get_response.py b/src/cloudflare/types/addressing/prefixes/bgp/binding_get_response.py deleted file mode 100644 index fc62b2c7f..000000000 --- a/src/cloudflare/types/addressing/prefixes/bgp/binding_get_response.py +++ /dev/null @@ -1,33 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from ....._models import BaseModel - -__all__ = ["BindingGetResponse", "Provisioning"] - - -class Provisioning(BaseModel): - state: Optional[Literal["provisioning", "active"]] = None - """ - When a binding has been deployed to a majority of Cloudflare datacenters, the - binding will become active and can be used with its associated service. - """ - - -class BindingGetResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - cidr: Optional[str] = None - """IP Prefix in Classless Inter-Domain Routing format.""" - - provisioning: Optional[Provisioning] = None - """Status of a Service Binding's deployment to the Cloudflare network""" - - service_id: Optional[str] = None - """Identifier""" - - service_name: Optional[str] = None - """Name of a service running on the Cloudflare network""" diff --git a/src/cloudflare/types/addressing/prefixes/bgp/binding_list_response.py b/src/cloudflare/types/addressing/prefixes/bgp/binding_list_response.py index 1e96e2900..335d13ca8 100644 --- a/src/cloudflare/types/addressing/prefixes/bgp/binding_list_response.py +++ b/src/cloudflare/types/addressing/prefixes/bgp/binding_list_response.py @@ -1,36 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from typing_extensions import Literal +from typing import List -from ....._models import BaseModel +from .addressing_service_binding import AddressingServiceBinding -__all__ = ["BindingListResponse", "BindingListResponseItem", "BindingListResponseItemProvisioning"] +__all__ = ["BindingListResponse"] - -class BindingListResponseItemProvisioning(BaseModel): - state: Optional[Literal["provisioning", "active"]] = None - """ - When a binding has been deployed to a majority of Cloudflare datacenters, the - binding will become active and can be used with its associated service. - """ - - -class BindingListResponseItem(BaseModel): - id: Optional[str] = None - """Identifier""" - - cidr: Optional[str] = None - """IP Prefix in Classless Inter-Domain Routing format.""" - - provisioning: Optional[BindingListResponseItemProvisioning] = None - """Status of a Service Binding's deployment to the Cloudflare network""" - - service_id: Optional[str] = None - """Identifier""" - - service_name: Optional[str] = None - """Name of a service running on the Cloudflare network""" - - -BindingListResponse = List[BindingListResponseItem] +BindingListResponse = List[AddressingServiceBinding] diff --git a/src/cloudflare/types/addressing/prefixes/bgp/prefix_get_response.py b/src/cloudflare/types/addressing/prefixes/bgp/prefix_get_response.py deleted file mode 100644 index aaec12330..000000000 --- a/src/cloudflare/types/addressing/prefixes/bgp/prefix_get_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ....._models import BaseModel - -__all__ = ["PrefixGetResponse", "BGPSignalOpts", "OnDemand"] - - -class BGPSignalOpts(BaseModel): - enabled: Optional[bool] = None - """ - Whether control of advertisement of the prefix to the Internet is enabled to be - performed via BGP signal - """ - - modified_at: Optional[datetime] = None - """Last time BGP signaling control was toggled. - - This field is null if BGP signaling has never been enabled. - """ - - -class OnDemand(BaseModel): - advertised: Optional[bool] = None - """Prefix advertisement status to the Internet. - - This field is only not 'null' if on demand is enabled. - """ - - advertised_modified_at: Optional[datetime] = None - """Last time the advertisement status was changed. - - This field is only not 'null' if on demand is enabled. - """ - - on_demand_enabled: Optional[bool] = None - """ - Whether advertisement of the prefix to the Internet may be dynamically enabled - or disabled. - """ - - on_demand_locked: Optional[bool] = None - """ - Whether advertisement status of the prefix is locked, meaning it cannot be - changed. - """ - - -class PrefixGetResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - asn: Optional[int] = None - """Autonomous System Number (ASN) the prefix will be advertised under.""" - - bgp_signal_opts: Optional[BGPSignalOpts] = None - - cidr: Optional[str] = None - """IP Prefix in Classless Inter-Domain Routing format.""" - - created_at: Optional[datetime] = None - - modified_at: Optional[datetime] = None - - on_demand: Optional[OnDemand] = None diff --git a/src/cloudflare/types/addressing/prefixes/bgp/prefix_list_response.py b/src/cloudflare/types/addressing/prefixes/bgp/prefix_list_response.py index 8beb26f6f..73bc53418 100644 --- a/src/cloudflare/types/addressing/prefixes/bgp/prefix_list_response.py +++ b/src/cloudflare/types/addressing/prefixes/bgp/prefix_list_response.py @@ -1,75 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ....._models import BaseModel +from .addressing_ipam_bgp_prefixes import AddressingIpamBGPPrefixes -__all__ = [ - "PrefixListResponse", - "PrefixListResponseItem", - "PrefixListResponseItemBGPSignalOpts", - "PrefixListResponseItemOnDemand", -] +__all__ = ["PrefixListResponse"] - -class PrefixListResponseItemBGPSignalOpts(BaseModel): - enabled: Optional[bool] = None - """ - Whether control of advertisement of the prefix to the Internet is enabled to be - performed via BGP signal - """ - - modified_at: Optional[datetime] = None - """Last time BGP signaling control was toggled. - - This field is null if BGP signaling has never been enabled. - """ - - -class PrefixListResponseItemOnDemand(BaseModel): - advertised: Optional[bool] = None - """Prefix advertisement status to the Internet. - - This field is only not 'null' if on demand is enabled. - """ - - advertised_modified_at: Optional[datetime] = None - """Last time the advertisement status was changed. - - This field is only not 'null' if on demand is enabled. - """ - - on_demand_enabled: Optional[bool] = None - """ - Whether advertisement of the prefix to the Internet may be dynamically enabled - or disabled. - """ - - on_demand_locked: Optional[bool] = None - """ - Whether advertisement status of the prefix is locked, meaning it cannot be - changed. - """ - - -class PrefixListResponseItem(BaseModel): - id: Optional[str] = None - """Identifier""" - - asn: Optional[int] = None - """Autonomous System Number (ASN) the prefix will be advertised under.""" - - bgp_signal_opts: Optional[PrefixListResponseItemBGPSignalOpts] = None - - cidr: Optional[str] = None - """IP Prefix in Classless Inter-Domain Routing format.""" - - created_at: Optional[datetime] = None - - modified_at: Optional[datetime] = None - - on_demand: Optional[PrefixListResponseItemOnDemand] = None - - -PrefixListResponse = List[PrefixListResponseItem] +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 index 84492ed50..f65ac4c47 100644 --- a/src/cloudflare/types/addressing/prefixes/delegation_list_response.py +++ b/src/cloudflare/types/addressing/prefixes/delegation_list_response.py @@ -1,29 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ...._models import BaseModel +from .addressing_ipam_delegations import AddressingIpamDelegations -__all__ = ["DelegationListResponse", "DelegationListResponseItem"] +__all__ = ["DelegationListResponse"] - -class DelegationListResponseItem(BaseModel): - id: Optional[str] = None - """Delegation identifier tag.""" - - cidr: Optional[str] = None - """IP Prefix in Classless Inter-Domain Routing format.""" - - created_at: Optional[datetime] = None - - delegated_account_id: Optional[str] = None - """Account identifier for the account to which prefix is being delegated.""" - - modified_at: Optional[datetime] = None - - parent_prefix_id: Optional[str] = None - """Identifier""" - - -DelegationListResponse = List[DelegationListResponseItem] +DelegationListResponse = List[AddressingIpamDelegations] diff --git a/src/cloudflare/types/alerting/v3/__init__.py b/src/cloudflare/types/alerting/v3/__init__.py index 864f58958..8d33feba0 100644 --- a/src/cloudflare/types/alerting/v3/__init__.py +++ b/src/cloudflare/types/alerting/v3/__init__.py @@ -2,12 +2,12 @@ from __future__ import annotations +from .aaa_history import AaaHistory as AaaHistory +from .aaa_policies import AaaPolicies as AaaPolicies from .history_list_params import HistoryListParams as HistoryListParams -from .policy_get_response import PolicyGetResponse as PolicyGetResponse 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 .history_list_response import HistoryListResponse as HistoryListResponse from .policy_create_response import PolicyCreateResponse as PolicyCreateResponse from .policy_delete_response import PolicyDeleteResponse as PolicyDeleteResponse from .policy_update_response import PolicyUpdateResponse as PolicyUpdateResponse diff --git a/src/cloudflare/types/alerting/v3/history_list_response.py b/src/cloudflare/types/alerting/v3/aaa_history.py similarity index 94% rename from src/cloudflare/types/alerting/v3/history_list_response.py rename to src/cloudflare/types/alerting/v3/aaa_history.py index dd9c1d26f..ae07972ba 100644 --- a/src/cloudflare/types/alerting/v3/history_list_response.py +++ b/src/cloudflare/types/alerting/v3/aaa_history.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["HistoryListResponse"] +__all__ = ["AaaHistory"] -class HistoryListResponse(BaseModel): +class AaaHistory(BaseModel): id: Optional[str] = None """UUID""" diff --git a/src/cloudflare/types/alerting/v3/policy_get_response.py b/src/cloudflare/types/alerting/v3/aaa_policies.py similarity index 98% rename from src/cloudflare/types/alerting/v3/policy_get_response.py rename to src/cloudflare/types/alerting/v3/aaa_policies.py index a6fac2ec7..2e865f6f1 100644 --- a/src/cloudflare/types/alerting/v3/policy_get_response.py +++ b/src/cloudflare/types/alerting/v3/aaa_policies.py @@ -6,7 +6,7 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["PolicyGetResponse", "Filters", "Mechanisms"] +__all__ = ["AaaPolicies", "Filters", "Mechanisms"] class Filters(BaseModel): @@ -142,7 +142,7 @@ class Mechanisms(BaseModel): """UUID""" -class PolicyGetResponse(BaseModel): +class AaaPolicies(BaseModel): id: Optional[str] = None """The unique identifier of a notification policy""" diff --git a/src/cloudflare/types/alerting/v3/destinations/__init__.py b/src/cloudflare/types/alerting/v3/destinations/__init__.py index e5eb6975d..e6c8be3d2 100644 --- a/src/cloudflare/types/alerting/v3/destinations/__init__.py +++ b/src/cloudflare/types/alerting/v3/destinations/__init__.py @@ -2,7 +2,8 @@ from __future__ import annotations -from .webhook_get_response import WebhookGetResponse as WebhookGetResponse +from .aaa_webhooks import AaaWebhooks as AaaWebhooks +from .aaa_pagerduty import AaaPagerduty as AaaPagerduty 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/v3/destinations/aaa_pagerduty.py b/src/cloudflare/types/alerting/v3/destinations/aaa_pagerduty.py new file mode 100644 index 000000000..0e4dc6dd8 --- /dev/null +++ b/src/cloudflare/types/alerting/v3/destinations/aaa_pagerduty.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional + +from ....._models import BaseModel + +__all__ = ["AaaPagerduty"] + + +class AaaPagerduty(BaseModel): + id: Optional[str] = None + """UUID""" + + name: Optional[str] = None + """The name of the pagerduty service.""" diff --git a/src/cloudflare/types/alerting/v3/destinations/webhook_get_response.py b/src/cloudflare/types/alerting/v3/destinations/aaa_webhooks.py similarity index 95% rename from src/cloudflare/types/alerting/v3/destinations/webhook_get_response.py rename to src/cloudflare/types/alerting/v3/destinations/aaa_webhooks.py index 36a3d6a9e..d946d3ccd 100644 --- a/src/cloudflare/types/alerting/v3/destinations/webhook_get_response.py +++ b/src/cloudflare/types/alerting/v3/destinations/aaa_webhooks.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ....._models import BaseModel -__all__ = ["WebhookGetResponse"] +__all__ = ["AaaWebhooks"] -class WebhookGetResponse(BaseModel): +class AaaWebhooks(BaseModel): id: Optional[str] = None """The unique identifier of a webhook""" diff --git a/src/cloudflare/types/alerting/v3/destinations/pagerduty_get_response.py b/src/cloudflare/types/alerting/v3/destinations/pagerduty_get_response.py index ca2aacc88..38b479178 100644 --- a/src/cloudflare/types/alerting/v3/destinations/pagerduty_get_response.py +++ b/src/cloudflare/types/alerting/v3/destinations/pagerduty_get_response.py @@ -1,18 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ....._models import BaseModel +from .aaa_pagerduty import AaaPagerduty -__all__ = ["PagerdutyGetResponse", "PagerdutyGetResponseItem"] +__all__ = ["PagerdutyGetResponse"] - -class PagerdutyGetResponseItem(BaseModel): - id: Optional[str] = None - """UUID""" - - name: Optional[str] = None - """The name of the pagerduty service.""" - - -PagerdutyGetResponse = List[PagerdutyGetResponseItem] +PagerdutyGetResponse = List[AaaPagerduty] diff --git a/src/cloudflare/types/alerting/v3/destinations/webhook_list_response.py b/src/cloudflare/types/alerting/v3/destinations/webhook_list_response.py index 874aca6ee..dec65b851 100644 --- a/src/cloudflare/types/alerting/v3/destinations/webhook_list_response.py +++ b/src/cloudflare/types/alerting/v3/destinations/webhook_list_response.py @@ -1,52 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ....._models import BaseModel +from .aaa_webhooks import AaaWebhooks -__all__ = ["WebhookListResponse", "WebhookListResponseItem"] +__all__ = ["WebhookListResponse"] - -class WebhookListResponseItem(BaseModel): - id: Optional[str] = None - """The unique identifier of a webhook""" - - created_at: Optional[datetime] = None - """Timestamp of when the webhook destination was created.""" - - last_failure: Optional[datetime] = None - """ - Timestamp of the last time an attempt to dispatch a notification to this webhook - failed. - """ - - last_success: Optional[datetime] = None - """ - Timestamp of the last time Cloudflare was able to successfully dispatch a - notification using this webhook. - """ - - name: Optional[str] = None - """The name of the webhook destination. - - This will be included in the request body when you receive a webhook - notification. - """ - - secret: Optional[str] = None - """ - Optional secret that will be passed in the `cf-webhook-auth` header when - dispatching generic webhook notifications or formatted for supported - destinations. Secrets are not returned in any API response body. - """ - - type: Optional[Literal["slack", "generic", "gchat"]] = None - """Type of webhook endpoint.""" - - url: Optional[str] = None - """The POST endpoint to call when dispatching a notification.""" - - -WebhookListResponse = List[WebhookListResponseItem] +WebhookListResponse = List[AaaWebhooks] diff --git a/src/cloudflare/types/alerting/v3/policy_list_response.py b/src/cloudflare/types/alerting/v3/policy_list_response.py index fd6319ce3..184ef5948 100644 --- a/src/cloudflare/types/alerting/v3/policy_list_response.py +++ b/src/cloudflare/types/alerting/v3/policy_list_response.py @@ -1,245 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import Dict, List, Union, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ...._models import BaseModel +from .aaa_policies import AaaPolicies -__all__ = [ - "PolicyListResponse", - "PolicyListResponseItem", - "PolicyListResponseItemFilters", - "PolicyListResponseItemMechanisms", -] +__all__ = ["PolicyListResponse"] - -class PolicyListResponseItemFilters(BaseModel): - actions: Optional[List[str]] = None - """Usage depends on specific alert type""" - - affected_asns: Optional[List[str]] = None - """Used for configuring radar_notification""" - - affected_components: Optional[List[str]] = None - """Used for configuring incident_alert""" - - affected_locations: Optional[List[str]] = None - """Used for configuring radar_notification""" - - airport_code: Optional[List[str]] = None - """Used for configuring maintenance_event_notification""" - - alert_trigger_preferences: Optional[List[str]] = None - """Usage depends on specific alert type""" - - alert_trigger_preferences_value: Optional[List[Literal["99.0", "98.0", "97.0"]]] = None - """Used for configuring magic_tunnel_health_check_event""" - - enabled: Optional[List[str]] = None - """Used for configuring load_balancing_pool_enablement_alert""" - - environment: Optional[List[str]] = None - """Used for configuring pages_event_alert""" - - event: Optional[List[str]] = None - """Used for configuring pages_event_alert""" - - event_source: Optional[List[str]] = None - """Used for configuring load_balancing_health_alert""" - - event_type: Optional[List[str]] = None - """Usage depends on specific alert type""" - - group_by: Optional[List[str]] = None - """Usage depends on specific alert type""" - - health_check_id: Optional[List[str]] = None - """Used for configuring health_check_status_notification""" - - incident_impact: Optional[ - List[ - Literal[ - "INCIDENT_IMPACT_NONE", "INCIDENT_IMPACT_MINOR", "INCIDENT_IMPACT_MAJOR", "INCIDENT_IMPACT_CRITICAL" - ] - ] - ] = None - """Used for configuring incident_alert""" - - input_id: Optional[List[str]] = None - """Used for configuring stream_live_notifications""" - - limit: Optional[List[str]] = None - """Used for configuring billing_usage_alert""" - - logo_tag: Optional[List[str]] = None - """Used for configuring logo_match_alert""" - - megabits_per_second: Optional[List[str]] = None - """Used for configuring advanced_ddos_attack_l4_alert""" - - new_health: Optional[List[str]] = None - """Used for configuring load_balancing_health_alert""" - - new_status: Optional[List[str]] = None - """Used for configuring tunnel_health_event""" - - packets_per_second: Optional[List[str]] = None - """Used for configuring advanced_ddos_attack_l4_alert""" - - pool_id: Optional[List[str]] = None - """Usage depends on specific alert type""" - - product: Optional[List[str]] = None - """Used for configuring billing_usage_alert""" - - project_id: Optional[List[str]] = None - """Used for configuring pages_event_alert""" - - protocol: Optional[List[str]] = None - """Used for configuring advanced_ddos_attack_l4_alert""" - - query_tag: Optional[List[str]] = None - """Usage depends on specific alert type""" - - requests_per_second: Optional[List[str]] = None - """Used for configuring advanced_ddos_attack_l7_alert""" - - selectors: Optional[List[str]] = None - """Usage depends on specific alert type""" - - services: Optional[List[str]] = None - """Used for configuring clickhouse_alert_fw_ent_anomaly""" - - slo: Optional[List[str]] = None - """Usage depends on specific alert type""" - - status: Optional[List[str]] = None - """Used for configuring health_check_status_notification""" - - target_hostname: Optional[List[str]] = None - """Used for configuring advanced_ddos_attack_l7_alert""" - - target_ip: Optional[List[str]] = None - """Used for configuring advanced_ddos_attack_l4_alert""" - - target_zone_name: Optional[List[str]] = None - """Used for configuring advanced_ddos_attack_l7_alert""" - - traffic_exclusions: Optional[List[Literal["security_events"]]] = None - """Used for configuring traffic_anomalies_alert""" - - tunnel_id: Optional[List[str]] = None - """Used for configuring tunnel_health_event""" - - tunnel_name: Optional[List[str]] = None - """Used for configuring magic_tunnel_health_check_event""" - - where: Optional[List[str]] = None - """Usage depends on specific alert type""" - - zones: Optional[List[str]] = None - """Usage depends on specific alert type""" - - -class PolicyListResponseItemMechanisms(BaseModel): - id: Union[str, str, None] = None - """UUID""" - - -class PolicyListResponseItem(BaseModel): - id: Optional[str] = None - """The unique identifier of a notification policy""" - - alert_type: Optional[ - Literal[ - "access_custom_certificate_expiration_type", - "advanced_ddos_attack_l4_alert", - "advanced_ddos_attack_l7_alert", - "advanced_http_alert_error", - "bgp_hijack_notification", - "billing_usage_alert", - "block_notification_block_removed", - "block_notification_new_block", - "block_notification_review_rejected", - "brand_protection_alert", - "brand_protection_digest", - "clickhouse_alert_fw_anomaly", - "clickhouse_alert_fw_ent_anomaly", - "custom_ssl_certificate_event_type", - "dedicated_ssl_certificate_event_type", - "dos_attack_l4", - "dos_attack_l7", - "expiring_service_token_alert", - "failing_logpush_job_disabled_alert", - "fbm_auto_advertisement", - "fbm_dosd_attack", - "fbm_volumetric_attack", - "health_check_status_notification", - "hostname_aop_custom_certificate_expiration_type", - "http_alert_edge_error", - "http_alert_origin_error", - "incident_alert", - "load_balancing_health_alert", - "load_balancing_pool_enablement_alert", - "logo_match_alert", - "magic_tunnel_health_check_event", - "maintenance_event_notification", - "mtls_certificate_store_certificate_expiration_type", - "pages_event_alert", - "radar_notification", - "real_origin_monitoring", - "scriptmonitor_alert_new_code_change_detections", - "scriptmonitor_alert_new_hosts", - "scriptmonitor_alert_new_malicious_hosts", - "scriptmonitor_alert_new_malicious_scripts", - "scriptmonitor_alert_new_malicious_url", - "scriptmonitor_alert_new_max_length_resource_url", - "scriptmonitor_alert_new_resources", - "secondary_dns_all_primaries_failing", - "secondary_dns_primaries_failing", - "secondary_dns_zone_successfully_updated", - "secondary_dns_zone_validation_warning", - "sentinel_alert", - "stream_live_notifications", - "tunnel_health_event", - "tunnel_update_event", - "universal_ssl_event_type", - "web_analytics_metrics_update", - "zone_aop_custom_certificate_expiration_type", - ] - ] = None - """Refers to which event will trigger a Notification dispatch. - - You can use the endpoint to get available alert types which then will give you a - list of possible values. - """ - - created: Optional[datetime] = None - - description: Optional[str] = None - """Optional description for the Notification policy.""" - - enabled: Optional[bool] = None - """Whether or not the Notification policy is enabled.""" - - filters: Optional[PolicyListResponseItemFilters] = None - """ - Optional filters that allow you to be alerted only on a subset of events for - that alert type based on some criteria. This is only available for select alert - types. See alert type documentation for more details. - """ - - mechanisms: Optional[Dict[str, List[PolicyListResponseItemMechanisms]]] = None - """List of IDs that will be used when dispatching a notification. - - IDs for email type will be the email address. - """ - - modified: Optional[datetime] = None - - name: Optional[str] = None - """Name of the policy.""" - - -PolicyListResponse = List[PolicyListResponseItem] +PolicyListResponse = List[AaaPolicies] diff --git a/src/cloudflare/types/available_plan_list_response.py b/src/cloudflare/types/available_plan_list_response.py index 628464eeb..afee061de 100644 --- a/src/cloudflare/types/available_plan_list_response.py +++ b/src/cloudflare/types/available_plan_list_response.py @@ -1,43 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from typing_extensions import Literal +from typing import List -from .._models import BaseModel +from .bill_subs_api_available_rate_plan import BillSubsAPIAvailableRatePlan -__all__ = ["AvailablePlanListResponse", "AvailablePlanListResponseItem"] +__all__ = ["AvailablePlanListResponse"] - -class AvailablePlanListResponseItem(BaseModel): - id: Optional[str] = None - """Identifier""" - - can_subscribe: Optional[bool] = None - """Indicates whether you can subscribe to this plan.""" - - currency: Optional[str] = None - """The monetary unit in which pricing information is displayed.""" - - externally_managed: Optional[bool] = None - """Indicates whether this plan is managed externally.""" - - frequency: Optional[Literal["weekly", "monthly", "quarterly", "yearly"]] = None - """The frequency at which you will be billed for this plan.""" - - is_subscribed: Optional[bool] = None - """Indicates whether you are currently subscribed to this plan.""" - - legacy_discount: Optional[bool] = None - """Indicates whether this plan has a legacy discount applied.""" - - legacy_id: Optional[str] = None - """The legacy identifier for this rate plan, if any.""" - - name: Optional[str] = None - """The plan name.""" - - price: Optional[float] = None - """The amount you will be billed for this plan.""" - - -AvailablePlanListResponse = List[AvailablePlanListResponseItem] +AvailablePlanListResponse = List[BillSubsAPIAvailableRatePlan] diff --git a/src/cloudflare/types/available_plan_get_response.py b/src/cloudflare/types/bill_subs_api_available_rate_plan.py similarity index 92% rename from src/cloudflare/types/available_plan_get_response.py rename to src/cloudflare/types/bill_subs_api_available_rate_plan.py index 0f13eaad9..29f56e521 100644 --- a/src/cloudflare/types/available_plan_get_response.py +++ b/src/cloudflare/types/bill_subs_api_available_rate_plan.py @@ -5,10 +5,10 @@ from typing_extensions import Literal from .._models import BaseModel -__all__ = ["AvailablePlanGetResponse"] +__all__ = ["BillSubsAPIAvailableRatePlan"] -class AvailablePlanGetResponse(BaseModel): +class BillSubsAPIAvailableRatePlan(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/cache/__init__.py b/src/cloudflare/types/cache/__init__.py index f4d9ef34a..d3971c64b 100644 --- a/src/cloudflare/types/cache/__init__.py +++ b/src/cloudflare/types/cache/__init__.py @@ -2,10 +2,10 @@ from __future__ import annotations +from .cache_variants import CacheVariants as CacheVariants from .variant_edit_params import VariantEditParams as VariantEditParams from .variant_get_response import VariantGetResponse as VariantGetResponse from .variant_edit_response import VariantEditResponse as VariantEditResponse -from .variant_delete_response import VariantDeleteResponse as VariantDeleteResponse from .cache_reserve_edit_params import CacheReserveEditParams as CacheReserveEditParams from .cache_reserve_get_response import CacheReserveGetResponse as CacheReserveGetResponse from .cache_reserve_edit_response import CacheReserveEditResponse as CacheReserveEditResponse diff --git a/src/cloudflare/types/cache/variant_delete_response.py b/src/cloudflare/types/cache/cache_variants.py similarity index 81% rename from src/cloudflare/types/cache/variant_delete_response.py rename to src/cloudflare/types/cache/cache_variants.py index cc33ae40a..607acd205 100644 --- a/src/cloudflare/types/cache/variant_delete_response.py +++ b/src/cloudflare/types/cache/cache_variants.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["VariantDeleteResponse"] +__all__ = ["CacheVariants"] -class VariantDeleteResponse(BaseModel): +class CacheVariants(BaseModel): id: Literal["variants"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/call_delete_response.py b/src/cloudflare/types/call_delete_response.py deleted file mode 100644 index b3910c465..000000000 --- a/src/cloudflare/types/call_delete_response.py +++ /dev/null @@ -1,22 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from .._models import BaseModel - -__all__ = ["CallDeleteResponse"] - - -class CallDeleteResponse(BaseModel): - created: Optional[datetime] = None - """The date and time the item was created.""" - - modified: Optional[datetime] = None - """The date and time the item was last modified.""" - - name: Optional[str] = None - """A short description of Calls app, not shown to end users.""" - - uid: Optional[str] = None - """A Cloudflare-generated unique identifier for a item.""" diff --git a/src/cloudflare/types/call_list_response.py b/src/cloudflare/types/call_list_response.py index 7067e51df..cca15d84a 100644 --- a/src/cloudflare/types/call_list_response.py +++ b/src/cloudflare/types/call_list_response.py @@ -1,25 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from .._models import BaseModel +from .calls_app import CallsApp -__all__ = ["CallListResponse", "CallListResponseItem"] +__all__ = ["CallListResponse"] - -class CallListResponseItem(BaseModel): - created: Optional[datetime] = None - """The date and time the item was created.""" - - modified: Optional[datetime] = None - """The date and time the item was last modified.""" - - name: Optional[str] = None - """A short description of Calls app, not shown to end users.""" - - uid: Optional[str] = None - """A Cloudflare-generated unique identifier for a item.""" - - -CallListResponse = List[CallListResponseItem] +CallListResponse = List[CallsApp] diff --git a/src/cloudflare/types/call_update_response.py b/src/cloudflare/types/call_update_response.py deleted file mode 100644 index b3ac00683..000000000 --- a/src/cloudflare/types/call_update_response.py +++ /dev/null @@ -1,22 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from .._models import BaseModel - -__all__ = ["CallUpdateResponse"] - - -class CallUpdateResponse(BaseModel): - created: Optional[datetime] = None - """The date and time the item was created.""" - - modified: Optional[datetime] = None - """The date and time the item was last modified.""" - - name: Optional[str] = None - """A short description of Calls app, not shown to end users.""" - - uid: Optional[str] = None - """A Cloudflare-generated unique identifier for a item.""" diff --git a/src/cloudflare/types/call_get_response.py b/src/cloudflare/types/calls_app.py similarity index 89% rename from src/cloudflare/types/call_get_response.py rename to src/cloudflare/types/calls_app.py index 09346f659..8d5393cc1 100644 --- a/src/cloudflare/types/call_get_response.py +++ b/src/cloudflare/types/calls_app.py @@ -5,10 +5,10 @@ from datetime import datetime from .._models import BaseModel -__all__ = ["CallGetResponse"] +__all__ = ["CallsApp"] -class CallGetResponse(BaseModel): +class CallsApp(BaseModel): created: Optional[datetime] = None """The date and time the item was created.""" diff --git a/src/cloudflare/types/call_create_response.py b/src/cloudflare/types/calls_app_with_secret.py similarity index 89% rename from src/cloudflare/types/call_create_response.py rename to src/cloudflare/types/calls_app_with_secret.py index bc6ee93f2..a709de490 100644 --- a/src/cloudflare/types/call_create_response.py +++ b/src/cloudflare/types/calls_app_with_secret.py @@ -5,10 +5,10 @@ from datetime import datetime from .._models import BaseModel -__all__ = ["CallCreateResponse"] +__all__ = ["CallsAppWithSecret"] -class CallCreateResponse(BaseModel): +class CallsAppWithSecret(BaseModel): created: Optional[datetime] = None """The date and time the item was created.""" diff --git a/src/cloudflare/types/certificate_authorities/__init__.py b/src/cloudflare/types/certificate_authorities/__init__.py index a5dcc3656..b1a6adeea 100644 --- a/src/cloudflare/types/certificate_authorities/__init__.py +++ b/src/cloudflare/types/certificate_authorities/__init__.py @@ -3,6 +3,7 @@ from __future__ import annotations from .hostname_association_get_params import HostnameAssociationGetParams as HostnameAssociationGetParams -from .hostname_association_get_response import HostnameAssociationGetResponse as HostnameAssociationGetResponse from .hostname_association_update_params import HostnameAssociationUpdateParams as HostnameAssociationUpdateParams -from .hostname_association_update_response import HostnameAssociationUpdateResponse as HostnameAssociationUpdateResponse +from .tls_certificates_and_hostnames_hostname_association import ( + TLSCertificatesAndHostnamesHostnameAssociation as TLSCertificatesAndHostnamesHostnameAssociation, +) diff --git a/src/cloudflare/types/certificate_authorities/hostname_association_update_response.py b/src/cloudflare/types/certificate_authorities/hostname_association_update_response.py deleted file mode 100644 index 282c51bed..000000000 --- a/src/cloudflare/types/certificate_authorities/hostname_association_update_response.py +++ /dev/null @@ -1,18 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional - -from ..._models import BaseModel - -__all__ = ["HostnameAssociationUpdateResponse"] - - -class HostnameAssociationUpdateResponse(BaseModel): - hostnames: Optional[List[str]] = None - - mtls_certificate_id: Optional[str] = None - """ - The UUID for a certificate that was uploaded to the mTLS Certificate Management - endpoint. If no mtls_certificate_id is given, the hostnames will be associated - to your active Cloudflare Managed CA. - """ diff --git a/src/cloudflare/types/certificate_authorities/hostname_association_get_response.py b/src/cloudflare/types/certificate_authorities/tls_certificates_and_hostnames_hostname_association.py similarity index 77% rename from src/cloudflare/types/certificate_authorities/hostname_association_get_response.py rename to src/cloudflare/types/certificate_authorities/tls_certificates_and_hostnames_hostname_association.py index f7431caed..958b7803e 100644 --- a/src/cloudflare/types/certificate_authorities/hostname_association_get_response.py +++ b/src/cloudflare/types/certificate_authorities/tls_certificates_and_hostnames_hostname_association.py @@ -4,10 +4,10 @@ from typing import List, Optional from ..._models import BaseModel -__all__ = ["HostnameAssociationGetResponse"] +__all__ = ["TLSCertificatesAndHostnamesHostnameAssociation"] -class HostnameAssociationGetResponse(BaseModel): +class TLSCertificatesAndHostnamesHostnameAssociation(BaseModel): hostnames: Optional[List[str]] = None mtls_certificate_id: Optional[str] = None diff --git a/src/cloudflare/types/challenges/__init__.py b/src/cloudflare/types/challenges/__init__.py index 2456da531..65b39178f 100644 --- a/src/cloudflare/types/challenges/__init__.py +++ b/src/cloudflare/types/challenges/__init__.py @@ -3,12 +3,8 @@ from __future__ import annotations from .widget_list_params import WidgetListParams as WidgetListParams -from .widget_get_response import WidgetGetResponse as WidgetGetResponse from .widget_create_params import WidgetCreateParams as WidgetCreateParams -from .widget_list_response import WidgetListResponse as WidgetListResponse from .widget_update_params import WidgetUpdateParams as WidgetUpdateParams -from .widget_create_response import WidgetCreateResponse as WidgetCreateResponse -from .widget_delete_response import WidgetDeleteResponse as WidgetDeleteResponse -from .widget_update_response import WidgetUpdateResponse as WidgetUpdateResponse from .widget_rotate_secret_params import WidgetRotateSecretParams as WidgetRotateSecretParams -from .widget_rotate_secret_response import WidgetRotateSecretResponse as WidgetRotateSecretResponse +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/widget_get_response.py b/src/cloudflare/types/challenges/nc_challenges_admin_widget_detail.py similarity index 93% rename from src/cloudflare/types/challenges/widget_get_response.py rename to src/cloudflare/types/challenges/nc_challenges_admin_widget_detail.py index 42d08ef16..a48c7e7fb 100644 --- a/src/cloudflare/types/challenges/widget_get_response.py +++ b/src/cloudflare/types/challenges/nc_challenges_admin_widget_detail.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["WidgetGetResponse"] +__all__ = ["NcChallengesAdminWidgetDetail"] -class WidgetGetResponse(BaseModel): +class NcChallengesAdminWidgetDetail(BaseModel): bot_fight_mode: bool """ If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive diff --git a/src/cloudflare/types/challenges/widget_list_response.py b/src/cloudflare/types/challenges/nc_challenges_admin_widget_list.py similarity index 93% rename from src/cloudflare/types/challenges/widget_list_response.py rename to src/cloudflare/types/challenges/nc_challenges_admin_widget_list.py index b5152e8cf..ccae7a3ba 100644 --- a/src/cloudflare/types/challenges/widget_list_response.py +++ b/src/cloudflare/types/challenges/nc_challenges_admin_widget_list.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["WidgetListResponse"] +__all__ = ["NcChallengesAdminWidgetList"] -class WidgetListResponse(BaseModel): +class NcChallengesAdminWidgetList(BaseModel): bot_fight_mode: bool """ If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive diff --git a/src/cloudflare/types/challenges/widget_create_response.py b/src/cloudflare/types/challenges/widget_create_response.py deleted file mode 100644 index abcee7cfa..000000000 --- a/src/cloudflare/types/challenges/widget_create_response.py +++ /dev/null @@ -1,53 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["WidgetCreateResponse"] - - -class WidgetCreateResponse(BaseModel): - bot_fight_mode: bool - """ - If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive - challenges in response to malicious bots (ENT only). - """ - - clearance_level: Literal["no_clearance", "jschallenge", "managed", "interactive"] - """ - If Turnstile is embedded on a Cloudflare site and the widget should grant - challenge clearance, this setting can determine the clearance level to be set - """ - - created_on: datetime - """When the widget was created.""" - - domains: List[str] - - mode: Literal["non-interactive", "invisible", "managed"] - """Widget Mode""" - - modified_on: datetime - """When the widget was modified.""" - - name: str - """Human readable widget name. - - Not unique. Cloudflare suggests that you set this to a meaningful string to make - it easier to identify your widget, and where it is used. - """ - - offlabel: bool - """Do not show any Cloudflare branding on the widget (ENT only).""" - - region: Literal["world"] - """Region where this widget can be used.""" - - secret: str - """Secret key for this widget.""" - - sitekey: str - """Widget item identifier tag.""" diff --git a/src/cloudflare/types/challenges/widget_delete_response.py b/src/cloudflare/types/challenges/widget_delete_response.py deleted file mode 100644 index fd2b67ead..000000000 --- a/src/cloudflare/types/challenges/widget_delete_response.py +++ /dev/null @@ -1,53 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["WidgetDeleteResponse"] - - -class WidgetDeleteResponse(BaseModel): - bot_fight_mode: bool - """ - If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive - challenges in response to malicious bots (ENT only). - """ - - clearance_level: Literal["no_clearance", "jschallenge", "managed", "interactive"] - """ - If Turnstile is embedded on a Cloudflare site and the widget should grant - challenge clearance, this setting can determine the clearance level to be set - """ - - created_on: datetime - """When the widget was created.""" - - domains: List[str] - - mode: Literal["non-interactive", "invisible", "managed"] - """Widget Mode""" - - modified_on: datetime - """When the widget was modified.""" - - name: str - """Human readable widget name. - - Not unique. Cloudflare suggests that you set this to a meaningful string to make - it easier to identify your widget, and where it is used. - """ - - offlabel: bool - """Do not show any Cloudflare branding on the widget (ENT only).""" - - region: Literal["world"] - """Region where this widget can be used.""" - - secret: str - """Secret key for this widget.""" - - sitekey: str - """Widget item identifier tag.""" diff --git a/src/cloudflare/types/challenges/widget_rotate_secret_response.py b/src/cloudflare/types/challenges/widget_rotate_secret_response.py deleted file mode 100644 index 5763d0533..000000000 --- a/src/cloudflare/types/challenges/widget_rotate_secret_response.py +++ /dev/null @@ -1,53 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["WidgetRotateSecretResponse"] - - -class WidgetRotateSecretResponse(BaseModel): - bot_fight_mode: bool - """ - If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive - challenges in response to malicious bots (ENT only). - """ - - clearance_level: Literal["no_clearance", "jschallenge", "managed", "interactive"] - """ - If Turnstile is embedded on a Cloudflare site and the widget should grant - challenge clearance, this setting can determine the clearance level to be set - """ - - created_on: datetime - """When the widget was created.""" - - domains: List[str] - - mode: Literal["non-interactive", "invisible", "managed"] - """Widget Mode""" - - modified_on: datetime - """When the widget was modified.""" - - name: str - """Human readable widget name. - - Not unique. Cloudflare suggests that you set this to a meaningful string to make - it easier to identify your widget, and where it is used. - """ - - offlabel: bool - """Do not show any Cloudflare branding on the widget (ENT only).""" - - region: Literal["world"] - """Region where this widget can be used.""" - - secret: str - """Secret key for this widget.""" - - sitekey: str - """Widget item identifier tag.""" diff --git a/src/cloudflare/types/challenges/widget_update_response.py b/src/cloudflare/types/challenges/widget_update_response.py deleted file mode 100644 index d12b905f0..000000000 --- a/src/cloudflare/types/challenges/widget_update_response.py +++ /dev/null @@ -1,53 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["WidgetUpdateResponse"] - - -class WidgetUpdateResponse(BaseModel): - bot_fight_mode: bool - """ - If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive - challenges in response to malicious bots (ENT only). - """ - - clearance_level: Literal["no_clearance", "jschallenge", "managed", "interactive"] - """ - If Turnstile is embedded on a Cloudflare site and the widget should grant - challenge clearance, this setting can determine the clearance level to be set - """ - - created_on: datetime - """When the widget was created.""" - - domains: List[str] - - mode: Literal["non-interactive", "invisible", "managed"] - """Widget Mode""" - - modified_on: datetime - """When the widget was modified.""" - - name: str - """Human readable widget name. - - Not unique. Cloudflare suggests that you set this to a meaningful string to make - it easier to identify your widget, and where it is used. - """ - - offlabel: bool - """Do not show any Cloudflare branding on the widget (ENT only).""" - - region: Literal["world"] - """Region where this widget can be used.""" - - secret: str - """Secret key for this widget.""" - - sitekey: str - """Widget item identifier tag.""" diff --git a/src/cloudflare/types/client_certificate_create_response.py b/src/cloudflare/types/client_certificate_create_response.py deleted file mode 100644 index 61ae03f71..000000000 --- a/src/cloudflare/types/client_certificate_create_response.py +++ /dev/null @@ -1,75 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["ClientCertificateCreateResponse", "CertificateAuthority"] - - -class CertificateAuthority(BaseModel): - id: Optional[str] = None - - name: Optional[str] = None - - -class ClientCertificateCreateResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - certificate: Optional[str] = None - """The Client Certificate PEM""" - - certificate_authority: Optional[CertificateAuthority] = None - """Certificate Authority used to issue the Client Certificate""" - - common_name: Optional[str] = None - """Common Name of the Client Certificate""" - - country: Optional[str] = None - """Country, provided by the CSR""" - - csr: Optional[str] = None - """The Certificate Signing Request (CSR). Must be newline-encoded.""" - - expires_on: Optional[str] = None - """Date that the Client Certificate expires""" - - fingerprint_sha256: Optional[str] = None - """Unique identifier of the Client Certificate""" - - issued_on: Optional[str] = None - """Date that the Client Certificate was issued by the Certificate Authority""" - - location: Optional[str] = None - """Location, provided by the CSR""" - - organization: Optional[str] = None - """Organization, provided by the CSR""" - - organizational_unit: Optional[str] = None - """Organizational Unit, provided by the CSR""" - - serial_number: Optional[str] = None - """The serial number on the created Client Certificate.""" - - signature: Optional[str] = None - """The type of hash used for the Client Certificate..""" - - ski: Optional[str] = None - """Subject Key Identifier""" - - state: Optional[str] = None - """State, provided by the CSR""" - - status: Optional[Literal["active", "pending_reactivation", "pending_revocation", "revoked"]] = None - """ - Client Certificates may be active or revoked, and the pending_reactivation or - pending_revocation represent in-progress asynchronous transitions - """ - - validity_days: Optional[int] = None - """ - The number of days the Client Certificate will be valid after the issued_on date - """ diff --git a/src/cloudflare/types/client_certificate_delete_response.py b/src/cloudflare/types/client_certificate_delete_response.py deleted file mode 100644 index c01748c8d..000000000 --- a/src/cloudflare/types/client_certificate_delete_response.py +++ /dev/null @@ -1,75 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["ClientCertificateDeleteResponse", "CertificateAuthority"] - - -class CertificateAuthority(BaseModel): - id: Optional[str] = None - - name: Optional[str] = None - - -class ClientCertificateDeleteResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - certificate: Optional[str] = None - """The Client Certificate PEM""" - - certificate_authority: Optional[CertificateAuthority] = None - """Certificate Authority used to issue the Client Certificate""" - - common_name: Optional[str] = None - """Common Name of the Client Certificate""" - - country: Optional[str] = None - """Country, provided by the CSR""" - - csr: Optional[str] = None - """The Certificate Signing Request (CSR). Must be newline-encoded.""" - - expires_on: Optional[str] = None - """Date that the Client Certificate expires""" - - fingerprint_sha256: Optional[str] = None - """Unique identifier of the Client Certificate""" - - issued_on: Optional[str] = None - """Date that the Client Certificate was issued by the Certificate Authority""" - - location: Optional[str] = None - """Location, provided by the CSR""" - - organization: Optional[str] = None - """Organization, provided by the CSR""" - - organizational_unit: Optional[str] = None - """Organizational Unit, provided by the CSR""" - - serial_number: Optional[str] = None - """The serial number on the created Client Certificate.""" - - signature: Optional[str] = None - """The type of hash used for the Client Certificate..""" - - ski: Optional[str] = None - """Subject Key Identifier""" - - state: Optional[str] = None - """State, provided by the CSR""" - - status: Optional[Literal["active", "pending_reactivation", "pending_revocation", "revoked"]] = None - """ - Client Certificates may be active or revoked, and the pending_reactivation or - pending_revocation represent in-progress asynchronous transitions - """ - - validity_days: Optional[int] = None - """ - The number of days the Client Certificate will be valid after the issued_on date - """ diff --git a/src/cloudflare/types/client_certificate_edit_response.py b/src/cloudflare/types/client_certificate_edit_response.py deleted file mode 100644 index 7bcbf1564..000000000 --- a/src/cloudflare/types/client_certificate_edit_response.py +++ /dev/null @@ -1,75 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["ClientCertificateEditResponse", "CertificateAuthority"] - - -class CertificateAuthority(BaseModel): - id: Optional[str] = None - - name: Optional[str] = None - - -class ClientCertificateEditResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - certificate: Optional[str] = None - """The Client Certificate PEM""" - - certificate_authority: Optional[CertificateAuthority] = None - """Certificate Authority used to issue the Client Certificate""" - - common_name: Optional[str] = None - """Common Name of the Client Certificate""" - - country: Optional[str] = None - """Country, provided by the CSR""" - - csr: Optional[str] = None - """The Certificate Signing Request (CSR). Must be newline-encoded.""" - - expires_on: Optional[str] = None - """Date that the Client Certificate expires""" - - fingerprint_sha256: Optional[str] = None - """Unique identifier of the Client Certificate""" - - issued_on: Optional[str] = None - """Date that the Client Certificate was issued by the Certificate Authority""" - - location: Optional[str] = None - """Location, provided by the CSR""" - - organization: Optional[str] = None - """Organization, provided by the CSR""" - - organizational_unit: Optional[str] = None - """Organizational Unit, provided by the CSR""" - - serial_number: Optional[str] = None - """The serial number on the created Client Certificate.""" - - signature: Optional[str] = None - """The type of hash used for the Client Certificate..""" - - ski: Optional[str] = None - """Subject Key Identifier""" - - state: Optional[str] = None - """State, provided by the CSR""" - - status: Optional[Literal["active", "pending_reactivation", "pending_revocation", "revoked"]] = None - """ - Client Certificates may be active or revoked, and the pending_reactivation or - pending_revocation represent in-progress asynchronous transitions - """ - - validity_days: Optional[int] = None - """ - The number of days the Client Certificate will be valid after the issued_on date - """ diff --git a/src/cloudflare/types/client_certificate_list_response.py b/src/cloudflare/types/client_certificate_list_response.py deleted file mode 100644 index 6a5d7e827..000000000 --- a/src/cloudflare/types/client_certificate_list_response.py +++ /dev/null @@ -1,75 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["ClientCertificateListResponse", "CertificateAuthority"] - - -class CertificateAuthority(BaseModel): - id: Optional[str] = None - - name: Optional[str] = None - - -class ClientCertificateListResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - certificate: Optional[str] = None - """The Client Certificate PEM""" - - certificate_authority: Optional[CertificateAuthority] = None - """Certificate Authority used to issue the Client Certificate""" - - common_name: Optional[str] = None - """Common Name of the Client Certificate""" - - country: Optional[str] = None - """Country, provided by the CSR""" - - csr: Optional[str] = None - """The Certificate Signing Request (CSR). Must be newline-encoded.""" - - expires_on: Optional[str] = None - """Date that the Client Certificate expires""" - - fingerprint_sha256: Optional[str] = None - """Unique identifier of the Client Certificate""" - - issued_on: Optional[str] = None - """Date that the Client Certificate was issued by the Certificate Authority""" - - location: Optional[str] = None - """Location, provided by the CSR""" - - organization: Optional[str] = None - """Organization, provided by the CSR""" - - organizational_unit: Optional[str] = None - """Organizational Unit, provided by the CSR""" - - serial_number: Optional[str] = None - """The serial number on the created Client Certificate.""" - - signature: Optional[str] = None - """The type of hash used for the Client Certificate..""" - - ski: Optional[str] = None - """Subject Key Identifier""" - - state: Optional[str] = None - """State, provided by the CSR""" - - status: Optional[Literal["active", "pending_reactivation", "pending_revocation", "revoked"]] = None - """ - Client Certificates may be active or revoked, and the pending_reactivation or - pending_revocation represent in-progress asynchronous transitions - """ - - validity_days: Optional[int] = None - """ - The number of days the Client Certificate will be valid after the issued_on date - """ diff --git a/src/cloudflare/types/cloudforce_one/__init__.py b/src/cloudflare/types/cloudforce_one/__init__.py index c146e3e15..b1301e0ae 100644 --- a/src/cloudflare/types/cloudforce_one/__init__.py +++ b/src/cloudflare/types/cloudforce_one/__init__.py @@ -3,13 +3,11 @@ from __future__ import annotations from .request_list_params import RequestListParams as RequestListParams -from .request_get_response import RequestGetResponse as RequestGetResponse +from .cloudforce_one_quota import CloudforceOneQuota as CloudforceOneQuota from .request_create_params import RequestCreateParams as RequestCreateParams -from .request_list_response import RequestListResponse as RequestListResponse from .request_update_params import RequestUpdateParams as RequestUpdateParams -from .request_quota_response import RequestQuotaResponse as RequestQuotaResponse -from .request_types_response import RequestTypesResponse as RequestTypesResponse -from .request_create_response import RequestCreateResponse as RequestCreateResponse from .request_delete_response import RequestDeleteResponse as RequestDeleteResponse -from .request_update_response import RequestUpdateResponse as RequestUpdateResponse -from .request_constants_response import RequestConstantsResponse as RequestConstantsResponse +from .cloudforce_one_request_item import CloudforceOneRequestItem as CloudforceOneRequestItem +from .cloudforce_one_request_types import CloudforceOneRequestTypes as CloudforceOneRequestTypes +from .cloudforce_one_request_constants import CloudforceOneRequestConstants as CloudforceOneRequestConstants +from .cloudforce_one_request_list_item import CloudforceOneRequestListItem as CloudforceOneRequestListItem diff --git a/src/cloudflare/types/cloudforce_one/request_quota_response.py b/src/cloudflare/types/cloudforce_one/cloudforce_one_quota.py similarity index 88% rename from src/cloudflare/types/cloudforce_one/request_quota_response.py rename to src/cloudflare/types/cloudforce_one/cloudforce_one_quota.py index 4e724196b..6be9eed92 100644 --- a/src/cloudflare/types/cloudforce_one/request_quota_response.py +++ b/src/cloudflare/types/cloudforce_one/cloudforce_one_quota.py @@ -5,10 +5,10 @@ from datetime import datetime from ..._models import BaseModel -__all__ = ["RequestQuotaResponse"] +__all__ = ["CloudforceOneQuota"] -class RequestQuotaResponse(BaseModel): +class CloudforceOneQuota(BaseModel): anniversary_date: Optional[datetime] = None """Anniversary date is when annual quota limit is refresh""" diff --git a/src/cloudflare/types/cloudforce_one/request_constants_response.py b/src/cloudflare/types/cloudforce_one/cloudforce_one_request_constants.py similarity index 82% rename from src/cloudflare/types/cloudforce_one/request_constants_response.py rename to src/cloudflare/types/cloudforce_one/cloudforce_one_request_constants.py index a645d53a0..94d8123be 100644 --- a/src/cloudflare/types/cloudforce_one/request_constants_response.py +++ b/src/cloudflare/types/cloudforce_one/cloudforce_one_request_constants.py @@ -5,10 +5,10 @@ from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["RequestConstantsResponse"] +__all__ = ["CloudforceOneRequestConstants"] -class RequestConstantsResponse(BaseModel): +class CloudforceOneRequestConstants(BaseModel): priority: Optional[List[Literal["routine", "high", "urgent"]]] = None status: Optional[List[Literal["open", "accepted", "reported", "approved", "completed", "declined"]]] = None diff --git a/src/cloudflare/types/cloudforce_one/request_update_response.py b/src/cloudflare/types/cloudforce_one/cloudforce_one_request_item.py similarity index 92% rename from src/cloudflare/types/cloudforce_one/request_update_response.py rename to src/cloudflare/types/cloudforce_one/cloudforce_one_request_item.py index d36e923c6..6b3faaeae 100644 --- a/src/cloudflare/types/cloudforce_one/request_update_response.py +++ b/src/cloudflare/types/cloudforce_one/cloudforce_one_request_item.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["RequestUpdateResponse"] +__all__ = ["CloudforceOneRequestItem"] -class RequestUpdateResponse(BaseModel): +class CloudforceOneRequestItem(BaseModel): id: str """UUID""" diff --git a/src/cloudflare/types/cloudforce_one/request_list_response.py b/src/cloudflare/types/cloudforce_one/cloudforce_one_request_list_item.py similarity index 92% rename from src/cloudflare/types/cloudforce_one/request_list_response.py rename to src/cloudflare/types/cloudforce_one/cloudforce_one_request_list_item.py index 3ee3c86b2..58615476c 100644 --- a/src/cloudflare/types/cloudforce_one/request_list_response.py +++ b/src/cloudflare/types/cloudforce_one/cloudforce_one_request_list_item.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["RequestListResponse"] +__all__ = ["CloudforceOneRequestListItem"] -class RequestListResponse(BaseModel): +class CloudforceOneRequestListItem(BaseModel): id: str """UUID""" diff --git a/src/cloudflare/types/cloudforce_one/request_types_response.py b/src/cloudflare/types/cloudforce_one/cloudforce_one_request_types.py similarity index 50% rename from src/cloudflare/types/cloudforce_one/request_types_response.py rename to src/cloudflare/types/cloudforce_one/cloudforce_one_request_types.py index b98bb0250..c50738ab5 100644 --- a/src/cloudflare/types/cloudforce_one/request_types_response.py +++ b/src/cloudflare/types/cloudforce_one/cloudforce_one_request_types.py @@ -2,6 +2,6 @@ from typing import List -__all__ = ["RequestTypesResponse"] +__all__ = ["CloudforceOneRequestTypes"] -RequestTypesResponse = List[str] +CloudforceOneRequestTypes = List[str] diff --git a/src/cloudflare/types/cloudforce_one/request_create_response.py b/src/cloudflare/types/cloudforce_one/request_create_response.py deleted file mode 100644 index c34c8f65c..000000000 --- a/src/cloudflare/types/cloudforce_one/request_create_response.py +++ /dev/null @@ -1,46 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["RequestCreateResponse"] - - -class RequestCreateResponse(BaseModel): - id: str - """UUID""" - - content: str - """Request content""" - - created: datetime - - priority: datetime - - request: str - """Requested information from request""" - - summary: str - """Brief description of the request""" - - tlp: Literal["clear", "amber", "amber-strict", "green", "red"] - """The CISA defined Traffic Light Protocol (TLP)""" - - updated: datetime - - completed: Optional[datetime] = None - - message_tokens: Optional[int] = None - """Tokens for the request messages""" - - readable_id: Optional[str] = None - """Readable Request ID""" - - status: Optional[Literal["open", "accepted", "reported", "approved", "completed", "declined"]] = None - """Request Status""" - - tokens: Optional[int] = None - """Tokens for the request""" diff --git a/src/cloudflare/types/cloudforce_one/request_get_response.py b/src/cloudflare/types/cloudforce_one/request_get_response.py deleted file mode 100644 index fd6ee3d76..000000000 --- a/src/cloudflare/types/cloudforce_one/request_get_response.py +++ /dev/null @@ -1,46 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["RequestGetResponse"] - - -class RequestGetResponse(BaseModel): - id: str - """UUID""" - - content: str - """Request content""" - - created: datetime - - priority: datetime - - request: str - """Requested information from request""" - - summary: str - """Brief description of the request""" - - tlp: Literal["clear", "amber", "amber-strict", "green", "red"] - """The CISA defined Traffic Light Protocol (TLP)""" - - updated: datetime - - completed: Optional[datetime] = None - - message_tokens: Optional[int] = None - """Tokens for the request messages""" - - readable_id: Optional[str] = None - """Readable Request ID""" - - status: Optional[Literal["open", "accepted", "reported", "approved", "completed", "declined"]] = None - """Request Status""" - - tokens: Optional[int] = None - """Tokens for the request""" diff --git a/src/cloudflare/types/cloudforce_one/requests/__init__.py b/src/cloudflare/types/cloudforce_one/requests/__init__.py index 617c23f7f..47d7d22d7 100644 --- a/src/cloudflare/types/cloudforce_one/requests/__init__.py +++ b/src/cloudflare/types/cloudforce_one/requests/__init__.py @@ -6,13 +6,9 @@ from .message_get_params import MessageGetParams as MessageGetParams from .message_get_response import MessageGetResponse as MessageGetResponse from .message_create_params import MessageCreateParams as MessageCreateParams from .message_update_params import MessageUpdateParams as MessageUpdateParams -from .priority_get_response import PriorityGetResponse as PriorityGetResponse from .priority_create_params import PriorityCreateParams as PriorityCreateParams from .priority_update_params import PriorityUpdateParams as PriorityUpdateParams -from .message_create_response import MessageCreateResponse as MessageCreateResponse from .message_delete_response import MessageDeleteResponse as MessageDeleteResponse -from .message_update_response import MessageUpdateResponse as MessageUpdateResponse -from .priority_quota_response import PriorityQuotaResponse as PriorityQuotaResponse -from .priority_create_response import PriorityCreateResponse as PriorityCreateResponse from .priority_delete_response import PriorityDeleteResponse as PriorityDeleteResponse -from .priority_update_response import PriorityUpdateResponse as PriorityUpdateResponse +from .cloudforce_one_priority_item import CloudforceOnePriorityItem as CloudforceOnePriorityItem +from .cloudforce_one_request_message_item import CloudforceOneRequestMessageItem as CloudforceOneRequestMessageItem diff --git a/src/cloudflare/types/cloudforce_one/requests/priority_create_response.py b/src/cloudflare/types/cloudforce_one/requests/cloudforce_one_priority_item.py similarity index 87% rename from src/cloudflare/types/cloudforce_one/requests/priority_create_response.py rename to src/cloudflare/types/cloudforce_one/requests/cloudforce_one_priority_item.py index 09cf95a2c..ae9206bea 100644 --- a/src/cloudflare/types/cloudforce_one/requests/priority_create_response.py +++ b/src/cloudflare/types/cloudforce_one/requests/cloudforce_one_priority_item.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["PriorityCreateResponse"] +__all__ = ["CloudforceOnePriorityItem"] -class PriorityCreateResponse(BaseModel): +class CloudforceOnePriorityItem(BaseModel): id: str """UUID""" diff --git a/src/cloudflare/types/cloudforce_one/requests/message_create_response.py b/src/cloudflare/types/cloudforce_one/requests/cloudforce_one_request_message_item.py similarity index 83% rename from src/cloudflare/types/cloudforce_one/requests/message_create_response.py rename to src/cloudflare/types/cloudforce_one/requests/cloudforce_one_request_message_item.py index 6bfec57fb..b343c62e7 100644 --- a/src/cloudflare/types/cloudforce_one/requests/message_create_response.py +++ b/src/cloudflare/types/cloudforce_one/requests/cloudforce_one_request_message_item.py @@ -5,10 +5,10 @@ from datetime import datetime from ...._models import BaseModel -__all__ = ["MessageCreateResponse"] +__all__ = ["CloudforceOneRequestMessageItem"] -class MessageCreateResponse(BaseModel): +class CloudforceOneRequestMessageItem(BaseModel): id: int """Message ID""" diff --git a/src/cloudflare/types/cloudforce_one/requests/message_get_response.py b/src/cloudflare/types/cloudforce_one/requests/message_get_response.py index 12967316c..f9050bbdd 100644 --- a/src/cloudflare/types/cloudforce_one/requests/message_get_response.py +++ b/src/cloudflare/types/cloudforce_one/requests/message_get_response.py @@ -1,31 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ...._models import BaseModel +from .cloudforce_one_request_message_item import CloudforceOneRequestMessageItem -__all__ = ["MessageGetResponse", "MessageGetResponseItem"] +__all__ = ["MessageGetResponse"] - -class MessageGetResponseItem(BaseModel): - id: int - """Message ID""" - - author: str - """Author of message""" - - content: str - """Content of message""" - - is_follow_on_request: bool - """Message is a follow-on request""" - - updated: datetime - """Message last updated time""" - - created: Optional[datetime] = None - """Message creation time""" - - -MessageGetResponse = List[MessageGetResponseItem] +MessageGetResponse = List[CloudforceOneRequestMessageItem] diff --git a/src/cloudflare/types/cloudforce_one/requests/message_update_response.py b/src/cloudflare/types/cloudforce_one/requests/message_update_response.py deleted file mode 100644 index 39b3d58cc..000000000 --- a/src/cloudflare/types/cloudforce_one/requests/message_update_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["MessageUpdateResponse"] - - -class MessageUpdateResponse(BaseModel): - id: int - """Message ID""" - - author: str - """Author of message""" - - content: str - """Content of message""" - - is_follow_on_request: bool - """Message is a follow-on request""" - - updated: datetime - """Message last updated time""" - - created: Optional[datetime] = None - """Message creation time""" diff --git a/src/cloudflare/types/cloudforce_one/requests/priority_get_response.py b/src/cloudflare/types/cloudforce_one/requests/priority_get_response.py deleted file mode 100644 index b540fdb0f..000000000 --- a/src/cloudflare/types/cloudforce_one/requests/priority_get_response.py +++ /dev/null @@ -1,46 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["PriorityGetResponse"] - - -class PriorityGetResponse(BaseModel): - id: str - """UUID""" - - content: str - """Request content""" - - created: datetime - - priority: datetime - - request: str - """Requested information from request""" - - summary: str - """Brief description of the request""" - - tlp: Literal["clear", "amber", "amber-strict", "green", "red"] - """The CISA defined Traffic Light Protocol (TLP)""" - - updated: datetime - - completed: Optional[datetime] = None - - message_tokens: Optional[int] = None - """Tokens for the request messages""" - - readable_id: Optional[str] = None - """Readable Request ID""" - - status: Optional[Literal["open", "accepted", "reported", "approved", "completed", "declined"]] = None - """Request Status""" - - tokens: Optional[int] = None - """Tokens for the request""" diff --git a/src/cloudflare/types/cloudforce_one/requests/priority_quota_response.py b/src/cloudflare/types/cloudforce_one/requests/priority_quota_response.py deleted file mode 100644 index cbbaa17d5..000000000 --- a/src/cloudflare/types/cloudforce_one/requests/priority_quota_response.py +++ /dev/null @@ -1,22 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["PriorityQuotaResponse"] - - -class PriorityQuotaResponse(BaseModel): - anniversary_date: Optional[datetime] = None - """Anniversary date is when annual quota limit is refresh""" - - quarter_anniversary_date: Optional[datetime] = None - """Quater anniversary date is when quota limit is refreshed each quarter""" - - quota: Optional[int] = None - """Tokens for the quarter""" - - remaining: Optional[int] = None - """Tokens remaining for the quarter""" diff --git a/src/cloudflare/types/cloudforce_one/requests/priority_update_response.py b/src/cloudflare/types/cloudforce_one/requests/priority_update_response.py deleted file mode 100644 index b31f318ab..000000000 --- a/src/cloudflare/types/cloudforce_one/requests/priority_update_response.py +++ /dev/null @@ -1,46 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["PriorityUpdateResponse"] - - -class PriorityUpdateResponse(BaseModel): - id: str - """UUID""" - - content: str - """Request content""" - - created: datetime - - priority: datetime - - request: str - """Requested information from request""" - - summary: str - """Brief description of the request""" - - tlp: Literal["clear", "amber", "amber-strict", "green", "red"] - """The CISA defined Traffic Light Protocol (TLP)""" - - updated: datetime - - completed: Optional[datetime] = None - - message_tokens: Optional[int] = None - """Tokens for the request messages""" - - readable_id: Optional[str] = None - """Readable Request ID""" - - status: Optional[Literal["open", "accepted", "reported", "approved", "completed", "declined"]] = None - """Request Status""" - - tokens: Optional[int] = None - """Tokens for the request""" diff --git a/src/cloudflare/types/custom_certificates/prioritize_update_response.py b/src/cloudflare/types/custom_certificates/prioritize_update_response.py index e5b1c6cae..ed243078a 100644 --- a/src/cloudflare/types/custom_certificates/prioritize_update_response.py +++ b/src/cloudflare/types/custom_certificates/prioritize_update_response.py @@ -1,138 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from ..tls_certificates_and_hostnames_custom_certificate import TLSCertificatesAndHostnamesCustomCertificate -__all__ = [ - "PrioritizeUpdateResponse", - "PrioritizeUpdateResponseItem", - "PrioritizeUpdateResponseItemGeoRestrictions", - "PrioritizeUpdateResponseItemKeylessServer", - "PrioritizeUpdateResponseItemKeylessServerTunnel", -] +__all__ = ["PrioritizeUpdateResponse"] - -class PrioritizeUpdateResponseItemGeoRestrictions(BaseModel): - label: Optional[Literal["us", "eu", "highest_security"]] = None - - -class PrioritizeUpdateResponseItemKeylessServerTunnel(BaseModel): - private_ip: str - """Private IP of the Key Server Host""" - - vnet_id: str - """Cloudflare Tunnel Virtual Network ID""" - - -class PrioritizeUpdateResponseItemKeylessServer(BaseModel): - id: str - """Keyless certificate identifier tag.""" - - created_on: datetime - """When the Keyless SSL was created.""" - - enabled: bool - """Whether or not the Keyless SSL is on or off.""" - - host: str - """The keyless SSL name.""" - - modified_on: datetime - """When the Keyless SSL was last modified.""" - - name: str - """The keyless SSL name.""" - - permissions: List[object] - """ - Available permissions for the Keyless SSL for the current user requesting the - item. - """ - - port: float - """ - The keyless SSL port used to communicate between Cloudflare and the client's - Keyless SSL server. - """ - - status: Literal["active", "deleted"] - """Status of the Keyless SSL.""" - - tunnel: Optional[PrioritizeUpdateResponseItemKeylessServerTunnel] = None - """Configuration for using Keyless SSL through a Cloudflare Tunnel""" - - -class PrioritizeUpdateResponseItem(BaseModel): - id: str - """Identifier""" - - bundle_method: Literal["ubiquitous", "optimal", "force"] - """ - A ubiquitous bundle has the highest probability of being verified everywhere, - even by clients using outdated or unusual trust stores. An optimal bundle uses - the shortest chain and newest intermediates. And the force bundle verifies the - chain, but does not otherwise modify it. - """ - - expires_on: datetime - """When the certificate from the authority expires.""" - - hosts: List[str] - - issuer: str - """The certificate authority that issued the certificate.""" - - modified_on: datetime - """When the certificate was last modified.""" - - priority: float - """The order/priority in which the certificate will be used in a request. - - The higher priority will break ties across overlapping 'legacy_custom' - certificates, but 'legacy_custom' certificates will always supercede - 'sni_custom' certificates. - """ - - signature: str - """The type of hash used for the certificate.""" - - status: Literal["active", "expired", "deleted", "pending", "initializing"] - """Status of the zone's custom SSL.""" - - uploaded_on: datetime - """When the certificate was uploaded to Cloudflare.""" - - zone_id: str - """Identifier""" - - geo_restrictions: Optional[PrioritizeUpdateResponseItemGeoRestrictions] = None - """ - Specify the region where your private key can be held locally for optimal TLS - performance. HTTPS connections to any excluded data center will still be fully - encrypted, but will incur some latency while Keyless SSL is used to complete the - handshake with the nearest allowed data center. Options allow distribution to - only to U.S. data centers, only to E.U. data centers, or only to highest - security data centers. Default distribution is to all Cloudflare datacenters, - for optimal performance. - """ - - keyless_server: Optional[PrioritizeUpdateResponseItemKeylessServer] = None - - policy: Optional[str] = None - """ - Specify the policy that determines the region where your private key will be - held locally. HTTPS connections to any excluded data center will still be fully - encrypted, but will incur some latency while Keyless SSL is used to complete the - handshake with the nearest allowed data center. Any combination of countries, - specified by their two letter country code - (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - can be chosen, such as 'country: IN', as well as 'region: EU' which refers to - the EU region. If there are too few data centers satisfying the policy, it will - be rejected. - """ - - -PrioritizeUpdateResponse = List[PrioritizeUpdateResponseItem] +PrioritizeUpdateResponse = List[TLSCertificatesAndHostnamesCustomCertificate] diff --git a/src/cloudflare/types/custom_nameserver_get_response.py b/src/cloudflare/types/custom_nameserver_get_response.py index dd8ff25ee..f5fe88cce 100644 --- a/src/cloudflare/types/custom_nameserver_get_response.py +++ b/src/cloudflare/types/custom_nameserver_get_response.py @@ -1,36 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from typing_extensions import Literal +from typing import List -from .._models import BaseModel +from .dns_custom_nameservers_custom_ns import DNSCustomNameserversCustomNS -__all__ = ["CustomNameserverGetResponse", "CustomNameserverGetResponseItem", "CustomNameserverGetResponseItemDNSRecord"] +__all__ = ["CustomNameserverGetResponse"] - -class CustomNameserverGetResponseItemDNSRecord(BaseModel): - type: Optional[Literal["A", "AAAA"]] = None - """DNS record type.""" - - value: Optional[str] = None - """DNS record contents (an IPv4 or IPv6 address).""" - - -class CustomNameserverGetResponseItem(BaseModel): - dns_records: List[CustomNameserverGetResponseItemDNSRecord] - """A and AAAA records associated with the nameserver.""" - - ns_name: str - """The FQDN of the name server.""" - - status: Literal["moved", "pending", "verified"] - """Verification status of the nameserver.""" - - zone_tag: str - """Identifier""" - - ns_set: Optional[float] = None - """The number of the set that this name server belongs to.""" - - -CustomNameserverGetResponse = List[CustomNameserverGetResponseItem] +CustomNameserverGetResponse = List[DNSCustomNameserversCustomNS] diff --git a/src/cloudflare/types/custom_nameserver_verify_response.py b/src/cloudflare/types/custom_nameserver_verify_response.py index 2627e85bc..8ce56c8ac 100644 --- a/src/cloudflare/types/custom_nameserver_verify_response.py +++ b/src/cloudflare/types/custom_nameserver_verify_response.py @@ -1,40 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from typing_extensions import Literal +from typing import List -from .._models import BaseModel +from .dns_custom_nameservers_custom_ns import DNSCustomNameserversCustomNS -__all__ = [ - "CustomNameserverVerifyResponse", - "CustomNameserverVerifyResponseItem", - "CustomNameserverVerifyResponseItemDNSRecord", -] +__all__ = ["CustomNameserverVerifyResponse"] - -class CustomNameserverVerifyResponseItemDNSRecord(BaseModel): - type: Optional[Literal["A", "AAAA"]] = None - """DNS record type.""" - - value: Optional[str] = None - """DNS record contents (an IPv4 or IPv6 address).""" - - -class CustomNameserverVerifyResponseItem(BaseModel): - dns_records: List[CustomNameserverVerifyResponseItemDNSRecord] - """A and AAAA records associated with the nameserver.""" - - ns_name: str - """The FQDN of the name server.""" - - status: Literal["moved", "pending", "verified"] - """Verification status of the nameserver.""" - - zone_tag: str - """Identifier""" - - ns_set: Optional[float] = None - """The number of the set that this name server belongs to.""" - - -CustomNameserverVerifyResponse = List[CustomNameserverVerifyResponseItem] +CustomNameserverVerifyResponse = List[DNSCustomNameserversCustomNS] diff --git a/src/cloudflare/types/d1/__init__.py b/src/cloudflare/types/d1/__init__.py index 9f57670c9..8be1aaea6 100644 --- a/src/cloudflare/types/d1/__init__.py +++ b/src/cloudflare/types/d1/__init__.py @@ -2,11 +2,11 @@ from __future__ import annotations +from .d1_query_result import D1QueryResult as D1QueryResult +from .d1_create_database import D1CreateDatabase as D1CreateDatabase +from .d1_database_details import D1DatabaseDetails as D1DatabaseDetails from .database_list_params import DatabaseListParams as DatabaseListParams -from .database_get_response import DatabaseGetResponse as DatabaseGetResponse from .database_query_params import DatabaseQueryParams as DatabaseQueryParams from .database_create_params import DatabaseCreateParams as DatabaseCreateParams -from .database_list_response import DatabaseListResponse as DatabaseListResponse from .database_query_response import DatabaseQueryResponse as DatabaseQueryResponse -from .database_create_response import DatabaseCreateResponse as DatabaseCreateResponse from .database_delete_response import DatabaseDeleteResponse as DatabaseDeleteResponse diff --git a/src/cloudflare/types/d1/database_list_response.py b/src/cloudflare/types/d1/d1_create_database.py similarity index 82% rename from src/cloudflare/types/d1/database_list_response.py rename to src/cloudflare/types/d1/d1_create_database.py index 0fa51941b..9151934ff 100644 --- a/src/cloudflare/types/d1/database_list_response.py +++ b/src/cloudflare/types/d1/d1_create_database.py @@ -4,10 +4,10 @@ from typing import Optional from ..._models import BaseModel -__all__ = ["DatabaseListResponse"] +__all__ = ["D1CreateDatabase"] -class DatabaseListResponse(BaseModel): +class D1CreateDatabase(BaseModel): created_at: Optional[object] = None """Specifies the timestamp the resource was created as an ISO8601 string.""" diff --git a/src/cloudflare/types/d1/database_get_response.py b/src/cloudflare/types/d1/d1_database_details.py similarity index 86% rename from src/cloudflare/types/d1/database_get_response.py rename to src/cloudflare/types/d1/d1_database_details.py index 01fa19053..53dd5d5f0 100644 --- a/src/cloudflare/types/d1/database_get_response.py +++ b/src/cloudflare/types/d1/d1_database_details.py @@ -4,10 +4,10 @@ from typing import Optional from ..._models import BaseModel -__all__ = ["DatabaseGetResponse"] +__all__ = ["D1DatabaseDetails"] -class DatabaseGetResponse(BaseModel): +class D1DatabaseDetails(BaseModel): created_at: Optional[object] = None """Specifies the timestamp the resource was created as an ISO8601 string.""" diff --git a/src/cloudflare/types/d1/d1_query_result.py b/src/cloudflare/types/d1/d1_query_result.py new file mode 100644 index 000000000..c874d0123 --- /dev/null +++ b/src/cloudflare/types/d1/d1_query_result.py @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import List, Optional + +from ..._models import BaseModel + +__all__ = ["D1QueryResult", "Meta"] + + +class Meta(BaseModel): + changed_db: Optional[bool] = None + + changes: Optional[float] = None + + duration: Optional[float] = None + + last_row_id: Optional[float] = None + + rows_read: Optional[float] = None + + rows_written: Optional[float] = None + + size_after: Optional[float] = None + + +class D1QueryResult(BaseModel): + meta: Optional[Meta] = None + + results: Optional[List[object]] = None + + success: Optional[bool] = None diff --git a/src/cloudflare/types/d1/database_create_response.py b/src/cloudflare/types/d1/database_create_response.py deleted file mode 100644 index 55579fa9f..000000000 --- a/src/cloudflare/types/d1/database_create_response.py +++ /dev/null @@ -1,18 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["DatabaseCreateResponse"] - - -class DatabaseCreateResponse(BaseModel): - created_at: Optional[object] = None - """Specifies the timestamp the resource was created as an ISO8601 string.""" - - name: Optional[str] = None - - uuid: Optional[str] = None - - version: Optional[str] = None diff --git a/src/cloudflare/types/d1/database_query_response.py b/src/cloudflare/types/d1/database_query_response.py index 86c588d55..37167681f 100644 --- a/src/cloudflare/types/d1/database_query_response.py +++ b/src/cloudflare/types/d1/database_query_response.py @@ -1,34 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ..._models import BaseModel +from .d1_query_result import D1QueryResult -__all__ = ["DatabaseQueryResponse", "DatabaseQueryResponseItem", "DatabaseQueryResponseItemMeta"] +__all__ = ["DatabaseQueryResponse"] - -class DatabaseQueryResponseItemMeta(BaseModel): - changed_db: Optional[bool] = None - - changes: Optional[float] = None - - duration: Optional[float] = None - - last_row_id: Optional[float] = None - - rows_read: Optional[float] = None - - rows_written: Optional[float] = None - - size_after: Optional[float] = None - - -class DatabaseQueryResponseItem(BaseModel): - meta: Optional[DatabaseQueryResponseItemMeta] = None - - results: Optional[List[object]] = None - - success: Optional[bool] = None - - -DatabaseQueryResponse = List[DatabaseQueryResponseItem] +DatabaseQueryResponse = List[D1QueryResult] diff --git a/src/cloudflare/types/dcv_delegation/__init__.py b/src/cloudflare/types/dcv_delegation/__init__.py index a2547d437..8f5a9db3f 100644 --- a/src/cloudflare/types/dcv_delegation/__init__.py +++ b/src/cloudflare/types/dcv_delegation/__init__.py @@ -2,4 +2,6 @@ from __future__ import annotations -from .uuid_get_response import UUIDGetResponse as UUIDGetResponse +from .tls_certificates_and_hostnames_uuid_object import ( + TLSCertificatesAndHostnamesUUIDObject as TLSCertificatesAndHostnamesUUIDObject, +) diff --git a/src/cloudflare/types/dcv_delegation/uuid_get_response.py b/src/cloudflare/types/dcv_delegation/tls_certificates_and_hostnames_uuid_object.py similarity index 64% rename from src/cloudflare/types/dcv_delegation/uuid_get_response.py rename to src/cloudflare/types/dcv_delegation/tls_certificates_and_hostnames_uuid_object.py index 95a3c6e3f..f8bf57c0f 100644 --- a/src/cloudflare/types/dcv_delegation/uuid_get_response.py +++ b/src/cloudflare/types/dcv_delegation/tls_certificates_and_hostnames_uuid_object.py @@ -4,9 +4,9 @@ from typing import Optional from ..._models import BaseModel -__all__ = ["UUIDGetResponse"] +__all__ = ["TLSCertificatesAndHostnamesUUIDObject"] -class UUIDGetResponse(BaseModel): +class TLSCertificatesAndHostnamesUUIDObject(BaseModel): uuid: Optional[str] = None """The DCV Delegation unique identifier.""" diff --git a/src/cloudflare/types/diagnostics/__init__.py b/src/cloudflare/types/diagnostics/__init__.py index 183c49354..99ba38d29 100644 --- a/src/cloudflare/types/diagnostics/__init__.py +++ b/src/cloudflare/types/diagnostics/__init__.py @@ -4,3 +4,4 @@ from __future__ import annotations from .traceroute_create_params import TracerouteCreateParams as TracerouteCreateParams from .traceroute_create_response import TracerouteCreateResponse as TracerouteCreateResponse +from .magic_transit_target_result import MagicTransitTargetResult as MagicTransitTargetResult diff --git a/src/cloudflare/types/diagnostics/magic_transit_target_result.py b/src/cloudflare/types/diagnostics/magic_transit_target_result.py new file mode 100644 index 000000000..c055c5ee8 --- /dev/null +++ b/src/cloudflare/types/diagnostics/magic_transit_target_result.py @@ -0,0 +1,93 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import List, Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["MagicTransitTargetResult", "Colo", "ColoColo", "ColoHop", "ColoHopNode"] + + +class ColoColo(BaseModel): + city: Optional[str] = None + """Source colo city.""" + + name: Optional[str] = None + """Source colo name.""" + + +class ColoHopNode(BaseModel): + asn: Optional[str] = None + """AS number associated with the node object.""" + + ip: Optional[str] = None + """IP address of the node.""" + + labels: Optional[List[str]] = None + """ + Field appears if there is an additional annotation printed when the probe + returns. Field also appears when running a GRE+ICMP traceroute to denote which + traceroute a node comes from. + """ + + max_rtt_ms: Optional[float] = None + """Maximum RTT in ms.""" + + mean_rtt_ms: Optional[float] = None + """Mean RTT in ms.""" + + min_rtt_ms: Optional[float] = None + """Minimum RTT in ms.""" + + name: Optional[str] = None + """Host name of the address, this may be the same as the IP address.""" + + packet_count: Optional[int] = None + """Number of packets with a response from this node.""" + + std_dev_rtt_ms: Optional[float] = None + """Standard deviation of the RTTs in ms.""" + + +class ColoHop(BaseModel): + nodes: Optional[List[ColoHopNode]] = None + """An array of node objects.""" + + packets_lost: Optional[int] = None + """Number of packets where no response was received.""" + + packets_sent: Optional[int] = None + """Number of packets sent with specified TTL.""" + + packets_ttl: Optional[int] = None + """The time to live (TTL).""" + + +class Colo(BaseModel): + colo: Optional[ColoColo] = None + + error: Optional[ + Literal[ + "", + "Could not gather traceroute data: Code 1", + "Could not gather traceroute data: Code 2", + "Could not gather traceroute data: Code 3", + "Could not gather traceroute data: Code 4", + ] + ] = None + """Errors resulting from collecting traceroute from colo to target.""" + + hops: Optional[List[ColoHop]] = None + + target_summary: Optional[object] = None + """Aggregated statistics from all hops about the target.""" + + traceroute_time_ms: Optional[int] = None + """Total time of traceroute in ms.""" + + +class MagicTransitTargetResult(BaseModel): + colos: Optional[List[Colo]] = None + + target: Optional[str] = None + """The target hostname, IPv6, or IPv6 address.""" diff --git a/src/cloudflare/types/diagnostics/traceroute_create_response.py b/src/cloudflare/types/diagnostics/traceroute_create_response.py index bd50aab1d..77e90c9f1 100644 --- a/src/cloudflare/types/diagnostics/traceroute_create_response.py +++ b/src/cloudflare/types/diagnostics/traceroute_create_response.py @@ -1,103 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .magic_transit_target_result import MagicTransitTargetResult -__all__ = [ - "TracerouteCreateResponse", - "TracerouteCreateResponseItem", - "TracerouteCreateResponseItemColo", - "TracerouteCreateResponseItemColoColo", - "TracerouteCreateResponseItemColoHop", - "TracerouteCreateResponseItemColoHopNode", -] +__all__ = ["TracerouteCreateResponse"] - -class TracerouteCreateResponseItemColoColo(BaseModel): - city: Optional[str] = None - """Source colo city.""" - - name: Optional[str] = None - """Source colo name.""" - - -class TracerouteCreateResponseItemColoHopNode(BaseModel): - asn: Optional[str] = None - """AS number associated with the node object.""" - - ip: Optional[str] = None - """IP address of the node.""" - - labels: Optional[List[str]] = None - """ - Field appears if there is an additional annotation printed when the probe - returns. Field also appears when running a GRE+ICMP traceroute to denote which - traceroute a node comes from. - """ - - max_rtt_ms: Optional[float] = None - """Maximum RTT in ms.""" - - mean_rtt_ms: Optional[float] = None - """Mean RTT in ms.""" - - min_rtt_ms: Optional[float] = None - """Minimum RTT in ms.""" - - name: Optional[str] = None - """Host name of the address, this may be the same as the IP address.""" - - packet_count: Optional[int] = None - """Number of packets with a response from this node.""" - - std_dev_rtt_ms: Optional[float] = None - """Standard deviation of the RTTs in ms.""" - - -class TracerouteCreateResponseItemColoHop(BaseModel): - nodes: Optional[List[TracerouteCreateResponseItemColoHopNode]] = None - """An array of node objects.""" - - packets_lost: Optional[int] = None - """Number of packets where no response was received.""" - - packets_sent: Optional[int] = None - """Number of packets sent with specified TTL.""" - - packets_ttl: Optional[int] = None - """The time to live (TTL).""" - - -class TracerouteCreateResponseItemColo(BaseModel): - colo: Optional[TracerouteCreateResponseItemColoColo] = None - - error: Optional[ - Literal[ - "", - "Could not gather traceroute data: Code 1", - "Could not gather traceroute data: Code 2", - "Could not gather traceroute data: Code 3", - "Could not gather traceroute data: Code 4", - ] - ] = None - """Errors resulting from collecting traceroute from colo to target.""" - - hops: Optional[List[TracerouteCreateResponseItemColoHop]] = None - - target_summary: Optional[object] = None - """Aggregated statistics from all hops about the target.""" - - traceroute_time_ms: Optional[int] = None - """Total time of traceroute in ms.""" - - -class TracerouteCreateResponseItem(BaseModel): - colos: Optional[List[TracerouteCreateResponseItemColo]] = None - - target: Optional[str] = None - """The target hostname, IPv6, or IPv6 address.""" - - -TracerouteCreateResponse = List[TracerouteCreateResponseItem] +TracerouteCreateResponse = List[MagicTransitTargetResult] diff --git a/src/cloudflare/types/dns/__init__.py b/src/cloudflare/types/dns/__init__.py index 5524a5d81..e6691b48b 100644 --- a/src/cloudflare/types/dns/__init__.py +++ b/src/cloudflare/types/dns/__init__.py @@ -13,14 +13,11 @@ from .record_import_params import RecordImportParams as RecordImportParams from .record_list_response import RecordListResponse as RecordListResponse from .record_scan_response import RecordScanResponse as RecordScanResponse from .record_update_params import RecordUpdateParams as RecordUpdateParams -from .firewall_get_response import FirewallGetResponse as FirewallGetResponse from .firewall_create_params import FirewallCreateParams as FirewallCreateParams -from .firewall_edit_response import FirewallEditResponse as FirewallEditResponse -from .firewall_list_response import FirewallListResponse as FirewallListResponse from .record_create_response import RecordCreateResponse as RecordCreateResponse from .record_delete_response import RecordDeleteResponse as RecordDeleteResponse from .record_export_response import RecordExportResponse as RecordExportResponse from .record_import_response import RecordImportResponse as RecordImportResponse from .record_update_response import RecordUpdateResponse as RecordUpdateResponse -from .firewall_create_response import FirewallCreateResponse as FirewallCreateResponse 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 f7c9d0723..f6c9327cd 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 .report_get_response import ReportGetResponse as ReportGetResponse +from .dns_dns_analytics_api_report import DNSDNSAnalyticsAPIReport as DNSDNSAnalyticsAPIReport diff --git a/src/cloudflare/types/dns/analytics/report_get_response.py b/src/cloudflare/types/dns/analytics/dns_dns_analytics_api_report.py similarity index 94% rename from src/cloudflare/types/dns/analytics/report_get_response.py rename to src/cloudflare/types/dns/analytics/dns_dns_analytics_api_report.py index 78eabe32d..25578fe32 100644 --- a/src/cloudflare/types/dns/analytics/report_get_response.py +++ b/src/cloudflare/types/dns/analytics/dns_dns_analytics_api_report.py @@ -5,7 +5,7 @@ from datetime import datetime from ...._models import BaseModel -__all__ = ["ReportGetResponse", "Data", "Query"] +__all__ = ["DNSDNSAnalyticsAPIReport", "Data", "Query"] class Data(BaseModel): @@ -45,7 +45,7 @@ class Query(BaseModel): """ -class ReportGetResponse(BaseModel): +class DNSDNSAnalyticsAPIReport(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 5156a0bb2..4b3f235bd 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 .bytime_get_response import BytimeGetResponse as BytimeGetResponse +from .dns_dns_analytics_api_report_bytime import DNSDNSAnalyticsAPIReportBytime as DNSDNSAnalyticsAPIReportBytime diff --git a/src/cloudflare/types/dns/analytics/reports/bytime_get_response.py b/src/cloudflare/types/dns/analytics/reports/dns_dns_analytics_api_report_bytime.py similarity index 95% rename from src/cloudflare/types/dns/analytics/reports/bytime_get_response.py rename to src/cloudflare/types/dns/analytics/reports/dns_dns_analytics_api_report_bytime.py index 0568f1d99..b4b473a8f 100644 --- a/src/cloudflare/types/dns/analytics/reports/bytime_get_response.py +++ b/src/cloudflare/types/dns/analytics/reports/dns_dns_analytics_api_report_bytime.py @@ -6,7 +6,7 @@ from typing_extensions import Literal from ....._models import BaseModel -__all__ = ["BytimeGetResponse", "Data", "Query"] +__all__ = ["DNSDNSAnalyticsAPIReportBytime", "Data", "Query"] class Data(BaseModel): @@ -52,7 +52,7 @@ class Query(BaseModel): """ -class BytimeGetResponse(BaseModel): +class DNSDNSAnalyticsAPIReportBytime(BaseModel): data: List[Data] """Array with one row per combination of dimension values.""" diff --git a/src/cloudflare/types/dns/firewall_list_response.py b/src/cloudflare/types/dns/dns_firewall_dns_firewall.py similarity index 94% rename from src/cloudflare/types/dns/firewall_list_response.py rename to src/cloudflare/types/dns/dns_firewall_dns_firewall.py index 1b1027bbb..cf8579bb5 100644 --- a/src/cloudflare/types/dns/firewall_list_response.py +++ b/src/cloudflare/types/dns/dns_firewall_dns_firewall.py @@ -5,7 +5,7 @@ from datetime import datetime from ..._models import BaseModel -__all__ = ["FirewallListResponse", "AttackMitigation"] +__all__ = ["DNSFirewallDNSFirewall", "AttackMitigation"] class AttackMitigation(BaseModel): @@ -22,7 +22,7 @@ class AttackMitigation(BaseModel): """Only mitigate attacks when upstream servers seem unhealthy.""" -class FirewallListResponse(BaseModel): +class DNSFirewallDNSFirewall(BaseModel): id: str """Identifier""" diff --git a/src/cloudflare/types/dns/firewall/analytics/__init__.py b/src/cloudflare/types/dns/firewall/analytics/__init__.py index f7c9d0723..0430e3c07 100644 --- a/src/cloudflare/types/dns/firewall/analytics/__init__.py +++ b/src/cloudflare/types/dns/firewall/analytics/__init__.py @@ -3,4 +3,3 @@ from __future__ import annotations from .report_get_params import ReportGetParams as ReportGetParams -from .report_get_response import ReportGetResponse as ReportGetResponse diff --git a/src/cloudflare/types/dns/firewall/analytics/report_get_response.py b/src/cloudflare/types/dns/firewall/analytics/report_get_response.py deleted file mode 100644 index d83c1eaf0..000000000 --- a/src/cloudflare/types/dns/firewall/analytics/report_get_response.py +++ /dev/null @@ -1,79 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ....._models import BaseModel - -__all__ = ["ReportGetResponse", "Data", "Query"] - - -class Data(BaseModel): - dimensions: List[str] - """ - Array of dimension values, representing the combination of dimension values - corresponding to this row. - """ - - metrics: List[float] - """Array with one item per requested metric. Each item is a single value.""" - - -class Query(BaseModel): - dimensions: List[str] - """Array of dimension names.""" - - limit: int - """Limit number of returned metrics.""" - - metrics: List[str] - """Array of metric names.""" - - since: datetime - """Start date and time of requesting data period in ISO 8601 format.""" - - until: datetime - """End date and time of requesting data period in ISO 8601 format.""" - - filters: Optional[str] = None - """Segmentation filter in 'attribute operator value' format.""" - - sort: Optional[List[str]] = None - """ - Array of dimensions to sort by, where each dimension may be prefixed by - - (descending) or + (ascending). - """ - - -class ReportGetResponse(BaseModel): - data: List[Data] - """Array with one row per combination of dimension values.""" - - data_lag: float - """ - Number of seconds between current time and last processed event, in another - words how many seconds of data could be missing. - """ - - max: object - """Maximum results for each metric (object mapping metric names to values). - - Currently always an empty object. - """ - - min: object - """Minimum results for each metric (object mapping metric names to values). - - Currently always an empty object. - """ - - query: Query - - rows: float - """Total number of rows in the result.""" - - totals: object - """ - Total results for metrics across all data (object mapping metric names to - values). - """ diff --git a/src/cloudflare/types/dns/firewall/analytics/reports/__init__.py b/src/cloudflare/types/dns/firewall/analytics/reports/__init__.py index 5156a0bb2..c70727ea8 100644 --- a/src/cloudflare/types/dns/firewall/analytics/reports/__init__.py +++ b/src/cloudflare/types/dns/firewall/analytics/reports/__init__.py @@ -3,4 +3,3 @@ from __future__ import annotations from .bytime_get_params import BytimeGetParams as BytimeGetParams -from .bytime_get_response import BytimeGetResponse as BytimeGetResponse diff --git a/src/cloudflare/types/dns/firewall/analytics/reports/bytime_get_response.py b/src/cloudflare/types/dns/firewall/analytics/reports/bytime_get_response.py deleted file mode 100644 index 8145d2669..000000000 --- a/src/cloudflare/types/dns/firewall/analytics/reports/bytime_get_response.py +++ /dev/null @@ -1,93 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from ......_models import BaseModel - -__all__ = ["BytimeGetResponse", "Data", "Query"] - - -class Data(BaseModel): - dimensions: List[str] - """ - Array of dimension values, representing the combination of dimension values - corresponding to this row. - """ - - metrics: List[List[object]] - """Array with one item per requested metric. - - Each item is an array of values, broken down by time interval. - """ - - -class Query(BaseModel): - dimensions: List[str] - """Array of dimension names.""" - - limit: int - """Limit number of returned metrics.""" - - metrics: List[str] - """Array of metric names.""" - - since: datetime - """Start date and time of requesting data period in ISO 8601 format.""" - - time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"] - """Unit of time to group data by.""" - - until: datetime - """End date and time of requesting data period in ISO 8601 format.""" - - filters: Optional[str] = None - """Segmentation filter in 'attribute operator value' format.""" - - sort: Optional[List[str]] = None - """ - Array of dimensions to sort by, where each dimension may be prefixed by - - (descending) or + (ascending). - """ - - -class BytimeGetResponse(BaseModel): - data: List[Data] - """Array with one row per combination of dimension values.""" - - data_lag: float - """ - Number of seconds between current time and last processed event, in another - words how many seconds of data could be missing. - """ - - max: object - """Maximum results for each metric (object mapping metric names to values). - - Currently always an empty object. - """ - - min: object - """Minimum results for each metric (object mapping metric names to values). - - Currently always an empty object. - """ - - query: Query - - rows: float - """Total number of rows in the result.""" - - time_intervals: List[List[datetime]] - """Array of time intervals in the response data. - - Each interval is represented as an array containing two values: the start time, - and the end time. - """ - - totals: object - """ - Total results for metrics across all data (object mapping metric names to - values). - """ diff --git a/src/cloudflare/types/dns/firewall_create_response.py b/src/cloudflare/types/dns/firewall_create_response.py deleted file mode 100644 index 5cc237c12..000000000 --- a/src/cloudflare/types/dns/firewall_create_response.py +++ /dev/null @@ -1,70 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["FirewallCreateResponse", "AttackMitigation"] - - -class AttackMitigation(BaseModel): - enabled: Optional[bool] = None - """ - When enabled, random-prefix attacks are automatically mitigated and the upstream - 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.""" - - -class FirewallCreateResponse(BaseModel): - id: str - """Identifier""" - - deprecate_any_requests: bool - """Deprecate the response to ANY requests.""" - - dns_firewall_ips: List[Union[str, str]] - - ecs_fallback: bool - """Forward client IP (resolver) subnet if no EDNS Client Subnet is sent.""" - - maximum_cache_ttl: float - """Maximum DNS Cache TTL.""" - - minimum_cache_ttl: float - """Minimum DNS Cache TTL.""" - - modified_on: datetime - """Last modification of DNS Firewall cluster.""" - - name: str - """DNS Firewall Cluster Name.""" - - upstream_ips: List[Union[str, str]] - - attack_mitigation: Optional[AttackMitigation] = None - """Attack mitigation settings.""" - - 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 - the upstream nameservers configured on the cluster). - """ - - retries: Optional[float] = None - """ - Number of retries for fetching DNS responses from upstream nameservers (not - counting the initial attempt). - """ diff --git a/src/cloudflare/types/dns/firewall_edit_response.py b/src/cloudflare/types/dns/firewall_edit_response.py deleted file mode 100644 index e258fac7d..000000000 --- a/src/cloudflare/types/dns/firewall_edit_response.py +++ /dev/null @@ -1,70 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["FirewallEditResponse", "AttackMitigation"] - - -class AttackMitigation(BaseModel): - enabled: Optional[bool] = None - """ - When enabled, random-prefix attacks are automatically mitigated and the upstream - 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.""" - - -class FirewallEditResponse(BaseModel): - id: str - """Identifier""" - - deprecate_any_requests: bool - """Deprecate the response to ANY requests.""" - - dns_firewall_ips: List[Union[str, str]] - - ecs_fallback: bool - """Forward client IP (resolver) subnet if no EDNS Client Subnet is sent.""" - - maximum_cache_ttl: float - """Maximum DNS Cache TTL.""" - - minimum_cache_ttl: float - """Minimum DNS Cache TTL.""" - - modified_on: datetime - """Last modification of DNS Firewall cluster.""" - - name: str - """DNS Firewall Cluster Name.""" - - upstream_ips: List[Union[str, str]] - - attack_mitigation: Optional[AttackMitigation] = None - """Attack mitigation settings.""" - - 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 - the upstream nameservers configured on the cluster). - """ - - retries: Optional[float] = None - """ - Number of retries for fetching DNS responses from upstream nameservers (not - counting the initial attempt). - """ diff --git a/src/cloudflare/types/dns/firewall_get_response.py b/src/cloudflare/types/dns/firewall_get_response.py deleted file mode 100644 index d1d13062c..000000000 --- a/src/cloudflare/types/dns/firewall_get_response.py +++ /dev/null @@ -1,70 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["FirewallGetResponse", "AttackMitigation"] - - -class AttackMitigation(BaseModel): - enabled: Optional[bool] = None - """ - When enabled, random-prefix attacks are automatically mitigated and the upstream - 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.""" - - -class FirewallGetResponse(BaseModel): - id: str - """Identifier""" - - deprecate_any_requests: bool - """Deprecate the response to ANY requests.""" - - dns_firewall_ips: List[Union[str, str]] - - ecs_fallback: bool - """Forward client IP (resolver) subnet if no EDNS Client Subnet is sent.""" - - maximum_cache_ttl: float - """Maximum DNS Cache TTL.""" - - minimum_cache_ttl: float - """Minimum DNS Cache TTL.""" - - modified_on: datetime - """Last modification of DNS Firewall cluster.""" - - name: str - """DNS Firewall Cluster Name.""" - - upstream_ips: List[Union[str, str]] - - attack_mitigation: Optional[AttackMitigation] = None - """Attack mitigation settings.""" - - 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 - the upstream nameservers configured on the cluster). - """ - - retries: Optional[float] = None - """ - Number of retries for fetching DNS responses from upstream nameservers (not - counting the initial attempt). - """ diff --git a/src/cloudflare/types/custom_nameserver_create_response.py b/src/cloudflare/types/dns_custom_nameservers_custom_ns.py similarity index 87% rename from src/cloudflare/types/custom_nameserver_create_response.py rename to src/cloudflare/types/dns_custom_nameservers_custom_ns.py index 4513f4221..6349c9ef5 100644 --- a/src/cloudflare/types/custom_nameserver_create_response.py +++ b/src/cloudflare/types/dns_custom_nameservers_custom_ns.py @@ -5,7 +5,7 @@ from typing_extensions import Literal from .._models import BaseModel -__all__ = ["CustomNameserverCreateResponse", "DNSRecord"] +__all__ = ["DNSCustomNameserversCustomNS", "DNSRecord"] class DNSRecord(BaseModel): @@ -16,7 +16,7 @@ class DNSRecord(BaseModel): """DNS record contents (an IPv4 or IPv6 address).""" -class CustomNameserverCreateResponse(BaseModel): +class DNSCustomNameserversCustomNS(BaseModel): dns_records: List[DNSRecord] """A and AAAA records associated with the nameserver.""" diff --git a/src/cloudflare/types/dnssec_get_response.py b/src/cloudflare/types/dnssec_dnssec.py similarity index 96% rename from src/cloudflare/types/dnssec_get_response.py rename to src/cloudflare/types/dnssec_dnssec.py index a023eec3e..8acb14538 100644 --- a/src/cloudflare/types/dnssec_get_response.py +++ b/src/cloudflare/types/dnssec_dnssec.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from .._models import BaseModel -__all__ = ["DNSSECGetResponse"] +__all__ = ["DNSSECDNSSEC"] -class DNSSECGetResponse(BaseModel): +class DNSSECDNSSEC(BaseModel): algorithm: Optional[str] = None """Algorithm key code.""" diff --git a/src/cloudflare/types/dnssec_edit_response.py b/src/cloudflare/types/dnssec_edit_response.py deleted file mode 100644 index c7ec78b0d..000000000 --- a/src/cloudflare/types/dnssec_edit_response.py +++ /dev/null @@ -1,69 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["DNSSECEditResponse"] - - -class DNSSECEditResponse(BaseModel): - algorithm: Optional[str] = None - """Algorithm key code.""" - - digest: Optional[str] = None - """Digest hash.""" - - digest_algorithm: Optional[str] = None - """Type of digest algorithm.""" - - digest_type: Optional[str] = None - """Coded type for digest algorithm.""" - - dnssec_multi_signer: Optional[bool] = None - """ - If true, multi-signer DNSSEC is enabled on the zone, allowing multiple providers - to serve a DNSSEC-signed zone at the same time. This is required for DNSKEY - records (except those automatically generated by Cloudflare) to be added to the - zone. - - See - [Multi-signer DNSSEC](https://developers.cloudflare.com/dns/dnssec/multi-signer-dnssec/) - for details. - """ - - dnssec_presigned: Optional[bool] = None - """ - If true, allows Cloudflare to transfer in a DNSSEC-signed zone including - signatures from an external provider, without requiring Cloudflare to sign any - records on the fly. - - Note that this feature has some limitations. See - [Cloudflare as Secondary](https://developers.cloudflare.com/dns/zone-setups/zone-transfers/cloudflare-as-secondary/setup/#dnssec) - for details. - """ - - ds: Optional[str] = None - """Full DS record.""" - - flags: Optional[float] = None - """Flag for DNSSEC record.""" - - key_tag: Optional[float] = None - """Code for key tag.""" - - key_type: Optional[str] = None - """Algorithm key type.""" - - modified_on: Optional[datetime] = None - """When DNSSEC was last modified.""" - - public_key: Optional[str] = None - """Public key for DS record.""" - - status: Optional[Literal["active", "pending", "disabled", "pending-disabled", "error"]] = None - """ - Status of DNSSEC, based on user-desired state and presence of necessary records. - """ diff --git a/src/cloudflare/types/durable_objects/__init__.py b/src/cloudflare/types/durable_objects/__init__.py index 9f30280ae..c7f6f7093 100644 --- a/src/cloudflare/types/durable_objects/__init__.py +++ b/src/cloudflare/types/durable_objects/__init__.py @@ -2,4 +2,5 @@ from __future__ import annotations +from .workers_namespace import WorkersNamespace as WorkersNamespace from .namespace_list_response import NamespaceListResponse as NamespaceListResponse diff --git a/src/cloudflare/types/durable_objects/namespace_list_response.py b/src/cloudflare/types/durable_objects/namespace_list_response.py index c71731543..5cebabbfe 100644 --- a/src/cloudflare/types/durable_objects/namespace_list_response.py +++ b/src/cloudflare/types/durable_objects/namespace_list_response.py @@ -1,22 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from pydantic import Field as FieldInfo +from .workers_namespace import WorkersNamespace -from ..._models import BaseModel +__all__ = ["NamespaceListResponse"] -__all__ = ["NamespaceListResponse", "NamespaceListResponseItem"] - - -class NamespaceListResponseItem(BaseModel): - id: Optional[object] = None - - class_: Optional[object] = FieldInfo(alias="class", default=None) - - name: Optional[object] = None - - script: Optional[object] = None - - -NamespaceListResponse = List[NamespaceListResponseItem] +NamespaceListResponse = List[WorkersNamespace] diff --git a/src/cloudflare/types/durable_objects/namespaces/__init__.py b/src/cloudflare/types/durable_objects/namespaces/__init__.py index 1edc9d392..95ad42da9 100644 --- a/src/cloudflare/types/durable_objects/namespaces/__init__.py +++ b/src/cloudflare/types/durable_objects/namespaces/__init__.py @@ -2,5 +2,6 @@ from __future__ import annotations +from .workers_object import WorkersObject as WorkersObject from .object_list_params import ObjectListParams as ObjectListParams from .object_list_response import ObjectListResponse as ObjectListResponse diff --git a/src/cloudflare/types/durable_objects/namespaces/object_list_response.py b/src/cloudflare/types/durable_objects/namespaces/object_list_response.py index 7cfd60ff6..52e3a0fba 100644 --- a/src/cloudflare/types/durable_objects/namespaces/object_list_response.py +++ b/src/cloudflare/types/durable_objects/namespaces/object_list_response.py @@ -1,20 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from pydantic import Field as FieldInfo +from .workers_object import WorkersObject -from ...._models import BaseModel +__all__ = ["ObjectListResponse"] -__all__ = ["ObjectListResponse", "ObjectListResponseItem"] - - -class ObjectListResponseItem(BaseModel): - id: Optional[str] = None - """ID of the Durable Object.""" - - has_stored_data: Optional[bool] = FieldInfo(alias="hasStoredData", default=None) - """Whether the Durable Object has stored data.""" - - -ObjectListResponse = List[ObjectListResponseItem] +ObjectListResponse = List[WorkersObject] diff --git a/src/cloudflare/types/durable_objects/namespaces/workers_object.py b/src/cloudflare/types/durable_objects/namespaces/workers_object.py new file mode 100644 index 000000000..97733b6bb --- /dev/null +++ b/src/cloudflare/types/durable_objects/namespaces/workers_object.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from ...._models import BaseModel + +__all__ = ["WorkersObject"] + + +class WorkersObject(BaseModel): + id: Optional[str] = None + """ID of the Durable Object.""" + + has_stored_data: Optional[bool] = FieldInfo(alias="hasStoredData", default=None) + """Whether the Durable Object has stored data.""" diff --git a/src/cloudflare/types/durable_objects/workers_namespace.py b/src/cloudflare/types/durable_objects/workers_namespace.py new file mode 100644 index 000000000..624f0a9a3 --- /dev/null +++ b/src/cloudflare/types/durable_objects/workers_namespace.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel + +__all__ = ["WorkersNamespace"] + + +class WorkersNamespace(BaseModel): + id: Optional[object] = None + + class_: Optional[object] = FieldInfo(alias="class", default=None) + + name: Optional[object] = None + + script: Optional[object] = None diff --git a/src/cloudflare/types/email_routing/routing/__init__.py b/src/cloudflare/types/email_routing/routing/__init__.py index 2f2433a40..0f8dfea01 100644 --- a/src/cloudflare/types/email_routing/routing/__init__.py +++ b/src/cloudflare/types/email_routing/routing/__init__.py @@ -3,6 +3,7 @@ from __future__ import annotations from .dns_get_response import DNSGetResponse as DNSGetResponse +from .email_dns_record import EmailDNSRecord as EmailDNSRecord from .rule_list_params import RuleListParams as RuleListParams from .rule_get_response import RuleGetResponse as RuleGetResponse from .rule_create_params import RuleCreateParams as RuleCreateParams diff --git a/src/cloudflare/types/email_routing/routing/dns_get_response.py b/src/cloudflare/types/email_routing/routing/dns_get_response.py index acf014d9b..17f97681e 100644 --- a/src/cloudflare/types/email_routing/routing/dns_get_response.py +++ b/src/cloudflare/types/email_routing/routing/dns_get_response.py @@ -1,55 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Union, Optional -from typing_extensions import Literal +from typing import List -from ...._models import BaseModel +from .email_dns_record import EmailDNSRecord -__all__ = ["DNSGetResponse", "DNSGetResponseItem"] +__all__ = ["DNSGetResponse"] - -class DNSGetResponseItem(BaseModel): - content: Optional[str] = None - """DNS record content.""" - - name: Optional[str] = None - """DNS record name (or @ for the zone apex).""" - - priority: Optional[float] = None - """Required for MX, SRV and URI records. - - Unused by other record types. Records with lower priorities are preferred. - """ - - ttl: Union[float, Literal[1], None] = None - """Time to live, in seconds, of the DNS record. - - Must be between 60 and 86400, or 1 for 'automatic'. - """ - - type: Optional[ - Literal[ - "A", - "AAAA", - "CNAME", - "HTTPS", - "TXT", - "SRV", - "LOC", - "MX", - "NS", - "CERT", - "DNSKEY", - "DS", - "NAPTR", - "SMIMEA", - "SSHFP", - "SVCB", - "TLSA", - "URI", - ] - ] = None - """DNS record type.""" - - -DNSGetResponse = List[DNSGetResponseItem] +DNSGetResponse = List[EmailDNSRecord] diff --git a/src/cloudflare/types/email_routing/routing/email_dns_record.py b/src/cloudflare/types/email_routing/routing/email_dns_record.py new file mode 100644 index 000000000..1257a4be7 --- /dev/null +++ b/src/cloudflare/types/email_routing/routing/email_dns_record.py @@ -0,0 +1,52 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Union, Optional +from typing_extensions import Literal + +from ...._models import BaseModel + +__all__ = ["EmailDNSRecord"] + + +class EmailDNSRecord(BaseModel): + content: Optional[str] = None + """DNS record content.""" + + name: Optional[str] = None + """DNS record name (or @ for the zone apex).""" + + priority: Optional[float] = None + """Required for MX, SRV and URI records. + + Unused by other record types. Records with lower priorities are preferred. + """ + + ttl: Union[float, Literal[1], None] = None + """Time to live, in seconds, of the DNS record. + + Must be between 60 and 86400, or 1 for 'automatic'. + """ + + type: Optional[ + Literal[ + "A", + "AAAA", + "CNAME", + "HTTPS", + "TXT", + "SRV", + "LOC", + "MX", + "NS", + "CERT", + "DNSKEY", + "DS", + "NAPTR", + "SMIMEA", + "SSHFP", + "SVCB", + "TLSA", + "URI", + ] + ] = None + """DNS record type.""" diff --git a/src/cloudflare/types/email_routing/routing/rules/__init__.py b/src/cloudflare/types/email_routing/routing/rules/__init__.py index 29f00431b..f7f8f5e89 100644 --- a/src/cloudflare/types/email_routing/routing/rules/__init__.py +++ b/src/cloudflare/types/email_routing/routing/rules/__init__.py @@ -2,6 +2,5 @@ from __future__ import annotations -from .catch_all_get_response import CatchAllGetResponse as CatchAllGetResponse +from .email_catch_all_rule import EmailCatchAllRule as EmailCatchAllRule from .catch_all_update_params import CatchAllUpdateParams as CatchAllUpdateParams -from .catch_all_update_response import CatchAllUpdateResponse as CatchAllUpdateResponse diff --git a/src/cloudflare/types/email_routing/routing/rules/catch_all_update_response.py b/src/cloudflare/types/email_routing/routing/rules/catch_all_update_response.py deleted file mode 100644 index 01cac20e8..000000000 --- a/src/cloudflare/types/email_routing/routing/rules/catch_all_update_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from typing_extensions import Literal - -from ....._models import BaseModel - -__all__ = ["CatchAllUpdateResponse", "Action", "Matcher"] - - -class Action(BaseModel): - type: Literal["drop", "forward", "worker"] - """Type of action for catch-all rule.""" - - value: Optional[List[str]] = None - - -class Matcher(BaseModel): - type: Literal["all"] - """Type of matcher. Default is 'all'.""" - - -class CatchAllUpdateResponse(BaseModel): - id: Optional[str] = None - """Routing rule identifier.""" - - actions: Optional[List[Action]] = None - """List actions for the catch-all routing rule.""" - - enabled: Optional[Literal[True, False]] = None - """Routing rule status.""" - - matchers: Optional[List[Matcher]] = None - """List of matchers for the catch-all routing rule.""" - - name: Optional[str] = None - """Routing rule name.""" - - tag: Optional[str] = None - """Routing rule tag. (Deprecated, replaced by routing rule identifier)""" diff --git a/src/cloudflare/types/email_routing/routing/rules/catch_all_get_response.py b/src/cloudflare/types/email_routing/routing/rules/email_catch_all_rule.py similarity index 91% rename from src/cloudflare/types/email_routing/routing/rules/catch_all_get_response.py rename to src/cloudflare/types/email_routing/routing/rules/email_catch_all_rule.py index 6208ffb96..19a7c940a 100644 --- a/src/cloudflare/types/email_routing/routing/rules/catch_all_get_response.py +++ b/src/cloudflare/types/email_routing/routing/rules/email_catch_all_rule.py @@ -5,7 +5,7 @@ from typing_extensions import Literal from ....._models import BaseModel -__all__ = ["CatchAllGetResponse", "Action", "Matcher"] +__all__ = ["EmailCatchAllRule", "Action", "Matcher"] class Action(BaseModel): @@ -20,7 +20,7 @@ class Matcher(BaseModel): """Type of matcher. Default is 'all'.""" -class CatchAllGetResponse(BaseModel): +class EmailCatchAllRule(BaseModel): id: Optional[str] = None """Routing rule identifier.""" diff --git a/src/cloudflare/types/filter_create_response.py b/src/cloudflare/types/filter_create_response.py index c6c0e296d..18e37b591 100644 --- a/src/cloudflare/types/filter_create_response.py +++ b/src/cloudflare/types/filter_create_response.py @@ -1,31 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from .._models import BaseModel +from .legacy_jhs_filter import LegacyJhsFilter -__all__ = ["FilterCreateResponse", "FilterCreateResponseItem"] +__all__ = ["FilterCreateResponse"] - -class FilterCreateResponseItem(BaseModel): - id: str - """The unique identifier of the filter.""" - - expression: str - """The filter expression. - - For more information, refer to - [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). - """ - - paused: bool - """When true, indicates that the filter is currently paused.""" - - description: Optional[str] = None - """An informative summary of the filter.""" - - ref: Optional[str] = None - """A short reference tag. Allows you to select related filters.""" - - -FilterCreateResponse = List[FilterCreateResponseItem] +FilterCreateResponse = List[LegacyJhsFilter] diff --git a/src/cloudflare/types/filter_get_response.py b/src/cloudflare/types/filter_get_response.py deleted file mode 100644 index 629a1ccb4..000000000 --- a/src/cloudflare/types/filter_get_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional - -from .._models import BaseModel - -__all__ = ["FilterGetResponse"] - - -class FilterGetResponse(BaseModel): - id: str - """The unique identifier of the filter.""" - - expression: str - """The filter expression. - - For more information, refer to - [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). - """ - - paused: bool - """When true, indicates that the filter is currently paused.""" - - description: Optional[str] = None - """An informative summary of the filter.""" - - ref: Optional[str] = None - """A short reference tag. Allows you to select related filters.""" diff --git a/src/cloudflare/types/filter_list_response.py b/src/cloudflare/types/filter_list_response.py deleted file mode 100644 index fc08b82f0..000000000 --- a/src/cloudflare/types/filter_list_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional - -from .._models import BaseModel - -__all__ = ["FilterListResponse"] - - -class FilterListResponse(BaseModel): - id: str - """The unique identifier of the filter.""" - - expression: str - """The filter expression. - - For more information, refer to - [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). - """ - - paused: bool - """When true, indicates that the filter is currently paused.""" - - description: Optional[str] = None - """An informative summary of the filter.""" - - ref: Optional[str] = None - """A short reference tag. Allows you to select related filters.""" diff --git a/src/cloudflare/types/filter_update_response.py b/src/cloudflare/types/filter_update_response.py deleted file mode 100644 index 0cf3058f1..000000000 --- a/src/cloudflare/types/filter_update_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional - -from .._models import BaseModel - -__all__ = ["FilterUpdateResponse"] - - -class FilterUpdateResponse(BaseModel): - id: str - """The unique identifier of the filter.""" - - expression: str - """The filter expression. - - For more information, refer to - [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). - """ - - paused: bool - """When true, indicates that the filter is currently paused.""" - - description: Optional[str] = None - """An informative summary of the filter.""" - - ref: Optional[str] = None - """A short reference tag. Allows you to select related filters.""" diff --git a/src/cloudflare/types/firewall/__init__.py b/src/cloudflare/types/firewall/__init__.py index c90daff76..bde944f2c 100644 --- a/src/cloudflare/types/firewall/__init__.py +++ b/src/cloudflare/types/firewall/__init__.py @@ -4,34 +4,28 @@ from __future__ import annotations from .rule_edit_params import RuleEditParams as RuleEditParams from .rule_list_params import RuleListParams as RuleListParams -from .rule_get_response import RuleGetResponse as RuleGetResponse from .rule_create_params import RuleCreateParams as RuleCreateParams from .rule_delete_params import RuleDeleteParams as RuleDeleteParams 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 .ua_rule_list_params import UARuleListParams as UARuleListParams from .lockdown_list_params import LockdownListParams as LockdownListParams from .rule_create_response import RuleCreateResponse as RuleCreateResponse -from .rule_delete_response import RuleDeleteResponse as RuleDeleteResponse -from .rule_update_response import RuleUpdateResponse as RuleUpdateResponse from .ua_rule_get_response import UARuleGetResponse as UARuleGetResponse -from .lockdown_get_response import LockdownGetResponse as LockdownGetResponse 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 .lockdown_create_params import LockdownCreateParams as LockdownCreateParams -from .lockdown_list_response import LockdownListResponse as LockdownListResponse 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 from .access_rule_get_response import AccessRuleGetResponse as AccessRuleGetResponse -from .lockdown_create_response import LockdownCreateResponse as LockdownCreateResponse from .lockdown_delete_response import LockdownDeleteResponse as LockdownDeleteResponse -from .lockdown_update_response import LockdownUpdateResponse as LockdownUpdateResponse from .access_rule_create_params import AccessRuleCreateParams as AccessRuleCreateParams from .access_rule_edit_response import AccessRuleEditResponse as AccessRuleEditResponse from .access_rule_create_response import AccessRuleCreateResponse as AccessRuleCreateResponse diff --git a/src/cloudflare/types/firewall/rule_delete_response.py b/src/cloudflare/types/firewall/legacy_jhs_filter_rule.py similarity index 64% rename from src/cloudflare/types/firewall/rule_delete_response.py rename to src/cloudflare/types/firewall/legacy_jhs_filter_rule.py index 6de98c5a2..a3d30fd09 100644 --- a/src/cloudflare/types/firewall/rule_delete_response.py +++ b/src/cloudflare/types/firewall/legacy_jhs_filter_rule.py @@ -4,29 +4,9 @@ from typing import List, Union, Optional from typing_extensions import Literal from ..._models import BaseModel +from ..legacy_jhs_filter import LegacyJhsFilter -__all__ = ["RuleDeleteResponse", "Filter", "FilterLegacyJhsFilter", "FilterLegacyJhsDeletedFilter"] - - -class FilterLegacyJhsFilter(BaseModel): - id: Optional[str] = None - """The unique identifier of the filter.""" - - description: Optional[str] = None - """An informative summary of the filter.""" - - expression: Optional[str] = None - """The filter expression. - - For more information, refer to - [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). - """ - - paused: Optional[bool] = None - """When true, indicates that the filter is currently paused.""" - - ref: Optional[str] = None - """A short reference tag. Allows you to select related filters.""" +__all__ = ["LegacyJhsFilterRule", "Filter", "FilterLegacyJhsDeletedFilter"] class FilterLegacyJhsDeletedFilter(BaseModel): @@ -37,11 +17,11 @@ class FilterLegacyJhsDeletedFilter(BaseModel): """When true, indicates that the firewall rule was deleted.""" -Filter = Union[FilterLegacyJhsFilter, FilterLegacyJhsDeletedFilter] +Filter = Union[LegacyJhsFilter, FilterLegacyJhsDeletedFilter] -class RuleDeleteResponse(BaseModel): - id: str +class LegacyJhsFilterRule(BaseModel): + id: Optional[str] = None """The unique identifier of the firewall rule.""" action: Optional[ diff --git a/src/cloudflare/types/firewall/lockdown_get_response.py b/src/cloudflare/types/firewall/legacy_jhs_zonelockdown.py similarity index 96% rename from src/cloudflare/types/firewall/lockdown_get_response.py rename to src/cloudflare/types/firewall/legacy_jhs_zonelockdown.py index c7930e96f..cc2d35760 100644 --- a/src/cloudflare/types/firewall/lockdown_get_response.py +++ b/src/cloudflare/types/firewall/legacy_jhs_zonelockdown.py @@ -7,7 +7,7 @@ from typing_extensions import Literal from ..._models import BaseModel __all__ = [ - "LockdownGetResponse", + "LegacyJhsZonelockdown", "Configurations", "ConfigurationsLegacyJhsSchemasIPConfiguration", "ConfigurationsLegacyJhsSchemasCidrConfiguration", @@ -44,7 +44,7 @@ class ConfigurationsLegacyJhsSchemasCidrConfiguration(BaseModel): Configurations = Union[ConfigurationsLegacyJhsSchemasIPConfiguration, ConfigurationsLegacyJhsSchemasCidrConfiguration] -class LockdownGetResponse(BaseModel): +class LegacyJhsZonelockdown(BaseModel): id: str """The unique identifier of the Zone Lockdown rule.""" diff --git a/src/cloudflare/types/firewall/lockdown_create_response.py b/src/cloudflare/types/firewall/lockdown_create_response.py deleted file mode 100644 index 580e7f824..000000000 --- a/src/cloudflare/types/firewall/lockdown_create_response.py +++ /dev/null @@ -1,75 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = [ - "LockdownCreateResponse", - "Configurations", - "ConfigurationsLegacyJhsSchemasIPConfiguration", - "ConfigurationsLegacyJhsSchemasCidrConfiguration", -] - - -class ConfigurationsLegacyJhsSchemasIPConfiguration(BaseModel): - target: Optional[Literal["ip"]] = None - """The configuration target. - - You must set the target to `ip` when specifying an IP address in the Zone - Lockdown rule. - """ - - value: Optional[str] = None - """The IP address to match. - - This address will be compared to the IP address of incoming requests. - """ - - -class ConfigurationsLegacyJhsSchemasCidrConfiguration(BaseModel): - target: Optional[Literal["ip_range"]] = None - """The configuration target. - - You must set the target to `ip_range` when specifying an IP address range in the - Zone Lockdown rule. - """ - - value: Optional[str] = None - """The IP address range to match. You can only use prefix lengths `/16` and `/24`.""" - - -Configurations = Union[ConfigurationsLegacyJhsSchemasIPConfiguration, ConfigurationsLegacyJhsSchemasCidrConfiguration] - - -class LockdownCreateResponse(BaseModel): - id: str - """The unique identifier of the Zone Lockdown rule.""" - - configurations: Configurations - """ - A list of IP addresses or CIDR ranges that will be allowed to access the URLs - specified in the Zone Lockdown rule. You can include any number of `ip` or - `ip_range` configurations. - """ - - created_on: datetime - """The timestamp of when the rule was created.""" - - description: str - """An informative summary of the rule.""" - - modified_on: datetime - """The timestamp of when the rule was last modified.""" - - paused: bool - """When true, indicates that the rule is currently paused.""" - - urls: List[str] - """The URLs to include in the rule definition. - - You can use wildcards. Each entered URL will be escaped before use, which means - you can only use simple wildcard patterns. - """ diff --git a/src/cloudflare/types/firewall/lockdown_list_response.py b/src/cloudflare/types/firewall/lockdown_list_response.py deleted file mode 100644 index 431bbbd2f..000000000 --- a/src/cloudflare/types/firewall/lockdown_list_response.py +++ /dev/null @@ -1,75 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = [ - "LockdownListResponse", - "Configurations", - "ConfigurationsLegacyJhsSchemasIPConfiguration", - "ConfigurationsLegacyJhsSchemasCidrConfiguration", -] - - -class ConfigurationsLegacyJhsSchemasIPConfiguration(BaseModel): - target: Optional[Literal["ip"]] = None - """The configuration target. - - You must set the target to `ip` when specifying an IP address in the Zone - Lockdown rule. - """ - - value: Optional[str] = None - """The IP address to match. - - This address will be compared to the IP address of incoming requests. - """ - - -class ConfigurationsLegacyJhsSchemasCidrConfiguration(BaseModel): - target: Optional[Literal["ip_range"]] = None - """The configuration target. - - You must set the target to `ip_range` when specifying an IP address range in the - Zone Lockdown rule. - """ - - value: Optional[str] = None - """The IP address range to match. You can only use prefix lengths `/16` and `/24`.""" - - -Configurations = Union[ConfigurationsLegacyJhsSchemasIPConfiguration, ConfigurationsLegacyJhsSchemasCidrConfiguration] - - -class LockdownListResponse(BaseModel): - id: str - """The unique identifier of the Zone Lockdown rule.""" - - configurations: Configurations - """ - A list of IP addresses or CIDR ranges that will be allowed to access the URLs - specified in the Zone Lockdown rule. You can include any number of `ip` or - `ip_range` configurations. - """ - - created_on: datetime - """The timestamp of when the rule was created.""" - - description: str - """An informative summary of the rule.""" - - modified_on: datetime - """The timestamp of when the rule was last modified.""" - - paused: bool - """When true, indicates that the rule is currently paused.""" - - urls: List[str] - """The URLs to include in the rule definition. - - You can use wildcards. Each entered URL will be escaped before use, which means - you can only use simple wildcard patterns. - """ diff --git a/src/cloudflare/types/firewall/lockdown_update_response.py b/src/cloudflare/types/firewall/lockdown_update_response.py deleted file mode 100644 index 9331da0cf..000000000 --- a/src/cloudflare/types/firewall/lockdown_update_response.py +++ /dev/null @@ -1,75 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = [ - "LockdownUpdateResponse", - "Configurations", - "ConfigurationsLegacyJhsSchemasIPConfiguration", - "ConfigurationsLegacyJhsSchemasCidrConfiguration", -] - - -class ConfigurationsLegacyJhsSchemasIPConfiguration(BaseModel): - target: Optional[Literal["ip"]] = None - """The configuration target. - - You must set the target to `ip` when specifying an IP address in the Zone - Lockdown rule. - """ - - value: Optional[str] = None - """The IP address to match. - - This address will be compared to the IP address of incoming requests. - """ - - -class ConfigurationsLegacyJhsSchemasCidrConfiguration(BaseModel): - target: Optional[Literal["ip_range"]] = None - """The configuration target. - - You must set the target to `ip_range` when specifying an IP address range in the - Zone Lockdown rule. - """ - - value: Optional[str] = None - """The IP address range to match. You can only use prefix lengths `/16` and `/24`.""" - - -Configurations = Union[ConfigurationsLegacyJhsSchemasIPConfiguration, ConfigurationsLegacyJhsSchemasCidrConfiguration] - - -class LockdownUpdateResponse(BaseModel): - id: str - """The unique identifier of the Zone Lockdown rule.""" - - configurations: Configurations - """ - A list of IP addresses or CIDR ranges that will be allowed to access the URLs - specified in the Zone Lockdown rule. You can include any number of `ip` or - `ip_range` configurations. - """ - - created_on: datetime - """The timestamp of when the rule was created.""" - - description: str - """An informative summary of the rule.""" - - modified_on: datetime - """The timestamp of when the rule was last modified.""" - - paused: bool - """When true, indicates that the rule is currently paused.""" - - urls: List[str] - """The URLs to include in the rule definition. - - You can use wildcards. Each entered URL will be escaped before use, which means - you can only use simple wildcard patterns. - """ diff --git a/src/cloudflare/types/firewall/rule_create_response.py b/src/cloudflare/types/firewall/rule_create_response.py index 5ea4defe5..7de4f170b 100644 --- a/src/cloudflare/types/firewall/rule_create_response.py +++ b/src/cloudflare/types/firewall/rule_create_response.py @@ -1,85 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Union, Optional -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .legacy_jhs_filter_rule import LegacyJhsFilterRule -__all__ = [ - "RuleCreateResponse", - "RuleCreateResponseItem", - "RuleCreateResponseItemFilter", - "RuleCreateResponseItemFilterLegacyJhsFilter", - "RuleCreateResponseItemFilterLegacyJhsDeletedFilter", -] +__all__ = ["RuleCreateResponse"] - -class RuleCreateResponseItemFilterLegacyJhsFilter(BaseModel): - id: Optional[str] = None - """The unique identifier of the filter.""" - - description: Optional[str] = None - """An informative summary of the filter.""" - - expression: Optional[str] = None - """The filter expression. - - For more information, refer to - [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). - """ - - paused: Optional[bool] = None - """When true, indicates that the filter is currently paused.""" - - ref: Optional[str] = None - """A short reference tag. Allows you to select related filters.""" - - -class RuleCreateResponseItemFilterLegacyJhsDeletedFilter(BaseModel): - id: str - """The unique identifier of the filter.""" - - deleted: bool - """When true, indicates that the firewall rule was deleted.""" - - -RuleCreateResponseItemFilter = Union[ - RuleCreateResponseItemFilterLegacyJhsFilter, RuleCreateResponseItemFilterLegacyJhsDeletedFilter -] - - -class RuleCreateResponseItem(BaseModel): - id: str - """The unique identifier of the firewall rule.""" - - action: Literal["block", "challenge", "js_challenge", "managed_challenge", "allow", "log", "bypass"] - """The action to apply to a matched request. - - The `log` action is only available on an Enterprise plan. - """ - - filter: RuleCreateResponseItemFilter - - paused: bool - """When true, indicates that the firewall rule is currently paused.""" - - description: Optional[str] = None - """An informative summary of the firewall rule.""" - - priority: Optional[float] = None - """The priority of the rule. - - Optional value used to define the processing order. A lower number indicates a - higher priority. If not provided, rules with a defined priority will be - processed before rules without a priority. - """ - - products: Optional[ - List[Literal["zoneLockdown", "uaBlock", "bic", "hot", "securityLevel", "rateLimit", "waf"]] - ] = None - - ref: Optional[str] = None - """A short reference tag. Allows you to select related firewall rules.""" - - -RuleCreateResponse = List[RuleCreateResponseItem] +RuleCreateResponse = List[LegacyJhsFilterRule] diff --git a/src/cloudflare/types/firewall/rule_edit_response.py b/src/cloudflare/types/firewall/rule_edit_response.py index 5e3495b86..d7a61eb7b 100644 --- a/src/cloudflare/types/firewall/rule_edit_response.py +++ b/src/cloudflare/types/firewall/rule_edit_response.py @@ -1,85 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Union, Optional -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .legacy_jhs_filter_rule import LegacyJhsFilterRule -__all__ = [ - "RuleEditResponse", - "RuleEditResponseItem", - "RuleEditResponseItemFilter", - "RuleEditResponseItemFilterLegacyJhsFilter", - "RuleEditResponseItemFilterLegacyJhsDeletedFilter", -] +__all__ = ["RuleEditResponse"] - -class RuleEditResponseItemFilterLegacyJhsFilter(BaseModel): - id: Optional[str] = None - """The unique identifier of the filter.""" - - description: Optional[str] = None - """An informative summary of the filter.""" - - expression: Optional[str] = None - """The filter expression. - - For more information, refer to - [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). - """ - - paused: Optional[bool] = None - """When true, indicates that the filter is currently paused.""" - - ref: Optional[str] = None - """A short reference tag. Allows you to select related filters.""" - - -class RuleEditResponseItemFilterLegacyJhsDeletedFilter(BaseModel): - id: str - """The unique identifier of the filter.""" - - deleted: bool - """When true, indicates that the firewall rule was deleted.""" - - -RuleEditResponseItemFilter = Union[ - RuleEditResponseItemFilterLegacyJhsFilter, RuleEditResponseItemFilterLegacyJhsDeletedFilter -] - - -class RuleEditResponseItem(BaseModel): - id: str - """The unique identifier of the firewall rule.""" - - action: Literal["block", "challenge", "js_challenge", "managed_challenge", "allow", "log", "bypass"] - """The action to apply to a matched request. - - The `log` action is only available on an Enterprise plan. - """ - - filter: RuleEditResponseItemFilter - - paused: bool - """When true, indicates that the firewall rule is currently paused.""" - - description: Optional[str] = None - """An informative summary of the firewall rule.""" - - priority: Optional[float] = None - """The priority of the rule. - - Optional value used to define the processing order. A lower number indicates a - higher priority. If not provided, rules with a defined priority will be - processed before rules without a priority. - """ - - products: Optional[ - List[Literal["zoneLockdown", "uaBlock", "bic", "hot", "securityLevel", "rateLimit", "waf"]] - ] = None - - ref: Optional[str] = None - """A short reference tag. Allows you to select related firewall rules.""" - - -RuleEditResponse = List[RuleEditResponseItem] +RuleEditResponse = List[LegacyJhsFilterRule] diff --git a/src/cloudflare/types/firewall/rule_get_response.py b/src/cloudflare/types/firewall/rule_get_response.py deleted file mode 100644 index 8abf36f8d..000000000 --- a/src/cloudflare/types/firewall/rule_get_response.py +++ /dev/null @@ -1,74 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["RuleGetResponse", "Filter", "FilterLegacyJhsFilter", "FilterLegacyJhsDeletedFilter"] - - -class FilterLegacyJhsFilter(BaseModel): - id: Optional[str] = None - """The unique identifier of the filter.""" - - description: Optional[str] = None - """An informative summary of the filter.""" - - expression: Optional[str] = None - """The filter expression. - - For more information, refer to - [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). - """ - - paused: Optional[bool] = None - """When true, indicates that the filter is currently paused.""" - - ref: Optional[str] = None - """A short reference tag. Allows you to select related filters.""" - - -class FilterLegacyJhsDeletedFilter(BaseModel): - id: str - """The unique identifier of the filter.""" - - deleted: bool - """When true, indicates that the firewall rule was deleted.""" - - -Filter = Union[FilterLegacyJhsFilter, FilterLegacyJhsDeletedFilter] - - -class RuleGetResponse(BaseModel): - id: str - """The unique identifier of the firewall rule.""" - - action: Literal["block", "challenge", "js_challenge", "managed_challenge", "allow", "log", "bypass"] - """The action to apply to a matched request. - - The `log` action is only available on an Enterprise plan. - """ - - filter: Filter - - paused: bool - """When true, indicates that the firewall rule is currently paused.""" - - description: Optional[str] = None - """An informative summary of the firewall rule.""" - - priority: Optional[float] = None - """The priority of the rule. - - Optional value used to define the processing order. A lower number indicates a - higher priority. If not provided, rules with a defined priority will be - processed before rules without a priority. - """ - - products: Optional[ - List[Literal["zoneLockdown", "uaBlock", "bic", "hot", "securityLevel", "rateLimit", "waf"]] - ] = None - - ref: Optional[str] = None - """A short reference tag. Allows you to select related firewall rules.""" diff --git a/src/cloudflare/types/firewall/rule_list_response.py b/src/cloudflare/types/firewall/rule_list_response.py deleted file mode 100644 index bf69bc7ff..000000000 --- a/src/cloudflare/types/firewall/rule_list_response.py +++ /dev/null @@ -1,74 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["RuleListResponse", "Filter", "FilterLegacyJhsFilter", "FilterLegacyJhsDeletedFilter"] - - -class FilterLegacyJhsFilter(BaseModel): - id: Optional[str] = None - """The unique identifier of the filter.""" - - description: Optional[str] = None - """An informative summary of the filter.""" - - expression: Optional[str] = None - """The filter expression. - - For more information, refer to - [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). - """ - - paused: Optional[bool] = None - """When true, indicates that the filter is currently paused.""" - - ref: Optional[str] = None - """A short reference tag. Allows you to select related filters.""" - - -class FilterLegacyJhsDeletedFilter(BaseModel): - id: str - """The unique identifier of the filter.""" - - deleted: bool - """When true, indicates that the firewall rule was deleted.""" - - -Filter = Union[FilterLegacyJhsFilter, FilterLegacyJhsDeletedFilter] - - -class RuleListResponse(BaseModel): - id: str - """The unique identifier of the firewall rule.""" - - action: Literal["block", "challenge", "js_challenge", "managed_challenge", "allow", "log", "bypass"] - """The action to apply to a matched request. - - The `log` action is only available on an Enterprise plan. - """ - - filter: Filter - - paused: bool - """When true, indicates that the firewall rule is currently paused.""" - - description: Optional[str] = None - """An informative summary of the firewall rule.""" - - priority: Optional[float] = None - """The priority of the rule. - - Optional value used to define the processing order. A lower number indicates a - higher priority. If not provided, rules with a defined priority will be - processed before rules without a priority. - """ - - products: Optional[ - List[Literal["zoneLockdown", "uaBlock", "bic", "hot", "securityLevel", "rateLimit", "waf"]] - ] = None - - ref: Optional[str] = None - """A short reference tag. Allows you to select related firewall rules.""" diff --git a/src/cloudflare/types/firewall/rule_update_response.py b/src/cloudflare/types/firewall/rule_update_response.py deleted file mode 100644 index ef0763cda..000000000 --- a/src/cloudflare/types/firewall/rule_update_response.py +++ /dev/null @@ -1,74 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["RuleUpdateResponse", "Filter", "FilterLegacyJhsFilter", "FilterLegacyJhsDeletedFilter"] - - -class FilterLegacyJhsFilter(BaseModel): - id: Optional[str] = None - """The unique identifier of the filter.""" - - description: Optional[str] = None - """An informative summary of the filter.""" - - expression: Optional[str] = None - """The filter expression. - - For more information, refer to - [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). - """ - - paused: Optional[bool] = None - """When true, indicates that the filter is currently paused.""" - - ref: Optional[str] = None - """A short reference tag. Allows you to select related filters.""" - - -class FilterLegacyJhsDeletedFilter(BaseModel): - id: str - """The unique identifier of the filter.""" - - deleted: bool - """When true, indicates that the firewall rule was deleted.""" - - -Filter = Union[FilterLegacyJhsFilter, FilterLegacyJhsDeletedFilter] - - -class RuleUpdateResponse(BaseModel): - id: str - """The unique identifier of the firewall rule.""" - - action: Literal["block", "challenge", "js_challenge", "managed_challenge", "allow", "log", "bypass"] - """The action to apply to a matched request. - - The `log` action is only available on an Enterprise plan. - """ - - filter: Filter - - paused: bool - """When true, indicates that the firewall rule is currently paused.""" - - description: Optional[str] = None - """An informative summary of the firewall rule.""" - - priority: Optional[float] = None - """The priority of the rule. - - Optional value used to define the processing order. A lower number indicates a - higher priority. If not provided, rules with a defined priority will be - processed before rules without a priority. - """ - - products: Optional[ - List[Literal["zoneLockdown", "uaBlock", "bic", "hot", "securityLevel", "rateLimit", "waf"]] - ] = None - - ref: Optional[str] = None - """A short reference tag. Allows you to select related firewall rules.""" diff --git a/src/cloudflare/types/firewall/waf/__init__.py b/src/cloudflare/types/firewall/waf/__init__.py index 748709eb2..8dc9b16e7 100644 --- a/src/cloudflare/types/firewall/waf/__init__.py +++ b/src/cloudflare/types/firewall/waf/__init__.py @@ -2,14 +2,11 @@ from __future__ import annotations +from .legacy_jhs_override import LegacyJhsOverride as LegacyJhsOverride from .package_list_params import PackageListParams as PackageListParams from .override_list_params import OverrideListParams as OverrideListParams from .package_get_response import PackageGetResponse as PackageGetResponse -from .override_get_response import OverrideGetResponse as OverrideGetResponse from .package_list_response import PackageListResponse as PackageListResponse from .override_create_params import OverrideCreateParams as OverrideCreateParams -from .override_list_response import OverrideListResponse as OverrideListResponse from .override_update_params import OverrideUpdateParams as OverrideUpdateParams -from .override_create_response import OverrideCreateResponse as OverrideCreateResponse from .override_delete_response import OverrideDeleteResponse as OverrideDeleteResponse -from .override_update_response import OverrideUpdateResponse as OverrideUpdateResponse diff --git a/src/cloudflare/types/firewall/waf/override_get_response.py b/src/cloudflare/types/firewall/waf/legacy_jhs_override.py similarity index 96% rename from src/cloudflare/types/firewall/waf/override_get_response.py rename to src/cloudflare/types/firewall/waf/legacy_jhs_override.py index 260666175..ab10f30e1 100644 --- a/src/cloudflare/types/firewall/waf/override_get_response.py +++ b/src/cloudflare/types/firewall/waf/legacy_jhs_override.py @@ -5,7 +5,7 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["OverrideGetResponse", "RewriteAction"] +__all__ = ["LegacyJhsOverride", "RewriteAction"] class RewriteAction(BaseModel): @@ -22,7 +22,7 @@ class RewriteAction(BaseModel): simulate: Optional[object] = None -class OverrideGetResponse(BaseModel): +class LegacyJhsOverride(BaseModel): id: Optional[str] = None """The unique identifier of the WAF override.""" diff --git a/src/cloudflare/types/firewall/waf/override_create_response.py b/src/cloudflare/types/firewall/waf/override_create_response.py deleted file mode 100644 index 9cd077dd6..000000000 --- a/src/cloudflare/types/firewall/waf/override_create_response.py +++ /dev/null @@ -1,71 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Dict, List, Optional -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["OverrideCreateResponse", "RewriteAction"] - - -class RewriteAction(BaseModel): - block: Optional[Literal["challenge", "block", "simulate", "disable", "default"]] = None - """The WAF rule action to apply.""" - - challenge: Optional[object] = None - - default: Optional[object] = None - - disable: Optional[Literal["challenge", "block", "simulate", "disable", "default"]] = None - """The WAF rule action to apply.""" - - simulate: Optional[object] = None - - -class OverrideCreateResponse(BaseModel): - id: Optional[str] = None - """The unique identifier of the WAF override.""" - - description: Optional[str] = None - """An informative summary of the current URI-based WAF override.""" - - groups: Optional[Dict[str, object]] = None - """ - An object that allows you to enable or disable WAF rule groups for the current - WAF override. Each key of this object must be the ID of a WAF rule group, and - each value must be a valid WAF action (usually `default` or `disable`). When - creating a new URI-based WAF override, you must provide a `groups` object or a - `rules` object. - """ - - paused: Optional[bool] = None - """When true, indicates that the WAF package is currently paused.""" - - priority: Optional[float] = None - """ - The relative priority of the current URI-based WAF override when multiple - overrides match a single URL. A lower number indicates higher priority. Higher - priority overrides may overwrite values set by lower priority overrides. - """ - - rewrite_action: Optional[RewriteAction] = None - """ - Specifies that, when a WAF rule matches, its configured action will be replaced - by the action configured in this object. - """ - - rules: Optional[Dict[str, Literal["challenge", "block", "simulate", "disable", "default"]]] = None - """An object that allows you to override the action of specific WAF rules. - - Each key of this object must be the ID of a WAF rule, and each value must be a - valid WAF action. Unless you are disabling a rule, ensure that you also enable - the rule group that this WAF rule belongs to. When creating a new URI-based WAF - override, you must provide a `groups` object or a `rules` object. - """ - - urls: Optional[List[str]] = None - """The URLs to include in the current WAF override. - - You can use wildcards. Each entered URL will be escaped before use, which means - you can only use simple wildcard patterns. - """ diff --git a/src/cloudflare/types/firewall/waf/override_list_response.py b/src/cloudflare/types/firewall/waf/override_list_response.py deleted file mode 100644 index 496f3657e..000000000 --- a/src/cloudflare/types/firewall/waf/override_list_response.py +++ /dev/null @@ -1,71 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Dict, List, Optional -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["OverrideListResponse", "RewriteAction"] - - -class RewriteAction(BaseModel): - block: Optional[Literal["challenge", "block", "simulate", "disable", "default"]] = None - """The WAF rule action to apply.""" - - challenge: Optional[object] = None - - default: Optional[object] = None - - disable: Optional[Literal["challenge", "block", "simulate", "disable", "default"]] = None - """The WAF rule action to apply.""" - - simulate: Optional[object] = None - - -class OverrideListResponse(BaseModel): - id: str - """The unique identifier of the WAF override.""" - - paused: bool - """When true, indicates that the WAF package is currently paused.""" - - priority: float - """ - The relative priority of the current URI-based WAF override when multiple - overrides match a single URL. A lower number indicates higher priority. Higher - priority overrides may overwrite values set by lower priority overrides. - """ - - urls: List[str] - """The URLs to include in the current WAF override. - - You can use wildcards. Each entered URL will be escaped before use, which means - you can only use simple wildcard patterns. - """ - - description: Optional[str] = None - """An informative summary of the current URI-based WAF override.""" - - groups: Optional[Dict[str, object]] = None - """ - An object that allows you to enable or disable WAF rule groups for the current - WAF override. Each key of this object must be the ID of a WAF rule group, and - each value must be a valid WAF action (usually `default` or `disable`). When - creating a new URI-based WAF override, you must provide a `groups` object or a - `rules` object. - """ - - rewrite_action: Optional[RewriteAction] = None - """ - Specifies that, when a WAF rule matches, its configured action will be replaced - by the action configured in this object. - """ - - rules: Optional[Dict[str, Literal["challenge", "block", "simulate", "disable", "default"]]] = None - """An object that allows you to override the action of specific WAF rules. - - Each key of this object must be the ID of a WAF rule, and each value must be a - valid WAF action. Unless you are disabling a rule, ensure that you also enable - the rule group that this WAF rule belongs to. When creating a new URI-based WAF - override, you must provide a `groups` object or a `rules` object. - """ diff --git a/src/cloudflare/types/firewall/waf/override_update_response.py b/src/cloudflare/types/firewall/waf/override_update_response.py deleted file mode 100644 index bdfb268d4..000000000 --- a/src/cloudflare/types/firewall/waf/override_update_response.py +++ /dev/null @@ -1,71 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Dict, List, Optional -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["OverrideUpdateResponse", "RewriteAction"] - - -class RewriteAction(BaseModel): - block: Optional[Literal["challenge", "block", "simulate", "disable", "default"]] = None - """The WAF rule action to apply.""" - - challenge: Optional[object] = None - - default: Optional[object] = None - - disable: Optional[Literal["challenge", "block", "simulate", "disable", "default"]] = None - """The WAF rule action to apply.""" - - simulate: Optional[object] = None - - -class OverrideUpdateResponse(BaseModel): - id: Optional[str] = None - """The unique identifier of the WAF override.""" - - description: Optional[str] = None - """An informative summary of the current URI-based WAF override.""" - - groups: Optional[Dict[str, object]] = None - """ - An object that allows you to enable or disable WAF rule groups for the current - WAF override. Each key of this object must be the ID of a WAF rule group, and - each value must be a valid WAF action (usually `default` or `disable`). When - creating a new URI-based WAF override, you must provide a `groups` object or a - `rules` object. - """ - - paused: Optional[bool] = None - """When true, indicates that the WAF package is currently paused.""" - - priority: Optional[float] = None - """ - The relative priority of the current URI-based WAF override when multiple - overrides match a single URL. A lower number indicates higher priority. Higher - priority overrides may overwrite values set by lower priority overrides. - """ - - rewrite_action: Optional[RewriteAction] = None - """ - Specifies that, when a WAF rule matches, its configured action will be replaced - by the action configured in this object. - """ - - rules: Optional[Dict[str, Literal["challenge", "block", "simulate", "disable", "default"]]] = None - """An object that allows you to override the action of specific WAF rules. - - Each key of this object must be the ID of a WAF rule, and each value must be a - valid WAF action. Unless you are disabling a rule, ensure that you also enable - the rule group that this WAF rule belongs to. When creating a new URI-based WAF - override, you must provide a `groups` object or a `rules` object. - """ - - urls: Optional[List[str]] = None - """The URLs to include in the current WAF override. - - You can use wildcards. Each entered URL will be escaped before use, which means - you can only use simple wildcard patterns. - """ diff --git a/src/cloudflare/types/firewall/waf/packages/__init__.py b/src/cloudflare/types/firewall/waf/packages/__init__.py index 639e732e4..3687e392e 100644 --- a/src/cloudflare/types/firewall/waf/packages/__init__.py +++ b/src/cloudflare/types/firewall/waf/packages/__init__.py @@ -9,6 +9,6 @@ from .group_list_params import GroupListParams as GroupListParams from .rule_get_response import RuleGetResponse as RuleGetResponse from .group_get_response import GroupGetResponse as GroupGetResponse from .rule_edit_response import RuleEditResponse as RuleEditResponse -from .rule_list_response import RuleListResponse as RuleListResponse from .group_edit_response import GroupEditResponse as GroupEditResponse -from .group_list_response import GroupListResponse as GroupListResponse +from .waf_managed_rules_rule import WAFManagedRulesRule as WAFManagedRulesRule +from .waf_managed_rules_schemas_group import WAFManagedRulesSchemasGroup as WAFManagedRulesSchemasGroup diff --git a/src/cloudflare/types/firewall/waf/packages/rule_list_response.py b/src/cloudflare/types/firewall/waf/packages/waf_managed_rules_rule.py similarity index 98% rename from src/cloudflare/types/firewall/waf/packages/rule_list_response.py rename to src/cloudflare/types/firewall/waf/packages/waf_managed_rules_rule.py index fae43f1a9..6ae072067 100644 --- a/src/cloudflare/types/firewall/waf/packages/rule_list_response.py +++ b/src/cloudflare/types/firewall/waf/packages/waf_managed_rules_rule.py @@ -6,7 +6,7 @@ from typing_extensions import Literal from ....._models import BaseModel __all__ = [ - "RuleListResponse", + "WAFManagedRulesRule", "WAFManagedRulesAnomalyRule", "WAFManagedRulesAnomalyRuleGroup", "WAFManagedRulesTraditionalDenyRule", @@ -124,6 +124,6 @@ class WAFManagedRulesTraditionalAllowRule(BaseModel): """The order in which the individual WAF rule is executed within its rule group.""" -RuleListResponse = Union[ +WAFManagedRulesRule = Union[ WAFManagedRulesAnomalyRule, WAFManagedRulesTraditionalDenyRule, WAFManagedRulesTraditionalAllowRule ] diff --git a/src/cloudflare/types/firewall/waf/packages/group_list_response.py b/src/cloudflare/types/firewall/waf/packages/waf_managed_rules_schemas_group.py similarity index 91% rename from src/cloudflare/types/firewall/waf/packages/group_list_response.py rename to src/cloudflare/types/firewall/waf/packages/waf_managed_rules_schemas_group.py index 726a28e95..3c03a85c0 100644 --- a/src/cloudflare/types/firewall/waf/packages/group_list_response.py +++ b/src/cloudflare/types/firewall/waf/packages/waf_managed_rules_schemas_group.py @@ -5,10 +5,10 @@ from typing_extensions import Literal from ....._models import BaseModel -__all__ = ["GroupListResponse"] +__all__ = ["WAFManagedRulesSchemasGroup"] -class GroupListResponse(BaseModel): +class WAFManagedRulesSchemasGroup(BaseModel): id: str """The unique identifier of the rule group.""" diff --git a/src/cloudflare/types/healthcheck_create_response.py b/src/cloudflare/types/healthcheck_create_response.py deleted file mode 100644 index 893f534a0..000000000 --- a/src/cloudflare/types/healthcheck_create_response.py +++ /dev/null @@ -1,152 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["HealthcheckCreateResponse", "HTTPConfig", "TcpConfig"] - - -class HTTPConfig(BaseModel): - allow_insecure: Optional[bool] = None - """Do not validate the certificate when the health check uses HTTPS.""" - - expected_body: Optional[str] = None - """A case-insensitive sub-string to look for in the response body. - - If this string is not found, the origin will be marked as unhealthy. - """ - - expected_codes: Optional[List[str]] = None - """The expected HTTP response codes (e.g. - - "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health - check. - """ - - follow_redirects: Optional[bool] = None - """Follow redirects if the origin returns a 3xx status code.""" - - header: Optional[object] = None - """The HTTP request headers to send in the health check. - - It is recommended you set a Host header by default. The User-Agent header cannot - be overridden. - """ - - method: Optional[Literal["GET", "HEAD"]] = None - """The HTTP method to use for the health check.""" - - path: Optional[str] = None - """The endpoint path to health check against.""" - - port: Optional[int] = None - """Port number to connect to for the health check. - - Defaults to 80 if type is HTTP or 443 if type is HTTPS. - """ - - -class TcpConfig(BaseModel): - method: Optional[Literal["connection_established"]] = None - """The TCP connection method to use for the health check.""" - - port: Optional[int] = None - """Port number to connect to for the health check. Defaults to 80.""" - - -class HealthcheckCreateResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - address: Optional[str] = None - """The hostname or IP address of the origin server to run health checks on.""" - - check_regions: Optional[ - List[ - Literal[ - "WNAM", - "ENAM", - "WEU", - "EEU", - "NSAM", - "SSAM", - "OC", - "ME", - "NAF", - "SAF", - "IN", - "SEAS", - "NEAS", - "ALL_REGIONS", - ] - ] - ] = None - """A list of regions from which to run health checks. - - Null means Cloudflare will pick a default region. - """ - - consecutive_fails: Optional[int] = None - """ - The number of consecutive fails required from a health check before changing the - health to unhealthy. - """ - - consecutive_successes: Optional[int] = None - """ - The number of consecutive successes required from a health check before changing - the health to healthy. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """A human-readable description of the health check.""" - - failure_reason: Optional[str] = None - """The current failure reason if status is unhealthy.""" - - http_config: Optional[HTTPConfig] = None - """Parameters specific to an HTTP or HTTPS health check.""" - - interval: Optional[int] = None - """The interval between each health check. - - Shorter intervals may give quicker notifications if the origin status changes, - but will increase load on the origin as we check from multiple locations. - """ - - modified_on: Optional[datetime] = None - - name: Optional[str] = None - """A short name to identify the health check. - - Only alphanumeric characters, hyphens and underscores are allowed. - """ - - retries: Optional[int] = None - """ - The number of retries to attempt in case of a timeout before marking the origin - as unhealthy. Retries are attempted immediately. - """ - - status: Optional[Literal["unknown", "healthy", "unhealthy", "suspended"]] = None - """The current status of the origin server according to the health check.""" - - suspended: Optional[bool] = None - """If suspended, no health checks are sent to the origin.""" - - tcp_config: Optional[TcpConfig] = None - """Parameters specific to TCP health check.""" - - timeout: Optional[int] = None - """The timeout (in seconds) before marking the health check as failed.""" - - type: Optional[str] = None - """The protocol to use for the health check. - - Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'. - """ diff --git a/src/cloudflare/types/healthcheck_get_response.py b/src/cloudflare/types/healthcheck_get_response.py deleted file mode 100644 index 8a8e818a8..000000000 --- a/src/cloudflare/types/healthcheck_get_response.py +++ /dev/null @@ -1,152 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["HealthcheckGetResponse", "HTTPConfig", "TcpConfig"] - - -class HTTPConfig(BaseModel): - allow_insecure: Optional[bool] = None - """Do not validate the certificate when the health check uses HTTPS.""" - - expected_body: Optional[str] = None - """A case-insensitive sub-string to look for in the response body. - - If this string is not found, the origin will be marked as unhealthy. - """ - - expected_codes: Optional[List[str]] = None - """The expected HTTP response codes (e.g. - - "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health - check. - """ - - follow_redirects: Optional[bool] = None - """Follow redirects if the origin returns a 3xx status code.""" - - header: Optional[object] = None - """The HTTP request headers to send in the health check. - - It is recommended you set a Host header by default. The User-Agent header cannot - be overridden. - """ - - method: Optional[Literal["GET", "HEAD"]] = None - """The HTTP method to use for the health check.""" - - path: Optional[str] = None - """The endpoint path to health check against.""" - - port: Optional[int] = None - """Port number to connect to for the health check. - - Defaults to 80 if type is HTTP or 443 if type is HTTPS. - """ - - -class TcpConfig(BaseModel): - method: Optional[Literal["connection_established"]] = None - """The TCP connection method to use for the health check.""" - - port: Optional[int] = None - """Port number to connect to for the health check. Defaults to 80.""" - - -class HealthcheckGetResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - address: Optional[str] = None - """The hostname or IP address of the origin server to run health checks on.""" - - check_regions: Optional[ - List[ - Literal[ - "WNAM", - "ENAM", - "WEU", - "EEU", - "NSAM", - "SSAM", - "OC", - "ME", - "NAF", - "SAF", - "IN", - "SEAS", - "NEAS", - "ALL_REGIONS", - ] - ] - ] = None - """A list of regions from which to run health checks. - - Null means Cloudflare will pick a default region. - """ - - consecutive_fails: Optional[int] = None - """ - The number of consecutive fails required from a health check before changing the - health to unhealthy. - """ - - consecutive_successes: Optional[int] = None - """ - The number of consecutive successes required from a health check before changing - the health to healthy. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """A human-readable description of the health check.""" - - failure_reason: Optional[str] = None - """The current failure reason if status is unhealthy.""" - - http_config: Optional[HTTPConfig] = None - """Parameters specific to an HTTP or HTTPS health check.""" - - interval: Optional[int] = None - """The interval between each health check. - - Shorter intervals may give quicker notifications if the origin status changes, - but will increase load on the origin as we check from multiple locations. - """ - - modified_on: Optional[datetime] = None - - name: Optional[str] = None - """A short name to identify the health check. - - Only alphanumeric characters, hyphens and underscores are allowed. - """ - - retries: Optional[int] = None - """ - The number of retries to attempt in case of a timeout before marking the origin - as unhealthy. Retries are attempted immediately. - """ - - status: Optional[Literal["unknown", "healthy", "unhealthy", "suspended"]] = None - """The current status of the origin server according to the health check.""" - - suspended: Optional[bool] = None - """If suspended, no health checks are sent to the origin.""" - - tcp_config: Optional[TcpConfig] = None - """Parameters specific to TCP health check.""" - - timeout: Optional[int] = None - """The timeout (in seconds) before marking the health check as failed.""" - - type: Optional[str] = None - """The protocol to use for the health check. - - Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'. - """ diff --git a/src/cloudflare/types/healthcheck_list_response.py b/src/cloudflare/types/healthcheck_list_response.py index ca57c0a68..39abc8cec 100644 --- a/src/cloudflare/types/healthcheck_list_response.py +++ b/src/cloudflare/types/healthcheck_list_response.py @@ -1,160 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from .._models import BaseModel +from .healthchecks_healthchecks import HealthchecksHealthchecks -__all__ = [ - "HealthcheckListResponse", - "HealthcheckListResponseItem", - "HealthcheckListResponseItemHTTPConfig", - "HealthcheckListResponseItemTcpConfig", -] +__all__ = ["HealthcheckListResponse"] - -class HealthcheckListResponseItemHTTPConfig(BaseModel): - allow_insecure: Optional[bool] = None - """Do not validate the certificate when the health check uses HTTPS.""" - - expected_body: Optional[str] = None - """A case-insensitive sub-string to look for in the response body. - - If this string is not found, the origin will be marked as unhealthy. - """ - - expected_codes: Optional[List[str]] = None - """The expected HTTP response codes (e.g. - - "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health - check. - """ - - follow_redirects: Optional[bool] = None - """Follow redirects if the origin returns a 3xx status code.""" - - header: Optional[object] = None - """The HTTP request headers to send in the health check. - - It is recommended you set a Host header by default. The User-Agent header cannot - be overridden. - """ - - method: Optional[Literal["GET", "HEAD"]] = None - """The HTTP method to use for the health check.""" - - path: Optional[str] = None - """The endpoint path to health check against.""" - - port: Optional[int] = None - """Port number to connect to for the health check. - - Defaults to 80 if type is HTTP or 443 if type is HTTPS. - """ - - -class HealthcheckListResponseItemTcpConfig(BaseModel): - method: Optional[Literal["connection_established"]] = None - """The TCP connection method to use for the health check.""" - - port: Optional[int] = None - """Port number to connect to for the health check. Defaults to 80.""" - - -class HealthcheckListResponseItem(BaseModel): - id: Optional[str] = None - """Identifier""" - - address: Optional[str] = None - """The hostname or IP address of the origin server to run health checks on.""" - - check_regions: Optional[ - List[ - Literal[ - "WNAM", - "ENAM", - "WEU", - "EEU", - "NSAM", - "SSAM", - "OC", - "ME", - "NAF", - "SAF", - "IN", - "SEAS", - "NEAS", - "ALL_REGIONS", - ] - ] - ] = None - """A list of regions from which to run health checks. - - Null means Cloudflare will pick a default region. - """ - - consecutive_fails: Optional[int] = None - """ - The number of consecutive fails required from a health check before changing the - health to unhealthy. - """ - - consecutive_successes: Optional[int] = None - """ - The number of consecutive successes required from a health check before changing - the health to healthy. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """A human-readable description of the health check.""" - - failure_reason: Optional[str] = None - """The current failure reason if status is unhealthy.""" - - http_config: Optional[HealthcheckListResponseItemHTTPConfig] = None - """Parameters specific to an HTTP or HTTPS health check.""" - - interval: Optional[int] = None - """The interval between each health check. - - Shorter intervals may give quicker notifications if the origin status changes, - but will increase load on the origin as we check from multiple locations. - """ - - modified_on: Optional[datetime] = None - - name: Optional[str] = None - """A short name to identify the health check. - - Only alphanumeric characters, hyphens and underscores are allowed. - """ - - retries: Optional[int] = None - """ - The number of retries to attempt in case of a timeout before marking the origin - as unhealthy. Retries are attempted immediately. - """ - - status: Optional[Literal["unknown", "healthy", "unhealthy", "suspended"]] = None - """The current status of the origin server according to the health check.""" - - suspended: Optional[bool] = None - """If suspended, no health checks are sent to the origin.""" - - tcp_config: Optional[HealthcheckListResponseItemTcpConfig] = None - """Parameters specific to TCP health check.""" - - timeout: Optional[int] = None - """The timeout (in seconds) before marking the health check as failed.""" - - type: Optional[str] = None - """The protocol to use for the health check. - - Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'. - """ - - -HealthcheckListResponse = List[HealthcheckListResponseItem] +HealthcheckListResponse = List[HealthchecksHealthchecks] diff --git a/src/cloudflare/types/healthcheck_update_response.py b/src/cloudflare/types/healthcheck_update_response.py deleted file mode 100644 index f606d57d6..000000000 --- a/src/cloudflare/types/healthcheck_update_response.py +++ /dev/null @@ -1,152 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["HealthcheckUpdateResponse", "HTTPConfig", "TcpConfig"] - - -class HTTPConfig(BaseModel): - allow_insecure: Optional[bool] = None - """Do not validate the certificate when the health check uses HTTPS.""" - - expected_body: Optional[str] = None - """A case-insensitive sub-string to look for in the response body. - - If this string is not found, the origin will be marked as unhealthy. - """ - - expected_codes: Optional[List[str]] = None - """The expected HTTP response codes (e.g. - - "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health - check. - """ - - follow_redirects: Optional[bool] = None - """Follow redirects if the origin returns a 3xx status code.""" - - header: Optional[object] = None - """The HTTP request headers to send in the health check. - - It is recommended you set a Host header by default. The User-Agent header cannot - be overridden. - """ - - method: Optional[Literal["GET", "HEAD"]] = None - """The HTTP method to use for the health check.""" - - path: Optional[str] = None - """The endpoint path to health check against.""" - - port: Optional[int] = None - """Port number to connect to for the health check. - - Defaults to 80 if type is HTTP or 443 if type is HTTPS. - """ - - -class TcpConfig(BaseModel): - method: Optional[Literal["connection_established"]] = None - """The TCP connection method to use for the health check.""" - - port: Optional[int] = None - """Port number to connect to for the health check. Defaults to 80.""" - - -class HealthcheckUpdateResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - address: Optional[str] = None - """The hostname or IP address of the origin server to run health checks on.""" - - check_regions: Optional[ - List[ - Literal[ - "WNAM", - "ENAM", - "WEU", - "EEU", - "NSAM", - "SSAM", - "OC", - "ME", - "NAF", - "SAF", - "IN", - "SEAS", - "NEAS", - "ALL_REGIONS", - ] - ] - ] = None - """A list of regions from which to run health checks. - - Null means Cloudflare will pick a default region. - """ - - consecutive_fails: Optional[int] = None - """ - The number of consecutive fails required from a health check before changing the - health to unhealthy. - """ - - consecutive_successes: Optional[int] = None - """ - The number of consecutive successes required from a health check before changing - the health to healthy. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """A human-readable description of the health check.""" - - failure_reason: Optional[str] = None - """The current failure reason if status is unhealthy.""" - - http_config: Optional[HTTPConfig] = None - """Parameters specific to an HTTP or HTTPS health check.""" - - interval: Optional[int] = None - """The interval between each health check. - - Shorter intervals may give quicker notifications if the origin status changes, - but will increase load on the origin as we check from multiple locations. - """ - - modified_on: Optional[datetime] = None - - name: Optional[str] = None - """A short name to identify the health check. - - Only alphanumeric characters, hyphens and underscores are allowed. - """ - - retries: Optional[int] = None - """ - The number of retries to attempt in case of a timeout before marking the origin - as unhealthy. Retries are attempted immediately. - """ - - status: Optional[Literal["unknown", "healthy", "unhealthy", "suspended"]] = None - """The current status of the origin server according to the health check.""" - - suspended: Optional[bool] = None - """If suspended, no health checks are sent to the origin.""" - - tcp_config: Optional[TcpConfig] = None - """Parameters specific to TCP health check.""" - - timeout: Optional[int] = None - """The timeout (in seconds) before marking the health check as failed.""" - - type: Optional[str] = None - """The protocol to use for the health check. - - Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'. - """ diff --git a/src/cloudflare/types/healthchecks/__init__.py b/src/cloudflare/types/healthchecks/__init__.py index 3865bf6c4..c69f9bb22 100644 --- a/src/cloudflare/types/healthchecks/__init__.py +++ b/src/cloudflare/types/healthchecks/__init__.py @@ -2,7 +2,5 @@ from __future__ import annotations -from .preview_get_response import PreviewGetResponse as PreviewGetResponse from .preview_create_params import PreviewCreateParams as PreviewCreateParams -from .preview_create_response import PreviewCreateResponse as PreviewCreateResponse from .preview_delete_response import PreviewDeleteResponse as PreviewDeleteResponse diff --git a/src/cloudflare/types/healthchecks/preview_create_response.py b/src/cloudflare/types/healthchecks/preview_create_response.py deleted file mode 100644 index fd1aa4d80..000000000 --- a/src/cloudflare/types/healthchecks/preview_create_response.py +++ /dev/null @@ -1,152 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["PreviewCreateResponse", "HTTPConfig", "TcpConfig"] - - -class HTTPConfig(BaseModel): - allow_insecure: Optional[bool] = None - """Do not validate the certificate when the health check uses HTTPS.""" - - expected_body: Optional[str] = None - """A case-insensitive sub-string to look for in the response body. - - If this string is not found, the origin will be marked as unhealthy. - """ - - expected_codes: Optional[List[str]] = None - """The expected HTTP response codes (e.g. - - "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health - check. - """ - - follow_redirects: Optional[bool] = None - """Follow redirects if the origin returns a 3xx status code.""" - - header: Optional[object] = None - """The HTTP request headers to send in the health check. - - It is recommended you set a Host header by default. The User-Agent header cannot - be overridden. - """ - - method: Optional[Literal["GET", "HEAD"]] = None - """The HTTP method to use for the health check.""" - - path: Optional[str] = None - """The endpoint path to health check against.""" - - port: Optional[int] = None - """Port number to connect to for the health check. - - Defaults to 80 if type is HTTP or 443 if type is HTTPS. - """ - - -class TcpConfig(BaseModel): - method: Optional[Literal["connection_established"]] = None - """The TCP connection method to use for the health check.""" - - port: Optional[int] = None - """Port number to connect to for the health check. Defaults to 80.""" - - -class PreviewCreateResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - address: Optional[str] = None - """The hostname or IP address of the origin server to run health checks on.""" - - check_regions: Optional[ - List[ - Literal[ - "WNAM", - "ENAM", - "WEU", - "EEU", - "NSAM", - "SSAM", - "OC", - "ME", - "NAF", - "SAF", - "IN", - "SEAS", - "NEAS", - "ALL_REGIONS", - ] - ] - ] = None - """A list of regions from which to run health checks. - - Null means Cloudflare will pick a default region. - """ - - consecutive_fails: Optional[int] = None - """ - The number of consecutive fails required from a health check before changing the - health to unhealthy. - """ - - consecutive_successes: Optional[int] = None - """ - The number of consecutive successes required from a health check before changing - the health to healthy. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """A human-readable description of the health check.""" - - failure_reason: Optional[str] = None - """The current failure reason if status is unhealthy.""" - - http_config: Optional[HTTPConfig] = None - """Parameters specific to an HTTP or HTTPS health check.""" - - interval: Optional[int] = None - """The interval between each health check. - - Shorter intervals may give quicker notifications if the origin status changes, - but will increase load on the origin as we check from multiple locations. - """ - - modified_on: Optional[datetime] = None - - name: Optional[str] = None - """A short name to identify the health check. - - Only alphanumeric characters, hyphens and underscores are allowed. - """ - - retries: Optional[int] = None - """ - The number of retries to attempt in case of a timeout before marking the origin - as unhealthy. Retries are attempted immediately. - """ - - status: Optional[Literal["unknown", "healthy", "unhealthy", "suspended"]] = None - """The current status of the origin server according to the health check.""" - - suspended: Optional[bool] = None - """If suspended, no health checks are sent to the origin.""" - - tcp_config: Optional[TcpConfig] = None - """Parameters specific to TCP health check.""" - - timeout: Optional[int] = None - """The timeout (in seconds) before marking the health check as failed.""" - - type: Optional[str] = None - """The protocol to use for the health check. - - Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'. - """ diff --git a/src/cloudflare/types/healthchecks/preview_get_response.py b/src/cloudflare/types/healthchecks/preview_get_response.py deleted file mode 100644 index 0c2462a34..000000000 --- a/src/cloudflare/types/healthchecks/preview_get_response.py +++ /dev/null @@ -1,152 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["PreviewGetResponse", "HTTPConfig", "TcpConfig"] - - -class HTTPConfig(BaseModel): - allow_insecure: Optional[bool] = None - """Do not validate the certificate when the health check uses HTTPS.""" - - expected_body: Optional[str] = None - """A case-insensitive sub-string to look for in the response body. - - If this string is not found, the origin will be marked as unhealthy. - """ - - expected_codes: Optional[List[str]] = None - """The expected HTTP response codes (e.g. - - "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health - check. - """ - - follow_redirects: Optional[bool] = None - """Follow redirects if the origin returns a 3xx status code.""" - - header: Optional[object] = None - """The HTTP request headers to send in the health check. - - It is recommended you set a Host header by default. The User-Agent header cannot - be overridden. - """ - - method: Optional[Literal["GET", "HEAD"]] = None - """The HTTP method to use for the health check.""" - - path: Optional[str] = None - """The endpoint path to health check against.""" - - port: Optional[int] = None - """Port number to connect to for the health check. - - Defaults to 80 if type is HTTP or 443 if type is HTTPS. - """ - - -class TcpConfig(BaseModel): - method: Optional[Literal["connection_established"]] = None - """The TCP connection method to use for the health check.""" - - port: Optional[int] = None - """Port number to connect to for the health check. Defaults to 80.""" - - -class PreviewGetResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - address: Optional[str] = None - """The hostname or IP address of the origin server to run health checks on.""" - - check_regions: Optional[ - List[ - Literal[ - "WNAM", - "ENAM", - "WEU", - "EEU", - "NSAM", - "SSAM", - "OC", - "ME", - "NAF", - "SAF", - "IN", - "SEAS", - "NEAS", - "ALL_REGIONS", - ] - ] - ] = None - """A list of regions from which to run health checks. - - Null means Cloudflare will pick a default region. - """ - - consecutive_fails: Optional[int] = None - """ - The number of consecutive fails required from a health check before changing the - health to unhealthy. - """ - - consecutive_successes: Optional[int] = None - """ - The number of consecutive successes required from a health check before changing - the health to healthy. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """A human-readable description of the health check.""" - - failure_reason: Optional[str] = None - """The current failure reason if status is unhealthy.""" - - http_config: Optional[HTTPConfig] = None - """Parameters specific to an HTTP or HTTPS health check.""" - - interval: Optional[int] = None - """The interval between each health check. - - Shorter intervals may give quicker notifications if the origin status changes, - but will increase load on the origin as we check from multiple locations. - """ - - modified_on: Optional[datetime] = None - - name: Optional[str] = None - """A short name to identify the health check. - - Only alphanumeric characters, hyphens and underscores are allowed. - """ - - retries: Optional[int] = None - """ - The number of retries to attempt in case of a timeout before marking the origin - as unhealthy. Retries are attempted immediately. - """ - - status: Optional[Literal["unknown", "healthy", "unhealthy", "suspended"]] = None - """The current status of the origin server according to the health check.""" - - suspended: Optional[bool] = None - """If suspended, no health checks are sent to the origin.""" - - tcp_config: Optional[TcpConfig] = None - """Parameters specific to TCP health check.""" - - timeout: Optional[int] = None - """The timeout (in seconds) before marking the health check as failed.""" - - type: Optional[str] = None - """The protocol to use for the health check. - - Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'. - """ diff --git a/src/cloudflare/types/healthcheck_edit_response.py b/src/cloudflare/types/healthchecks_healthchecks.py similarity index 97% rename from src/cloudflare/types/healthcheck_edit_response.py rename to src/cloudflare/types/healthchecks_healthchecks.py index c30edd9e7..908d214a9 100644 --- a/src/cloudflare/types/healthcheck_edit_response.py +++ b/src/cloudflare/types/healthchecks_healthchecks.py @@ -6,7 +6,7 @@ from typing_extensions import Literal from .._models import BaseModel -__all__ = ["HealthcheckEditResponse", "HTTPConfig", "TcpConfig"] +__all__ = ["HealthchecksHealthchecks", "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 HealthcheckEditResponse(BaseModel): +class HealthchecksHealthchecks(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/hostnames/settings/__init__.py b/src/cloudflare/types/hostnames/settings/__init__.py index ce4b4ba1b..c16544829 100644 --- a/src/cloudflare/types/hostnames/settings/__init__.py +++ b/src/cloudflare/types/hostnames/settings/__init__.py @@ -4,5 +4,9 @@ from __future__ import annotations from .tls_get_response import TLSGetResponse as TLSGetResponse from .tls_update_params import TLSUpdateParams as TLSUpdateParams -from .tls_delete_response import TLSDeleteResponse as TLSDeleteResponse -from .tls_update_response import TLSUpdateResponse as TLSUpdateResponse +from .tls_certificates_and_hostnames_setting_object import ( + TLSCertificatesAndHostnamesSettingObject as TLSCertificatesAndHostnamesSettingObject, +) +from .tls_certificates_and_hostnames_setting_object_delete import ( + TLSCertificatesAndHostnamesSettingObjectDelete as TLSCertificatesAndHostnamesSettingObjectDelete, +) diff --git a/src/cloudflare/types/hostnames/settings/tls_update_response.py b/src/cloudflare/types/hostnames/settings/tls_certificates_and_hostnames_setting_object.py similarity index 85% rename from src/cloudflare/types/hostnames/settings/tls_update_response.py rename to src/cloudflare/types/hostnames/settings/tls_certificates_and_hostnames_setting_object.py index 93a9f3630..b519ad1a2 100644 --- a/src/cloudflare/types/hostnames/settings/tls_update_response.py +++ b/src/cloudflare/types/hostnames/settings/tls_certificates_and_hostnames_setting_object.py @@ -5,10 +5,10 @@ from datetime import datetime from ...._models import BaseModel -__all__ = ["TLSUpdateResponse"] +__all__ = ["TLSCertificatesAndHostnamesSettingObject"] -class TLSUpdateResponse(BaseModel): +class TLSCertificatesAndHostnamesSettingObject(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_delete_response.py b/src/cloudflare/types/hostnames/settings/tls_certificates_and_hostnames_setting_object_delete.py similarity index 81% rename from src/cloudflare/types/hostnames/settings/tls_delete_response.py rename to src/cloudflare/types/hostnames/settings/tls_certificates_and_hostnames_setting_object_delete.py index 82a5e9904..8ae710a3b 100644 --- a/src/cloudflare/types/hostnames/settings/tls_delete_response.py +++ b/src/cloudflare/types/hostnames/settings/tls_certificates_and_hostnames_setting_object_delete.py @@ -5,10 +5,10 @@ from datetime import datetime from ...._models import BaseModel -__all__ = ["TLSDeleteResponse"] +__all__ = ["TLSCertificatesAndHostnamesSettingObjectDelete"] -class TLSDeleteResponse(BaseModel): +class TLSCertificatesAndHostnamesSettingObjectDelete(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/images/__init__.py b/src/cloudflare/types/images/__init__.py index 26070bbc1..05ab975e6 100644 --- a/src/cloudflare/types/images/__init__.py +++ b/src/cloudflare/types/images/__init__.py @@ -2,13 +2,11 @@ from __future__ import annotations +from .images_image import ImagesImage as ImagesImage from .v1_edit_params import V1EditParams as V1EditParams from .v1_list_params import V1ListParams as V1ListParams from .v2_list_params import V2ListParams as V2ListParams -from .v1_get_response import V1GetResponse as V1GetResponse from .v1_create_params import V1CreateParams as V1CreateParams -from .v1_edit_response import V1EditResponse as V1EditResponse from .v1_list_response import V1ListResponse as V1ListResponse from .v2_list_response import V2ListResponse as V2ListResponse -from .v1_create_response import V1CreateResponse as V1CreateResponse from .v1_delete_response import V1DeleteResponse as V1DeleteResponse diff --git a/src/cloudflare/types/images/v1_get_response.py b/src/cloudflare/types/images/images_image.py similarity index 94% rename from src/cloudflare/types/images/v1_get_response.py rename to src/cloudflare/types/images/images_image.py index 9c3b95fa5..fc675b88e 100644 --- a/src/cloudflare/types/images/v1_get_response.py +++ b/src/cloudflare/types/images/images_image.py @@ -7,10 +7,10 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel -__all__ = ["V1GetResponse"] +__all__ = ["ImagesImage"] -class V1GetResponse(BaseModel): +class ImagesImage(BaseModel): id: Optional[str] = None """Image unique identifier.""" diff --git a/src/cloudflare/types/images/v1/__init__.py b/src/cloudflare/types/images/v1/__init__.py index 93b619e8d..21ca7cc87 100644 --- a/src/cloudflare/types/images/v1/__init__.py +++ b/src/cloudflare/types/images/v1/__init__.py @@ -2,12 +2,10 @@ from __future__ import annotations -from .key_list_response import KeyListResponse as KeyListResponse -from .stat_get_response import StatGetResponse as StatGetResponse +from .image_variant import ImageVariant as ImageVariant +from .image_variants import ImageVariants as ImageVariants +from .images_image_keys import ImagesImageKeys as ImagesImageKeys +from .images_images_stats import ImagesImagesStats as ImagesImagesStats from .variant_edit_params import VariantEditParams as VariantEditParams -from .variant_get_response import VariantGetResponse as VariantGetResponse from .variant_create_params import VariantCreateParams as VariantCreateParams -from .variant_edit_response import VariantEditResponse as VariantEditResponse -from .variant_list_response import VariantListResponse as VariantListResponse -from .variant_create_response import VariantCreateResponse as VariantCreateResponse from .variant_delete_response import VariantDeleteResponse as VariantDeleteResponse diff --git a/src/cloudflare/types/images/v1/variant_get_response.py b/src/cloudflare/types/images/v1/image_variant.py similarity index 91% rename from src/cloudflare/types/images/v1/variant_get_response.py rename to src/cloudflare/types/images/v1/image_variant.py index f502a8459..2413cb8fd 100644 --- a/src/cloudflare/types/images/v1/variant_get_response.py +++ b/src/cloudflare/types/images/v1/image_variant.py @@ -7,7 +7,7 @@ from pydantic import Field as FieldInfo from ...._models import BaseModel -__all__ = ["VariantGetResponse", "Variant", "VariantOptions"] +__all__ = ["ImageVariant", "Variant", "VariantOptions"] class VariantOptions(BaseModel): @@ -40,5 +40,5 @@ class Variant(BaseModel): """ -class VariantGetResponse(BaseModel): +class ImageVariant(BaseModel): variant: Optional[Variant] = None diff --git a/src/cloudflare/types/images/v1/variant_list_response.py b/src/cloudflare/types/images/v1/image_variants.py similarity index 90% rename from src/cloudflare/types/images/v1/variant_list_response.py rename to src/cloudflare/types/images/v1/image_variants.py index 03da05415..816cf69fd 100644 --- a/src/cloudflare/types/images/v1/variant_list_response.py +++ b/src/cloudflare/types/images/v1/image_variants.py @@ -7,7 +7,7 @@ from pydantic import Field as FieldInfo from ...._models import BaseModel -__all__ = ["VariantListResponse", "Variants", "VariantsHero", "VariantsHeroOptions"] +__all__ = ["ImageVariants", "Variants", "VariantsHero", "VariantsHeroOptions"] class VariantsHeroOptions(BaseModel): @@ -44,5 +44,5 @@ class Variants(BaseModel): hero: Optional[VariantsHero] = None -class VariantListResponse(BaseModel): +class ImageVariants(BaseModel): variants: Optional[Variants] = None diff --git a/src/cloudflare/types/images/v1/key_list_response.py b/src/cloudflare/types/images/v1/images_image_keys.py similarity index 80% rename from src/cloudflare/types/images/v1/key_list_response.py rename to src/cloudflare/types/images/v1/images_image_keys.py index 5798fedbd..9395134a6 100644 --- a/src/cloudflare/types/images/v1/key_list_response.py +++ b/src/cloudflare/types/images/v1/images_image_keys.py @@ -4,7 +4,7 @@ from typing import List, Optional from ...._models import BaseModel -__all__ = ["KeyListResponse", "Key"] +__all__ = ["ImagesImageKeys", "Key"] class Key(BaseModel): @@ -15,5 +15,5 @@ class Key(BaseModel): """Key value.""" -class KeyListResponse(BaseModel): +class ImagesImageKeys(BaseModel): keys: Optional[List[Key]] = None diff --git a/src/cloudflare/types/images/v1/stat_get_response.py b/src/cloudflare/types/images/v1/images_images_stats.py similarity index 81% rename from src/cloudflare/types/images/v1/stat_get_response.py rename to src/cloudflare/types/images/v1/images_images_stats.py index ca465058e..d67b88440 100644 --- a/src/cloudflare/types/images/v1/stat_get_response.py +++ b/src/cloudflare/types/images/v1/images_images_stats.py @@ -4,7 +4,7 @@ from typing import Optional from ...._models import BaseModel -__all__ = ["StatGetResponse", "Count"] +__all__ = ["ImagesImagesStats", "Count"] class Count(BaseModel): @@ -15,5 +15,5 @@ class Count(BaseModel): """Cloudflare Images current usage.""" -class StatGetResponse(BaseModel): +class ImagesImagesStats(BaseModel): count: Optional[Count] = None diff --git a/src/cloudflare/types/images/v1/variant_create_response.py b/src/cloudflare/types/images/v1/variant_create_response.py deleted file mode 100644 index 7ab9aca12..000000000 --- a/src/cloudflare/types/images/v1/variant_create_response.py +++ /dev/null @@ -1,44 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ...._models import BaseModel - -__all__ = ["VariantCreateResponse", "Variant", "VariantOptions"] - - -class VariantOptions(BaseModel): - fit: Literal["scale-down", "contain", "cover", "crop", "pad"] - """ - The fit property describes how the width and height dimensions should be - interpreted. - """ - - height: float - """Maximum height in image pixels.""" - - metadata: Literal["keep", "copyright", "none"] - """What EXIF data should be preserved in the output image.""" - - width: float - """Maximum width in image pixels.""" - - -class Variant(BaseModel): - id: object - - options: VariantOptions - """Allows you to define image resizing sizes for different use cases.""" - - never_require_signed_urls: Optional[bool] = FieldInfo(alias="neverRequireSignedURLs", default=None) - """ - Indicates whether the variant can access an image without a signature, - regardless of image access control. - """ - - -class VariantCreateResponse(BaseModel): - variant: Optional[Variant] = None diff --git a/src/cloudflare/types/images/v1/variant_edit_response.py b/src/cloudflare/types/images/v1/variant_edit_response.py deleted file mode 100644 index 544f50ce1..000000000 --- a/src/cloudflare/types/images/v1/variant_edit_response.py +++ /dev/null @@ -1,44 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ...._models import BaseModel - -__all__ = ["VariantEditResponse", "Variant", "VariantOptions"] - - -class VariantOptions(BaseModel): - fit: Literal["scale-down", "contain", "cover", "crop", "pad"] - """ - The fit property describes how the width and height dimensions should be - interpreted. - """ - - height: float - """Maximum height in image pixels.""" - - metadata: Literal["keep", "copyright", "none"] - """What EXIF data should be preserved in the output image.""" - - width: float - """Maximum width in image pixels.""" - - -class Variant(BaseModel): - id: object - - options: VariantOptions - """Allows you to define image resizing sizes for different use cases.""" - - never_require_signed_urls: Optional[bool] = FieldInfo(alias="neverRequireSignedURLs", default=None) - """ - Indicates whether the variant can access an image without a signature, - regardless of image access control. - """ - - -class VariantEditResponse(BaseModel): - variant: Optional[Variant] = None diff --git a/src/cloudflare/types/images/v1_create_response.py b/src/cloudflare/types/images/v1_create_response.py deleted file mode 100644 index 7646d8119..000000000 --- a/src/cloudflare/types/images/v1_create_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from datetime import datetime - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = ["V1CreateResponse"] - - -class V1CreateResponse(BaseModel): - id: Optional[str] = None - """Image unique identifier.""" - - filename: Optional[str] = None - """Image file name.""" - - meta: Optional[object] = None - """User modifiable key-value store. - - Can be used for keeping references to another system of record for managing - images. Metadata must not exceed 1024 bytes. - """ - - require_signed_urls: Optional[bool] = FieldInfo(alias="requireSignedURLs", default=None) - """Indicates whether the image can be a accessed only using it's UID. - - If set to true, a signed token needs to be generated with a signing key to view - the image. - """ - - uploaded: Optional[datetime] = None - """When the media item was uploaded.""" - - variants: Optional[List[Union[str, str, str]]] = None - """Object specifying available variants for an image.""" diff --git a/src/cloudflare/types/images/v1_edit_response.py b/src/cloudflare/types/images/v1_edit_response.py deleted file mode 100644 index 90eda6cad..000000000 --- a/src/cloudflare/types/images/v1_edit_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from datetime import datetime - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = ["V1EditResponse"] - - -class V1EditResponse(BaseModel): - id: Optional[str] = None - """Image unique identifier.""" - - filename: Optional[str] = None - """Image file name.""" - - meta: Optional[object] = None - """User modifiable key-value store. - - Can be used for keeping references to another system of record for managing - images. Metadata must not exceed 1024 bytes. - """ - - require_signed_urls: Optional[bool] = FieldInfo(alias="requireSignedURLs", default=None) - """Indicates whether the image can be a accessed only using it's UID. - - If set to true, a signed token needs to be generated with a signing key to view - the image. - """ - - uploaded: Optional[datetime] = None - """When the media item was uploaded.""" - - variants: Optional[List[Union[str, str, str]]] = None - """Object specifying available variants for an image.""" diff --git a/src/cloudflare/types/images/v1_list_response.py b/src/cloudflare/types/images/v1_list_response.py index 3f0ac6cc5..f3c399b16 100644 --- a/src/cloudflare/types/images/v1_list_response.py +++ b/src/cloudflare/types/images/v1_list_response.py @@ -1,14 +1,12 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Union, Optional -from datetime import datetime +from typing import List, Optional from typing_extensions import Literal -from pydantic import Field as FieldInfo - from ..._models import BaseModel +from .images_image import ImagesImage -__all__ = ["V1ListResponse", "Error", "Message", "Result", "ResultImage"] +__all__ = ["V1ListResponse", "Error", "Message", "Result"] class Error(BaseModel): @@ -23,36 +21,8 @@ class Message(BaseModel): message: str -class ResultImage(BaseModel): - id: Optional[str] = None - """Image unique identifier.""" - - filename: Optional[str] = None - """Image file name.""" - - meta: Optional[object] = None - """User modifiable key-value store. - - Can be used for keeping references to another system of record for managing - images. Metadata must not exceed 1024 bytes. - """ - - require_signed_urls: Optional[bool] = FieldInfo(alias="requireSignedURLs", default=None) - """Indicates whether the image can be a accessed only using it's UID. - - If set to true, a signed token needs to be generated with a signing key to view - the image. - """ - - uploaded: Optional[datetime] = None - """When the media item was uploaded.""" - - variants: Optional[List[Union[str, str, str]]] = None - """Object specifying available variants for an image.""" - - class Result(BaseModel): - images: Optional[List[ResultImage]] = None + images: Optional[List[ImagesImage]] = 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 b32089728..400ccba45 100644 --- a/src/cloudflare/types/images/v2_list_response.py +++ b/src/cloudflare/types/images/v2_list_response.py @@ -1,41 +1,11 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Union, Optional -from datetime import datetime - -from pydantic import Field as FieldInfo +from typing import List, Optional from ..._models import BaseModel +from .images_image import ImagesImage -__all__ = ["V2ListResponse", "Image"] - - -class Image(BaseModel): - id: Optional[str] = None - """Image unique identifier.""" - - filename: Optional[str] = None - """Image file name.""" - - meta: Optional[object] = None - """User modifiable key-value store. - - Can be used for keeping references to another system of record for managing - images. Metadata must not exceed 1024 bytes. - """ - - require_signed_urls: Optional[bool] = FieldInfo(alias="requireSignedURLs", default=None) - """Indicates whether the image can be a accessed only using it's UID. - - If set to true, a signed token needs to be generated with a signing key to view - the image. - """ - - uploaded: Optional[datetime] = None - """When the media item was uploaded.""" - - variants: Optional[List[Union[str, str, str]]] = None - """Object specifying available variants for an image.""" +__all__ = ["V2ListResponse"] class V2ListResponse(BaseModel): @@ -45,4 +15,4 @@ class V2ListResponse(BaseModel): Passed as a query param when requesting List V2 api endpoint. """ - images: Optional[List[Image]] = None + images: Optional[List[ImagesImage]] = None diff --git a/src/cloudflare/types/intel/__init__.py b/src/cloudflare/types/intel/__init__.py index 6e2650354..7dfc2e38c 100644 --- a/src/cloudflare/types/intel/__init__.py +++ b/src/cloudflare/types/intel/__init__.py @@ -2,25 +2,29 @@ from __future__ import annotations +from .intel_asn import IntelASN as IntelASN +from .intel_whois import IntelWhois as IntelWhois +from .intel_domain import IntelDomain as IntelDomain +from .intel_ip_list import IntelIPList as IntelIPList from .ip_get_params import IPGetParams as IPGetParams from .dns_get_params import DNSGetParams as DNSGetParams from .ip_get_response import IPGetResponse as IPGetResponse -from .asn_get_response import ASNGetResponse as ASNGetResponse -from .dns_get_response import DNSGetResponse as DNSGetResponse +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 .whois_get_response import WhoisGetResponse as WhoisGetResponse -from .domain_get_response import DomainGetResponse as DomainGetResponse +from .intel_update_feed import IntelUpdateFeed as IntelUpdateFeed +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 .intel_indicator_feed_item import IntelIndicatorFeedItem as IntelIndicatorFeedItem from .domain_history_get_response import DomainHistoryGetResponse as DomainHistoryGetResponse -from .indicator_feed_get_response import IndicatorFeedGetResponse as IndicatorFeedGetResponse from .indicator_feed_create_params import IndicatorFeedCreateParams as IndicatorFeedCreateParams 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 .indicator_feed_create_response import IndicatorFeedCreateResponse as IndicatorFeedCreateResponse -from .indicator_feed_update_response import IndicatorFeedUpdateResponse as IndicatorFeedUpdateResponse +from .intel_indicator_feed_metadata import IntelIndicatorFeedMetadata as IntelIndicatorFeedMetadata +from .intel_sinkholes_sinkhole_item import IntelSinkholesSinkholeItem as IntelSinkholesSinkholeItem from .miscategorization_create_params import MiscategorizationCreateParams as MiscategorizationCreateParams from .miscategorization_create_response import MiscategorizationCreateResponse as MiscategorizationCreateResponse diff --git a/src/cloudflare/types/intel/asn/subnet_get_response.py b/src/cloudflare/types/intel/asn/subnet_get_response.py index 9f0ac4f1e..5b63a6526 100644 --- a/src/cloudflare/types/intel/asn/subnet_get_response.py +++ b/src/cloudflare/types/intel/asn/subnet_get_response.py @@ -3,12 +3,13 @@ from typing import List, Optional from ...._models import BaseModel +from ..intel_asn import IntelASN __all__ = ["SubnetGetResponse"] class SubnetGetResponse(BaseModel): - asn: Optional[int] = None + asn: Optional[IntelASN] = None count: Optional[float] = None """Total results returned based on your search parameters.""" diff --git a/src/cloudflare/types/intel/domain_history_get_response.py b/src/cloudflare/types/intel/domain_history_get_response.py index 24b372eb5..8bef27b44 100644 --- a/src/cloudflare/types/intel/domain_history_get_response.py +++ b/src/cloudflare/types/intel/domain_history_get_response.py @@ -1,25 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import date +from typing import List -from ..._models import BaseModel +from .intel_domain_history import IntelDomainHistory -__all__ = ["DomainHistoryGetResponse", "DomainHistoryGetResponseItem", "DomainHistoryGetResponseItemCategorization"] +__all__ = ["DomainHistoryGetResponse"] - -class DomainHistoryGetResponseItemCategorization(BaseModel): - categories: Optional[object] = None - - end: Optional[date] = None - - start: Optional[date] = None - - -class DomainHistoryGetResponseItem(BaseModel): - categorizations: Optional[List[DomainHistoryGetResponseItemCategorization]] = None - - domain: Optional[str] = None - - -DomainHistoryGetResponse = List[DomainHistoryGetResponseItem] +DomainHistoryGetResponse = List[IntelDomainHistory] diff --git a/src/cloudflare/types/intel/indicator_feed_list_response.py b/src/cloudflare/types/intel/indicator_feed_list_response.py index e6409722a..77bcc42fe 100644 --- a/src/cloudflare/types/intel/indicator_feed_list_response.py +++ b/src/cloudflare/types/intel/indicator_feed_list_response.py @@ -1,28 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ..._models import BaseModel +from .intel_indicator_feed_item import IntelIndicatorFeedItem -__all__ = ["IndicatorFeedListResponse", "IndicatorFeedListResponseItem"] +__all__ = ["IndicatorFeedListResponse"] - -class IndicatorFeedListResponseItem(BaseModel): - id: Optional[int] = None - """The unique identifier for the indicator feed""" - - created_on: Optional[datetime] = None - """The date and time when the data entry was created""" - - description: Optional[str] = None - """The description of the example test""" - - modified_on: Optional[datetime] = None - """The date and time when the data entry was last modified""" - - name: Optional[str] = None - """The name of the indicator feed""" - - -IndicatorFeedListResponse = List[IndicatorFeedListResponseItem] +IndicatorFeedListResponse = List[IntelIndicatorFeedItem] diff --git a/src/cloudflare/types/intel/indicator_feeds/__init__.py b/src/cloudflare/types/intel/indicator_feeds/__init__.py index b2fcff7a7..eb845fab2 100644 --- a/src/cloudflare/types/intel/indicator_feeds/__init__.py +++ b/src/cloudflare/types/intel/indicator_feeds/__init__.py @@ -2,8 +2,8 @@ from __future__ import annotations +from .intel_permissions_update import IntelPermissionsUpdate as IntelPermissionsUpdate from .permission_create_params import PermissionCreateParams as PermissionCreateParams from .permission_delete_params import PermissionDeleteParams as PermissionDeleteParams from .permission_list_response import PermissionListResponse as PermissionListResponse -from .permission_create_response import PermissionCreateResponse as PermissionCreateResponse -from .permission_delete_response import PermissionDeleteResponse as PermissionDeleteResponse +from .intel_permission_list_item import IntelPermissionListItem as IntelPermissionListItem diff --git a/src/cloudflare/types/intel/indicator_feeds/intel_permission_list_item.py b/src/cloudflare/types/intel/indicator_feeds/intel_permission_list_item.py new file mode 100644 index 000000000..4e4aadcd3 --- /dev/null +++ b/src/cloudflare/types/intel/indicator_feeds/intel_permission_list_item.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional + +from ...._models import BaseModel + +__all__ = ["IntelPermissionListItem"] + + +class IntelPermissionListItem(BaseModel): + id: Optional[int] = None + """The unique identifier for the indicator feed""" + + description: Optional[str] = None + """The description of the example test""" + + name: Optional[str] = None + """The name of the indicator feed""" diff --git a/src/cloudflare/types/intel/indicator_feeds/permission_delete_response.py b/src/cloudflare/types/intel/indicator_feeds/intel_permissions_update.py similarity index 71% rename from src/cloudflare/types/intel/indicator_feeds/permission_delete_response.py rename to src/cloudflare/types/intel/indicator_feeds/intel_permissions_update.py index 76f5f37fa..f53c046dd 100644 --- a/src/cloudflare/types/intel/indicator_feeds/permission_delete_response.py +++ b/src/cloudflare/types/intel/indicator_feeds/intel_permissions_update.py @@ -4,9 +4,9 @@ from typing import Optional from ...._models import BaseModel -__all__ = ["PermissionDeleteResponse"] +__all__ = ["IntelPermissionsUpdate"] -class PermissionDeleteResponse(BaseModel): +class IntelPermissionsUpdate(BaseModel): success: Optional[bool] = None """Whether the update succeeded or not""" diff --git a/src/cloudflare/types/intel/indicator_feeds/permission_create_response.py b/src/cloudflare/types/intel/indicator_feeds/permission_create_response.py deleted file mode 100644 index d78e47078..000000000 --- a/src/cloudflare/types/intel/indicator_feeds/permission_create_response.py +++ /dev/null @@ -1,12 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional - -from ...._models import BaseModel - -__all__ = ["PermissionCreateResponse"] - - -class PermissionCreateResponse(BaseModel): - success: Optional[bool] = None - """Whether the update succeeded or not""" diff --git a/src/cloudflare/types/intel/indicator_feeds/permission_list_response.py b/src/cloudflare/types/intel/indicator_feeds/permission_list_response.py index b57eaf3f2..f5eee21b5 100644 --- a/src/cloudflare/types/intel/indicator_feeds/permission_list_response.py +++ b/src/cloudflare/types/intel/indicator_feeds/permission_list_response.py @@ -1,21 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ...._models import BaseModel +from .intel_permission_list_item import IntelPermissionListItem -__all__ = ["PermissionListResponse", "PermissionListResponseItem"] +__all__ = ["PermissionListResponse"] - -class PermissionListResponseItem(BaseModel): - id: Optional[int] = None - """The unique identifier for the indicator feed""" - - description: Optional[str] = None - """The description of the example test""" - - name: Optional[str] = None - """The name of the indicator feed""" - - -PermissionListResponse = List[PermissionListResponseItem] +PermissionListResponse = List[IntelPermissionListItem] diff --git a/src/cloudflare/types/intel/asn_get_response.py b/src/cloudflare/types/intel/intel_asn.py similarity index 52% rename from src/cloudflare/types/intel/asn_get_response.py rename to src/cloudflare/types/intel/intel_asn.py index ee5bddf5a..715f80598 100644 --- a/src/cloudflare/types/intel/asn_get_response.py +++ b/src/cloudflare/types/intel/intel_asn.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. -__all__ = ["ASNGetResponse"] +__all__ = ["IntelASN"] -ASNGetResponse = int +IntelASN = int diff --git a/src/cloudflare/types/intel/domain_get_response.py b/src/cloudflare/types/intel/intel_domain.py similarity index 97% rename from src/cloudflare/types/intel/domain_get_response.py rename to src/cloudflare/types/intel/intel_domain.py index 37802f6ae..323b568f3 100644 --- a/src/cloudflare/types/intel/domain_get_response.py +++ b/src/cloudflare/types/intel/intel_domain.py @@ -5,7 +5,7 @@ from typing import List, Optional from ..._models import BaseModel __all__ = [ - "DomainGetResponse", + "IntelDomain", "AdditionalInformation", "Application", "InheritedContentCategory", @@ -52,7 +52,7 @@ class ResolvesToRef(BaseModel): """IP address or domain name.""" -class DomainGetResponse(BaseModel): +class IntelDomain(BaseModel): additional_information: Optional[AdditionalInformation] = None """Additional information related to the host name.""" diff --git a/src/cloudflare/types/intel/intel_domain_history.py b/src/cloudflare/types/intel/intel_domain_history.py new file mode 100644 index 000000000..0d0e13097 --- /dev/null +++ b/src/cloudflare/types/intel/intel_domain_history.py @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import List, Optional +from datetime import date + +from ..._models import BaseModel + +__all__ = ["IntelDomainHistory", "Categorization"] + + +class Categorization(BaseModel): + categories: Optional[object] = None + + end: Optional[date] = None + + start: Optional[date] = None + + +class IntelDomainHistory(BaseModel): + categorizations: Optional[List[Categorization]] = None + + domain: Optional[str] = None diff --git a/src/cloudflare/types/intel/indicator_feed_create_response.py b/src/cloudflare/types/intel/intel_indicator_feed_item.py similarity index 87% rename from src/cloudflare/types/intel/indicator_feed_create_response.py rename to src/cloudflare/types/intel/intel_indicator_feed_item.py index bbb8550c2..c0ae4c901 100644 --- a/src/cloudflare/types/intel/indicator_feed_create_response.py +++ b/src/cloudflare/types/intel/intel_indicator_feed_item.py @@ -5,10 +5,10 @@ from datetime import datetime from ..._models import BaseModel -__all__ = ["IndicatorFeedCreateResponse"] +__all__ = ["IntelIndicatorFeedItem"] -class IndicatorFeedCreateResponse(BaseModel): +class IntelIndicatorFeedItem(BaseModel): id: Optional[int] = None """The unique identifier for the indicator feed""" diff --git a/src/cloudflare/types/intel/indicator_feed_get_response.py b/src/cloudflare/types/intel/intel_indicator_feed_metadata.py similarity index 90% rename from src/cloudflare/types/intel/indicator_feed_get_response.py rename to src/cloudflare/types/intel/intel_indicator_feed_metadata.py index 03b5ba33a..a874726c9 100644 --- a/src/cloudflare/types/intel/indicator_feed_get_response.py +++ b/src/cloudflare/types/intel/intel_indicator_feed_metadata.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["IndicatorFeedGetResponse"] +__all__ = ["IntelIndicatorFeedMetadata"] -class IndicatorFeedGetResponse(BaseModel): +class IntelIndicatorFeedMetadata(BaseModel): id: Optional[int] = None """The unique identifier for the indicator feed""" diff --git a/src/cloudflare/types/intel/intel_ip_list.py b/src/cloudflare/types/intel/intel_ip_list.py new file mode 100644 index 000000000..04917b411 --- /dev/null +++ b/src/cloudflare/types/intel/intel_ip_list.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["IntelIPList"] + + +class IntelIPList(BaseModel): + id: Optional[int] = None + + description: Optional[str] = None + + name: Optional[str] = None diff --git a/src/cloudflare/types/intel/dns_get_response.py b/src/cloudflare/types/intel/intel_passive_dns_by_ip.py similarity index 90% rename from src/cloudflare/types/intel/dns_get_response.py rename to src/cloudflare/types/intel/intel_passive_dns_by_ip.py index ee51702e2..c27226869 100644 --- a/src/cloudflare/types/intel/dns_get_response.py +++ b/src/cloudflare/types/intel/intel_passive_dns_by_ip.py @@ -5,7 +5,7 @@ from datetime import date from ..._models import BaseModel -__all__ = ["DNSGetResponse", "ReverseRecord"] +__all__ = ["IntelPassiveDNSByIP", "ReverseRecord"] class ReverseRecord(BaseModel): @@ -19,7 +19,7 @@ class ReverseRecord(BaseModel): """Last seen date of the DNS record during the time period.""" -class DNSGetResponse(BaseModel): +class IntelPassiveDNSByIP(BaseModel): count: Optional[float] = None """Total results returned based on your search parameters.""" diff --git a/src/cloudflare/types/intel/intel_schemas_ip.py b/src/cloudflare/types/intel/intel_schemas_ip.py new file mode 100644 index 000000000..cc5a749be --- /dev/null +++ b/src/cloudflare/types/intel/intel_schemas_ip.py @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Union, Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["IntelSchemasIP", "BelongsToRef"] + + +class BelongsToRef(BaseModel): + id: Optional[object] = None + + country: Optional[str] = None + + description: Optional[str] = None + + type: Optional[Literal["hosting_provider", "isp", "organization"]] = None + """Infrastructure type of this ASN.""" + + value: Optional[str] = None + + +class IntelSchemasIP(BaseModel): + belongs_to_ref: Optional[BelongsToRef] = None + """ + Specifies a reference to the autonomous systems (AS) that the IP address belongs + to. + """ + + ip: Union[str, str, None] = None + + risk_types: Optional[object] = None diff --git a/src/cloudflare/types/intel/intel_sinkholes_sinkhole_item.py b/src/cloudflare/types/intel/intel_sinkholes_sinkhole_item.py new file mode 100644 index 000000000..63465ef34 --- /dev/null +++ b/src/cloudflare/types/intel/intel_sinkholes_sinkhole_item.py @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional +from datetime import datetime + +from ..._models import BaseModel + +__all__ = ["IntelSinkholesSinkholeItem"] + + +class IntelSinkholesSinkholeItem(BaseModel): + id: Optional[int] = None + """The unique identifier for the sinkhole""" + + account_tag: Optional[str] = None + """The account tag that owns this sinkhole""" + + created_on: Optional[datetime] = None + """The date and time when the sinkhole was created""" + + modified_on: Optional[datetime] = None + """The date and time when the sinkhole was last modified""" + + name: Optional[str] = None + """The name of the sinkhole""" + + r2_bucket: Optional[str] = None + """The name of the R2 bucket to store results""" + + r2_id: Optional[str] = None + """The id of the R2 instance""" diff --git a/src/cloudflare/types/intel/indicator_feed_update_response.py b/src/cloudflare/types/intel/intel_update_feed.py similarity index 79% rename from src/cloudflare/types/intel/indicator_feed_update_response.py rename to src/cloudflare/types/intel/intel_update_feed.py index dfa4bc0c8..2697f55d3 100644 --- a/src/cloudflare/types/intel/indicator_feed_update_response.py +++ b/src/cloudflare/types/intel/intel_update_feed.py @@ -4,10 +4,10 @@ from typing import Optional from ..._models import BaseModel -__all__ = ["IndicatorFeedUpdateResponse"] +__all__ = ["IntelUpdateFeed"] -class IndicatorFeedUpdateResponse(BaseModel): +class IntelUpdateFeed(BaseModel): file_id: Optional[int] = None """Feed id""" diff --git a/src/cloudflare/types/intel/whois_get_response.py b/src/cloudflare/types/intel/intel_whois.py similarity index 88% rename from src/cloudflare/types/intel/whois_get_response.py rename to src/cloudflare/types/intel/intel_whois.py index fb2078e5f..974bb7231 100644 --- a/src/cloudflare/types/intel/whois_get_response.py +++ b/src/cloudflare/types/intel/intel_whois.py @@ -5,10 +5,10 @@ from datetime import date from ..._models import BaseModel -__all__ = ["WhoisGetResponse"] +__all__ = ["IntelWhois"] -class WhoisGetResponse(BaseModel): +class IntelWhois(BaseModel): created_date: Optional[date] = None domain: Optional[str] = None diff --git a/src/cloudflare/types/intel/ip_get_response.py b/src/cloudflare/types/intel/ip_get_response.py index cc6fee034..8d1bc1c4a 100644 --- a/src/cloudflare/types/intel/ip_get_response.py +++ b/src/cloudflare/types/intel/ip_get_response.py @@ -1,36 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Union, Optional -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .intel_schemas_ip import IntelSchemasIP -__all__ = ["IPGetResponse", "IPGetResponseItem", "IPGetResponseItemBelongsToRef"] +__all__ = ["IPGetResponse"] - -class IPGetResponseItemBelongsToRef(BaseModel): - id: Optional[object] = None - - country: Optional[str] = None - - description: Optional[str] = None - - type: Optional[Literal["hosting_provider", "isp", "organization"]] = None - """Infrastructure type of this ASN.""" - - value: Optional[str] = None - - -class IPGetResponseItem(BaseModel): - belongs_to_ref: Optional[IPGetResponseItemBelongsToRef] = None - """ - Specifies a reference to the autonomous systems (AS) that the IP address belongs - to. - """ - - ip: Union[str, str, None] = None - - risk_types: Optional[object] = None - - -IPGetResponse = List[IPGetResponseItem] +IPGetResponse = List[IntelSchemasIP] diff --git a/src/cloudflare/types/intel/ip_list_get_response.py b/src/cloudflare/types/intel/ip_list_get_response.py index 3654365b2..e44eee4f3 100644 --- a/src/cloudflare/types/intel/ip_list_get_response.py +++ b/src/cloudflare/types/intel/ip_list_get_response.py @@ -1,18 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ..._models import BaseModel +from .intel_ip_list import IntelIPList -__all__ = ["IPListGetResponse", "IPListGetResponseItem"] +__all__ = ["IPListGetResponse"] - -class IPListGetResponseItem(BaseModel): - id: Optional[int] = None - - description: Optional[str] = None - - name: Optional[str] = None - - -IPListGetResponse = List[IPListGetResponseItem] +IPListGetResponse = List[IntelIPList] diff --git a/src/cloudflare/types/intel/sinkhole_list_response.py b/src/cloudflare/types/intel/sinkhole_list_response.py index 12b668f62..35f53e71b 100644 --- a/src/cloudflare/types/intel/sinkhole_list_response.py +++ b/src/cloudflare/types/intel/sinkhole_list_response.py @@ -1,34 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ..._models import BaseModel +from .intel_sinkholes_sinkhole_item import IntelSinkholesSinkholeItem -__all__ = ["SinkholeListResponse", "SinkholeListResponseItem"] +__all__ = ["SinkholeListResponse"] - -class SinkholeListResponseItem(BaseModel): - id: Optional[int] = None - """The unique identifier for the sinkhole""" - - account_tag: Optional[str] = None - """The account tag that owns this sinkhole""" - - created_on: Optional[datetime] = None - """The date and time when the sinkhole was created""" - - modified_on: Optional[datetime] = None - """The date and time when the sinkhole was last modified""" - - name: Optional[str] = None - """The name of the sinkhole""" - - r2_bucket: Optional[str] = None - """The name of the R2 bucket to store results""" - - r2_id: Optional[str] = None - """The id of the R2 instance""" - - -SinkholeListResponse = List[SinkholeListResponseItem] +SinkholeListResponse = List[IntelSinkholesSinkholeItem] diff --git a/src/cloudflare/types/brand_protection_url_info_response.py b/src/cloudflare/types/intel_phishing_url_info.py similarity index 93% rename from src/cloudflare/types/brand_protection_url_info_response.py rename to src/cloudflare/types/intel_phishing_url_info.py index bf7ae3f92..4dbf4e297 100644 --- a/src/cloudflare/types/brand_protection_url_info_response.py +++ b/src/cloudflare/types/intel_phishing_url_info.py @@ -6,7 +6,7 @@ from pydantic import Field as FieldInfo from .._models import BaseModel -__all__ = ["BrandProtectionURLInfoResponse", "Categorization", "ModelResult", "RuleMatch", "ScanStatus"] +__all__ = ["IntelPhishingURLInfo", "Categorization", "ModelResult", "RuleMatch", "ScanStatus"] class Categorization(BaseModel): @@ -53,7 +53,7 @@ class ScanStatus(BaseModel): """ID of the most recent submission.""" -class BrandProtectionURLInfoResponse(BaseModel): +class IntelPhishingURLInfo(BaseModel): categorizations: Optional[List[Categorization]] = None """List of categorizations applied to this submission.""" diff --git a/src/cloudflare/types/brand_protection_submit_response.py b/src/cloudflare/types/intel_phishing_url_submit.py similarity index 88% rename from src/cloudflare/types/brand_protection_submit_response.py rename to src/cloudflare/types/intel_phishing_url_submit.py index 6437777de..742fa0998 100644 --- a/src/cloudflare/types/brand_protection_submit_response.py +++ b/src/cloudflare/types/intel_phishing_url_submit.py @@ -4,7 +4,7 @@ from typing import List, Optional from .._models import BaseModel -__all__ = ["BrandProtectionSubmitResponse", "ExcludedURL", "SkippedURL", "SubmittedURL"] +__all__ = ["IntelPhishingURLSubmit", "ExcludedURL", "SkippedURL", "SubmittedURL"] class ExcludedURL(BaseModel): @@ -28,7 +28,7 @@ class SubmittedURL(BaseModel): """ID assigned to this URL submission. Used to retrieve scanning results.""" -class BrandProtectionSubmitResponse(BaseModel): +class IntelPhishingURLSubmit(BaseModel): excluded_urls: Optional[List[ExcludedURL]] = None """ URLs that were excluded from scanning because their domain is in our no-scan diff --git a/src/cloudflare/types/keyless_certificate_create_response.py b/src/cloudflare/types/keyless_certificate_create_response.py deleted file mode 100644 index 23e98b26c..000000000 --- a/src/cloudflare/types/keyless_certificate_create_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["KeylessCertificateCreateResponse", "Tunnel"] - - -class Tunnel(BaseModel): - private_ip: str - """Private IP of the Key Server Host""" - - vnet_id: str - """Cloudflare Tunnel Virtual Network ID""" - - -class KeylessCertificateCreateResponse(BaseModel): - id: str - """Keyless certificate identifier tag.""" - - created_on: datetime - """When the Keyless SSL was created.""" - - enabled: bool - """Whether or not the Keyless SSL is on or off.""" - - host: str - """The keyless SSL name.""" - - modified_on: datetime - """When the Keyless SSL was last modified.""" - - name: str - """The keyless SSL name.""" - - permissions: List[object] - """ - Available permissions for the Keyless SSL for the current user requesting the - item. - """ - - port: float - """ - The keyless SSL port used to communicate between Cloudflare and the client's - Keyless SSL server. - """ - - status: Literal["active", "deleted"] - """Status of the Keyless SSL.""" - - tunnel: Optional[Tunnel] = None - """Configuration for using Keyless SSL through a Cloudflare Tunnel""" diff --git a/src/cloudflare/types/keyless_certificate_get_response.py b/src/cloudflare/types/keyless_certificate_get_response.py deleted file mode 100644 index 793a91fec..000000000 --- a/src/cloudflare/types/keyless_certificate_get_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["KeylessCertificateGetResponse", "Tunnel"] - - -class Tunnel(BaseModel): - private_ip: str - """Private IP of the Key Server Host""" - - vnet_id: str - """Cloudflare Tunnel Virtual Network ID""" - - -class KeylessCertificateGetResponse(BaseModel): - id: str - """Keyless certificate identifier tag.""" - - created_on: datetime - """When the Keyless SSL was created.""" - - enabled: bool - """Whether or not the Keyless SSL is on or off.""" - - host: str - """The keyless SSL name.""" - - modified_on: datetime - """When the Keyless SSL was last modified.""" - - name: str - """The keyless SSL name.""" - - permissions: List[object] - """ - Available permissions for the Keyless SSL for the current user requesting the - item. - """ - - port: float - """ - The keyless SSL port used to communicate between Cloudflare and the client's - Keyless SSL server. - """ - - status: Literal["active", "deleted"] - """Status of the Keyless SSL.""" - - tunnel: Optional[Tunnel] = None - """Configuration for using Keyless SSL through a Cloudflare Tunnel""" diff --git a/src/cloudflare/types/keyless_certificate_list_response.py b/src/cloudflare/types/keyless_certificate_list_response.py index f33423a1e..e9f5fa21c 100644 --- a/src/cloudflare/types/keyless_certificate_list_response.py +++ b/src/cloudflare/types/keyless_certificate_list_response.py @@ -1,62 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from .._models import BaseModel +from .tls_certificates_and_hostnames_base import TLSCertificatesAndHostnamesBase -__all__ = [ - "KeylessCertificateListResponse", - "KeylessCertificateListResponseItem", - "KeylessCertificateListResponseItemTunnel", -] +__all__ = ["KeylessCertificateListResponse"] - -class KeylessCertificateListResponseItemTunnel(BaseModel): - private_ip: str - """Private IP of the Key Server Host""" - - vnet_id: str - """Cloudflare Tunnel Virtual Network ID""" - - -class KeylessCertificateListResponseItem(BaseModel): - id: str - """Keyless certificate identifier tag.""" - - created_on: datetime - """When the Keyless SSL was created.""" - - enabled: bool - """Whether or not the Keyless SSL is on or off.""" - - host: str - """The keyless SSL name.""" - - modified_on: datetime - """When the Keyless SSL was last modified.""" - - name: str - """The keyless SSL name.""" - - permissions: List[object] - """ - Available permissions for the Keyless SSL for the current user requesting the - item. - """ - - port: float - """ - The keyless SSL port used to communicate between Cloudflare and the client's - Keyless SSL server. - """ - - status: Literal["active", "deleted"] - """Status of the Keyless SSL.""" - - tunnel: Optional[KeylessCertificateListResponseItemTunnel] = None - """Configuration for using Keyless SSL through a Cloudflare Tunnel""" - - -KeylessCertificateListResponse = List[KeylessCertificateListResponseItem] +KeylessCertificateListResponse = List[TLSCertificatesAndHostnamesBase] diff --git a/src/cloudflare/types/kv/__init__.py b/src/cloudflare/types/kv/__init__.py index 3b40ee661..82e46fdbf 100644 --- a/src/cloudflare/types/kv/__init__.py +++ b/src/cloudflare/types/kv/__init__.py @@ -2,10 +2,9 @@ from __future__ import annotations +from .workers_kv_namespace import WorkersKVNamespace as WorkersKVNamespace from .namespace_list_params import NamespaceListParams as NamespaceListParams from .namespace_create_params import NamespaceCreateParams as NamespaceCreateParams -from .namespace_list_response import NamespaceListResponse as NamespaceListResponse from .namespace_update_params import NamespaceUpdateParams as NamespaceUpdateParams -from .namespace_create_response import NamespaceCreateResponse as NamespaceCreateResponse from .namespace_delete_response import NamespaceDeleteResponse as NamespaceDeleteResponse from .namespace_update_response import NamespaceUpdateResponse as NamespaceUpdateResponse diff --git a/src/cloudflare/types/kv/namespace_create_response.py b/src/cloudflare/types/kv/namespace_create_response.py deleted file mode 100644 index 1994a6a5d..000000000 --- a/src/cloudflare/types/kv/namespace_create_response.py +++ /dev/null @@ -1,22 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["NamespaceCreateResponse"] - - -class NamespaceCreateResponse(BaseModel): - id: str - """Namespace identifier tag.""" - - title: str - """A human-readable string name for a Namespace.""" - - supports_url_encoding: Optional[bool] = None - """True if keys written on the URL will be URL-decoded before storing. - - For example, if set to "true", a key written on the URL as "%3F" will be stored - as "?". - """ diff --git a/src/cloudflare/types/kv/namespaces/__init__.py b/src/cloudflare/types/kv/namespaces/__init__.py index dc7fbd80a..a508aa46e 100644 --- a/src/cloudflare/types/kv/namespaces/__init__.py +++ b/src/cloudflare/types/kv/namespaces/__init__.py @@ -2,6 +2,7 @@ from __future__ import annotations +from .workers_kv_key import WorkersKVKey as WorkersKVKey from .key_list_params import KeyListParams as KeyListParams from .key_list_response import KeyListResponse as KeyListResponse from .bulk_delete_params import BulkDeleteParams as BulkDeleteParams diff --git a/src/cloudflare/types/kv/namespaces/key_list_response.py b/src/cloudflare/types/kv/namespaces/key_list_response.py index 17c95a062..43d8e00ec 100644 --- a/src/cloudflare/types/kv/namespaces/key_list_response.py +++ b/src/cloudflare/types/kv/namespaces/key_list_response.py @@ -1,28 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ...._models import BaseModel +from .workers_kv_key import WorkersKVKey -__all__ = ["KeyListResponse", "KeyListResponseItem"] +__all__ = ["KeyListResponse"] - -class KeyListResponseItem(BaseModel): - name: str - """A key's name. - - The name may be at most 512 bytes. All printable, non-whitespace characters are - valid. Use percent-encoding to define key names as part of a URL. - """ - - expiration: Optional[float] = None - """ - The time, measured in number of seconds since the UNIX epoch, at which the key - will expire. This property is omitted for keys that will not expire. - """ - - metadata: Optional[object] = None - """Arbitrary JSON that is associated with a key.""" - - -KeyListResponse = List[KeyListResponseItem] +KeyListResponse = List[WorkersKVKey] diff --git a/src/cloudflare/types/kv/namespaces/workers_kv_key.py b/src/cloudflare/types/kv/namespaces/workers_kv_key.py new file mode 100644 index 000000000..c45a9888e --- /dev/null +++ b/src/cloudflare/types/kv/namespaces/workers_kv_key.py @@ -0,0 +1,25 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional + +from ...._models import BaseModel + +__all__ = ["WorkersKVKey"] + + +class WorkersKVKey(BaseModel): + name: str + """A key's name. + + The name may be at most 512 bytes. All printable, non-whitespace characters are + valid. Use percent-encoding to define key names as part of a URL. + """ + + expiration: Optional[float] = None + """ + The time, measured in number of seconds since the UNIX epoch, at which the key + will expire. This property is omitted for keys that will not expire. + """ + + metadata: Optional[object] = None + """Arbitrary JSON that is associated with a key.""" diff --git a/src/cloudflare/types/kv/namespace_list_response.py b/src/cloudflare/types/kv/workers_kv_namespace.py similarity index 86% rename from src/cloudflare/types/kv/namespace_list_response.py rename to src/cloudflare/types/kv/workers_kv_namespace.py index ef94587ac..25c5f9b7c 100644 --- a/src/cloudflare/types/kv/namespace_list_response.py +++ b/src/cloudflare/types/kv/workers_kv_namespace.py @@ -4,10 +4,10 @@ from typing import Optional from ..._models import BaseModel -__all__ = ["NamespaceListResponse"] +__all__ = ["WorkersKVNamespace"] -class NamespaceListResponse(BaseModel): +class WorkersKVNamespace(BaseModel): id: str """Namespace identifier tag.""" diff --git a/src/cloudflare/types/filter_delete_response.py b/src/cloudflare/types/legacy_jhs_filter.py similarity index 87% rename from src/cloudflare/types/filter_delete_response.py rename to src/cloudflare/types/legacy_jhs_filter.py index 44ed8d424..d74250eea 100644 --- a/src/cloudflare/types/filter_delete_response.py +++ b/src/cloudflare/types/legacy_jhs_filter.py @@ -4,11 +4,11 @@ from typing import Optional from .._models import BaseModel -__all__ = ["FilterDeleteResponse"] +__all__ = ["LegacyJhsFilter"] -class FilterDeleteResponse(BaseModel): - id: str +class LegacyJhsFilter(BaseModel): + id: Optional[str] = None """The unique identifier of the filter.""" description: Optional[str] = None diff --git a/src/cloudflare/types/load_balancers/__init__.py b/src/cloudflare/types/load_balancers/__init__.py index d621a6d96..d3177a5d3 100644 --- a/src/cloudflare/types/load_balancers/__init__.py +++ b/src/cloudflare/types/load_balancers/__init__.py @@ -4,26 +4,17 @@ from __future__ import annotations from .pool_edit_params import PoolEditParams as PoolEditParams from .pool_list_params import PoolListParams as PoolListParams -from .pool_get_response import PoolGetResponse as PoolGetResponse from .search_get_params import SearchGetParams as SearchGetParams from .pool_create_params import PoolCreateParams as PoolCreateParams -from .pool_edit_response import PoolEditResponse as PoolEditResponse 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 from .region_get_response import RegionGetResponse as RegionGetResponse from .search_get_response import SearchGetResponse as SearchGetResponse -from .monitor_get_response import MonitorGetResponse as MonitorGetResponse -from .pool_create_response import PoolCreateResponse as PoolCreateResponse from .pool_delete_response import PoolDeleteResponse as PoolDeleteResponse -from .pool_update_response import PoolUpdateResponse as PoolUpdateResponse -from .preview_get_response import PreviewGetResponse as PreviewGetResponse from .region_list_response import RegionListResponse as RegionListResponse from .monitor_create_params import MonitorCreateParams as MonitorCreateParams -from .monitor_edit_response import MonitorEditResponse as MonitorEditResponse from .monitor_list_response import MonitorListResponse as MonitorListResponse from .monitor_update_params import MonitorUpdateParams as MonitorUpdateParams -from .monitor_create_response import MonitorCreateResponse as MonitorCreateResponse from .monitor_delete_response import MonitorDeleteResponse as MonitorDeleteResponse -from .monitor_update_response import MonitorUpdateResponse as MonitorUpdateResponse diff --git a/src/cloudflare/types/load_balancers/monitor_create_response.py b/src/cloudflare/types/load_balancers/monitor_create_response.py deleted file mode 100644 index bef8852d6..000000000 --- a/src/cloudflare/types/load_balancers/monitor_create_response.py +++ /dev/null @@ -1,113 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["MonitorCreateResponse"] - - -class MonitorCreateResponse(BaseModel): - id: Optional[str] = None - - allow_insecure: Optional[bool] = None - """Do not validate the certificate when monitor use HTTPS. - - This parameter is currently only valid for HTTP and HTTPS monitors. - """ - - consecutive_down: Optional[int] = None - """ - To be marked unhealthy the monitored origin must fail this healthcheck N - consecutive times. - """ - - consecutive_up: Optional[int] = None - """ - To be marked healthy the monitored origin must pass this healthcheck N - consecutive times. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """Object description.""" - - expected_body: Optional[str] = None - """A case-insensitive sub-string to look for in the response body. - - If this string is not found, the origin will be marked as unhealthy. This - parameter is only valid for HTTP and HTTPS monitors. - """ - - expected_codes: Optional[str] = None - """The expected HTTP response code or code range of the health check. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - follow_redirects: Optional[bool] = None - """Follow redirects if returned by the origin. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - header: Optional[object] = None - """The HTTP request headers to send in the health check. - - It is recommended you set a Host header by default. The User-Agent header cannot - be overridden. This parameter is only valid for HTTP and HTTPS monitors. - """ - - interval: Optional[int] = None - """The interval between each health check. - - Shorter intervals may improve failover time, but will increase load on the - origins as we check from multiple locations. - """ - - method: Optional[str] = None - """The method to use for the health check. - - This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' - for TCP based health checks. - """ - - modified_on: Optional[datetime] = None - - path: Optional[str] = None - """The endpoint path you want to conduct a health check against. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - port: Optional[int] = None - """The port number to connect to for the health check. - - Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define - the port when using a non-standard port (HTTP: default 80, HTTPS: default 443). - """ - - probe_zone: Optional[str] = None - """Assign this monitor to emulate the specified zone while probing. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - retries: Optional[int] = None - """ - The number of retries to attempt in case of a timeout before marking the origin - as unhealthy. Retries are attempted immediately. - """ - - timeout: Optional[int] = None - """The timeout (in seconds) before marking the health check as failed.""" - - type: Optional[Literal["http", "https", "tcp", "udp_icmp", "icmp_ping", "smtp"]] = None - """The protocol to use for the health check. - - Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', - 'UDP-ICMP', and 'SMTP'. - """ diff --git a/src/cloudflare/types/load_balancers/monitor_edit_response.py b/src/cloudflare/types/load_balancers/monitor_edit_response.py deleted file mode 100644 index dcfb5ff1a..000000000 --- a/src/cloudflare/types/load_balancers/monitor_edit_response.py +++ /dev/null @@ -1,113 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["MonitorEditResponse"] - - -class MonitorEditResponse(BaseModel): - id: Optional[str] = None - - allow_insecure: Optional[bool] = None - """Do not validate the certificate when monitor use HTTPS. - - This parameter is currently only valid for HTTP and HTTPS monitors. - """ - - consecutive_down: Optional[int] = None - """ - To be marked unhealthy the monitored origin must fail this healthcheck N - consecutive times. - """ - - consecutive_up: Optional[int] = None - """ - To be marked healthy the monitored origin must pass this healthcheck N - consecutive times. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """Object description.""" - - expected_body: Optional[str] = None - """A case-insensitive sub-string to look for in the response body. - - If this string is not found, the origin will be marked as unhealthy. This - parameter is only valid for HTTP and HTTPS monitors. - """ - - expected_codes: Optional[str] = None - """The expected HTTP response code or code range of the health check. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - follow_redirects: Optional[bool] = None - """Follow redirects if returned by the origin. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - header: Optional[object] = None - """The HTTP request headers to send in the health check. - - It is recommended you set a Host header by default. The User-Agent header cannot - be overridden. This parameter is only valid for HTTP and HTTPS monitors. - """ - - interval: Optional[int] = None - """The interval between each health check. - - Shorter intervals may improve failover time, but will increase load on the - origins as we check from multiple locations. - """ - - method: Optional[str] = None - """The method to use for the health check. - - This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' - for TCP based health checks. - """ - - modified_on: Optional[datetime] = None - - path: Optional[str] = None - """The endpoint path you want to conduct a health check against. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - port: Optional[int] = None - """The port number to connect to for the health check. - - Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define - the port when using a non-standard port (HTTP: default 80, HTTPS: default 443). - """ - - probe_zone: Optional[str] = None - """Assign this monitor to emulate the specified zone while probing. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - retries: Optional[int] = None - """ - The number of retries to attempt in case of a timeout before marking the origin - as unhealthy. Retries are attempted immediately. - """ - - timeout: Optional[int] = None - """The timeout (in seconds) before marking the health check as failed.""" - - type: Optional[Literal["http", "https", "tcp", "udp_icmp", "icmp_ping", "smtp"]] = None - """The protocol to use for the health check. - - Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', - 'UDP-ICMP', and 'SMTP'. - """ diff --git a/src/cloudflare/types/load_balancers/monitor_get_response.py b/src/cloudflare/types/load_balancers/monitor_get_response.py deleted file mode 100644 index f4f880a2e..000000000 --- a/src/cloudflare/types/load_balancers/monitor_get_response.py +++ /dev/null @@ -1,113 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["MonitorGetResponse"] - - -class MonitorGetResponse(BaseModel): - id: Optional[str] = None - - allow_insecure: Optional[bool] = None - """Do not validate the certificate when monitor use HTTPS. - - This parameter is currently only valid for HTTP and HTTPS monitors. - """ - - consecutive_down: Optional[int] = None - """ - To be marked unhealthy the monitored origin must fail this healthcheck N - consecutive times. - """ - - consecutive_up: Optional[int] = None - """ - To be marked healthy the monitored origin must pass this healthcheck N - consecutive times. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """Object description.""" - - expected_body: Optional[str] = None - """A case-insensitive sub-string to look for in the response body. - - If this string is not found, the origin will be marked as unhealthy. This - parameter is only valid for HTTP and HTTPS monitors. - """ - - expected_codes: Optional[str] = None - """The expected HTTP response code or code range of the health check. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - follow_redirects: Optional[bool] = None - """Follow redirects if returned by the origin. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - header: Optional[object] = None - """The HTTP request headers to send in the health check. - - It is recommended you set a Host header by default. The User-Agent header cannot - be overridden. This parameter is only valid for HTTP and HTTPS monitors. - """ - - interval: Optional[int] = None - """The interval between each health check. - - Shorter intervals may improve failover time, but will increase load on the - origins as we check from multiple locations. - """ - - method: Optional[str] = None - """The method to use for the health check. - - This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' - for TCP based health checks. - """ - - modified_on: Optional[datetime] = None - - path: Optional[str] = None - """The endpoint path you want to conduct a health check against. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - port: Optional[int] = None - """The port number to connect to for the health check. - - Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define - the port when using a non-standard port (HTTP: default 80, HTTPS: default 443). - """ - - probe_zone: Optional[str] = None - """Assign this monitor to emulate the specified zone while probing. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - retries: Optional[int] = None - """ - The number of retries to attempt in case of a timeout before marking the origin - as unhealthy. Retries are attempted immediately. - """ - - timeout: Optional[int] = None - """The timeout (in seconds) before marking the health check as failed.""" - - type: Optional[Literal["http", "https", "tcp", "udp_icmp", "icmp_ping", "smtp"]] = None - """The protocol to use for the health check. - - Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', - 'UDP-ICMP', and 'SMTP'. - """ diff --git a/src/cloudflare/types/load_balancers/monitor_list_response.py b/src/cloudflare/types/load_balancers/monitor_list_response.py index 67ed4efed..db02297b9 100644 --- a/src/cloudflare/types/load_balancers/monitor_list_response.py +++ b/src/cloudflare/types/load_balancers/monitor_list_response.py @@ -1,116 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from ..user.load_balancers import LoadBalancingMonitor -__all__ = ["MonitorListResponse", "MonitorListResponseItem"] +__all__ = ["MonitorListResponse"] - -class MonitorListResponseItem(BaseModel): - id: Optional[str] = None - - allow_insecure: Optional[bool] = None - """Do not validate the certificate when monitor use HTTPS. - - This parameter is currently only valid for HTTP and HTTPS monitors. - """ - - consecutive_down: Optional[int] = None - """ - To be marked unhealthy the monitored origin must fail this healthcheck N - consecutive times. - """ - - consecutive_up: Optional[int] = None - """ - To be marked healthy the monitored origin must pass this healthcheck N - consecutive times. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """Object description.""" - - expected_body: Optional[str] = None - """A case-insensitive sub-string to look for in the response body. - - If this string is not found, the origin will be marked as unhealthy. This - parameter is only valid for HTTP and HTTPS monitors. - """ - - expected_codes: Optional[str] = None - """The expected HTTP response code or code range of the health check. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - follow_redirects: Optional[bool] = None - """Follow redirects if returned by the origin. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - header: Optional[object] = None - """The HTTP request headers to send in the health check. - - It is recommended you set a Host header by default. The User-Agent header cannot - be overridden. This parameter is only valid for HTTP and HTTPS monitors. - """ - - interval: Optional[int] = None - """The interval between each health check. - - Shorter intervals may improve failover time, but will increase load on the - origins as we check from multiple locations. - """ - - method: Optional[str] = None - """The method to use for the health check. - - This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' - for TCP based health checks. - """ - - modified_on: Optional[datetime] = None - - path: Optional[str] = None - """The endpoint path you want to conduct a health check against. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - port: Optional[int] = None - """The port number to connect to for the health check. - - Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define - the port when using a non-standard port (HTTP: default 80, HTTPS: default 443). - """ - - probe_zone: Optional[str] = None - """Assign this monitor to emulate the specified zone while probing. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - retries: Optional[int] = None - """ - The number of retries to attempt in case of a timeout before marking the origin - as unhealthy. Retries are attempted immediately. - """ - - timeout: Optional[int] = None - """The timeout (in seconds) before marking the health check as failed.""" - - type: Optional[Literal["http", "https", "tcp", "udp_icmp", "icmp_ping", "smtp"]] = None - """The protocol to use for the health check. - - Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', - 'UDP-ICMP', and 'SMTP'. - """ - - -MonitorListResponse = List[MonitorListResponseItem] +MonitorListResponse = List[LoadBalancingMonitor] diff --git a/src/cloudflare/types/load_balancers/monitor_update_response.py b/src/cloudflare/types/load_balancers/monitor_update_response.py deleted file mode 100644 index dcd706f29..000000000 --- a/src/cloudflare/types/load_balancers/monitor_update_response.py +++ /dev/null @@ -1,113 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["MonitorUpdateResponse"] - - -class MonitorUpdateResponse(BaseModel): - id: Optional[str] = None - - allow_insecure: Optional[bool] = None - """Do not validate the certificate when monitor use HTTPS. - - This parameter is currently only valid for HTTP and HTTPS monitors. - """ - - consecutive_down: Optional[int] = None - """ - To be marked unhealthy the monitored origin must fail this healthcheck N - consecutive times. - """ - - consecutive_up: Optional[int] = None - """ - To be marked healthy the monitored origin must pass this healthcheck N - consecutive times. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """Object description.""" - - expected_body: Optional[str] = None - """A case-insensitive sub-string to look for in the response body. - - If this string is not found, the origin will be marked as unhealthy. This - parameter is only valid for HTTP and HTTPS monitors. - """ - - expected_codes: Optional[str] = None - """The expected HTTP response code or code range of the health check. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - follow_redirects: Optional[bool] = None - """Follow redirects if returned by the origin. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - header: Optional[object] = None - """The HTTP request headers to send in the health check. - - It is recommended you set a Host header by default. The User-Agent header cannot - be overridden. This parameter is only valid for HTTP and HTTPS monitors. - """ - - interval: Optional[int] = None - """The interval between each health check. - - Shorter intervals may improve failover time, but will increase load on the - origins as we check from multiple locations. - """ - - method: Optional[str] = None - """The method to use for the health check. - - This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' - for TCP based health checks. - """ - - modified_on: Optional[datetime] = None - - path: Optional[str] = None - """The endpoint path you want to conduct a health check against. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - port: Optional[int] = None - """The port number to connect to for the health check. - - Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define - the port when using a non-standard port (HTTP: default 80, HTTPS: default 443). - """ - - probe_zone: Optional[str] = None - """Assign this monitor to emulate the specified zone while probing. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - retries: Optional[int] = None - """ - The number of retries to attempt in case of a timeout before marking the origin - as unhealthy. Retries are attempted immediately. - """ - - timeout: Optional[int] = None - """The timeout (in seconds) before marking the health check as failed.""" - - type: Optional[Literal["http", "https", "tcp", "udp_icmp", "icmp_ping", "smtp"]] = None - """The protocol to use for the health check. - - Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', - 'UDP-ICMP', and 'SMTP'. - """ diff --git a/src/cloudflare/types/load_balancers/pool_create_response.py b/src/cloudflare/types/load_balancers/pool_create_response.py deleted file mode 100644 index bda9c56b5..000000000 --- a/src/cloudflare/types/load_balancers/pool_create_response.py +++ /dev/null @@ -1,273 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = [ - "PoolCreateResponse", - "LoadShedding", - "NotificationFilter", - "NotificationFilterOrigin", - "NotificationFilterPool", - "OriginSteering", - "Origin", - "OriginHeader", -] - - -class LoadShedding(BaseModel): - default_percent: Optional[float] = None - """The percent of traffic to shed from the pool, according to the default policy. - - Applies to new sessions and traffic without session affinity. - """ - - default_policy: Optional[Literal["random", "hash"]] = None - """The default policy to use when load shedding. - - A random policy randomly sheds a given percent of requests. A hash policy - computes a hash over the CF-Connecting-IP address and sheds all requests - originating from a percent of IPs. - """ - - session_percent: Optional[float] = None - """ - The percent of existing sessions to shed from the pool, according to the session - policy. - """ - - session_policy: Optional[Literal["hash"]] = None - """ - Only the hash policy is supported for existing sessions (to avoid exponential - decay). - """ - - -class NotificationFilterOrigin(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class NotificationFilterPool(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class NotificationFilter(BaseModel): - origin: Optional[NotificationFilterOrigin] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - pool: Optional[NotificationFilterPool] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - -class OriginSteering(BaseModel): - policy: Optional[Literal["random", "hash", "least_outstanding_requests", "least_connections"]] = None - """The type of origin steering policy to use. - - - `"random"`: Select an origin randomly. - - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP - address. - - `"least_outstanding_requests"`: Select an origin by taking into consideration - origin weights, as well as each origin's number of outstanding requests. - Origins with more pending requests are weighted proportionately less relative - to others. - - `"least_connections"`: Select an origin by taking into consideration origin - weights, as well as each origin's number of open connections. Origins with - more open connections are weighted proportionately less relative to others. - Supported for HTTP/1 and HTTP/2 connections. - """ - - -class OriginHeader(BaseModel): - host: Optional[List[str]] = FieldInfo(alias="Host", default=None) - """The 'Host' header allows to override the hostname set in the HTTP request. - - Current support is 1 'Host' header override per origin. - """ - - -class Origin(BaseModel): - address: Optional[str] = None - """ - The IP address (IPv4 or IPv6) of the origin, or its publicly addressable - hostname. Hostnames entered here should resolve directly to the origin, and not - be a hostname proxied by Cloudflare. To set an internal/reserved address, - virtual_network_id must also be set. - """ - - disabled_at: Optional[datetime] = None - """This field shows up only if the origin is disabled. - - This field is set with the time the origin was disabled. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) this origin within the pool. - - Disabled origins will not receive traffic and are excluded from health checks. - The origin will only be disabled for the current pool. - """ - - header: Optional[OriginHeader] = None - """The request header is used to pass additional information with an HTTP request. - - Currently supported header is 'Host'. - """ - - name: Optional[str] = None - """A human-identifiable name for the origin.""" - - virtual_network_id: Optional[str] = None - """The virtual network subnet ID the origin belongs in. - - Virtual network must also belong to the account. - """ - - weight: Optional[float] = None - """The weight of this origin relative to other origins in the pool. - - Based on the configured weight the total traffic is distributed among origins - within the pool. - - - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the - origin's outstanding requests. - - `origin_steering.policy="least_connections"`: Use weight to scale the origin's - open connections. - """ - - -class PoolCreateResponse(BaseModel): - id: Optional[str] = None - - check_regions: Optional[ - List[ - Literal[ - "WNAM", - "ENAM", - "WEU", - "EEU", - "NSAM", - "SSAM", - "OC", - "ME", - "NAF", - "SAF", - "SAS", - "SEAS", - "NEAS", - "ALL_REGIONS", - ] - ] - ] = None - """A list of regions from which to run health checks. - - Null means every Cloudflare data center. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """A human-readable description of the pool.""" - - disabled_at: Optional[datetime] = None - """This field shows up only if the pool is disabled. - - This field is set with the time the pool was disabled at. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) or disable this pool. - - Disabled pools will not receive traffic and are excluded from health checks. - Disabling a pool will cause any load balancers using it to failover to the next - pool (if any). - """ - - latitude: Optional[float] = None - """ - The latitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, longitude must also be set. - """ - - load_shedding: Optional[LoadShedding] = None - """Configures load shedding policies and percentages for the pool.""" - - longitude: Optional[float] = None - """ - The longitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, latitude must also be set. - """ - - minimum_origins: Optional[int] = None - """ - The minimum number of origins that must be healthy for this pool to serve - traffic. If the number of healthy origins falls below this number, the pool will - be marked unhealthy and will failover to the next available pool. - """ - - modified_on: Optional[datetime] = None - - monitor: Optional[object] = None - """ - The ID of the Monitor to use for checking the health of origins within this - pool. - """ - - name: Optional[str] = None - """A short name (tag) for the pool. - - Only alphanumeric characters, hyphens, and underscores are allowed. - """ - - notification_email: Optional[str] = None - """This field is now deprecated. - - It has been moved to Cloudflare's Centralized Notification service - https://developers.cloudflare.com/fundamentals/notifications/. The email address - to send health status notifications to. This can be an individual mailbox or a - mailing list. Multiple emails can be supplied as a comma delimited list. - """ - - notification_filter: Optional[NotificationFilter] = None - """Filter pool and origin health notifications by resource type or health status. - - Use null to reset. - """ - - origin_steering: Optional[OriginSteering] = None - """Configures origin steering for the pool. - - Controls how origins are selected for new sessions and traffic without session - affinity. - """ - - origins: Optional[List[Origin]] = None - """The list of origins within this pool. - - Traffic directed at this pool is balanced across all currently healthy origins, - provided the pool itself is healthy. - """ diff --git a/src/cloudflare/types/load_balancers/pool_edit_response.py b/src/cloudflare/types/load_balancers/pool_edit_response.py deleted file mode 100644 index b3f155b78..000000000 --- a/src/cloudflare/types/load_balancers/pool_edit_response.py +++ /dev/null @@ -1,273 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = [ - "PoolEditResponse", - "LoadShedding", - "NotificationFilter", - "NotificationFilterOrigin", - "NotificationFilterPool", - "OriginSteering", - "Origin", - "OriginHeader", -] - - -class LoadShedding(BaseModel): - default_percent: Optional[float] = None - """The percent of traffic to shed from the pool, according to the default policy. - - Applies to new sessions and traffic without session affinity. - """ - - default_policy: Optional[Literal["random", "hash"]] = None - """The default policy to use when load shedding. - - A random policy randomly sheds a given percent of requests. A hash policy - computes a hash over the CF-Connecting-IP address and sheds all requests - originating from a percent of IPs. - """ - - session_percent: Optional[float] = None - """ - The percent of existing sessions to shed from the pool, according to the session - policy. - """ - - session_policy: Optional[Literal["hash"]] = None - """ - Only the hash policy is supported for existing sessions (to avoid exponential - decay). - """ - - -class NotificationFilterOrigin(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class NotificationFilterPool(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class NotificationFilter(BaseModel): - origin: Optional[NotificationFilterOrigin] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - pool: Optional[NotificationFilterPool] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - -class OriginSteering(BaseModel): - policy: Optional[Literal["random", "hash", "least_outstanding_requests", "least_connections"]] = None - """The type of origin steering policy to use. - - - `"random"`: Select an origin randomly. - - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP - address. - - `"least_outstanding_requests"`: Select an origin by taking into consideration - origin weights, as well as each origin's number of outstanding requests. - Origins with more pending requests are weighted proportionately less relative - to others. - - `"least_connections"`: Select an origin by taking into consideration origin - weights, as well as each origin's number of open connections. Origins with - more open connections are weighted proportionately less relative to others. - Supported for HTTP/1 and HTTP/2 connections. - """ - - -class OriginHeader(BaseModel): - host: Optional[List[str]] = FieldInfo(alias="Host", default=None) - """The 'Host' header allows to override the hostname set in the HTTP request. - - Current support is 1 'Host' header override per origin. - """ - - -class Origin(BaseModel): - address: Optional[str] = None - """ - The IP address (IPv4 or IPv6) of the origin, or its publicly addressable - hostname. Hostnames entered here should resolve directly to the origin, and not - be a hostname proxied by Cloudflare. To set an internal/reserved address, - virtual_network_id must also be set. - """ - - disabled_at: Optional[datetime] = None - """This field shows up only if the origin is disabled. - - This field is set with the time the origin was disabled. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) this origin within the pool. - - Disabled origins will not receive traffic and are excluded from health checks. - The origin will only be disabled for the current pool. - """ - - header: Optional[OriginHeader] = None - """The request header is used to pass additional information with an HTTP request. - - Currently supported header is 'Host'. - """ - - name: Optional[str] = None - """A human-identifiable name for the origin.""" - - virtual_network_id: Optional[str] = None - """The virtual network subnet ID the origin belongs in. - - Virtual network must also belong to the account. - """ - - weight: Optional[float] = None - """The weight of this origin relative to other origins in the pool. - - Based on the configured weight the total traffic is distributed among origins - within the pool. - - - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the - origin's outstanding requests. - - `origin_steering.policy="least_connections"`: Use weight to scale the origin's - open connections. - """ - - -class PoolEditResponse(BaseModel): - id: Optional[str] = None - - check_regions: Optional[ - List[ - Literal[ - "WNAM", - "ENAM", - "WEU", - "EEU", - "NSAM", - "SSAM", - "OC", - "ME", - "NAF", - "SAF", - "SAS", - "SEAS", - "NEAS", - "ALL_REGIONS", - ] - ] - ] = None - """A list of regions from which to run health checks. - - Null means every Cloudflare data center. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """A human-readable description of the pool.""" - - disabled_at: Optional[datetime] = None - """This field shows up only if the pool is disabled. - - This field is set with the time the pool was disabled at. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) or disable this pool. - - Disabled pools will not receive traffic and are excluded from health checks. - Disabling a pool will cause any load balancers using it to failover to the next - pool (if any). - """ - - latitude: Optional[float] = None - """ - The latitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, longitude must also be set. - """ - - load_shedding: Optional[LoadShedding] = None - """Configures load shedding policies and percentages for the pool.""" - - longitude: Optional[float] = None - """ - The longitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, latitude must also be set. - """ - - minimum_origins: Optional[int] = None - """ - The minimum number of origins that must be healthy for this pool to serve - traffic. If the number of healthy origins falls below this number, the pool will - be marked unhealthy and will failover to the next available pool. - """ - - modified_on: Optional[datetime] = None - - monitor: Optional[object] = None - """ - The ID of the Monitor to use for checking the health of origins within this - pool. - """ - - name: Optional[str] = None - """A short name (tag) for the pool. - - Only alphanumeric characters, hyphens, and underscores are allowed. - """ - - notification_email: Optional[str] = None - """This field is now deprecated. - - It has been moved to Cloudflare's Centralized Notification service - https://developers.cloudflare.com/fundamentals/notifications/. The email address - to send health status notifications to. This can be an individual mailbox or a - mailing list. Multiple emails can be supplied as a comma delimited list. - """ - - notification_filter: Optional[NotificationFilter] = None - """Filter pool and origin health notifications by resource type or health status. - - Use null to reset. - """ - - origin_steering: Optional[OriginSteering] = None - """Configures origin steering for the pool. - - Controls how origins are selected for new sessions and traffic without session - affinity. - """ - - origins: Optional[List[Origin]] = None - """The list of origins within this pool. - - Traffic directed at this pool is balanced across all currently healthy origins, - provided the pool itself is healthy. - """ diff --git a/src/cloudflare/types/load_balancers/pool_get_response.py b/src/cloudflare/types/load_balancers/pool_get_response.py deleted file mode 100644 index 3cb4873ca..000000000 --- a/src/cloudflare/types/load_balancers/pool_get_response.py +++ /dev/null @@ -1,273 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = [ - "PoolGetResponse", - "LoadShedding", - "NotificationFilter", - "NotificationFilterOrigin", - "NotificationFilterPool", - "OriginSteering", - "Origin", - "OriginHeader", -] - - -class LoadShedding(BaseModel): - default_percent: Optional[float] = None - """The percent of traffic to shed from the pool, according to the default policy. - - Applies to new sessions and traffic without session affinity. - """ - - default_policy: Optional[Literal["random", "hash"]] = None - """The default policy to use when load shedding. - - A random policy randomly sheds a given percent of requests. A hash policy - computes a hash over the CF-Connecting-IP address and sheds all requests - originating from a percent of IPs. - """ - - session_percent: Optional[float] = None - """ - The percent of existing sessions to shed from the pool, according to the session - policy. - """ - - session_policy: Optional[Literal["hash"]] = None - """ - Only the hash policy is supported for existing sessions (to avoid exponential - decay). - """ - - -class NotificationFilterOrigin(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class NotificationFilterPool(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class NotificationFilter(BaseModel): - origin: Optional[NotificationFilterOrigin] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - pool: Optional[NotificationFilterPool] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - -class OriginSteering(BaseModel): - policy: Optional[Literal["random", "hash", "least_outstanding_requests", "least_connections"]] = None - """The type of origin steering policy to use. - - - `"random"`: Select an origin randomly. - - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP - address. - - `"least_outstanding_requests"`: Select an origin by taking into consideration - origin weights, as well as each origin's number of outstanding requests. - Origins with more pending requests are weighted proportionately less relative - to others. - - `"least_connections"`: Select an origin by taking into consideration origin - weights, as well as each origin's number of open connections. Origins with - more open connections are weighted proportionately less relative to others. - Supported for HTTP/1 and HTTP/2 connections. - """ - - -class OriginHeader(BaseModel): - host: Optional[List[str]] = FieldInfo(alias="Host", default=None) - """The 'Host' header allows to override the hostname set in the HTTP request. - - Current support is 1 'Host' header override per origin. - """ - - -class Origin(BaseModel): - address: Optional[str] = None - """ - The IP address (IPv4 or IPv6) of the origin, or its publicly addressable - hostname. Hostnames entered here should resolve directly to the origin, and not - be a hostname proxied by Cloudflare. To set an internal/reserved address, - virtual_network_id must also be set. - """ - - disabled_at: Optional[datetime] = None - """This field shows up only if the origin is disabled. - - This field is set with the time the origin was disabled. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) this origin within the pool. - - Disabled origins will not receive traffic and are excluded from health checks. - The origin will only be disabled for the current pool. - """ - - header: Optional[OriginHeader] = None - """The request header is used to pass additional information with an HTTP request. - - Currently supported header is 'Host'. - """ - - name: Optional[str] = None - """A human-identifiable name for the origin.""" - - virtual_network_id: Optional[str] = None - """The virtual network subnet ID the origin belongs in. - - Virtual network must also belong to the account. - """ - - weight: Optional[float] = None - """The weight of this origin relative to other origins in the pool. - - Based on the configured weight the total traffic is distributed among origins - within the pool. - - - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the - origin's outstanding requests. - - `origin_steering.policy="least_connections"`: Use weight to scale the origin's - open connections. - """ - - -class PoolGetResponse(BaseModel): - id: Optional[str] = None - - check_regions: Optional[ - List[ - Literal[ - "WNAM", - "ENAM", - "WEU", - "EEU", - "NSAM", - "SSAM", - "OC", - "ME", - "NAF", - "SAF", - "SAS", - "SEAS", - "NEAS", - "ALL_REGIONS", - ] - ] - ] = None - """A list of regions from which to run health checks. - - Null means every Cloudflare data center. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """A human-readable description of the pool.""" - - disabled_at: Optional[datetime] = None - """This field shows up only if the pool is disabled. - - This field is set with the time the pool was disabled at. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) or disable this pool. - - Disabled pools will not receive traffic and are excluded from health checks. - Disabling a pool will cause any load balancers using it to failover to the next - pool (if any). - """ - - latitude: Optional[float] = None - """ - The latitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, longitude must also be set. - """ - - load_shedding: Optional[LoadShedding] = None - """Configures load shedding policies and percentages for the pool.""" - - longitude: Optional[float] = None - """ - The longitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, latitude must also be set. - """ - - minimum_origins: Optional[int] = None - """ - The minimum number of origins that must be healthy for this pool to serve - traffic. If the number of healthy origins falls below this number, the pool will - be marked unhealthy and will failover to the next available pool. - """ - - modified_on: Optional[datetime] = None - - monitor: Optional[object] = None - """ - The ID of the Monitor to use for checking the health of origins within this - pool. - """ - - name: Optional[str] = None - """A short name (tag) for the pool. - - Only alphanumeric characters, hyphens, and underscores are allowed. - """ - - notification_email: Optional[str] = None - """This field is now deprecated. - - It has been moved to Cloudflare's Centralized Notification service - https://developers.cloudflare.com/fundamentals/notifications/. The email address - to send health status notifications to. This can be an individual mailbox or a - mailing list. Multiple emails can be supplied as a comma delimited list. - """ - - notification_filter: Optional[NotificationFilter] = None - """Filter pool and origin health notifications by resource type or health status. - - Use null to reset. - """ - - origin_steering: Optional[OriginSteering] = None - """Configures origin steering for the pool. - - Controls how origins are selected for new sessions and traffic without session - affinity. - """ - - origins: Optional[List[Origin]] = None - """The list of origins within this pool. - - Traffic directed at this pool is balanced across all currently healthy origins, - provided the pool itself is healthy. - """ diff --git a/src/cloudflare/types/load_balancers/pool_list_response.py b/src/cloudflare/types/load_balancers/pool_list_response.py index 23654f93b..2c5e8f063 100644 --- a/src/cloudflare/types/load_balancers/pool_list_response.py +++ b/src/cloudflare/types/load_balancers/pool_list_response.py @@ -1,277 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from pydantic import Field as FieldInfo +from ..user.load_balancers import LoadBalancingPool -from ..._models import BaseModel +__all__ = ["PoolListResponse"] -__all__ = [ - "PoolListResponse", - "PoolListResponseItem", - "PoolListResponseItemLoadShedding", - "PoolListResponseItemNotificationFilter", - "PoolListResponseItemNotificationFilterOrigin", - "PoolListResponseItemNotificationFilterPool", - "PoolListResponseItemOriginSteering", - "PoolListResponseItemOrigin", - "PoolListResponseItemOriginHeader", -] - - -class PoolListResponseItemLoadShedding(BaseModel): - default_percent: Optional[float] = None - """The percent of traffic to shed from the pool, according to the default policy. - - Applies to new sessions and traffic without session affinity. - """ - - default_policy: Optional[Literal["random", "hash"]] = None - """The default policy to use when load shedding. - - A random policy randomly sheds a given percent of requests. A hash policy - computes a hash over the CF-Connecting-IP address and sheds all requests - originating from a percent of IPs. - """ - - session_percent: Optional[float] = None - """ - The percent of existing sessions to shed from the pool, according to the session - policy. - """ - - session_policy: Optional[Literal["hash"]] = None - """ - Only the hash policy is supported for existing sessions (to avoid exponential - decay). - """ - - -class PoolListResponseItemNotificationFilterOrigin(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class PoolListResponseItemNotificationFilterPool(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class PoolListResponseItemNotificationFilter(BaseModel): - origin: Optional[PoolListResponseItemNotificationFilterOrigin] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - pool: Optional[PoolListResponseItemNotificationFilterPool] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - -class PoolListResponseItemOriginSteering(BaseModel): - policy: Optional[Literal["random", "hash", "least_outstanding_requests", "least_connections"]] = None - """The type of origin steering policy to use. - - - `"random"`: Select an origin randomly. - - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP - address. - - `"least_outstanding_requests"`: Select an origin by taking into consideration - origin weights, as well as each origin's number of outstanding requests. - Origins with more pending requests are weighted proportionately less relative - to others. - - `"least_connections"`: Select an origin by taking into consideration origin - weights, as well as each origin's number of open connections. Origins with - more open connections are weighted proportionately less relative to others. - Supported for HTTP/1 and HTTP/2 connections. - """ - - -class PoolListResponseItemOriginHeader(BaseModel): - host: Optional[List[str]] = FieldInfo(alias="Host", default=None) - """The 'Host' header allows to override the hostname set in the HTTP request. - - Current support is 1 'Host' header override per origin. - """ - - -class PoolListResponseItemOrigin(BaseModel): - address: Optional[str] = None - """ - The IP address (IPv4 or IPv6) of the origin, or its publicly addressable - hostname. Hostnames entered here should resolve directly to the origin, and not - be a hostname proxied by Cloudflare. To set an internal/reserved address, - virtual_network_id must also be set. - """ - - disabled_at: Optional[datetime] = None - """This field shows up only if the origin is disabled. - - This field is set with the time the origin was disabled. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) this origin within the pool. - - Disabled origins will not receive traffic and are excluded from health checks. - The origin will only be disabled for the current pool. - """ - - header: Optional[PoolListResponseItemOriginHeader] = None - """The request header is used to pass additional information with an HTTP request. - - Currently supported header is 'Host'. - """ - - name: Optional[str] = None - """A human-identifiable name for the origin.""" - - virtual_network_id: Optional[str] = None - """The virtual network subnet ID the origin belongs in. - - Virtual network must also belong to the account. - """ - - weight: Optional[float] = None - """The weight of this origin relative to other origins in the pool. - - Based on the configured weight the total traffic is distributed among origins - within the pool. - - - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the - origin's outstanding requests. - - `origin_steering.policy="least_connections"`: Use weight to scale the origin's - open connections. - """ - - -class PoolListResponseItem(BaseModel): - id: Optional[str] = None - - check_regions: Optional[ - List[ - Literal[ - "WNAM", - "ENAM", - "WEU", - "EEU", - "NSAM", - "SSAM", - "OC", - "ME", - "NAF", - "SAF", - "SAS", - "SEAS", - "NEAS", - "ALL_REGIONS", - ] - ] - ] = None - """A list of regions from which to run health checks. - - Null means every Cloudflare data center. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """A human-readable description of the pool.""" - - disabled_at: Optional[datetime] = None - """This field shows up only if the pool is disabled. - - This field is set with the time the pool was disabled at. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) or disable this pool. - - Disabled pools will not receive traffic and are excluded from health checks. - Disabling a pool will cause any load balancers using it to failover to the next - pool (if any). - """ - - latitude: Optional[float] = None - """ - The latitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, longitude must also be set. - """ - - load_shedding: Optional[PoolListResponseItemLoadShedding] = None - """Configures load shedding policies and percentages for the pool.""" - - longitude: Optional[float] = None - """ - The longitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, latitude must also be set. - """ - - minimum_origins: Optional[int] = None - """ - The minimum number of origins that must be healthy for this pool to serve - traffic. If the number of healthy origins falls below this number, the pool will - be marked unhealthy and will failover to the next available pool. - """ - - modified_on: Optional[datetime] = None - - monitor: Optional[object] = None - """ - The ID of the Monitor to use for checking the health of origins within this - pool. - """ - - name: Optional[str] = None - """A short name (tag) for the pool. - - Only alphanumeric characters, hyphens, and underscores are allowed. - """ - - notification_email: Optional[str] = None - """This field is now deprecated. - - It has been moved to Cloudflare's Centralized Notification service - https://developers.cloudflare.com/fundamentals/notifications/. The email address - to send health status notifications to. This can be an individual mailbox or a - mailing list. Multiple emails can be supplied as a comma delimited list. - """ - - notification_filter: Optional[PoolListResponseItemNotificationFilter] = None - """Filter pool and origin health notifications by resource type or health status. - - Use null to reset. - """ - - origin_steering: Optional[PoolListResponseItemOriginSteering] = None - """Configures origin steering for the pool. - - Controls how origins are selected for new sessions and traffic without session - affinity. - """ - - origins: Optional[List[PoolListResponseItemOrigin]] = None - """The list of origins within this pool. - - Traffic directed at this pool is balanced across all currently healthy origins, - provided the pool itself is healthy. - """ - - -PoolListResponse = List[PoolListResponseItem] +PoolListResponse = List[LoadBalancingPool] diff --git a/src/cloudflare/types/load_balancers/pool_update_response.py b/src/cloudflare/types/load_balancers/pool_update_response.py deleted file mode 100644 index dd4c05a3b..000000000 --- a/src/cloudflare/types/load_balancers/pool_update_response.py +++ /dev/null @@ -1,273 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = [ - "PoolUpdateResponse", - "LoadShedding", - "NotificationFilter", - "NotificationFilterOrigin", - "NotificationFilterPool", - "OriginSteering", - "Origin", - "OriginHeader", -] - - -class LoadShedding(BaseModel): - default_percent: Optional[float] = None - """The percent of traffic to shed from the pool, according to the default policy. - - Applies to new sessions and traffic without session affinity. - """ - - default_policy: Optional[Literal["random", "hash"]] = None - """The default policy to use when load shedding. - - A random policy randomly sheds a given percent of requests. A hash policy - computes a hash over the CF-Connecting-IP address and sheds all requests - originating from a percent of IPs. - """ - - session_percent: Optional[float] = None - """ - The percent of existing sessions to shed from the pool, according to the session - policy. - """ - - session_policy: Optional[Literal["hash"]] = None - """ - Only the hash policy is supported for existing sessions (to avoid exponential - decay). - """ - - -class NotificationFilterOrigin(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class NotificationFilterPool(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class NotificationFilter(BaseModel): - origin: Optional[NotificationFilterOrigin] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - pool: Optional[NotificationFilterPool] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - -class OriginSteering(BaseModel): - policy: Optional[Literal["random", "hash", "least_outstanding_requests", "least_connections"]] = None - """The type of origin steering policy to use. - - - `"random"`: Select an origin randomly. - - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP - address. - - `"least_outstanding_requests"`: Select an origin by taking into consideration - origin weights, as well as each origin's number of outstanding requests. - Origins with more pending requests are weighted proportionately less relative - to others. - - `"least_connections"`: Select an origin by taking into consideration origin - weights, as well as each origin's number of open connections. Origins with - more open connections are weighted proportionately less relative to others. - Supported for HTTP/1 and HTTP/2 connections. - """ - - -class OriginHeader(BaseModel): - host: Optional[List[str]] = FieldInfo(alias="Host", default=None) - """The 'Host' header allows to override the hostname set in the HTTP request. - - Current support is 1 'Host' header override per origin. - """ - - -class Origin(BaseModel): - address: Optional[str] = None - """ - The IP address (IPv4 or IPv6) of the origin, or its publicly addressable - hostname. Hostnames entered here should resolve directly to the origin, and not - be a hostname proxied by Cloudflare. To set an internal/reserved address, - virtual_network_id must also be set. - """ - - disabled_at: Optional[datetime] = None - """This field shows up only if the origin is disabled. - - This field is set with the time the origin was disabled. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) this origin within the pool. - - Disabled origins will not receive traffic and are excluded from health checks. - The origin will only be disabled for the current pool. - """ - - header: Optional[OriginHeader] = None - """The request header is used to pass additional information with an HTTP request. - - Currently supported header is 'Host'. - """ - - name: Optional[str] = None - """A human-identifiable name for the origin.""" - - virtual_network_id: Optional[str] = None - """The virtual network subnet ID the origin belongs in. - - Virtual network must also belong to the account. - """ - - weight: Optional[float] = None - """The weight of this origin relative to other origins in the pool. - - Based on the configured weight the total traffic is distributed among origins - within the pool. - - - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the - origin's outstanding requests. - - `origin_steering.policy="least_connections"`: Use weight to scale the origin's - open connections. - """ - - -class PoolUpdateResponse(BaseModel): - id: Optional[str] = None - - check_regions: Optional[ - List[ - Literal[ - "WNAM", - "ENAM", - "WEU", - "EEU", - "NSAM", - "SSAM", - "OC", - "ME", - "NAF", - "SAF", - "SAS", - "SEAS", - "NEAS", - "ALL_REGIONS", - ] - ] - ] = None - """A list of regions from which to run health checks. - - Null means every Cloudflare data center. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """A human-readable description of the pool.""" - - disabled_at: Optional[datetime] = None - """This field shows up only if the pool is disabled. - - This field is set with the time the pool was disabled at. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) or disable this pool. - - Disabled pools will not receive traffic and are excluded from health checks. - Disabling a pool will cause any load balancers using it to failover to the next - pool (if any). - """ - - latitude: Optional[float] = None - """ - The latitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, longitude must also be set. - """ - - load_shedding: Optional[LoadShedding] = None - """Configures load shedding policies and percentages for the pool.""" - - longitude: Optional[float] = None - """ - The longitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, latitude must also be set. - """ - - minimum_origins: Optional[int] = None - """ - The minimum number of origins that must be healthy for this pool to serve - traffic. If the number of healthy origins falls below this number, the pool will - be marked unhealthy and will failover to the next available pool. - """ - - modified_on: Optional[datetime] = None - - monitor: Optional[object] = None - """ - The ID of the Monitor to use for checking the health of origins within this - pool. - """ - - name: Optional[str] = None - """A short name (tag) for the pool. - - Only alphanumeric characters, hyphens, and underscores are allowed. - """ - - notification_email: Optional[str] = None - """This field is now deprecated. - - It has been moved to Cloudflare's Centralized Notification service - https://developers.cloudflare.com/fundamentals/notifications/. The email address - to send health status notifications to. This can be an individual mailbox or a - mailing list. Multiple emails can be supplied as a comma delimited list. - """ - - notification_filter: Optional[NotificationFilter] = None - """Filter pool and origin health notifications by resource type or health status. - - Use null to reset. - """ - - origin_steering: Optional[OriginSteering] = None - """Configures origin steering for the pool. - - Controls how origins are selected for new sessions and traffic without session - affinity. - """ - - origins: Optional[List[Origin]] = None - """The list of origins within this pool. - - Traffic directed at this pool is balanced across all currently healthy origins, - provided the pool itself is healthy. - """ diff --git a/src/cloudflare/types/load_balancers/preview_get_response.py b/src/cloudflare/types/load_balancers/preview_get_response.py deleted file mode 100644 index a86a96386..000000000 --- a/src/cloudflare/types/load_balancers/preview_get_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Dict, List, Optional - -from ..._models import BaseModel - -__all__ = [ - "PreviewGetResponse", - "PreviewGetResponseItem", - "PreviewGetResponseItemOriginPreviewGetResponseItemOriginItem", -] - - -class PreviewGetResponseItemOriginPreviewGetResponseItemOriginItem(BaseModel): - failure_reason: Optional[str] = None - - healthy: Optional[bool] = None - - response_code: Optional[float] = None - - rtt: Optional[str] = None - - -class PreviewGetResponseItem(BaseModel): - healthy: Optional[bool] = None - - origins: Optional[List[Dict[str, PreviewGetResponseItemOriginPreviewGetResponseItemOriginItem]]] = None - - -PreviewGetResponse = Dict[str, PreviewGetResponseItem] diff --git a/src/cloudflare/types/logpush/__init__.py b/src/cloudflare/types/logpush/__init__.py index 680f71713..5ce19c2fa 100644 --- a/src/cloudflare/types/logpush/__init__.py +++ b/src/cloudflare/types/logpush/__init__.py @@ -2,18 +2,15 @@ from __future__ import annotations -from .job_get_response import JobGetResponse as JobGetResponse 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 .job_create_response import JobCreateResponse as JobCreateResponse from .job_delete_response import JobDeleteResponse as JobDeleteResponse -from .job_update_response import JobUpdateResponse as JobUpdateResponse -from .edge_create_response import EdgeCreateResponse as EdgeCreateResponse 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 f44ac4856..401a63eef 100644 --- a/src/cloudflare/types/logpush/datasets/__init__.py +++ b/src/cloudflare/types/logpush/datasets/__init__.py @@ -3,3 +3,4 @@ from __future__ import annotations 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 b6bb12942..f891a6c99 100644 --- a/src/cloudflare/types/logpush/datasets/job_get_response.py +++ b/src/cloudflare/types/logpush/datasets/job_get_response.py @@ -1,148 +1,9 @@ # File generated from our OpenAPI spec by Stainless. from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal -from pydantic import Field as FieldInfo +from .logpush_logpush_job import LogpushLogpushJob -from ...._models import BaseModel +__all__ = ["JobGetResponse"] -__all__ = ["JobGetResponse", "JobGetResponseItem", "JobGetResponseItemOutputOptions"] - - -class JobGetResponseItemOutputOptions(BaseModel): - batch_prefix: Optional[str] = None - """String to be prepended before each batch.""" - - batch_suffix: Optional[str] = None - """String to be appended after each batch.""" - - cve_2021_4428: Optional[bool] = FieldInfo(alias="CVE-2021-4428", default=None) - """ - If set to true, will cause all occurrences of `${` in the generated files to be - replaced with `x{`. - """ - - field_delimiter: Optional[str] = None - """String to join fields. This field be ignored when `record_template` is set.""" - - field_names: Optional[List[str]] = None - """List of field names to be included in the Logpush output. - - For the moment, there is no option to add all fields at once, so you must - specify all the fields names you are interested in. - """ - - output_type: Optional[Literal["ndjson", "csv"]] = None - """Specifies the output type, such as `ndjson` or `csv`. - - This sets default values for the rest of the settings, depending on the chosen - output type. Some formatting rules, like string quoting, are different between - output types. - """ - - record_delimiter: Optional[str] = None - """String to be inserted in-between the records as separator.""" - - record_prefix: Optional[str] = None - """String to be prepended before each record.""" - - record_suffix: Optional[str] = None - """String to be appended after each record.""" - - record_template: Optional[str] = None - """ - String to use as template for each record instead of the default comma-separated - list. All fields used in the template must be present in `field_names` as well, - otherwise they will end up as null. Format as a Go `text/template` without any - standard functions, like conditionals, loops, sub-templates, etc. - """ - - sample_rate: Optional[float] = None - """Floating number to specify sampling rate. - - Sampling is applied on top of filtering, and regardless of the current - `sample_interval` of the data. - """ - - timestamp_format: Optional[Literal["unixnano", "unix", "rfc3339"]] = None - """ - String to specify the format for timestamps, such as `unixnano`, `unix`, or - `rfc3339`. - """ - - -class JobGetResponseItem(BaseModel): - id: Optional[int] = None - """Unique id of the job.""" - - dataset: Optional[str] = None - """Name of the dataset.""" - - destination_conf: Optional[str] = None - """Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. - - Additional configuration parameters supported by the destination may be - included. - """ - - enabled: Optional[bool] = None - """Flag that indicates if the job is enabled.""" - - error_message: Optional[datetime] = None - """If not null, the job is currently failing. - - Failures are usually repetitive (example: no permissions to write to destination - bucket). Only the last failure is recorded. On successful execution of a job the - error_message and last_error are set to null. - """ - - frequency: Optional[Literal["high", "low"]] = None - """The frequency at which Cloudflare sends batches of logs to your destination. - - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. - """ - - last_complete: Optional[datetime] = None - """Records the last time for which logs have been successfully pushed. - - If the last successful push was for logs range 2018-07-23T10:00:00Z to - 2018-07-23T10:01:00Z then the value of this field will be 2018-07-23T10:01:00Z. - If the job has never run or has just been enabled and hasn't run yet then the - field will be empty. - """ - - last_error: Optional[datetime] = None - """Records the last time the job failed. - - If not null, the job is currently failing. If null, the job has either never - failed or has run successfully at least once since last failure. See also the - error_message field. - """ - - logpull_options: Optional[str] = None - """This field is deprecated. - - Use `output_options` instead. Configuration string. It specifies things like - requested fields and timestamp formats. If migrating from the logpull api, copy - the url (full url or just the query string) of your call here, and logpush will - keep on making this call for you, setting start and end times appropriately. - """ - - name: Optional[str] = None - """Optional human readable job name. - - Not unique. Cloudflare suggests that you set this to a meaningful string, like - the domain name, to make it easier to identify your job. - """ - - output_options: Optional[JobGetResponseItemOutputOptions] = None - """The structured replacement for `logpull_options`. - - When including this field, the `logpull_option` field will be ignored. - """ - - -JobGetResponse = List[Optional[JobGetResponseItem]] +JobGetResponse = List[Optional[LogpushLogpushJob]] diff --git a/src/cloudflare/types/logpush/job_create_response.py b/src/cloudflare/types/logpush/datasets/logpush_logpush_job.py similarity index 97% rename from src/cloudflare/types/logpush/job_create_response.py rename to src/cloudflare/types/logpush/datasets/logpush_logpush_job.py index ae9942205..682d3dce4 100644 --- a/src/cloudflare/types/logpush/job_create_response.py +++ b/src/cloudflare/types/logpush/datasets/logpush_logpush_job.py @@ -6,9 +6,9 @@ from typing_extensions import Literal from pydantic import Field as FieldInfo -from ..._models import BaseModel +from ...._models import BaseModel -__all__ = ["JobCreateResponse", "OutputOptions"] +__all__ = ["LogpushLogpushJob", "OutputOptions"] class OutputOptions(BaseModel): @@ -73,7 +73,7 @@ class OutputOptions(BaseModel): """ -class JobCreateResponse(BaseModel): +class LogpushLogpushJob(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 a30432577..a9fa809ec 100644 --- a/src/cloudflare/types/logpush/edge_get_response.py +++ b/src/cloudflare/types/logpush/edge_get_response.py @@ -2,29 +2,8 @@ from typing import List, Optional -from ..._models import BaseModel +from .logpush_instant_logs_job import LogpushInstantLogsJob -__all__ = ["EdgeGetResponse", "EdgeGetResponseItem"] +__all__ = ["EdgeGetResponse"] - -class EdgeGetResponseItem(BaseModel): - destination_conf: Optional[str] = None - """Unique WebSocket address that will receive messages from Cloudflare’s edge.""" - - fields: Optional[str] = None - """Comma-separated list of fields.""" - - filter: Optional[str] = None - """Filters to drill down into specific events.""" - - sample: Optional[int] = None - """ - The sample parameter is the sample rate of the records set by the client: - "sample": 1 is 100% of records "sample": 10 is 10% and so on. - """ - - session_id: Optional[str] = None - """Unique session id of the job.""" - - -EdgeGetResponse = List[Optional[EdgeGetResponseItem]] +EdgeGetResponse = List[Optional[LogpushInstantLogsJob]] diff --git a/src/cloudflare/types/logpush/job_get_response.py b/src/cloudflare/types/logpush/job_get_response.py deleted file mode 100644 index 44cd1b6c4..000000000 --- a/src/cloudflare/types/logpush/job_get_response.py +++ /dev/null @@ -1,145 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = ["JobGetResponse", "OutputOptions"] - - -class OutputOptions(BaseModel): - batch_prefix: Optional[str] = None - """String to be prepended before each batch.""" - - batch_suffix: Optional[str] = None - """String to be appended after each batch.""" - - cve_2021_4428: Optional[bool] = FieldInfo(alias="CVE-2021-4428", default=None) - """ - If set to true, will cause all occurrences of `${` in the generated files to be - replaced with `x{`. - """ - - field_delimiter: Optional[str] = None - """String to join fields. This field be ignored when `record_template` is set.""" - - field_names: Optional[List[str]] = None - """List of field names to be included in the Logpush output. - - For the moment, there is no option to add all fields at once, so you must - specify all the fields names you are interested in. - """ - - output_type: Optional[Literal["ndjson", "csv"]] = None - """Specifies the output type, such as `ndjson` or `csv`. - - This sets default values for the rest of the settings, depending on the chosen - output type. Some formatting rules, like string quoting, are different between - output types. - """ - - record_delimiter: Optional[str] = None - """String to be inserted in-between the records as separator.""" - - record_prefix: Optional[str] = None - """String to be prepended before each record.""" - - record_suffix: Optional[str] = None - """String to be appended after each record.""" - - record_template: Optional[str] = None - """ - String to use as template for each record instead of the default comma-separated - list. All fields used in the template must be present in `field_names` as well, - otherwise they will end up as null. Format as a Go `text/template` without any - standard functions, like conditionals, loops, sub-templates, etc. - """ - - sample_rate: Optional[float] = None - """Floating number to specify sampling rate. - - Sampling is applied on top of filtering, and regardless of the current - `sample_interval` of the data. - """ - - timestamp_format: Optional[Literal["unixnano", "unix", "rfc3339"]] = None - """ - String to specify the format for timestamps, such as `unixnano`, `unix`, or - `rfc3339`. - """ - - -class JobGetResponse(BaseModel): - id: Optional[int] = None - """Unique id of the job.""" - - dataset: Optional[str] = None - """Name of the dataset.""" - - destination_conf: Optional[str] = None - """Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. - - Additional configuration parameters supported by the destination may be - included. - """ - - enabled: Optional[bool] = None - """Flag that indicates if the job is enabled.""" - - error_message: Optional[datetime] = None - """If not null, the job is currently failing. - - Failures are usually repetitive (example: no permissions to write to destination - bucket). Only the last failure is recorded. On successful execution of a job the - error_message and last_error are set to null. - """ - - frequency: Optional[Literal["high", "low"]] = None - """The frequency at which Cloudflare sends batches of logs to your destination. - - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. - """ - - last_complete: Optional[datetime] = None - """Records the last time for which logs have been successfully pushed. - - If the last successful push was for logs range 2018-07-23T10:00:00Z to - 2018-07-23T10:01:00Z then the value of this field will be 2018-07-23T10:01:00Z. - If the job has never run or has just been enabled and hasn't run yet then the - field will be empty. - """ - - last_error: Optional[datetime] = None - """Records the last time the job failed. - - If not null, the job is currently failing. If null, the job has either never - failed or has run successfully at least once since last failure. See also the - error_message field. - """ - - logpull_options: Optional[str] = None - """This field is deprecated. - - Use `output_options` instead. Configuration string. It specifies things like - requested fields and timestamp formats. If migrating from the logpull api, copy - the url (full url or just the query string) of your call here, and logpush will - keep on making this call for you, setting start and end times appropriately. - """ - - name: Optional[str] = None - """Optional human readable job name. - - Not unique. Cloudflare suggests that you set this to a meaningful string, like - the domain name, to make it easier to identify your job. - """ - - output_options: Optional[OutputOptions] = None - """The structured replacement for `logpull_options`. - - When including this field, the `logpull_option` field will be ignored. - """ diff --git a/src/cloudflare/types/logpush/job_list_response.py b/src/cloudflare/types/logpush/job_list_response.py index aeea41750..bda86ef0c 100644 --- a/src/cloudflare/types/logpush/job_list_response.py +++ b/src/cloudflare/types/logpush/job_list_response.py @@ -1,148 +1,9 @@ # File generated from our OpenAPI spec by Stainless. from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal -from pydantic import Field as FieldInfo +from .datasets import LogpushLogpushJob -from ..._models import BaseModel +__all__ = ["JobListResponse"] -__all__ = ["JobListResponse", "JobListResponseItem", "JobListResponseItemOutputOptions"] - - -class JobListResponseItemOutputOptions(BaseModel): - batch_prefix: Optional[str] = None - """String to be prepended before each batch.""" - - batch_suffix: Optional[str] = None - """String to be appended after each batch.""" - - cve_2021_4428: Optional[bool] = FieldInfo(alias="CVE-2021-4428", default=None) - """ - If set to true, will cause all occurrences of `${` in the generated files to be - replaced with `x{`. - """ - - field_delimiter: Optional[str] = None - """String to join fields. This field be ignored when `record_template` is set.""" - - field_names: Optional[List[str]] = None - """List of field names to be included in the Logpush output. - - For the moment, there is no option to add all fields at once, so you must - specify all the fields names you are interested in. - """ - - output_type: Optional[Literal["ndjson", "csv"]] = None - """Specifies the output type, such as `ndjson` or `csv`. - - This sets default values for the rest of the settings, depending on the chosen - output type. Some formatting rules, like string quoting, are different between - output types. - """ - - record_delimiter: Optional[str] = None - """String to be inserted in-between the records as separator.""" - - record_prefix: Optional[str] = None - """String to be prepended before each record.""" - - record_suffix: Optional[str] = None - """String to be appended after each record.""" - - record_template: Optional[str] = None - """ - String to use as template for each record instead of the default comma-separated - list. All fields used in the template must be present in `field_names` as well, - otherwise they will end up as null. Format as a Go `text/template` without any - standard functions, like conditionals, loops, sub-templates, etc. - """ - - sample_rate: Optional[float] = None - """Floating number to specify sampling rate. - - Sampling is applied on top of filtering, and regardless of the current - `sample_interval` of the data. - """ - - timestamp_format: Optional[Literal["unixnano", "unix", "rfc3339"]] = None - """ - String to specify the format for timestamps, such as `unixnano`, `unix`, or - `rfc3339`. - """ - - -class JobListResponseItem(BaseModel): - id: Optional[int] = None - """Unique id of the job.""" - - dataset: Optional[str] = None - """Name of the dataset.""" - - destination_conf: Optional[str] = None - """Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. - - Additional configuration parameters supported by the destination may be - included. - """ - - enabled: Optional[bool] = None - """Flag that indicates if the job is enabled.""" - - error_message: Optional[datetime] = None - """If not null, the job is currently failing. - - Failures are usually repetitive (example: no permissions to write to destination - bucket). Only the last failure is recorded. On successful execution of a job the - error_message and last_error are set to null. - """ - - frequency: Optional[Literal["high", "low"]] = None - """The frequency at which Cloudflare sends batches of logs to your destination. - - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. - """ - - last_complete: Optional[datetime] = None - """Records the last time for which logs have been successfully pushed. - - If the last successful push was for logs range 2018-07-23T10:00:00Z to - 2018-07-23T10:01:00Z then the value of this field will be 2018-07-23T10:01:00Z. - If the job has never run or has just been enabled and hasn't run yet then the - field will be empty. - """ - - last_error: Optional[datetime] = None - """Records the last time the job failed. - - If not null, the job is currently failing. If null, the job has either never - failed or has run successfully at least once since last failure. See also the - error_message field. - """ - - logpull_options: Optional[str] = None - """This field is deprecated. - - Use `output_options` instead. Configuration string. It specifies things like - requested fields and timestamp formats. If migrating from the logpull api, copy - the url (full url or just the query string) of your call here, and logpush will - keep on making this call for you, setting start and end times appropriately. - """ - - name: Optional[str] = None - """Optional human readable job name. - - Not unique. Cloudflare suggests that you set this to a meaningful string, like - the domain name, to make it easier to identify your job. - """ - - output_options: Optional[JobListResponseItemOutputOptions] = None - """The structured replacement for `logpull_options`. - - When including this field, the `logpull_option` field will be ignored. - """ - - -JobListResponse = List[Optional[JobListResponseItem]] +JobListResponse = List[Optional[LogpushLogpushJob]] diff --git a/src/cloudflare/types/logpush/job_update_response.py b/src/cloudflare/types/logpush/job_update_response.py deleted file mode 100644 index 83500f832..000000000 --- a/src/cloudflare/types/logpush/job_update_response.py +++ /dev/null @@ -1,145 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = ["JobUpdateResponse", "OutputOptions"] - - -class OutputOptions(BaseModel): - batch_prefix: Optional[str] = None - """String to be prepended before each batch.""" - - batch_suffix: Optional[str] = None - """String to be appended after each batch.""" - - cve_2021_4428: Optional[bool] = FieldInfo(alias="CVE-2021-4428", default=None) - """ - If set to true, will cause all occurrences of `${` in the generated files to be - replaced with `x{`. - """ - - field_delimiter: Optional[str] = None - """String to join fields. This field be ignored when `record_template` is set.""" - - field_names: Optional[List[str]] = None - """List of field names to be included in the Logpush output. - - For the moment, there is no option to add all fields at once, so you must - specify all the fields names you are interested in. - """ - - output_type: Optional[Literal["ndjson", "csv"]] = None - """Specifies the output type, such as `ndjson` or `csv`. - - This sets default values for the rest of the settings, depending on the chosen - output type. Some formatting rules, like string quoting, are different between - output types. - """ - - record_delimiter: Optional[str] = None - """String to be inserted in-between the records as separator.""" - - record_prefix: Optional[str] = None - """String to be prepended before each record.""" - - record_suffix: Optional[str] = None - """String to be appended after each record.""" - - record_template: Optional[str] = None - """ - String to use as template for each record instead of the default comma-separated - list. All fields used in the template must be present in `field_names` as well, - otherwise they will end up as null. Format as a Go `text/template` without any - standard functions, like conditionals, loops, sub-templates, etc. - """ - - sample_rate: Optional[float] = None - """Floating number to specify sampling rate. - - Sampling is applied on top of filtering, and regardless of the current - `sample_interval` of the data. - """ - - timestamp_format: Optional[Literal["unixnano", "unix", "rfc3339"]] = None - """ - String to specify the format for timestamps, such as `unixnano`, `unix`, or - `rfc3339`. - """ - - -class JobUpdateResponse(BaseModel): - id: Optional[int] = None - """Unique id of the job.""" - - dataset: Optional[str] = None - """Name of the dataset.""" - - destination_conf: Optional[str] = None - """Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. - - Additional configuration parameters supported by the destination may be - included. - """ - - enabled: Optional[bool] = None - """Flag that indicates if the job is enabled.""" - - error_message: Optional[datetime] = None - """If not null, the job is currently failing. - - Failures are usually repetitive (example: no permissions to write to destination - bucket). Only the last failure is recorded. On successful execution of a job the - error_message and last_error are set to null. - """ - - frequency: Optional[Literal["high", "low"]] = None - """The frequency at which Cloudflare sends batches of logs to your destination. - - Setting frequency to high sends your logs in larger quantities of smaller files. - Setting frequency to low sends logs in smaller quantities of larger files. - """ - - last_complete: Optional[datetime] = None - """Records the last time for which logs have been successfully pushed. - - If the last successful push was for logs range 2018-07-23T10:00:00Z to - 2018-07-23T10:01:00Z then the value of this field will be 2018-07-23T10:01:00Z. - If the job has never run or has just been enabled and hasn't run yet then the - field will be empty. - """ - - last_error: Optional[datetime] = None - """Records the last time the job failed. - - If not null, the job is currently failing. If null, the job has either never - failed or has run successfully at least once since last failure. See also the - error_message field. - """ - - logpull_options: Optional[str] = None - """This field is deprecated. - - Use `output_options` instead. Configuration string. It specifies things like - requested fields and timestamp formats. If migrating from the logpull api, copy - the url (full url or just the query string) of your call here, and logpush will - keep on making this call for you, setting start and end times appropriately. - """ - - name: Optional[str] = None - """Optional human readable job name. - - Not unique. Cloudflare suggests that you set this to a meaningful string, like - the domain name, to make it easier to identify your job. - """ - - output_options: Optional[OutputOptions] = None - """The structured replacement for `logpull_options`. - - When including this field, the `logpull_option` field will be ignored. - """ diff --git a/src/cloudflare/types/logpush/edge_create_response.py b/src/cloudflare/types/logpush/logpush_instant_logs_job.py similarity index 90% rename from src/cloudflare/types/logpush/edge_create_response.py rename to src/cloudflare/types/logpush/logpush_instant_logs_job.py index b459f0994..55e562717 100644 --- a/src/cloudflare/types/logpush/edge_create_response.py +++ b/src/cloudflare/types/logpush/logpush_instant_logs_job.py @@ -4,10 +4,10 @@ from typing import Optional from ..._models import BaseModel -__all__ = ["EdgeCreateResponse"] +__all__ = ["LogpushInstantLogsJob"] -class EdgeCreateResponse(BaseModel): +class LogpushInstantLogsJob(BaseModel): destination_conf: Optional[str] = None """Unique WebSocket address that will receive messages from Cloudflare’s edge.""" diff --git a/src/cloudflare/types/logs/control/cmb/__init__.py b/src/cloudflare/types/logs/control/cmb/__init__.py index 5608d217d..0bca372cb 100644 --- a/src/cloudflare/types/logs/control/cmb/__init__.py +++ b/src/cloudflare/types/logs/control/cmb/__init__.py @@ -2,7 +2,6 @@ from __future__ import annotations -from .config_get_response import ConfigGetResponse as ConfigGetResponse from .config_create_params import ConfigCreateParams as ConfigCreateParams -from .config_create_response import ConfigCreateResponse as ConfigCreateResponse +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/config_create_response.py b/src/cloudflare/types/logs/control/cmb/config_create_response.py deleted file mode 100644 index 5553278de..000000000 --- a/src/cloudflare/types/logs/control/cmb/config_create_response.py +++ /dev/null @@ -1,12 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional - -from ....._models import BaseModel - -__all__ = ["ConfigCreateResponse"] - - -class ConfigCreateResponse(BaseModel): - regions: Optional[str] = None - """Comma-separated list of regions.""" diff --git a/src/cloudflare/types/logs/control/cmb/config_get_response.py b/src/cloudflare/types/logs/control/cmb/logcontrol_cmb_config.py similarity index 73% rename from src/cloudflare/types/logs/control/cmb/config_get_response.py rename to src/cloudflare/types/logs/control/cmb/logcontrol_cmb_config.py index ae8a80876..e11d6bba8 100644 --- a/src/cloudflare/types/logs/control/cmb/config_get_response.py +++ b/src/cloudflare/types/logs/control/cmb/logcontrol_cmb_config.py @@ -4,9 +4,9 @@ from typing import Optional from ....._models import BaseModel -__all__ = ["ConfigGetResponse"] +__all__ = ["LogcontrolCmbConfig"] -class ConfigGetResponse(BaseModel): +class LogcontrolCmbConfig(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 c90963d15..9707f8f22 100644 --- a/src/cloudflare/types/magic_network_monitoring/__init__.py +++ b/src/cloudflare/types/magic_network_monitoring/__init__.py @@ -2,14 +2,6 @@ from __future__ import annotations -from .rule_get_response import RuleGetResponse as RuleGetResponse -from .rule_edit_response import RuleEditResponse as RuleEditResponse from .rule_list_response import RuleListResponse as RuleListResponse -from .config_get_response import ConfigGetResponse as ConfigGetResponse -from .config_edit_response import ConfigEditResponse as ConfigEditResponse -from .rule_create_response import RuleCreateResponse as RuleCreateResponse -from .rule_delete_response import RuleDeleteResponse as RuleDeleteResponse -from .rule_update_response import RuleUpdateResponse as RuleUpdateResponse -from .config_create_response import ConfigCreateResponse as ConfigCreateResponse -from .config_delete_response import ConfigDeleteResponse as ConfigDeleteResponse -from .config_update_response import ConfigUpdateResponse as ConfigUpdateResponse +from .magic_visibility_mnm_rule import MagicVisibilityMNMRule as MagicVisibilityMNMRule +from .magic_visibility_mnm_config import MagicVisibilityMNMConfig as MagicVisibilityMNMConfig diff --git a/src/cloudflare/types/magic_network_monitoring/config_create_response.py b/src/cloudflare/types/magic_network_monitoring/config_create_response.py deleted file mode 100644 index aeaea51d7..000000000 --- a/src/cloudflare/types/magic_network_monitoring/config_create_response.py +++ /dev/null @@ -1,20 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List - -from ..._models import BaseModel - -__all__ = ["ConfigCreateResponse"] - - -class ConfigCreateResponse(BaseModel): - default_sampling: float - """Fallback sampling rate of flow messages being sent in packets per second. - - This should match the packet sampling rate configured on the router. - """ - - name: str - """The account name.""" - - router_ips: List[str] diff --git a/src/cloudflare/types/magic_network_monitoring/config_edit_response.py b/src/cloudflare/types/magic_network_monitoring/config_edit_response.py deleted file mode 100644 index 4d14a75aa..000000000 --- a/src/cloudflare/types/magic_network_monitoring/config_edit_response.py +++ /dev/null @@ -1,20 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List - -from ..._models import BaseModel - -__all__ = ["ConfigEditResponse"] - - -class ConfigEditResponse(BaseModel): - default_sampling: float - """Fallback sampling rate of flow messages being sent in packets per second. - - This should match the packet sampling rate configured on the router. - """ - - name: str - """The account name.""" - - router_ips: List[str] diff --git a/src/cloudflare/types/magic_network_monitoring/config_get_response.py b/src/cloudflare/types/magic_network_monitoring/config_get_response.py deleted file mode 100644 index 64c973981..000000000 --- a/src/cloudflare/types/magic_network_monitoring/config_get_response.py +++ /dev/null @@ -1,20 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List - -from ..._models import BaseModel - -__all__ = ["ConfigGetResponse"] - - -class ConfigGetResponse(BaseModel): - default_sampling: float - """Fallback sampling rate of flow messages being sent in packets per second. - - This should match the packet sampling rate configured on the router. - """ - - name: str - """The account name.""" - - router_ips: List[str] diff --git a/src/cloudflare/types/magic_network_monitoring/config_update_response.py b/src/cloudflare/types/magic_network_monitoring/config_update_response.py deleted file mode 100644 index 5a5aad846..000000000 --- a/src/cloudflare/types/magic_network_monitoring/config_update_response.py +++ /dev/null @@ -1,20 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List - -from ..._models import BaseModel - -__all__ = ["ConfigUpdateResponse"] - - -class ConfigUpdateResponse(BaseModel): - default_sampling: float - """Fallback sampling rate of flow messages being sent in packets per second. - - This should match the packet sampling rate configured on the router. - """ - - name: str - """The account name.""" - - router_ips: List[str] diff --git a/src/cloudflare/types/magic_network_monitoring/configs/__init__.py b/src/cloudflare/types/magic_network_monitoring/configs/__init__.py index 61a79f3b5..b2f53e352 100644 --- a/src/cloudflare/types/magic_network_monitoring/configs/__init__.py +++ b/src/cloudflare/types/magic_network_monitoring/configs/__init__.py @@ -1,5 +1,3 @@ # File generated from our OpenAPI spec by Stainless. from __future__ import annotations - -from .full_get_response import FullGetResponse as FullGetResponse diff --git a/src/cloudflare/types/magic_network_monitoring/configs/full_get_response.py b/src/cloudflare/types/magic_network_monitoring/configs/full_get_response.py deleted file mode 100644 index b994c67d4..000000000 --- a/src/cloudflare/types/magic_network_monitoring/configs/full_get_response.py +++ /dev/null @@ -1,20 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List - -from ...._models import BaseModel - -__all__ = ["FullGetResponse"] - - -class FullGetResponse(BaseModel): - default_sampling: float - """Fallback sampling rate of flow messages being sent in packets per second. - - This should match the packet sampling rate configured on the router. - """ - - name: str - """The account name.""" - - router_ips: List[str] diff --git a/src/cloudflare/types/magic_network_monitoring/config_delete_response.py b/src/cloudflare/types/magic_network_monitoring/magic_visibility_mnm_config.py similarity index 82% rename from src/cloudflare/types/magic_network_monitoring/config_delete_response.py rename to src/cloudflare/types/magic_network_monitoring/magic_visibility_mnm_config.py index 4e9d2804f..2d919070c 100644 --- a/src/cloudflare/types/magic_network_monitoring/config_delete_response.py +++ b/src/cloudflare/types/magic_network_monitoring/magic_visibility_mnm_config.py @@ -4,10 +4,10 @@ from typing import List from ..._models import BaseModel -__all__ = ["ConfigDeleteResponse"] +__all__ = ["MagicVisibilityMNMConfig"] -class ConfigDeleteResponse(BaseModel): +class MagicVisibilityMNMConfig(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/rule_get_response.py b/src/cloudflare/types/magic_network_monitoring/magic_visibility_mnm_rule.py similarity index 95% rename from src/cloudflare/types/magic_network_monitoring/rule_get_response.py rename to src/cloudflare/types/magic_network_monitoring/magic_visibility_mnm_rule.py index 2e2f9a38c..dfee1d6fa 100644 --- a/src/cloudflare/types/magic_network_monitoring/rule_get_response.py +++ b/src/cloudflare/types/magic_network_monitoring/magic_visibility_mnm_rule.py @@ -4,10 +4,10 @@ from typing import List, Optional from ..._models import BaseModel -__all__ = ["RuleGetResponse"] +__all__ = ["MagicVisibilityMNMRule"] -class RuleGetResponse(BaseModel): +class MagicVisibilityMNMRule(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_create_response.py b/src/cloudflare/types/magic_network_monitoring/rule_create_response.py deleted file mode 100644 index 37de7fbbe..000000000 --- a/src/cloudflare/types/magic_network_monitoring/rule_create_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional - -from ..._models import BaseModel - -__all__ = ["RuleCreateResponse"] - - -class RuleCreateResponse(BaseModel): - automatic_advertisement: Optional[bool] = None - """ - Toggle on if you would like Cloudflare to automatically advertise the IP - Prefixes within the rule via Magic Transit when the rule is triggered. Only - available for users of Magic Transit. - """ - - duration: str - """ - The amount of time that the rule threshold must be exceeded to send an alert - notification. The final value must be equivalent to one of the following 8 - values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is - AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at - least one unit must be provided. - """ - - name: str - """The name of the rule. - - Must be unique. Supports characters A-Z, a-z, 0-9, underscore (\\__), dash (-), - period (.), and tilde (~). You can’t have a space in the rule name. Max 256 - characters. - """ - - prefixes: List[str] - - id: Optional[object] = None - - bandwidth_threshold: Optional[float] = None - """The number of bits per second for the rule. - - When this value is exceeded for the set duration, an alert notification is sent. - Minimum of 1 and no maximum. - """ - - packet_threshold: Optional[float] = None - """The number of packets per second for the rule. - - When this value is exceeded for the set duration, an alert notification is sent. - Minimum of 1 and no maximum. - """ diff --git a/src/cloudflare/types/magic_network_monitoring/rule_delete_response.py b/src/cloudflare/types/magic_network_monitoring/rule_delete_response.py deleted file mode 100644 index cb8ecf059..000000000 --- a/src/cloudflare/types/magic_network_monitoring/rule_delete_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional - -from ..._models import BaseModel - -__all__ = ["RuleDeleteResponse"] - - -class RuleDeleteResponse(BaseModel): - automatic_advertisement: Optional[bool] = None - """ - Toggle on if you would like Cloudflare to automatically advertise the IP - Prefixes within the rule via Magic Transit when the rule is triggered. Only - available for users of Magic Transit. - """ - - duration: str - """ - The amount of time that the rule threshold must be exceeded to send an alert - notification. The final value must be equivalent to one of the following 8 - values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is - AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at - least one unit must be provided. - """ - - name: str - """The name of the rule. - - Must be unique. Supports characters A-Z, a-z, 0-9, underscore (\\__), dash (-), - period (.), and tilde (~). You can’t have a space in the rule name. Max 256 - characters. - """ - - prefixes: List[str] - - id: Optional[object] = None - - bandwidth_threshold: Optional[float] = None - """The number of bits per second for the rule. - - When this value is exceeded for the set duration, an alert notification is sent. - Minimum of 1 and no maximum. - """ - - packet_threshold: Optional[float] = None - """The number of packets per second for the rule. - - When this value is exceeded for the set duration, an alert notification is sent. - Minimum of 1 and no maximum. - """ diff --git a/src/cloudflare/types/magic_network_monitoring/rule_edit_response.py b/src/cloudflare/types/magic_network_monitoring/rule_edit_response.py deleted file mode 100644 index 56872f21c..000000000 --- a/src/cloudflare/types/magic_network_monitoring/rule_edit_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional - -from ..._models import BaseModel - -__all__ = ["RuleEditResponse"] - - -class RuleEditResponse(BaseModel): - automatic_advertisement: Optional[bool] = None - """ - Toggle on if you would like Cloudflare to automatically advertise the IP - Prefixes within the rule via Magic Transit when the rule is triggered. Only - available for users of Magic Transit. - """ - - duration: str - """ - The amount of time that the rule threshold must be exceeded to send an alert - notification. The final value must be equivalent to one of the following 8 - values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is - AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at - least one unit must be provided. - """ - - name: str - """The name of the rule. - - Must be unique. Supports characters A-Z, a-z, 0-9, underscore (\\__), dash (-), - period (.), and tilde (~). You can’t have a space in the rule name. Max 256 - characters. - """ - - prefixes: List[str] - - id: Optional[object] = None - - bandwidth_threshold: Optional[float] = None - """The number of bits per second for the rule. - - When this value is exceeded for the set duration, an alert notification is sent. - Minimum of 1 and no maximum. - """ - - packet_threshold: Optional[float] = None - """The number of packets per second for the rule. - - When this value is exceeded for the set duration, an alert notification is sent. - Minimum of 1 and no maximum. - """ 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 07789ebde..8160de75b 100644 --- a/src/cloudflare/types/magic_network_monitoring/rule_list_response.py +++ b/src/cloudflare/types/magic_network_monitoring/rule_list_response.py @@ -2,53 +2,8 @@ from typing import List, Optional -from ..._models import BaseModel +from .magic_visibility_mnm_rule import MagicVisibilityMNMRule -__all__ = ["RuleListResponse", "RuleListResponseItem"] +__all__ = ["RuleListResponse"] - -class RuleListResponseItem(BaseModel): - automatic_advertisement: Optional[bool] = None - """ - Toggle on if you would like Cloudflare to automatically advertise the IP - Prefixes within the rule via Magic Transit when the rule is triggered. Only - available for users of Magic Transit. - """ - - duration: str - """ - The amount of time that the rule threshold must be exceeded to send an alert - notification. The final value must be equivalent to one of the following 8 - values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is - AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at - least one unit must be provided. - """ - - name: str - """The name of the rule. - - Must be unique. Supports characters A-Z, a-z, 0-9, underscore (\\__), dash (-), - period (.), and tilde (~). You can’t have a space in the rule name. Max 256 - characters. - """ - - prefixes: List[str] - - id: Optional[object] = None - - bandwidth_threshold: Optional[float] = None - """The number of bits per second for the rule. - - When this value is exceeded for the set duration, an alert notification is sent. - Minimum of 1 and no maximum. - """ - - packet_threshold: Optional[float] = None - """The number of packets per second for the rule. - - When this value is exceeded for the set duration, an alert notification is sent. - Minimum of 1 and no maximum. - """ - - -RuleListResponse = List[Optional[RuleListResponseItem]] +RuleListResponse = List[Optional[MagicVisibilityMNMRule]] diff --git a/src/cloudflare/types/magic_network_monitoring/rule_update_response.py b/src/cloudflare/types/magic_network_monitoring/rule_update_response.py deleted file mode 100644 index c7008831c..000000000 --- a/src/cloudflare/types/magic_network_monitoring/rule_update_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional - -from ..._models import BaseModel - -__all__ = ["RuleUpdateResponse"] - - -class RuleUpdateResponse(BaseModel): - automatic_advertisement: Optional[bool] = None - """ - Toggle on if you would like Cloudflare to automatically advertise the IP - Prefixes within the rule via Magic Transit when the rule is triggered. Only - available for users of Magic Transit. - """ - - duration: str - """ - The amount of time that the rule threshold must be exceeded to send an alert - notification. The final value must be equivalent to one of the following 8 - values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is - AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at - least one unit must be provided. - """ - - name: str - """The name of the rule. - - Must be unique. Supports characters A-Z, a-z, 0-9, underscore (\\__), dash (-), - period (.), and tilde (~). You can’t have a space in the rule name. Max 256 - characters. - """ - - prefixes: List[str] - - id: Optional[object] = None - - bandwidth_threshold: Optional[float] = None - """The number of bits per second for the rule. - - When this value is exceeded for the set duration, an alert notification is sent. - Minimum of 1 and no maximum. - """ - - packet_threshold: Optional[float] = None - """The number of packets per second for the rule. - - When this value is exceeded for the set duration, an alert notification is sent. - Minimum of 1 and no maximum. - """ diff --git a/src/cloudflare/types/magic_network_monitoring/rules/__init__.py b/src/cloudflare/types/magic_network_monitoring/rules/__init__.py index 3f5510d15..42b5abd34 100644 --- a/src/cloudflare/types/magic_network_monitoring/rules/__init__.py +++ b/src/cloudflare/types/magic_network_monitoring/rules/__init__.py @@ -2,4 +2,6 @@ from __future__ import annotations -from .advertisement_edit_response import AdvertisementEditResponse as AdvertisementEditResponse +from .magic_visibility_mnm_rule_advertisable import ( + MagicVisibilityMNMRuleAdvertisable as MagicVisibilityMNMRuleAdvertisable, +) diff --git a/src/cloudflare/types/magic_network_monitoring/rules/advertisement_edit_response.py b/src/cloudflare/types/magic_network_monitoring/rules/magic_visibility_mnm_rule_advertisable.py similarity index 79% rename from src/cloudflare/types/magic_network_monitoring/rules/advertisement_edit_response.py rename to src/cloudflare/types/magic_network_monitoring/rules/magic_visibility_mnm_rule_advertisable.py index db0139b61..726943bc4 100644 --- a/src/cloudflare/types/magic_network_monitoring/rules/advertisement_edit_response.py +++ b/src/cloudflare/types/magic_network_monitoring/rules/magic_visibility_mnm_rule_advertisable.py @@ -4,10 +4,10 @@ from typing import Optional from ...._models import BaseModel -__all__ = ["AdvertisementEditResponse"] +__all__ = ["MagicVisibilityMNMRuleAdvertisable"] -class AdvertisementEditResponse(BaseModel): +class MagicVisibilityMNMRuleAdvertisable(BaseModel): automatic_advertisement: Optional[bool] = None """ Toggle on if you would like Cloudflare to automatically advertise the IP diff --git a/src/cloudflare/types/mtls_certificate_delete_response.py b/src/cloudflare/types/mtls_certificate_delete_response.py deleted file mode 100644 index bb27c2419..000000000 --- a/src/cloudflare/types/mtls_certificate_delete_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from .._models import BaseModel - -__all__ = ["MTLSCertificateDeleteResponse"] - - -class MTLSCertificateDeleteResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - ca: Optional[bool] = None - """Indicates whether the certificate is a CA or leaf certificate.""" - - certificates: Optional[str] = None - """The uploaded root CA certificate.""" - - expires_on: Optional[datetime] = None - """When the certificate expires.""" - - issuer: Optional[str] = None - """The certificate authority that issued the certificate.""" - - name: Optional[str] = None - """Optional unique name for the certificate. Only used for human readability.""" - - serial_number: Optional[str] = None - """The certificate serial number.""" - - signature: Optional[str] = None - """The type of hash used for the certificate.""" - - uploaded_on: Optional[datetime] = None - """This is the time the certificate was uploaded.""" diff --git a/src/cloudflare/types/mtls_certificate_list_response.py b/src/cloudflare/types/mtls_certificate_list_response.py index 641abf299..edbbd9346 100644 --- a/src/cloudflare/types/mtls_certificate_list_response.py +++ b/src/cloudflare/types/mtls_certificate_list_response.py @@ -1,40 +1,11 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from .._models import BaseModel +from .tls_certificates_and_hostnames_components_schemas_certificate_object import ( + TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, +) -__all__ = ["MTLSCertificateListResponse", "MTLSCertificateListResponseItem"] +__all__ = ["MTLSCertificateListResponse"] - -class MTLSCertificateListResponseItem(BaseModel): - id: Optional[str] = None - """Identifier""" - - ca: Optional[bool] = None - """Indicates whether the certificate is a CA or leaf certificate.""" - - certificates: Optional[str] = None - """The uploaded root CA certificate.""" - - expires_on: Optional[datetime] = None - """When the certificate expires.""" - - issuer: Optional[str] = None - """The certificate authority that issued the certificate.""" - - name: Optional[str] = None - """Optional unique name for the certificate. Only used for human readability.""" - - serial_number: Optional[str] = None - """The certificate serial number.""" - - signature: Optional[str] = None - """The type of hash used for the certificate.""" - - uploaded_on: Optional[datetime] = None - """This is the time the certificate was uploaded.""" - - -MTLSCertificateListResponse = List[MTLSCertificateListResponseItem] +MTLSCertificateListResponse = List[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject] diff --git a/src/cloudflare/types/mtls_certificates/__init__.py b/src/cloudflare/types/mtls_certificates/__init__.py index 55fa54c26..0c9e4507c 100644 --- a/src/cloudflare/types/mtls_certificates/__init__.py +++ b/src/cloudflare/types/mtls_certificates/__init__.py @@ -3,3 +3,6 @@ from __future__ import annotations from .association_get_response import AssociationGetResponse as AssociationGetResponse +from .tls_certificates_and_hostnames_association_object import ( + TLSCertificatesAndHostnamesAssociationObject as TLSCertificatesAndHostnamesAssociationObject, +) diff --git a/src/cloudflare/types/mtls_certificates/association_get_response.py b/src/cloudflare/types/mtls_certificates/association_get_response.py index f4755c2ae..8cd584cf6 100644 --- a/src/cloudflare/types/mtls_certificates/association_get_response.py +++ b/src/cloudflare/types/mtls_certificates/association_get_response.py @@ -1,18 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ..._models import BaseModel +from .tls_certificates_and_hostnames_association_object import TLSCertificatesAndHostnamesAssociationObject -__all__ = ["AssociationGetResponse", "AssociationGetResponseItem"] +__all__ = ["AssociationGetResponse"] - -class AssociationGetResponseItem(BaseModel): - service: Optional[str] = None - """The service using the certificate.""" - - status: Optional[str] = None - """Certificate deployment status for the given service.""" - - -AssociationGetResponse = List[AssociationGetResponseItem] +AssociationGetResponse = List[TLSCertificatesAndHostnamesAssociationObject] diff --git a/src/cloudflare/types/mtls_certificates/tls_certificates_and_hostnames_association_object.py b/src/cloudflare/types/mtls_certificates/tls_certificates_and_hostnames_association_object.py new file mode 100644 index 000000000..54a7f2c84 --- /dev/null +++ b/src/cloudflare/types/mtls_certificates/tls_certificates_and_hostnames_association_object.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["TLSCertificatesAndHostnamesAssociationObject"] + + +class TLSCertificatesAndHostnamesAssociationObject(BaseModel): + service: Optional[str] = None + """The service using the certificate.""" + + status: Optional[str] = None + """Certificate deployment status for the given service.""" diff --git a/src/cloudflare/types/speed_schedule_get_response.py b/src/cloudflare/types/observatory_schedule.py similarity index 92% rename from src/cloudflare/types/speed_schedule_get_response.py rename to src/cloudflare/types/observatory_schedule.py index 363238bef..2b294be7e 100644 --- a/src/cloudflare/types/speed_schedule_get_response.py +++ b/src/cloudflare/types/observatory_schedule.py @@ -5,10 +5,10 @@ from typing_extensions import Literal from .._models import BaseModel -__all__ = ["SpeedScheduleGetResponse"] +__all__ = ["ObservatorySchedule"] -class SpeedScheduleGetResponse(BaseModel): +class ObservatorySchedule(BaseModel): frequency: Optional[Literal["DAILY", "WEEKLY"]] = None """The frequency of the test.""" diff --git a/src/cloudflare/types/speed_trends_list_response.py b/src/cloudflare/types/observatory_trend.py similarity index 91% rename from src/cloudflare/types/speed_trends_list_response.py rename to src/cloudflare/types/observatory_trend.py index 39b568e53..0fc0768b0 100644 --- a/src/cloudflare/types/speed_trends_list_response.py +++ b/src/cloudflare/types/observatory_trend.py @@ -6,10 +6,10 @@ from pydantic import Field as FieldInfo from .._models import BaseModel -__all__ = ["SpeedTrendsListResponse"] +__all__ = ["ObservatoryTrend"] -class SpeedTrendsListResponse(BaseModel): +class ObservatoryTrend(BaseModel): cls: Optional[List[Optional[float]]] = None """Cumulative Layout Shift trend.""" diff --git a/src/cloudflare/types/origin_tls_client_auth/__init__.py b/src/cloudflare/types/origin_tls_client_auth/__init__.py index a9b92a45f..70777c310 100644 --- a/src/cloudflare/types/origin_tls_client_auth/__init__.py +++ b/src/cloudflare/types/origin_tls_client_auth/__init__.py @@ -3,8 +3,10 @@ from __future__ import annotations from .setting_get_response import SettingGetResponse as SettingGetResponse -from .hostname_get_response import HostnameGetResponse as HostnameGetResponse from .setting_update_params import SettingUpdateParams as SettingUpdateParams 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, +) 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 db89d820b..59fd28c06 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 @@ -1,36 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ..._models import BaseModel +from .tls_certificates_and_hostnames_hostname_certid_object import TLSCertificatesAndHostnamesHostnameCertidObject -__all__ = ["HostnameUpdateResponse", "HostnameUpdateResponseItem"] +__all__ = ["HostnameUpdateResponse"] - -class HostnameUpdateResponseItem(BaseModel): - id: Optional[str] = None - """Identifier""" - - cert_id: Optional[str] = None - """Identifier""" - - certificate: Optional[str] = None - """The hostname certificate.""" - - enabled: Optional[bool] = None - """Indicates whether hostname-level authenticated origin pulls is enabled. - - A null value voids the association. - """ - - hostname: Optional[str] = None - """ - The hostname on the origin for which the client certificate uploaded will be - used. - """ - - private_key: Optional[str] = None - """The hostname certificate's private key.""" - - -HostnameUpdateResponse = List[HostnameUpdateResponseItem] +HostnameUpdateResponse = List[TLSCertificatesAndHostnamesHostnameCertidObject] 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 d15320dfe..41ed389eb 100644 --- a/src/cloudflare/types/origin_tls_client_auth/hostnames/__init__.py +++ b/src/cloudflare/types/origin_tls_client_auth/hostnames/__init__.py @@ -2,8 +2,8 @@ from __future__ import annotations -from .certificate_get_response import CertificateGetResponse as CertificateGetResponse from .certificate_create_params import CertificateCreateParams as CertificateCreateParams from .certificate_list_response import CertificateListResponse as CertificateListResponse -from .certificate_create_response import CertificateCreateResponse as CertificateCreateResponse -from .certificate_delete_response import CertificateDeleteResponse as CertificateDeleteResponse +from .tls_certificates_and_hostnames_schemas_certificate_object import ( + TLSCertificatesAndHostnamesSchemasCertificateObject as TLSCertificatesAndHostnamesSchemasCertificateObject, +) diff --git a/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_delete_response.py b/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_delete_response.py deleted file mode 100644 index fc680daa4..000000000 --- a/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_delete_response.py +++ /dev/null @@ -1,45 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["CertificateDeleteResponse"] - - -class CertificateDeleteResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - certificate: Optional[str] = None - """The hostname certificate.""" - - expires_on: Optional[datetime] = None - """The date when the certificate expires.""" - - issuer: Optional[str] = None - """The certificate authority that issued the certificate.""" - - serial_number: Optional[str] = None - """The serial number on the uploaded certificate.""" - - signature: Optional[str] = None - """The type of hash used for the certificate.""" - - status: Optional[ - Literal[ - "initializing", - "pending_deployment", - "pending_deletion", - "active", - "deleted", - "deployment_timed_out", - "deletion_timed_out", - ] - ] = None - """Status of the certificate or the association.""" - - uploaded_on: Optional[datetime] = None - """The time when the certificate was uploaded.""" diff --git a/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_get_response.py b/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_get_response.py deleted file mode 100644 index eed6f0a1e..000000000 --- a/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_get_response.py +++ /dev/null @@ -1,45 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["CertificateGetResponse"] - - -class CertificateGetResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - certificate: Optional[str] = None - """The hostname certificate.""" - - expires_on: Optional[datetime] = None - """The date when the certificate expires.""" - - issuer: Optional[str] = None - """The certificate authority that issued the certificate.""" - - serial_number: Optional[str] = None - """The serial number on the uploaded certificate.""" - - signature: Optional[str] = None - """The type of hash used for the certificate.""" - - status: Optional[ - Literal[ - "initializing", - "pending_deployment", - "pending_deletion", - "active", - "deleted", - "deployment_timed_out", - "deletion_timed_out", - ] - ] = None - """Status of the certificate or the association.""" - - uploaded_on: Optional[datetime] = None - """The time when the certificate was uploaded.""" 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 69702083e..c428df074 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 @@ -1,36 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ...._models import BaseModel +from ..tls_certificates_and_hostnames_hostname_certid_object import TLSCertificatesAndHostnamesHostnameCertidObject -__all__ = ["CertificateListResponse", "CertificateListResponseItem"] +__all__ = ["CertificateListResponse"] - -class CertificateListResponseItem(BaseModel): - id: Optional[str] = None - """Identifier""" - - cert_id: Optional[str] = None - """Identifier""" - - certificate: Optional[str] = None - """The hostname certificate.""" - - enabled: Optional[bool] = None - """Indicates whether hostname-level authenticated origin pulls is enabled. - - A null value voids the association. - """ - - hostname: Optional[str] = None - """ - The hostname on the origin for which the client certificate uploaded will be - used. - """ - - private_key: Optional[str] = None - """The hostname certificate's private key.""" - - -CertificateListResponse = List[CertificateListResponseItem] +CertificateListResponse = List[TLSCertificatesAndHostnamesHostnameCertidObject] diff --git a/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_create_response.py b/src/cloudflare/types/origin_tls_client_auth/hostnames/tls_certificates_and_hostnames_schemas_certificate_object.py similarity index 89% rename from src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_create_response.py rename to src/cloudflare/types/origin_tls_client_auth/hostnames/tls_certificates_and_hostnames_schemas_certificate_object.py index 922ad4737..fbd589d80 100644 --- a/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_create_response.py +++ b/src/cloudflare/types/origin_tls_client_auth/hostnames/tls_certificates_and_hostnames_schemas_certificate_object.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["CertificateCreateResponse"] +__all__ = ["TLSCertificatesAndHostnamesSchemasCertificateObject"] -class CertificateCreateResponse(BaseModel): +class TLSCertificatesAndHostnamesSchemasCertificateObject(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/origin_tls_client_auth/hostname_get_response.py b/src/cloudflare/types/origin_tls_client_auth/tls_certificates_and_hostnames_hostname_certid_object.py similarity index 94% rename from src/cloudflare/types/origin_tls_client_auth/hostname_get_response.py rename to src/cloudflare/types/origin_tls_client_auth/tls_certificates_and_hostnames_hostname_certid_object.py index b1789586c..c9d07173c 100644 --- a/src/cloudflare/types/origin_tls_client_auth/hostname_get_response.py +++ b/src/cloudflare/types/origin_tls_client_auth/tls_certificates_and_hostnames_hostname_certid_object.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["HostnameGetResponse"] +__all__ = ["TLSCertificatesAndHostnamesHostnameCertidObject"] -class HostnameGetResponse(BaseModel): +class TLSCertificatesAndHostnamesHostnameCertidObject(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 7fbb8e7c7..12f413617 100644 --- a/src/cloudflare/types/page_shield/__init__.py +++ b/src/cloudflare/types/page_shield/__init__.py @@ -2,15 +2,14 @@ from __future__ import annotations +from .page_shield_script import PageShieldScript as PageShieldScript from .script_list_params import ScriptListParams as ScriptListParams -from .policy_get_response import PolicyGetResponse as PolicyGetResponse 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 .policy_create_response import PolicyCreateResponse as PolicyCreateResponse -from .policy_update_response import PolicyUpdateResponse as PolicyUpdateResponse -from .connection_get_response import ConnectionGetResponse as ConnectionGetResponse +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/connection_list_response.py b/src/cloudflare/types/page_shield/connection_list_response.py index cf10f6e3b..9980899d1 100644 --- a/src/cloudflare/types/page_shield/connection_list_response.py +++ b/src/cloudflare/types/page_shield/connection_list_response.py @@ -1,32 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ..._models import BaseModel +from .page_shield_connection import PageShieldConnection -__all__ = ["ConnectionListResponse", "ConnectionListResponseItem"] +__all__ = ["ConnectionListResponse"] - -class ConnectionListResponseItem(BaseModel): - id: Optional[object] = None - - added_at: Optional[object] = None - - domain_reported_malicious: Optional[object] = None - - first_page_url: Optional[object] = None - - first_seen_at: Optional[object] = None - - host: Optional[object] = None - - last_seen_at: Optional[object] = None - - page_urls: Optional[object] = None - - url: Optional[object] = None - - url_contains_cdn_cgi_path: Optional[object] = None - - -ConnectionListResponse = List[ConnectionListResponseItem] +ConnectionListResponse = List[PageShieldConnection] diff --git a/src/cloudflare/types/page_shield/connection_get_response.py b/src/cloudflare/types/page_shield/page_shield_connection.py similarity index 87% rename from src/cloudflare/types/page_shield/connection_get_response.py rename to src/cloudflare/types/page_shield/page_shield_connection.py index 75231a73a..49dab8969 100644 --- a/src/cloudflare/types/page_shield/connection_get_response.py +++ b/src/cloudflare/types/page_shield/page_shield_connection.py @@ -4,10 +4,10 @@ from typing import Optional from ..._models import BaseModel -__all__ = ["ConnectionGetResponse"] +__all__ = ["PageShieldConnection"] -class ConnectionGetResponse(BaseModel): +class PageShieldConnection(BaseModel): id: Optional[object] = None added_at: Optional[object] = None diff --git a/src/cloudflare/types/page_shield/policy_create_response.py b/src/cloudflare/types/page_shield/page_shield_pageshield_policy.py similarity index 89% rename from src/cloudflare/types/page_shield/policy_create_response.py rename to src/cloudflare/types/page_shield/page_shield_pageshield_policy.py index f95c8831b..2306b3dda 100644 --- a/src/cloudflare/types/page_shield/policy_create_response.py +++ b/src/cloudflare/types/page_shield/page_shield_pageshield_policy.py @@ -5,10 +5,10 @@ from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["PolicyCreateResponse"] +__all__ = ["PageShieldPageshieldPolicy"] -class PolicyCreateResponse(BaseModel): +class PageShieldPageshieldPolicy(BaseModel): id: Optional[str] = None """The ID of the policy""" diff --git a/src/cloudflare/types/page_shield/page_shield_script.py b/src/cloudflare/types/page_shield/page_shield_script.py new file mode 100644 index 000000000..160192a18 --- /dev/null +++ b/src/cloudflare/types/page_shield/page_shield_script.py @@ -0,0 +1,35 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["PageShieldScript"] + + +class PageShieldScript(BaseModel): + id: Optional[object] = None + + added_at: Optional[object] = None + + domain_reported_malicious: Optional[object] = None + + fetched_at: Optional[object] = None + + first_page_url: Optional[object] = None + + first_seen_at: Optional[object] = None + + hash: Optional[object] = None + + host: Optional[object] = None + + js_integrity_score: Optional[object] = None + + last_seen_at: Optional[object] = None + + page_urls: Optional[object] = None + + url: Optional[object] = None + + url_contains_cdn_cgi_path: Optional[object] = None diff --git a/src/cloudflare/types/page_shield/policy_get_response.py b/src/cloudflare/types/page_shield/policy_get_response.py deleted file mode 100644 index 0a7256963..000000000 --- a/src/cloudflare/types/page_shield/policy_get_response.py +++ /dev/null @@ -1,31 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["PolicyGetResponse"] - - -class PolicyGetResponse(BaseModel): - id: Optional[str] = None - """The ID of the policy""" - - action: Optional[Literal["allow", "log"]] = None - """The action to take if the expression matches""" - - description: Optional[str] = None - """A description for the policy""" - - enabled: Optional[bool] = None - """Whether the policy is enabled""" - - expression: Optional[str] = None - """ - The expression which must match for the policy to be applied, using the - Cloudflare Firewall rule expression syntax - """ - - value: Optional[str] = None - """The policy which will be applied""" diff --git a/src/cloudflare/types/page_shield/policy_list_response.py b/src/cloudflare/types/page_shield/policy_list_response.py index f944ab31f..af49a185c 100644 --- a/src/cloudflare/types/page_shield/policy_list_response.py +++ b/src/cloudflare/types/page_shield/policy_list_response.py @@ -1,34 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .page_shield_pageshield_policy import PageShieldPageshieldPolicy -__all__ = ["PolicyListResponse", "PolicyListResponseItem"] +__all__ = ["PolicyListResponse"] - -class PolicyListResponseItem(BaseModel): - id: Optional[str] = None - """The ID of the policy""" - - action: Optional[Literal["allow", "log"]] = None - """The action to take if the expression matches""" - - description: Optional[str] = None - """A description for the policy""" - - enabled: Optional[bool] = None - """Whether the policy is enabled""" - - expression: Optional[str] = None - """ - The expression which must match for the policy to be applied, using the - Cloudflare Firewall rule expression syntax - """ - - value: Optional[str] = None - """The policy which will be applied""" - - -PolicyListResponse = List[PolicyListResponseItem] +PolicyListResponse = List[PageShieldPageshieldPolicy] diff --git a/src/cloudflare/types/page_shield/policy_update_response.py b/src/cloudflare/types/page_shield/policy_update_response.py deleted file mode 100644 index b2859ce3d..000000000 --- a/src/cloudflare/types/page_shield/policy_update_response.py +++ /dev/null @@ -1,31 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["PolicyUpdateResponse"] - - -class PolicyUpdateResponse(BaseModel): - id: Optional[str] = None - """The ID of the policy""" - - action: Optional[Literal["allow", "log"]] = None - """The action to take if the expression matches""" - - description: Optional[str] = None - """A description for the policy""" - - enabled: Optional[bool] = None - """Whether the policy is enabled""" - - expression: Optional[str] = None - """ - The expression which must match for the policy to be applied, using the - Cloudflare Firewall rule expression syntax - """ - - value: Optional[str] = None - """The policy which will be applied""" diff --git a/src/cloudflare/types/page_shield/script_list_response.py b/src/cloudflare/types/page_shield/script_list_response.py index 8325ceb6f..20daea307 100644 --- a/src/cloudflare/types/page_shield/script_list_response.py +++ b/src/cloudflare/types/page_shield/script_list_response.py @@ -1,38 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ..._models import BaseModel +from .page_shield_script import PageShieldScript -__all__ = ["ScriptListResponse", "ScriptListResponseItem"] +__all__ = ["ScriptListResponse"] - -class ScriptListResponseItem(BaseModel): - id: Optional[object] = None - - added_at: Optional[object] = None - - domain_reported_malicious: Optional[object] = None - - fetched_at: Optional[object] = None - - first_page_url: Optional[object] = None - - first_seen_at: Optional[object] = None - - hash: Optional[object] = None - - host: Optional[object] = None - - js_integrity_score: Optional[object] = None - - last_seen_at: Optional[object] = None - - page_urls: Optional[object] = None - - url: Optional[object] = None - - url_contains_cdn_cgi_path: Optional[object] = None - - -ScriptListResponse = List[ScriptListResponseItem] +ScriptListResponse = List[PageShieldScript] diff --git a/src/cloudflare/types/page_shield_list_response.py b/src/cloudflare/types/page_shield_get_zone_settings.py similarity index 88% rename from src/cloudflare/types/page_shield_list_response.py rename to src/cloudflare/types/page_shield_get_zone_settings.py index b7f012f48..149d45eaa 100644 --- a/src/cloudflare/types/page_shield_list_response.py +++ b/src/cloudflare/types/page_shield_get_zone_settings.py @@ -4,10 +4,10 @@ from typing import Optional from .._models import BaseModel -__all__ = ["PageShieldListResponse"] +__all__ = ["PageShieldGetZoneSettings"] -class PageShieldListResponse(BaseModel): +class PageShieldGetZoneSettings(BaseModel): enabled: Optional[bool] = None """When true, indicates that Page Shield is enabled.""" diff --git a/src/cloudflare/types/page_shield_update_response.py b/src/cloudflare/types/page_shield_update_zone_settings.py similarity index 87% rename from src/cloudflare/types/page_shield_update_response.py rename to src/cloudflare/types/page_shield_update_zone_settings.py index 65f16c71b..1c75bfd47 100644 --- a/src/cloudflare/types/page_shield_update_response.py +++ b/src/cloudflare/types/page_shield_update_zone_settings.py @@ -4,10 +4,10 @@ from typing import Optional from .._models import BaseModel -__all__ = ["PageShieldUpdateResponse"] +__all__ = ["PageShieldUpdateZoneSettings"] -class PageShieldUpdateResponse(BaseModel): +class PageShieldUpdateZoneSettings(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 10fddb0bb..04024a082 100644 --- a/src/cloudflare/types/pagerule_list_response.py +++ b/src/cloudflare/types/pagerule_list_response.py @@ -1,93 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from .._models import BaseModel +from .zones_page_rule import ZonesPageRule -__all__ = [ - "PageruleListResponse", - "PageruleListResponseItem", - "PageruleListResponseItemAction", - "PageruleListResponseItemActionValue", - "PageruleListResponseItemTarget", - "PageruleListResponseItemTargetConstraint", -] +__all__ = ["PageruleListResponse"] - -class PageruleListResponseItemActionValue(BaseModel): - type: Optional[Literal["temporary", "permanent"]] = None - """The response type for the URL redirect.""" - - url: Optional[str] = None - """ - The URL to redirect the request to. Notes: ${num} refers to the position of '\\**' - in the constraint value. - """ - - -class PageruleListResponseItemAction(BaseModel): - modified_on: Optional[datetime] = None - """The timestamp of when the override was last modified.""" - - name: Optional[Literal["forward_url"]] = None - """The type of route.""" - - value: Optional[PageruleListResponseItemActionValue] = None - - -class PageruleListResponseItemTargetConstraint(BaseModel): - operator: Literal["matches", "contains", "equals", "not_equal", "not_contain"] - """ - The matches operator can use asterisks and pipes as wildcard and 'or' operators. - """ - - value: str - """The URL pattern to match against the current request. - - The pattern may contain up to four asterisks ('\\**') as placeholders. - """ - - -class PageruleListResponseItemTarget(BaseModel): - constraint: PageruleListResponseItemTargetConstraint - """String constraint.""" - - target: Literal["url"] - """A target based on the URL of the request.""" - - -class PageruleListResponseItem(BaseModel): - id: str - """Identifier""" - - actions: List[PageruleListResponseItemAction] - """The set of actions to perform if the targets of this rule match the request. - - Actions can redirect to another URL or override settings, but not both. - """ - - created_on: datetime - """The timestamp of when the Page Rule was created.""" - - modified_on: datetime - """The timestamp of when the Page Rule was last modified.""" - - priority: int - """ - The priority of the rule, used to define which Page Rule is processed over - another. A higher number indicates a higher priority. For example, if you have a - catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to - take precedence (rule B: `/images/special/*`), specify a higher priority for - rule B so it overrides rule A. - """ - - status: Literal["active", "disabled"] - """The status of the Page Rule.""" - - targets: List[PageruleListResponseItemTarget] - """The rule targets to evaluate on each request.""" - - -PageruleListResponse = List[PageruleListResponseItem] +PageruleListResponse = List[ZonesPageRule] diff --git a/src/cloudflare/types/pagerules/__init__.py b/src/cloudflare/types/pagerules/__init__.py index 8f7e9fc08..1f532cc52 100644 --- a/src/cloudflare/types/pagerules/__init__.py +++ b/src/cloudflare/types/pagerules/__init__.py @@ -2,4 +2,4 @@ from __future__ import annotations -from .setting_list_response import SettingListResponse as SettingListResponse +from .zones_settings import ZonesSettings as ZonesSettings diff --git a/src/cloudflare/types/pagerules/setting_list_response.py b/src/cloudflare/types/pagerules/setting_list_response.py deleted file mode 100644 index 9dfff9994..000000000 --- a/src/cloudflare/types/pagerules/setting_list_response.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List - -__all__ = ["SettingListResponse"] - -SettingListResponse = List[object] diff --git a/src/cloudflare/types/rules/list_get_response.py b/src/cloudflare/types/pagerules/zones_settings.py similarity index 56% rename from src/cloudflare/types/rules/list_get_response.py rename to src/cloudflare/types/pagerules/zones_settings.py index 0aa21c6f5..a31108f04 100644 --- a/src/cloudflare/types/rules/list_get_response.py +++ b/src/cloudflare/types/pagerules/zones_settings.py @@ -2,6 +2,6 @@ from typing import List -__all__ = ["ListGetResponse"] +__all__ = ["ZonesSettings"] -ListGetResponse = List[object] +ZonesSettings = List[object] diff --git a/src/cloudflare/types/pages/__init__.py b/src/cloudflare/types/pages/__init__.py index daadc7d76..9b5190dc7 100644 --- a/src/cloudflare/types/pages/__init__.py +++ b/src/cloudflare/types/pages/__init__.py @@ -2,9 +2,11 @@ from __future__ import annotations +from .pages_projects import PagesProjects as PagesProjects +from .pages_deployments import PagesDeployments as PagesDeployments from .project_edit_params import ProjectEditParams as ProjectEditParams -from .project_get_response import ProjectGetResponse as ProjectGetResponse 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/projects/deployment_get_response.py b/src/cloudflare/types/pages/pages_deployments.py similarity index 92% rename from src/cloudflare/types/pages/projects/deployment_get_response.py rename to src/cloudflare/types/pages/pages_deployments.py index 7465b2bab..a5177181d 100644 --- a/src/cloudflare/types/pages/projects/deployment_get_response.py +++ b/src/cloudflare/types/pages/pages_deployments.py @@ -3,9 +3,9 @@ from typing import List, Optional from datetime import datetime -from ...._models import BaseModel +from ..._models import BaseModel -__all__ = ["DeploymentGetResponse", "DeploymentTrigger", "DeploymentTriggerMetadata", "Stage"] +__all__ = ["PagesDeployments", "DeploymentTrigger", "DeploymentTriggerMetadata", "Stage"] class DeploymentTriggerMetadata(BaseModel): @@ -41,7 +41,7 @@ class Stage(BaseModel): """State of the current stage.""" -class DeploymentGetResponse(BaseModel): +class PagesDeployments(BaseModel): id: Optional[str] = None """Id of the deployment.""" diff --git a/src/cloudflare/types/pages/pages_deployments_param.py b/src/cloudflare/types/pages/pages_deployments_param.py new file mode 100644 index 000000000..d006ea4c4 --- /dev/null +++ b/src/cloudflare/types/pages/pages_deployments_param.py @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import TypedDict + +__all__ = ["PagesDeploymentsParam"] + + +class PagesDeploymentsParam(TypedDict, total=False): + pass diff --git a/src/cloudflare/types/pages/project_get_response.py b/src/cloudflare/types/pages/pages_projects.py similarity index 74% rename from src/cloudflare/types/pages/project_get_response.py rename to src/cloudflare/types/pages/pages_projects.py index 35a8c5d52..25c75f779 100644 --- a/src/cloudflare/types/pages/project_get_response.py +++ b/src/cloudflare/types/pages/pages_projects.py @@ -7,14 +7,11 @@ from typing_extensions import Literal from pydantic import Field as FieldInfo from ..._models import BaseModel +from .pages_deployments import PagesDeployments __all__ = [ - "ProjectGetResponse", + "PagesProjects", "BuildConfig", - "CanonicalDeployment", - "CanonicalDeploymentDeploymentTrigger", - "CanonicalDeploymentDeploymentTriggerMetadata", - "CanonicalDeploymentStage", "DeploymentConfigs", "DeploymentConfigsPreview", "DeploymentConfigsPreviewAIBindings", @@ -56,10 +53,6 @@ __all__ = [ "DeploymentConfigsProductionR2BucketsR2Binding", "DeploymentConfigsProductionServiceBindings", "DeploymentConfigsProductionServiceBindingsServiceBinding", - "LatestDeployment", - "LatestDeploymentDeploymentTrigger", - "LatestDeploymentDeploymentTriggerMetadata", - "LatestDeploymentStage", ] @@ -83,86 +76,6 @@ class BuildConfig(BaseModel): """The auth token for analytics.""" -class CanonicalDeploymentDeploymentTriggerMetadata(BaseModel): - branch: Optional[str] = None - """Where the trigger happened.""" - - commit_hash: Optional[str] = None - """Hash of the deployment trigger commit.""" - - commit_message: Optional[str] = None - """Message of the deployment trigger commit.""" - - -class CanonicalDeploymentDeploymentTrigger(BaseModel): - metadata: Optional[CanonicalDeploymentDeploymentTriggerMetadata] = None - """Additional info about the trigger.""" - - type: Optional[str] = None - """What caused the deployment.""" - - -class CanonicalDeploymentStage(BaseModel): - ended_on: Optional[datetime] = None - """When the stage ended.""" - - name: Optional[str] = None - """The current build stage.""" - - started_on: Optional[datetime] = None - """When the stage started.""" - - status: Optional[str] = None - """State of the current stage.""" - - -class CanonicalDeployment(BaseModel): - id: Optional[str] = None - """Id of the deployment.""" - - aliases: Optional[List[object]] = None - """A list of alias URLs pointing to this deployment.""" - - build_config: Optional[object] = None - - created_on: Optional[datetime] = None - """When the deployment was created.""" - - deployment_trigger: Optional[CanonicalDeploymentDeploymentTrigger] = None - """Info about what caused the deployment.""" - - env_vars: Optional[object] = None - """A dict of env variables to build this deploy.""" - - environment: Optional[str] = None - """Type of deploy.""" - - is_skipped: Optional[bool] = None - """If the deployment has been skipped.""" - - latest_stage: Optional[object] = None - - modified_on: Optional[datetime] = None - """When the deployment was last modified.""" - - project_id: Optional[str] = None - """Id of the project.""" - - project_name: Optional[str] = None - """Name of the project.""" - - short_id: Optional[str] = None - """Short Id (8 character) of the deployment.""" - - source: Optional[object] = None - - stages: Optional[List[CanonicalDeploymentStage]] = None - """List of past stages.""" - - url: Optional[str] = None - """The live URL to view this deployment.""" - - class DeploymentConfigsPreviewAIBindingsAIBinding(BaseModel): project_id: Optional[object] = None @@ -467,94 +380,14 @@ class DeploymentConfigs(BaseModel): """Configs for production deploys.""" -class LatestDeploymentDeploymentTriggerMetadata(BaseModel): - branch: Optional[str] = None - """Where the trigger happened.""" - - commit_hash: Optional[str] = None - """Hash of the deployment trigger commit.""" - - commit_message: Optional[str] = None - """Message of the deployment trigger commit.""" - - -class LatestDeploymentDeploymentTrigger(BaseModel): - metadata: Optional[LatestDeploymentDeploymentTriggerMetadata] = None - """Additional info about the trigger.""" - - type: Optional[str] = None - """What caused the deployment.""" - - -class LatestDeploymentStage(BaseModel): - ended_on: Optional[datetime] = None - """When the stage ended.""" - - name: Optional[str] = None - """The current build stage.""" - - started_on: Optional[datetime] = None - """When the stage started.""" - - status: Optional[str] = None - """State of the current stage.""" - - -class LatestDeployment(BaseModel): - id: Optional[str] = None - """Id of the deployment.""" - - aliases: Optional[List[object]] = None - """A list of alias URLs pointing to this deployment.""" - - build_config: Optional[object] = None - - created_on: Optional[datetime] = None - """When the deployment was created.""" - - deployment_trigger: Optional[LatestDeploymentDeploymentTrigger] = None - """Info about what caused the deployment.""" - - env_vars: Optional[object] = None - """A dict of env variables to build this deploy.""" - - environment: Optional[str] = None - """Type of deploy.""" - - is_skipped: Optional[bool] = None - """If the deployment has been skipped.""" - - latest_stage: Optional[object] = None - - modified_on: Optional[datetime] = None - """When the deployment was last modified.""" - - project_id: Optional[str] = None - """Id of the project.""" - - project_name: Optional[str] = None - """Name of the project.""" - - short_id: Optional[str] = None - """Short Id (8 character) of the deployment.""" - - source: Optional[object] = None - - stages: Optional[List[LatestDeploymentStage]] = None - """List of past stages.""" - - url: Optional[str] = None - """The live URL to view this deployment.""" - - -class ProjectGetResponse(BaseModel): +class PagesProjects(BaseModel): id: Optional[str] = None """Id of the project.""" build_config: Optional[BuildConfig] = None """Configs for the project build process.""" - canonical_deployment: Optional[CanonicalDeployment] = None + canonical_deployment: Optional[PagesDeployments] = None created_on: Optional[datetime] = None """When the project was created.""" @@ -565,7 +398,7 @@ class ProjectGetResponse(BaseModel): domains: Optional[List[object]] = None """A list of associated custom domains for the project.""" - latest_deployment: Optional[LatestDeployment] = None + latest_deployment: Optional[PagesDeployments] = None name: Optional[str] = None """Name of the project.""" diff --git a/src/cloudflare/types/pages/project_create_params.py b/src/cloudflare/types/pages/project_create_params.py index 4c930f3e2..702b5d408 100644 --- a/src/cloudflare/types/pages/project_create_params.py +++ b/src/cloudflare/types/pages/project_create_params.py @@ -6,11 +6,11 @@ from typing import Iterable, Optional from typing_extensions import Literal, Required, Annotated, TypedDict from ..._utils import PropertyInfo +from .pages_deployments_param import PagesDeploymentsParam __all__ = [ "ProjectCreateParams", "BuildConfig", - "CanonicalDeployment", "DeploymentConfigs", "DeploymentConfigsPreview", "DeploymentConfigsPreviewAIBindings", @@ -52,7 +52,6 @@ __all__ = [ "DeploymentConfigsProductionR2BucketsR2Binding", "DeploymentConfigsProductionServiceBindings", "DeploymentConfigsProductionServiceBindingsServiceBinding", - "LatestDeployment", ] @@ -63,12 +62,12 @@ class ProjectCreateParams(TypedDict, total=False): build_config: BuildConfig """Configs for the project build process.""" - canonical_deployment: CanonicalDeployment + canonical_deployment: PagesDeploymentsParam deployment_configs: DeploymentConfigs """Configs for deployments in a project.""" - latest_deployment: LatestDeployment + latest_deployment: PagesDeploymentsParam name: str """Name of the project.""" @@ -97,10 +96,6 @@ class BuildConfig(TypedDict, total=False): """The auth token for analytics.""" -class CanonicalDeployment(TypedDict, total=False): - pass - - class DeploymentConfigsPreviewAIBindingsAIBinding(TypedDict, total=False): project_id: object @@ -401,7 +396,3 @@ class DeploymentConfigs(TypedDict, total=False): production: DeploymentConfigsProduction """Configs for production deploys.""" - - -class LatestDeployment(TypedDict, total=False): - pass diff --git a/src/cloudflare/types/pages/project_list_response.py b/src/cloudflare/types/pages/project_list_response.py index c0cd321fd..506d761fb 100644 --- a/src/cloudflare/types/pages/project_list_response.py +++ b/src/cloudflare/types/pages/project_list_response.py @@ -1,97 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ..._models import BaseModel +from .pages_deployments import PagesDeployments -__all__ = [ - "ProjectListResponse", - "ProjectListResponseItem", - "ProjectListResponseItemDeploymentTrigger", - "ProjectListResponseItemDeploymentTriggerMetadata", - "ProjectListResponseItemStage", -] +__all__ = ["ProjectListResponse"] - -class ProjectListResponseItemDeploymentTriggerMetadata(BaseModel): - branch: Optional[str] = None - """Where the trigger happened.""" - - commit_hash: Optional[str] = None - """Hash of the deployment trigger commit.""" - - commit_message: Optional[str] = None - """Message of the deployment trigger commit.""" - - -class ProjectListResponseItemDeploymentTrigger(BaseModel): - metadata: Optional[ProjectListResponseItemDeploymentTriggerMetadata] = None - """Additional info about the trigger.""" - - type: Optional[str] = None - """What caused the deployment.""" - - -class ProjectListResponseItemStage(BaseModel): - ended_on: Optional[datetime] = None - """When the stage ended.""" - - name: Optional[str] = None - """The current build stage.""" - - started_on: Optional[datetime] = None - """When the stage started.""" - - status: Optional[str] = None - """State of the current stage.""" - - -class ProjectListResponseItem(BaseModel): - id: Optional[str] = None - """Id of the deployment.""" - - aliases: Optional[List[object]] = None - """A list of alias URLs pointing to this deployment.""" - - build_config: Optional[object] = None - - created_on: Optional[datetime] = None - """When the deployment was created.""" - - deployment_trigger: Optional[ProjectListResponseItemDeploymentTrigger] = None - """Info about what caused the deployment.""" - - env_vars: Optional[object] = None - """A dict of env variables to build this deploy.""" - - environment: Optional[str] = None - """Type of deploy.""" - - is_skipped: Optional[bool] = None - """If the deployment has been skipped.""" - - latest_stage: Optional[object] = None - - modified_on: Optional[datetime] = None - """When the deployment was last modified.""" - - project_id: Optional[str] = None - """Id of the project.""" - - project_name: Optional[str] = None - """Name of the project.""" - - short_id: Optional[str] = None - """Short Id (8 character) of the deployment.""" - - source: Optional[object] = None - - stages: Optional[List[ProjectListResponseItemStage]] = None - """List of past stages.""" - - url: Optional[str] = None - """The live URL to view this deployment.""" - - -ProjectListResponse = List[ProjectListResponseItem] +ProjectListResponse = List[PagesDeployments] diff --git a/src/cloudflare/types/pages/projects/__init__.py b/src/cloudflare/types/pages/projects/__init__.py index 54a398eb4..86ae534be 100644 --- a/src/cloudflare/types/pages/projects/__init__.py +++ b/src/cloudflare/types/pages/projects/__init__.py @@ -7,9 +7,5 @@ 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 .domain_create_response import DomainCreateResponse as DomainCreateResponse -from .deployment_get_response import DeploymentGetResponse as DeploymentGetResponse from .deployment_create_params import DeploymentCreateParams as DeploymentCreateParams from .deployment_list_response import DeploymentListResponse as DeploymentListResponse -from .deployment_retry_response import DeploymentRetryResponse as DeploymentRetryResponse -from .deployment_create_response import DeploymentCreateResponse as DeploymentCreateResponse -from .deployment_rollback_response import DeploymentRollbackResponse as DeploymentRollbackResponse diff --git a/src/cloudflare/types/pages/projects/deployment_create_response.py b/src/cloudflare/types/pages/projects/deployment_create_response.py deleted file mode 100644 index 083d8b151..000000000 --- a/src/cloudflare/types/pages/projects/deployment_create_response.py +++ /dev/null @@ -1,88 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["DeploymentCreateResponse", "DeploymentTrigger", "DeploymentTriggerMetadata", "Stage"] - - -class DeploymentTriggerMetadata(BaseModel): - branch: Optional[str] = None - """Where the trigger happened.""" - - commit_hash: Optional[str] = None - """Hash of the deployment trigger commit.""" - - commit_message: Optional[str] = None - """Message of the deployment trigger commit.""" - - -class DeploymentTrigger(BaseModel): - metadata: Optional[DeploymentTriggerMetadata] = None - """Additional info about the trigger.""" - - type: Optional[str] = None - """What caused the deployment.""" - - -class Stage(BaseModel): - ended_on: Optional[datetime] = None - """When the stage ended.""" - - name: Optional[str] = None - """The current build stage.""" - - started_on: Optional[datetime] = None - """When the stage started.""" - - status: Optional[str] = None - """State of the current stage.""" - - -class DeploymentCreateResponse(BaseModel): - id: Optional[str] = None - """Id of the deployment.""" - - aliases: Optional[List[object]] = None - """A list of alias URLs pointing to this deployment.""" - - build_config: Optional[object] = None - - created_on: Optional[datetime] = None - """When the deployment was created.""" - - deployment_trigger: Optional[DeploymentTrigger] = None - """Info about what caused the deployment.""" - - env_vars: Optional[object] = None - """A dict of env variables to build this deploy.""" - - environment: Optional[str] = None - """Type of deploy.""" - - is_skipped: Optional[bool] = None - """If the deployment has been skipped.""" - - latest_stage: Optional[object] = None - - modified_on: Optional[datetime] = None - """When the deployment was last modified.""" - - project_id: Optional[str] = None - """Id of the project.""" - - project_name: Optional[str] = None - """Name of the project.""" - - short_id: Optional[str] = None - """Short Id (8 character) of the deployment.""" - - source: Optional[object] = None - - stages: Optional[List[Stage]] = None - """List of past stages.""" - - url: Optional[str] = None - """The live URL to view this deployment.""" diff --git a/src/cloudflare/types/pages/projects/deployment_list_response.py b/src/cloudflare/types/pages/projects/deployment_list_response.py index 8dd446edd..f97cc17f2 100644 --- a/src/cloudflare/types/pages/projects/deployment_list_response.py +++ b/src/cloudflare/types/pages/projects/deployment_list_response.py @@ -1,97 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ...._models import BaseModel +from ..pages_deployments import PagesDeployments -__all__ = [ - "DeploymentListResponse", - "DeploymentListResponseItem", - "DeploymentListResponseItemDeploymentTrigger", - "DeploymentListResponseItemDeploymentTriggerMetadata", - "DeploymentListResponseItemStage", -] +__all__ = ["DeploymentListResponse"] - -class DeploymentListResponseItemDeploymentTriggerMetadata(BaseModel): - branch: Optional[str] = None - """Where the trigger happened.""" - - commit_hash: Optional[str] = None - """Hash of the deployment trigger commit.""" - - commit_message: Optional[str] = None - """Message of the deployment trigger commit.""" - - -class DeploymentListResponseItemDeploymentTrigger(BaseModel): - metadata: Optional[DeploymentListResponseItemDeploymentTriggerMetadata] = None - """Additional info about the trigger.""" - - type: Optional[str] = None - """What caused the deployment.""" - - -class DeploymentListResponseItemStage(BaseModel): - ended_on: Optional[datetime] = None - """When the stage ended.""" - - name: Optional[str] = None - """The current build stage.""" - - started_on: Optional[datetime] = None - """When the stage started.""" - - status: Optional[str] = None - """State of the current stage.""" - - -class DeploymentListResponseItem(BaseModel): - id: Optional[str] = None - """Id of the deployment.""" - - aliases: Optional[List[object]] = None - """A list of alias URLs pointing to this deployment.""" - - build_config: Optional[object] = None - - created_on: Optional[datetime] = None - """When the deployment was created.""" - - deployment_trigger: Optional[DeploymentListResponseItemDeploymentTrigger] = None - """Info about what caused the deployment.""" - - env_vars: Optional[object] = None - """A dict of env variables to build this deploy.""" - - environment: Optional[str] = None - """Type of deploy.""" - - is_skipped: Optional[bool] = None - """If the deployment has been skipped.""" - - latest_stage: Optional[object] = None - - modified_on: Optional[datetime] = None - """When the deployment was last modified.""" - - project_id: Optional[str] = None - """Id of the project.""" - - project_name: Optional[str] = None - """Name of the project.""" - - short_id: Optional[str] = None - """Short Id (8 character) of the deployment.""" - - source: Optional[object] = None - - stages: Optional[List[DeploymentListResponseItemStage]] = None - """List of past stages.""" - - url: Optional[str] = None - """The live URL to view this deployment.""" - - -DeploymentListResponse = List[DeploymentListResponseItem] +DeploymentListResponse = List[PagesDeployments] diff --git a/src/cloudflare/types/pages/projects/deployment_retry_response.py b/src/cloudflare/types/pages/projects/deployment_retry_response.py deleted file mode 100644 index ffcd052b0..000000000 --- a/src/cloudflare/types/pages/projects/deployment_retry_response.py +++ /dev/null @@ -1,88 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["DeploymentRetryResponse", "DeploymentTrigger", "DeploymentTriggerMetadata", "Stage"] - - -class DeploymentTriggerMetadata(BaseModel): - branch: Optional[str] = None - """Where the trigger happened.""" - - commit_hash: Optional[str] = None - """Hash of the deployment trigger commit.""" - - commit_message: Optional[str] = None - """Message of the deployment trigger commit.""" - - -class DeploymentTrigger(BaseModel): - metadata: Optional[DeploymentTriggerMetadata] = None - """Additional info about the trigger.""" - - type: Optional[str] = None - """What caused the deployment.""" - - -class Stage(BaseModel): - ended_on: Optional[datetime] = None - """When the stage ended.""" - - name: Optional[str] = None - """The current build stage.""" - - started_on: Optional[datetime] = None - """When the stage started.""" - - status: Optional[str] = None - """State of the current stage.""" - - -class DeploymentRetryResponse(BaseModel): - id: Optional[str] = None - """Id of the deployment.""" - - aliases: Optional[List[object]] = None - """A list of alias URLs pointing to this deployment.""" - - build_config: Optional[object] = None - - created_on: Optional[datetime] = None - """When the deployment was created.""" - - deployment_trigger: Optional[DeploymentTrigger] = None - """Info about what caused the deployment.""" - - env_vars: Optional[object] = None - """A dict of env variables to build this deploy.""" - - environment: Optional[str] = None - """Type of deploy.""" - - is_skipped: Optional[bool] = None - """If the deployment has been skipped.""" - - latest_stage: Optional[object] = None - - modified_on: Optional[datetime] = None - """When the deployment was last modified.""" - - project_id: Optional[str] = None - """Id of the project.""" - - project_name: Optional[str] = None - """Name of the project.""" - - short_id: Optional[str] = None - """Short Id (8 character) of the deployment.""" - - source: Optional[object] = None - - stages: Optional[List[Stage]] = None - """List of past stages.""" - - url: Optional[str] = None - """The live URL to view this deployment.""" diff --git a/src/cloudflare/types/pages/projects/deployment_rollback_response.py b/src/cloudflare/types/pages/projects/deployment_rollback_response.py deleted file mode 100644 index e0db9fc33..000000000 --- a/src/cloudflare/types/pages/projects/deployment_rollback_response.py +++ /dev/null @@ -1,88 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["DeploymentRollbackResponse", "DeploymentTrigger", "DeploymentTriggerMetadata", "Stage"] - - -class DeploymentTriggerMetadata(BaseModel): - branch: Optional[str] = None - """Where the trigger happened.""" - - commit_hash: Optional[str] = None - """Hash of the deployment trigger commit.""" - - commit_message: Optional[str] = None - """Message of the deployment trigger commit.""" - - -class DeploymentTrigger(BaseModel): - metadata: Optional[DeploymentTriggerMetadata] = None - """Additional info about the trigger.""" - - type: Optional[str] = None - """What caused the deployment.""" - - -class Stage(BaseModel): - ended_on: Optional[datetime] = None - """When the stage ended.""" - - name: Optional[str] = None - """The current build stage.""" - - started_on: Optional[datetime] = None - """When the stage started.""" - - status: Optional[str] = None - """State of the current stage.""" - - -class DeploymentRollbackResponse(BaseModel): - id: Optional[str] = None - """Id of the deployment.""" - - aliases: Optional[List[object]] = None - """A list of alias URLs pointing to this deployment.""" - - build_config: Optional[object] = None - - created_on: Optional[datetime] = None - """When the deployment was created.""" - - deployment_trigger: Optional[DeploymentTrigger] = None - """Info about what caused the deployment.""" - - env_vars: Optional[object] = None - """A dict of env variables to build this deploy.""" - - environment: Optional[str] = None - """Type of deploy.""" - - is_skipped: Optional[bool] = None - """If the deployment has been skipped.""" - - latest_stage: Optional[object] = None - - modified_on: Optional[datetime] = None - """When the deployment was last modified.""" - - project_id: Optional[str] = None - """Id of the project.""" - - project_name: Optional[str] = None - """Name of the project.""" - - short_id: Optional[str] = None - """Short Id (8 character) of the deployment.""" - - source: Optional[object] = None - - stages: Optional[List[Stage]] = None - """List of past stages.""" - - url: Optional[str] = None - """The live URL to view this deployment.""" diff --git a/src/cloudflare/types/pcaps/__init__.py b/src/cloudflare/types/pcaps/__init__.py index 5a4e768a5..7ad285d97 100644 --- a/src/cloudflare/types/pcaps/__init__.py +++ b/src/cloudflare/types/pcaps/__init__.py @@ -4,6 +4,5 @@ from __future__ import annotations from .ownership_get_response import OwnershipGetResponse as OwnershipGetResponse from .ownership_create_params import OwnershipCreateParams as OwnershipCreateParams -from .ownership_create_response import OwnershipCreateResponse as OwnershipCreateResponse from .ownership_validate_params import OwnershipValidateParams as OwnershipValidateParams -from .ownership_validate_response import OwnershipValidateResponse as OwnershipValidateResponse +from .magic_visibility_pcaps_ownership import MagicVisibilityPCAPsOwnership as MagicVisibilityPCAPsOwnership diff --git a/src/cloudflare/types/pcaps/ownership_validate_response.py b/src/cloudflare/types/pcaps/magic_visibility_pcaps_ownership.py similarity index 89% rename from src/cloudflare/types/pcaps/ownership_validate_response.py rename to src/cloudflare/types/pcaps/magic_visibility_pcaps_ownership.py index 29637d369..9928be87d 100644 --- a/src/cloudflare/types/pcaps/ownership_validate_response.py +++ b/src/cloudflare/types/pcaps/magic_visibility_pcaps_ownership.py @@ -5,10 +5,10 @@ from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["OwnershipValidateResponse"] +__all__ = ["MagicVisibilityPCAPsOwnership"] -class OwnershipValidateResponse(BaseModel): +class MagicVisibilityPCAPsOwnership(BaseModel): id: str """The bucket ID associated with the packet captures API.""" diff --git a/src/cloudflare/types/pcaps/ownership_create_response.py b/src/cloudflare/types/pcaps/ownership_create_response.py deleted file mode 100644 index 6899e1b2d..000000000 --- a/src/cloudflare/types/pcaps/ownership_create_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["OwnershipCreateResponse"] - - -class OwnershipCreateResponse(BaseModel): - id: str - """The bucket ID associated with the packet captures API.""" - - destination_conf: str - """The full URI for the bucket. This field only applies to `full` packet captures.""" - - filename: str - """The ownership challenge filename stored in the bucket.""" - - status: Literal["pending", "success", "failed"] - """The status of the ownership challenge. Can be pending, success or failed.""" - - submitted: str - """The RFC 3339 timestamp when the bucket was added to packet captures API.""" - - validated: Optional[str] = None - """The RFC 3339 timestamp when the bucket was validated.""" diff --git a/src/cloudflare/types/pcaps/ownership_get_response.py b/src/cloudflare/types/pcaps/ownership_get_response.py index 3fec8ed86..a1b07e6cf 100644 --- a/src/cloudflare/types/pcaps/ownership_get_response.py +++ b/src/cloudflare/types/pcaps/ownership_get_response.py @@ -1,31 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .magic_visibility_pcaps_ownership import MagicVisibilityPCAPsOwnership -__all__ = ["OwnershipGetResponse", "OwnershipGetResponseItem"] +__all__ = ["OwnershipGetResponse"] - -class OwnershipGetResponseItem(BaseModel): - id: str - """The bucket ID associated with the packet captures API.""" - - destination_conf: str - """The full URI for the bucket. This field only applies to `full` packet captures.""" - - filename: str - """The ownership challenge filename stored in the bucket.""" - - status: Literal["pending", "success", "failed"] - """The status of the ownership challenge. Can be pending, success or failed.""" - - submitted: str - """The RFC 3339 timestamp when the bucket was added to packet captures API.""" - - validated: Optional[str] = None - """The RFC 3339 timestamp when the bucket was validated.""" - - -OwnershipGetResponse = List[OwnershipGetResponseItem] +OwnershipGetResponse = List[MagicVisibilityPCAPsOwnership] diff --git a/src/cloudflare/types/queue_list_response.py b/src/cloudflare/types/queue_list_response.py index 43d20130e..ccae6348f 100644 --- a/src/cloudflare/types/queue_list_response.py +++ b/src/cloudflare/types/queue_list_response.py @@ -1,28 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from .._models import BaseModel +from .workers_queue import WorkersQueue -__all__ = ["QueueListResponse", "QueueListResponseItem"] +__all__ = ["QueueListResponse"] - -class QueueListResponseItem(BaseModel): - consumers: Optional[object] = None - - consumers_total_count: Optional[object] = None - - created_on: Optional[object] = None - - modified_on: Optional[object] = None - - producers: Optional[object] = None - - producers_total_count: Optional[object] = None - - queue_id: Optional[object] = None - - queue_name: Optional[str] = None - - -QueueListResponse = List[QueueListResponseItem] +QueueListResponse = List[WorkersQueue] diff --git a/src/cloudflare/types/queues/__init__.py b/src/cloudflare/types/queues/__init__.py index 8edcd7d5c..2837d082a 100644 --- a/src/cloudflare/types/queues/__init__.py +++ b/src/cloudflare/types/queues/__init__.py @@ -2,9 +2,10 @@ from __future__ import annotations +from .workers_consumer import WorkersConsumer as WorkersConsumer from .consumer_get_response import ConsumerGetResponse as ConsumerGetResponse from .consumer_create_params import ConsumerCreateParams as ConsumerCreateParams from .consumer_update_params import ConsumerUpdateParams as ConsumerUpdateParams -from .consumer_create_response import ConsumerCreateResponse as ConsumerCreateResponse from .consumer_delete_response import ConsumerDeleteResponse as ConsumerDeleteResponse -from .consumer_update_response import ConsumerUpdateResponse as ConsumerUpdateResponse +from .workers_consumer_created import WorkersConsumerCreated as WorkersConsumerCreated +from .workers_consumer_updated import WorkersConsumerUpdated as WorkersConsumerUpdated diff --git a/src/cloudflare/types/queues/consumer_get_response.py b/src/cloudflare/types/queues/consumer_get_response.py index 6ef673fdf..fe58087a1 100644 --- a/src/cloudflare/types/queues/consumer_get_response.py +++ b/src/cloudflare/types/queues/consumer_get_response.py @@ -1,30 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ..._models import BaseModel +from .workers_consumer import WorkersConsumer -__all__ = ["ConsumerGetResponse", "ConsumerGetResponseItem", "ConsumerGetResponseItemSettings"] +__all__ = ["ConsumerGetResponse"] - -class ConsumerGetResponseItemSettings(BaseModel): - batch_size: Optional[float] = None - - max_retries: Optional[float] = None - - max_wait_time_ms: Optional[float] = None - - -class ConsumerGetResponseItem(BaseModel): - created_on: Optional[object] = None - - environment: Optional[object] = None - - queue_name: Optional[object] = None - - service: Optional[object] = None - - settings: Optional[ConsumerGetResponseItemSettings] = None - - -ConsumerGetResponse = List[ConsumerGetResponseItem] +ConsumerGetResponse = List[WorkersConsumer] diff --git a/src/cloudflare/types/queues/workers_consumer.py b/src/cloudflare/types/queues/workers_consumer.py new file mode 100644 index 000000000..182d98b07 --- /dev/null +++ b/src/cloudflare/types/queues/workers_consumer.py @@ -0,0 +1,27 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["WorkersConsumer", "Settings"] + + +class Settings(BaseModel): + batch_size: Optional[float] = None + + max_retries: Optional[float] = None + + max_wait_time_ms: Optional[float] = None + + +class WorkersConsumer(BaseModel): + created_on: Optional[object] = None + + environment: Optional[object] = None + + queue_name: Optional[object] = None + + service: Optional[object] = None + + settings: Optional[Settings] = None diff --git a/src/cloudflare/types/queues/consumer_create_response.py b/src/cloudflare/types/queues/workers_consumer_created.py similarity index 85% rename from src/cloudflare/types/queues/consumer_create_response.py rename to src/cloudflare/types/queues/workers_consumer_created.py index 2b5202466..615a07436 100644 --- a/src/cloudflare/types/queues/consumer_create_response.py +++ b/src/cloudflare/types/queues/workers_consumer_created.py @@ -4,7 +4,7 @@ from typing import Optional from ..._models import BaseModel -__all__ = ["ConsumerCreateResponse", "Settings"] +__all__ = ["WorkersConsumerCreated", "Settings"] class Settings(BaseModel): @@ -15,7 +15,7 @@ class Settings(BaseModel): max_wait_time_ms: Optional[float] = None -class ConsumerCreateResponse(BaseModel): +class WorkersConsumerCreated(BaseModel): created_on: Optional[object] = None dead_letter_queue: Optional[str] = None diff --git a/src/cloudflare/types/queues/consumer_update_response.py b/src/cloudflare/types/queues/workers_consumer_updated.py similarity index 85% rename from src/cloudflare/types/queues/consumer_update_response.py rename to src/cloudflare/types/queues/workers_consumer_updated.py index 47c30f526..3e8b1c38a 100644 --- a/src/cloudflare/types/queues/consumer_update_response.py +++ b/src/cloudflare/types/queues/workers_consumer_updated.py @@ -4,7 +4,7 @@ from typing import Optional from ..._models import BaseModel -__all__ = ["ConsumerUpdateResponse", "Settings"] +__all__ = ["WorkersConsumerUpdated", "Settings"] class Settings(BaseModel): @@ -15,7 +15,7 @@ class Settings(BaseModel): max_wait_time_ms: Optional[float] = None -class ConsumerUpdateResponse(BaseModel): +class WorkersConsumerUpdated(BaseModel): created_on: Optional[object] = None dead_letter_queue: Optional[object] = None diff --git a/src/cloudflare/types/r2/__init__.py b/src/cloudflare/types/r2/__init__.py index ae10851d2..a3dd91f95 100644 --- a/src/cloudflare/types/r2/__init__.py +++ b/src/cloudflare/types/r2/__init__.py @@ -2,12 +2,10 @@ from __future__ import annotations +from .r2_sippy import R2Sippy as R2Sippy +from .r2_bucket import R2Bucket as R2Bucket from .bucket_list_params import BucketListParams as BucketListParams -from .sippy_get_response import SippyGetResponse as SippyGetResponse -from .bucket_get_response import BucketGetResponse as BucketGetResponse from .sippy_update_params import SippyUpdateParams as SippyUpdateParams from .bucket_create_params import BucketCreateParams as BucketCreateParams from .bucket_list_response import BucketListResponse as BucketListResponse from .sippy_delete_response import SippyDeleteResponse as SippyDeleteResponse -from .sippy_update_response import SippyUpdateResponse as SippyUpdateResponse -from .bucket_create_response import BucketCreateResponse as BucketCreateResponse diff --git a/src/cloudflare/types/r2/bucket_create_response.py b/src/cloudflare/types/r2/bucket_create_response.py deleted file mode 100644 index 33c3ebb9d..000000000 --- a/src/cloudflare/types/r2/bucket_create_response.py +++ /dev/null @@ -1,19 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["BucketCreateResponse"] - - -class BucketCreateResponse(BaseModel): - creation_date: Optional[str] = None - """Creation timestamp""" - - location: Optional[Literal["apac", "eeur", "enam", "weur", "wnam"]] = None - """Location of the bucket""" - - name: Optional[str] = None - """Name of the bucket""" diff --git a/src/cloudflare/types/r2/bucket_list_response.py b/src/cloudflare/types/r2/bucket_list_response.py index 907838192..27597c443 100644 --- a/src/cloudflare/types/r2/bucket_list_response.py +++ b/src/cloudflare/types/r2/bucket_list_response.py @@ -1,22 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .r2_bucket import R2Bucket -__all__ = ["BucketListResponse", "BucketListResponseItem"] +__all__ = ["BucketListResponse"] - -class BucketListResponseItem(BaseModel): - creation_date: Optional[str] = None - """Creation timestamp""" - - location: Optional[Literal["apac", "eeur", "enam", "weur", "wnam"]] = None - """Location of the bucket""" - - name: Optional[str] = None - """Name of the bucket""" - - -BucketListResponse = List[BucketListResponseItem] +BucketListResponse = List[R2Bucket] diff --git a/src/cloudflare/types/r2/bucket_get_response.py b/src/cloudflare/types/r2/r2_bucket.py similarity index 85% rename from src/cloudflare/types/r2/bucket_get_response.py rename to src/cloudflare/types/r2/r2_bucket.py index 9eef7c527..7bd03b829 100644 --- a/src/cloudflare/types/r2/bucket_get_response.py +++ b/src/cloudflare/types/r2/r2_bucket.py @@ -5,10 +5,10 @@ from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["BucketGetResponse"] +__all__ = ["R2Bucket"] -class BucketGetResponse(BaseModel): +class R2Bucket(BaseModel): creation_date: Optional[str] = None """Creation timestamp""" diff --git a/src/cloudflare/types/r2/sippy_get_response.py b/src/cloudflare/types/r2/r2_sippy.py similarity index 92% rename from src/cloudflare/types/r2/sippy_get_response.py rename to src/cloudflare/types/r2/r2_sippy.py index 29dffcddc..2d30dff5f 100644 --- a/src/cloudflare/types/r2/sippy_get_response.py +++ b/src/cloudflare/types/r2/r2_sippy.py @@ -7,7 +7,7 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel -__all__ = ["SippyGetResponse", "Destination", "Source"] +__all__ = ["R2Sippy", "Destination", "Source"] class Destination(BaseModel): @@ -32,7 +32,7 @@ class Source(BaseModel): """Region where the bucket resides (AWS only)""" -class SippyGetResponse(BaseModel): +class R2Sippy(BaseModel): destination: Optional[Destination] = None """Details about the configured destination bucket""" diff --git a/src/cloudflare/types/r2/sippy_update_response.py b/src/cloudflare/types/r2/sippy_update_response.py deleted file mode 100644 index b9ee554cf..000000000 --- a/src/cloudflare/types/r2/sippy_update_response.py +++ /dev/null @@ -1,43 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = ["SippyUpdateResponse", "Destination", "Source"] - - -class Destination(BaseModel): - access_key_id: Optional[str] = FieldInfo(alias="accessKeyId", default=None) - """ID of the Cloudflare API token used when writing objects to this bucket""" - - account: Optional[str] = None - - bucket: Optional[str] = None - """Name of the bucket on the provider""" - - provider: Optional[Literal["r2"]] = None - - -class Source(BaseModel): - bucket: Optional[str] = None - """Name of the bucket on the provider""" - - provider: Optional[Literal["aws", "gcs"]] = None - - region: Optional[str] = None - """Region where the bucket resides (AWS only)""" - - -class SippyUpdateResponse(BaseModel): - destination: Optional[Destination] = None - """Details about the configured destination bucket""" - - enabled: Optional[bool] = None - """State of Sippy for this bucket""" - - source: Optional[Source] = None - """Details about the configured source bucket""" diff --git a/src/cloudflare/types/rules/__init__.py b/src/cloudflare/types/rules/__init__.py index 305a1cb46..a6212ee3a 100644 --- a/src/cloudflare/types/rules/__init__.py +++ b/src/cloudflare/types/rules/__init__.py @@ -2,10 +2,8 @@ from __future__ import annotations -from .list_get_response import ListGetResponse as ListGetResponse +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_create_response import ListCreateResponse as ListCreateResponse from .list_delete_response import ListDeleteResponse as ListDeleteResponse -from .list_update_response import ListUpdateResponse as ListUpdateResponse diff --git a/src/cloudflare/types/rules/list_create_response.py b/src/cloudflare/types/rules/list_create_response.py deleted file mode 100644 index 22e7cef9b..000000000 --- a/src/cloudflare/types/rules/list_create_response.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List - -__all__ = ["ListCreateResponse"] - -ListCreateResponse = List[object] diff --git a/src/cloudflare/types/rules/list_list_response.py b/src/cloudflare/types/rules/list_list_response.py index f5b74f24f..5590fa0a2 100644 --- a/src/cloudflare/types/rules/list_list_response.py +++ b/src/cloudflare/types/rules/list_list_response.py @@ -1,41 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .lists_list import ListsList -__all__ = ["ListListResponse", "ListListResponseItem"] +__all__ = ["ListListResponse"] - -class ListListResponseItem(BaseModel): - id: str - """The unique ID of the list.""" - - created_on: str - """The RFC 3339 timestamp of when the list was created.""" - - kind: Literal["ip", "redirect", "hostname", "asn"] - """The type of the list. - - Each type supports specific list items (IP addresses, ASNs, hostnames or - redirects). - """ - - modified_on: str - """The RFC 3339 timestamp of when the list was last modified.""" - - name: str - """An informative name for the list. Use this name in filter and rule expressions.""" - - num_items: float - """The number of items in the list.""" - - description: Optional[str] = None - """An informative summary of the list.""" - - num_referencing_filters: Optional[float] = None - """The number of [filters](/operations/filters-list-filters) referencing the list.""" - - -ListListResponse = List[ListListResponseItem] +ListListResponse = List[ListsList] diff --git a/src/cloudflare/types/rules/list_update_response.py b/src/cloudflare/types/rules/list_update_response.py deleted file mode 100644 index cbcc7c743..000000000 --- a/src/cloudflare/types/rules/list_update_response.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List - -__all__ = ["ListUpdateResponse"] - -ListUpdateResponse = List[object] diff --git a/src/cloudflare/types/rules/lists_list.py b/src/cloudflare/types/rules/lists_list.py new file mode 100644 index 000000000..a40d47245 --- /dev/null +++ b/src/cloudflare/types/rules/lists_list.py @@ -0,0 +1,38 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["ListsList"] + + +class ListsList(BaseModel): + id: Optional[str] = None + """The unique ID of the list.""" + + created_on: Optional[str] = None + """The RFC 3339 timestamp of when the list was created.""" + + description: Optional[str] = None + """An informative summary of the list.""" + + kind: Optional[Literal["ip", "redirect", "hostname", "asn"]] = None + """The type of the list. + + Each type supports specific list items (IP addresses, ASNs, hostnames or + redirects). + """ + + modified_on: Optional[str] = None + """The RFC 3339 timestamp of when the list was last modified.""" + + name: Optional[str] = None + """An informative name for the list. Use this name in filter and rule expressions.""" + + num_items: Optional[float] = None + """The number of items in the list.""" + + num_referencing_filters: Optional[float] = None + """The number of [filters](/operations/filters-list-filters) referencing the list.""" diff --git a/src/cloudflare/types/ruleset_get_response.py b/src/cloudflare/types/ruleset_get_response.py deleted file mode 100644 index 2cc1dd415..000000000 --- a/src/cloudflare/types/ruleset_get_response.py +++ /dev/null @@ -1,393 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Dict, List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = [ - "RulesetGetResponse", - "Rule", - "RuleRulesetsBlockRule", - "RuleRulesetsBlockRuleActionParameters", - "RuleRulesetsBlockRuleActionParametersResponse", - "RuleRulesetsBlockRuleLogging", - "RuleRulesetsExecuteRule", - "RuleRulesetsExecuteRuleActionParameters", - "RuleRulesetsExecuteRuleActionParametersMatchedData", - "RuleRulesetsExecuteRuleActionParametersOverrides", - "RuleRulesetsExecuteRuleActionParametersOverridesCategory", - "RuleRulesetsExecuteRuleActionParametersOverridesRule", - "RuleRulesetsExecuteRuleLogging", - "RuleRulesetsLogRule", - "RuleRulesetsLogRuleLogging", - "RuleRulesetsSkipRule", - "RuleRulesetsSkipRuleActionParameters", - "RuleRulesetsSkipRuleLogging", -] - - -class RuleRulesetsBlockRuleActionParametersResponse(BaseModel): - content: str - """The content to return.""" - - content_type: str - """The type of the content to return.""" - - status_code: int - """The status code to return.""" - - -class RuleRulesetsBlockRuleActionParameters(BaseModel): - response: Optional[RuleRulesetsBlockRuleActionParametersResponse] = None - """The response to show when the block is applied.""" - - -class RuleRulesetsBlockRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsBlockRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["block"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsBlockRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsBlockRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsExecuteRuleActionParametersMatchedData(BaseModel): - public_key: str - """The public key to encrypt matched data logs with.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesCategory(BaseModel): - category: str - """The name of the category to override.""" - - action: Optional[str] = None - """The action to override rules in the category with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of rules in the category.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for rules in the category.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesRule(BaseModel): - id: str - """The ID of the rule to override.""" - - action: Optional[str] = None - """The action to override the rule with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of the rule.""" - - score_threshold: Optional[int] = None - """The score threshold to use for the rule.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for the rule.""" - - -class RuleRulesetsExecuteRuleActionParametersOverrides(BaseModel): - action: Optional[str] = None - """An action to override all rules with. - - This option has lower precedence than rule and category overrides. - """ - - categories: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesCategory]] = None - """A list of category-level overrides. - - This option has the second-highest precedence after rule-level overrides. - """ - - enabled: Optional[bool] = None - """Whether to enable execution of all rules. - - This option has lower precedence than rule and category overrides. - """ - - rules: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesRule]] = None - """A list of rule-level overrides. This option has the highest precedence.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """A sensitivity level to set for all rules. - - This option has lower precedence than rule and category overrides and is only - applicable for DDoS phases. - """ - - -class RuleRulesetsExecuteRuleActionParameters(BaseModel): - id: str - """The ID of the ruleset to execute.""" - - matched_data: Optional[RuleRulesetsExecuteRuleActionParametersMatchedData] = None - """The configuration to use for matched data logging.""" - - overrides: Optional[RuleRulesetsExecuteRuleActionParametersOverrides] = None - """A set of overrides to apply to the target ruleset.""" - - -class RuleRulesetsExecuteRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsExecuteRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["execute"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsExecuteRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsExecuteRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsLogRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsLogRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["log"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[object] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsLogRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsSkipRuleActionParameters(BaseModel): - phases: Optional[ - List[ - 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", - ] - ] - ] = None - """A list of phases to skip the execution of. - - This option is incompatible with the ruleset and rulesets options. - """ - - products: Optional[ - List[Literal["bic", "hot", "rateLimit", "securityLevel", "uaBlock", "waf", "zoneLockdown"]] - ] = None - """A list of legacy security products to skip the execution of.""" - - rules: Optional[Dict[str, List[str]]] = None - """ - A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the - execution of. This option is incompatible with the ruleset option. - """ - - ruleset: Optional[Literal["current"]] = None - """A ruleset to skip the execution of. - - This option is incompatible with the rulesets, rules and phases options. - """ - - rulesets: Optional[List[str]] = None - """A list of ruleset IDs to skip the execution of. - - This option is incompatible with the ruleset and phases options. - """ - - -class RuleRulesetsSkipRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsSkipRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["skip"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsSkipRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsSkipRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -Rule = Union[RuleRulesetsBlockRule, RuleRulesetsExecuteRule, RuleRulesetsLogRule, RuleRulesetsSkipRule] - - -class RulesetGetResponse(BaseModel): - id: str - """The unique ID of the ruleset.""" - - kind: Literal["managed", "custom", "root", "zone"] - """The kind of the ruleset.""" - - last_updated: datetime - """The timestamp of when the ruleset was last modified.""" - - 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.""" - - rules: List[Rule] - """The list of rules in the ruleset.""" - - version: str - """The version of the ruleset.""" - - description: Optional[str] = None - """An informative description of the ruleset.""" diff --git a/src/cloudflare/types/ruleset_update_response.py b/src/cloudflare/types/ruleset_update_response.py deleted file mode 100644 index e9176cde3..000000000 --- a/src/cloudflare/types/ruleset_update_response.py +++ /dev/null @@ -1,393 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Dict, List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = [ - "RulesetUpdateResponse", - "Rule", - "RuleRulesetsBlockRule", - "RuleRulesetsBlockRuleActionParameters", - "RuleRulesetsBlockRuleActionParametersResponse", - "RuleRulesetsBlockRuleLogging", - "RuleRulesetsExecuteRule", - "RuleRulesetsExecuteRuleActionParameters", - "RuleRulesetsExecuteRuleActionParametersMatchedData", - "RuleRulesetsExecuteRuleActionParametersOverrides", - "RuleRulesetsExecuteRuleActionParametersOverridesCategory", - "RuleRulesetsExecuteRuleActionParametersOverridesRule", - "RuleRulesetsExecuteRuleLogging", - "RuleRulesetsLogRule", - "RuleRulesetsLogRuleLogging", - "RuleRulesetsSkipRule", - "RuleRulesetsSkipRuleActionParameters", - "RuleRulesetsSkipRuleLogging", -] - - -class RuleRulesetsBlockRuleActionParametersResponse(BaseModel): - content: str - """The content to return.""" - - content_type: str - """The type of the content to return.""" - - status_code: int - """The status code to return.""" - - -class RuleRulesetsBlockRuleActionParameters(BaseModel): - response: Optional[RuleRulesetsBlockRuleActionParametersResponse] = None - """The response to show when the block is applied.""" - - -class RuleRulesetsBlockRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsBlockRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["block"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsBlockRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsBlockRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsExecuteRuleActionParametersMatchedData(BaseModel): - public_key: str - """The public key to encrypt matched data logs with.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesCategory(BaseModel): - category: str - """The name of the category to override.""" - - action: Optional[str] = None - """The action to override rules in the category with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of rules in the category.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for rules in the category.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesRule(BaseModel): - id: str - """The ID of the rule to override.""" - - action: Optional[str] = None - """The action to override the rule with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of the rule.""" - - score_threshold: Optional[int] = None - """The score threshold to use for the rule.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for the rule.""" - - -class RuleRulesetsExecuteRuleActionParametersOverrides(BaseModel): - action: Optional[str] = None - """An action to override all rules with. - - This option has lower precedence than rule and category overrides. - """ - - categories: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesCategory]] = None - """A list of category-level overrides. - - This option has the second-highest precedence after rule-level overrides. - """ - - enabled: Optional[bool] = None - """Whether to enable execution of all rules. - - This option has lower precedence than rule and category overrides. - """ - - rules: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesRule]] = None - """A list of rule-level overrides. This option has the highest precedence.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """A sensitivity level to set for all rules. - - This option has lower precedence than rule and category overrides and is only - applicable for DDoS phases. - """ - - -class RuleRulesetsExecuteRuleActionParameters(BaseModel): - id: str - """The ID of the ruleset to execute.""" - - matched_data: Optional[RuleRulesetsExecuteRuleActionParametersMatchedData] = None - """The configuration to use for matched data logging.""" - - overrides: Optional[RuleRulesetsExecuteRuleActionParametersOverrides] = None - """A set of overrides to apply to the target ruleset.""" - - -class RuleRulesetsExecuteRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsExecuteRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["execute"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsExecuteRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsExecuteRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsLogRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsLogRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["log"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[object] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsLogRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsSkipRuleActionParameters(BaseModel): - phases: Optional[ - List[ - 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", - ] - ] - ] = None - """A list of phases to skip the execution of. - - This option is incompatible with the ruleset and rulesets options. - """ - - products: Optional[ - List[Literal["bic", "hot", "rateLimit", "securityLevel", "uaBlock", "waf", "zoneLockdown"]] - ] = None - """A list of legacy security products to skip the execution of.""" - - rules: Optional[Dict[str, List[str]]] = None - """ - A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the - execution of. This option is incompatible with the ruleset option. - """ - - ruleset: Optional[Literal["current"]] = None - """A ruleset to skip the execution of. - - This option is incompatible with the rulesets, rules and phases options. - """ - - rulesets: Optional[List[str]] = None - """A list of ruleset IDs to skip the execution of. - - This option is incompatible with the ruleset and phases options. - """ - - -class RuleRulesetsSkipRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsSkipRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["skip"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsSkipRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsSkipRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -Rule = Union[RuleRulesetsBlockRule, RuleRulesetsExecuteRule, RuleRulesetsLogRule, RuleRulesetsSkipRule] - - -class RulesetUpdateResponse(BaseModel): - id: str - """The unique ID of the ruleset.""" - - kind: Literal["managed", "custom", "root", "zone"] - """The kind of the ruleset.""" - - last_updated: datetime - """The timestamp of when the ruleset was last modified.""" - - 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.""" - - rules: List[Rule] - """The list of rules in the ruleset.""" - - version: str - """The version of the ruleset.""" - - description: Optional[str] = None - """An informative description of the ruleset.""" diff --git a/src/cloudflare/types/rulesets/__init__.py b/src/cloudflare/types/rulesets/__init__.py index 1bde4e124..84b5eaf4c 100644 --- a/src/cloudflare/types/rulesets/__init__.py +++ b/src/cloudflare/types/rulesets/__init__.py @@ -3,12 +3,5 @@ from __future__ import annotations from .rule_edit_params import RuleEditParams as RuleEditParams -from .phase_get_response import PhaseGetResponse as PhaseGetResponse from .rule_create_params import RuleCreateParams as RuleCreateParams -from .rule_edit_response import RuleEditResponse as RuleEditResponse from .phase_update_params import PhaseUpdateParams as PhaseUpdateParams -from .rule_create_response import RuleCreateResponse as RuleCreateResponse -from .rule_delete_response import RuleDeleteResponse as RuleDeleteResponse -from .version_get_response import VersionGetResponse as VersionGetResponse -from .phase_update_response import PhaseUpdateResponse as PhaseUpdateResponse -from .version_list_response import VersionListResponse as VersionListResponse diff --git a/src/cloudflare/types/rulesets/phase_get_response.py b/src/cloudflare/types/rulesets/phase_get_response.py deleted file mode 100644 index 2f024a053..000000000 --- a/src/cloudflare/types/rulesets/phase_get_response.py +++ /dev/null @@ -1,393 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Dict, List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = [ - "PhaseGetResponse", - "Rule", - "RuleRulesetsBlockRule", - "RuleRulesetsBlockRuleActionParameters", - "RuleRulesetsBlockRuleActionParametersResponse", - "RuleRulesetsBlockRuleLogging", - "RuleRulesetsExecuteRule", - "RuleRulesetsExecuteRuleActionParameters", - "RuleRulesetsExecuteRuleActionParametersMatchedData", - "RuleRulesetsExecuteRuleActionParametersOverrides", - "RuleRulesetsExecuteRuleActionParametersOverridesCategory", - "RuleRulesetsExecuteRuleActionParametersOverridesRule", - "RuleRulesetsExecuteRuleLogging", - "RuleRulesetsLogRule", - "RuleRulesetsLogRuleLogging", - "RuleRulesetsSkipRule", - "RuleRulesetsSkipRuleActionParameters", - "RuleRulesetsSkipRuleLogging", -] - - -class RuleRulesetsBlockRuleActionParametersResponse(BaseModel): - content: str - """The content to return.""" - - content_type: str - """The type of the content to return.""" - - status_code: int - """The status code to return.""" - - -class RuleRulesetsBlockRuleActionParameters(BaseModel): - response: Optional[RuleRulesetsBlockRuleActionParametersResponse] = None - """The response to show when the block is applied.""" - - -class RuleRulesetsBlockRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsBlockRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["block"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsBlockRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsBlockRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsExecuteRuleActionParametersMatchedData(BaseModel): - public_key: str - """The public key to encrypt matched data logs with.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesCategory(BaseModel): - category: str - """The name of the category to override.""" - - action: Optional[str] = None - """The action to override rules in the category with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of rules in the category.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for rules in the category.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesRule(BaseModel): - id: str - """The ID of the rule to override.""" - - action: Optional[str] = None - """The action to override the rule with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of the rule.""" - - score_threshold: Optional[int] = None - """The score threshold to use for the rule.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for the rule.""" - - -class RuleRulesetsExecuteRuleActionParametersOverrides(BaseModel): - action: Optional[str] = None - """An action to override all rules with. - - This option has lower precedence than rule and category overrides. - """ - - categories: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesCategory]] = None - """A list of category-level overrides. - - This option has the second-highest precedence after rule-level overrides. - """ - - enabled: Optional[bool] = None - """Whether to enable execution of all rules. - - This option has lower precedence than rule and category overrides. - """ - - rules: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesRule]] = None - """A list of rule-level overrides. This option has the highest precedence.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """A sensitivity level to set for all rules. - - This option has lower precedence than rule and category overrides and is only - applicable for DDoS phases. - """ - - -class RuleRulesetsExecuteRuleActionParameters(BaseModel): - id: str - """The ID of the ruleset to execute.""" - - matched_data: Optional[RuleRulesetsExecuteRuleActionParametersMatchedData] = None - """The configuration to use for matched data logging.""" - - overrides: Optional[RuleRulesetsExecuteRuleActionParametersOverrides] = None - """A set of overrides to apply to the target ruleset.""" - - -class RuleRulesetsExecuteRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsExecuteRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["execute"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsExecuteRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsExecuteRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsLogRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsLogRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["log"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[object] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsLogRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsSkipRuleActionParameters(BaseModel): - phases: Optional[ - List[ - 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", - ] - ] - ] = None - """A list of phases to skip the execution of. - - This option is incompatible with the ruleset and rulesets options. - """ - - products: Optional[ - List[Literal["bic", "hot", "rateLimit", "securityLevel", "uaBlock", "waf", "zoneLockdown"]] - ] = None - """A list of legacy security products to skip the execution of.""" - - rules: Optional[Dict[str, List[str]]] = None - """ - A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the - execution of. This option is incompatible with the ruleset option. - """ - - ruleset: Optional[Literal["current"]] = None - """A ruleset to skip the execution of. - - This option is incompatible with the rulesets, rules and phases options. - """ - - rulesets: Optional[List[str]] = None - """A list of ruleset IDs to skip the execution of. - - This option is incompatible with the ruleset and phases options. - """ - - -class RuleRulesetsSkipRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsSkipRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["skip"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsSkipRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsSkipRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -Rule = Union[RuleRulesetsBlockRule, RuleRulesetsExecuteRule, RuleRulesetsLogRule, RuleRulesetsSkipRule] - - -class PhaseGetResponse(BaseModel): - id: str - """The unique ID of the ruleset.""" - - kind: Literal["managed", "custom", "root", "zone"] - """The kind of the ruleset.""" - - last_updated: datetime - """The timestamp of when the ruleset was last modified.""" - - 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.""" - - rules: List[Rule] - """The list of rules in the ruleset.""" - - version: str - """The version of the ruleset.""" - - description: Optional[str] = None - """An informative description of the ruleset.""" diff --git a/src/cloudflare/types/rulesets/phase_update_response.py b/src/cloudflare/types/rulesets/phase_update_response.py deleted file mode 100644 index 46f932e46..000000000 --- a/src/cloudflare/types/rulesets/phase_update_response.py +++ /dev/null @@ -1,393 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Dict, List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = [ - "PhaseUpdateResponse", - "Rule", - "RuleRulesetsBlockRule", - "RuleRulesetsBlockRuleActionParameters", - "RuleRulesetsBlockRuleActionParametersResponse", - "RuleRulesetsBlockRuleLogging", - "RuleRulesetsExecuteRule", - "RuleRulesetsExecuteRuleActionParameters", - "RuleRulesetsExecuteRuleActionParametersMatchedData", - "RuleRulesetsExecuteRuleActionParametersOverrides", - "RuleRulesetsExecuteRuleActionParametersOverridesCategory", - "RuleRulesetsExecuteRuleActionParametersOverridesRule", - "RuleRulesetsExecuteRuleLogging", - "RuleRulesetsLogRule", - "RuleRulesetsLogRuleLogging", - "RuleRulesetsSkipRule", - "RuleRulesetsSkipRuleActionParameters", - "RuleRulesetsSkipRuleLogging", -] - - -class RuleRulesetsBlockRuleActionParametersResponse(BaseModel): - content: str - """The content to return.""" - - content_type: str - """The type of the content to return.""" - - status_code: int - """The status code to return.""" - - -class RuleRulesetsBlockRuleActionParameters(BaseModel): - response: Optional[RuleRulesetsBlockRuleActionParametersResponse] = None - """The response to show when the block is applied.""" - - -class RuleRulesetsBlockRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsBlockRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["block"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsBlockRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsBlockRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsExecuteRuleActionParametersMatchedData(BaseModel): - public_key: str - """The public key to encrypt matched data logs with.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesCategory(BaseModel): - category: str - """The name of the category to override.""" - - action: Optional[str] = None - """The action to override rules in the category with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of rules in the category.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for rules in the category.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesRule(BaseModel): - id: str - """The ID of the rule to override.""" - - action: Optional[str] = None - """The action to override the rule with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of the rule.""" - - score_threshold: Optional[int] = None - """The score threshold to use for the rule.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for the rule.""" - - -class RuleRulesetsExecuteRuleActionParametersOverrides(BaseModel): - action: Optional[str] = None - """An action to override all rules with. - - This option has lower precedence than rule and category overrides. - """ - - categories: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesCategory]] = None - """A list of category-level overrides. - - This option has the second-highest precedence after rule-level overrides. - """ - - enabled: Optional[bool] = None - """Whether to enable execution of all rules. - - This option has lower precedence than rule and category overrides. - """ - - rules: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesRule]] = None - """A list of rule-level overrides. This option has the highest precedence.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """A sensitivity level to set for all rules. - - This option has lower precedence than rule and category overrides and is only - applicable for DDoS phases. - """ - - -class RuleRulesetsExecuteRuleActionParameters(BaseModel): - id: str - """The ID of the ruleset to execute.""" - - matched_data: Optional[RuleRulesetsExecuteRuleActionParametersMatchedData] = None - """The configuration to use for matched data logging.""" - - overrides: Optional[RuleRulesetsExecuteRuleActionParametersOverrides] = None - """A set of overrides to apply to the target ruleset.""" - - -class RuleRulesetsExecuteRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsExecuteRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["execute"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsExecuteRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsExecuteRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsLogRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsLogRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["log"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[object] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsLogRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsSkipRuleActionParameters(BaseModel): - phases: Optional[ - List[ - 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", - ] - ] - ] = None - """A list of phases to skip the execution of. - - This option is incompatible with the ruleset and rulesets options. - """ - - products: Optional[ - List[Literal["bic", "hot", "rateLimit", "securityLevel", "uaBlock", "waf", "zoneLockdown"]] - ] = None - """A list of legacy security products to skip the execution of.""" - - rules: Optional[Dict[str, List[str]]] = None - """ - A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the - execution of. This option is incompatible with the ruleset option. - """ - - ruleset: Optional[Literal["current"]] = None - """A ruleset to skip the execution of. - - This option is incompatible with the rulesets, rules and phases options. - """ - - rulesets: Optional[List[str]] = None - """A list of ruleset IDs to skip the execution of. - - This option is incompatible with the ruleset and phases options. - """ - - -class RuleRulesetsSkipRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsSkipRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["skip"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsSkipRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsSkipRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -Rule = Union[RuleRulesetsBlockRule, RuleRulesetsExecuteRule, RuleRulesetsLogRule, RuleRulesetsSkipRule] - - -class PhaseUpdateResponse(BaseModel): - id: str - """The unique ID of the ruleset.""" - - kind: Literal["managed", "custom", "root", "zone"] - """The kind of the ruleset.""" - - last_updated: datetime - """The timestamp of when the ruleset was last modified.""" - - 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.""" - - rules: List[Rule] - """The list of rules in the ruleset.""" - - version: str - """The version of the ruleset.""" - - description: Optional[str] = None - """An informative description of the ruleset.""" diff --git a/src/cloudflare/types/rulesets/phases/__init__.py b/src/cloudflare/types/rulesets/phases/__init__.py index 70142258c..b2f53e352 100644 --- a/src/cloudflare/types/rulesets/phases/__init__.py +++ b/src/cloudflare/types/rulesets/phases/__init__.py @@ -1,6 +1,3 @@ # File generated from our OpenAPI spec by Stainless. from __future__ import annotations - -from .version_get_response import VersionGetResponse as VersionGetResponse -from .version_list_response import VersionListResponse as VersionListResponse diff --git a/src/cloudflare/types/rulesets/phases/version_get_response.py b/src/cloudflare/types/rulesets/phases/version_get_response.py deleted file mode 100644 index 1b2e7403a..000000000 --- a/src/cloudflare/types/rulesets/phases/version_get_response.py +++ /dev/null @@ -1,393 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Dict, List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = [ - "VersionGetResponse", - "Rule", - "RuleRulesetsBlockRule", - "RuleRulesetsBlockRuleActionParameters", - "RuleRulesetsBlockRuleActionParametersResponse", - "RuleRulesetsBlockRuleLogging", - "RuleRulesetsExecuteRule", - "RuleRulesetsExecuteRuleActionParameters", - "RuleRulesetsExecuteRuleActionParametersMatchedData", - "RuleRulesetsExecuteRuleActionParametersOverrides", - "RuleRulesetsExecuteRuleActionParametersOverridesCategory", - "RuleRulesetsExecuteRuleActionParametersOverridesRule", - "RuleRulesetsExecuteRuleLogging", - "RuleRulesetsLogRule", - "RuleRulesetsLogRuleLogging", - "RuleRulesetsSkipRule", - "RuleRulesetsSkipRuleActionParameters", - "RuleRulesetsSkipRuleLogging", -] - - -class RuleRulesetsBlockRuleActionParametersResponse(BaseModel): - content: str - """The content to return.""" - - content_type: str - """The type of the content to return.""" - - status_code: int - """The status code to return.""" - - -class RuleRulesetsBlockRuleActionParameters(BaseModel): - response: Optional[RuleRulesetsBlockRuleActionParametersResponse] = None - """The response to show when the block is applied.""" - - -class RuleRulesetsBlockRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsBlockRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["block"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsBlockRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsBlockRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsExecuteRuleActionParametersMatchedData(BaseModel): - public_key: str - """The public key to encrypt matched data logs with.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesCategory(BaseModel): - category: str - """The name of the category to override.""" - - action: Optional[str] = None - """The action to override rules in the category with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of rules in the category.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for rules in the category.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesRule(BaseModel): - id: str - """The ID of the rule to override.""" - - action: Optional[str] = None - """The action to override the rule with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of the rule.""" - - score_threshold: Optional[int] = None - """The score threshold to use for the rule.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for the rule.""" - - -class RuleRulesetsExecuteRuleActionParametersOverrides(BaseModel): - action: Optional[str] = None - """An action to override all rules with. - - This option has lower precedence than rule and category overrides. - """ - - categories: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesCategory]] = None - """A list of category-level overrides. - - This option has the second-highest precedence after rule-level overrides. - """ - - enabled: Optional[bool] = None - """Whether to enable execution of all rules. - - This option has lower precedence than rule and category overrides. - """ - - rules: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesRule]] = None - """A list of rule-level overrides. This option has the highest precedence.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """A sensitivity level to set for all rules. - - This option has lower precedence than rule and category overrides and is only - applicable for DDoS phases. - """ - - -class RuleRulesetsExecuteRuleActionParameters(BaseModel): - id: str - """The ID of the ruleset to execute.""" - - matched_data: Optional[RuleRulesetsExecuteRuleActionParametersMatchedData] = None - """The configuration to use for matched data logging.""" - - overrides: Optional[RuleRulesetsExecuteRuleActionParametersOverrides] = None - """A set of overrides to apply to the target ruleset.""" - - -class RuleRulesetsExecuteRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsExecuteRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["execute"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsExecuteRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsExecuteRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsLogRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsLogRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["log"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[object] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsLogRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsSkipRuleActionParameters(BaseModel): - phases: Optional[ - List[ - 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", - ] - ] - ] = None - """A list of phases to skip the execution of. - - This option is incompatible with the ruleset and rulesets options. - """ - - products: Optional[ - List[Literal["bic", "hot", "rateLimit", "securityLevel", "uaBlock", "waf", "zoneLockdown"]] - ] = None - """A list of legacy security products to skip the execution of.""" - - rules: Optional[Dict[str, List[str]]] = None - """ - A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the - execution of. This option is incompatible with the ruleset option. - """ - - ruleset: Optional[Literal["current"]] = None - """A ruleset to skip the execution of. - - This option is incompatible with the rulesets, rules and phases options. - """ - - rulesets: Optional[List[str]] = None - """A list of ruleset IDs to skip the execution of. - - This option is incompatible with the ruleset and phases options. - """ - - -class RuleRulesetsSkipRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsSkipRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["skip"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsSkipRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsSkipRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -Rule = Union[RuleRulesetsBlockRule, RuleRulesetsExecuteRule, RuleRulesetsLogRule, RuleRulesetsSkipRule] - - -class VersionGetResponse(BaseModel): - id: str - """The unique ID of the ruleset.""" - - kind: Literal["managed", "custom", "root", "zone"] - """The kind of the ruleset.""" - - last_updated: datetime - """The timestamp of when the ruleset was last modified.""" - - 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.""" - - rules: List[Rule] - """The list of rules in the ruleset.""" - - version: str - """The version of the ruleset.""" - - description: Optional[str] = None - """An informative description of the ruleset.""" diff --git a/src/cloudflare/types/rulesets/phases/version_list_response.py b/src/cloudflare/types/rulesets/phases/version_list_response.py deleted file mode 100644 index 96ecaa5da..000000000 --- a/src/cloudflare/types/rulesets/phases/version_list_response.py +++ /dev/null @@ -1,59 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["VersionListResponse", "VersionListResponseItem"] - - -class VersionListResponseItem(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.""" - - -VersionListResponse = List[VersionListResponseItem] diff --git a/src/cloudflare/types/rulesets/rule_create_response.py b/src/cloudflare/types/rulesets/rule_create_response.py deleted file mode 100644 index 43926806d..000000000 --- a/src/cloudflare/types/rulesets/rule_create_response.py +++ /dev/null @@ -1,393 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Dict, List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = [ - "RuleCreateResponse", - "Rule", - "RuleRulesetsBlockRule", - "RuleRulesetsBlockRuleActionParameters", - "RuleRulesetsBlockRuleActionParametersResponse", - "RuleRulesetsBlockRuleLogging", - "RuleRulesetsExecuteRule", - "RuleRulesetsExecuteRuleActionParameters", - "RuleRulesetsExecuteRuleActionParametersMatchedData", - "RuleRulesetsExecuteRuleActionParametersOverrides", - "RuleRulesetsExecuteRuleActionParametersOverridesCategory", - "RuleRulesetsExecuteRuleActionParametersOverridesRule", - "RuleRulesetsExecuteRuleLogging", - "RuleRulesetsLogRule", - "RuleRulesetsLogRuleLogging", - "RuleRulesetsSkipRule", - "RuleRulesetsSkipRuleActionParameters", - "RuleRulesetsSkipRuleLogging", -] - - -class RuleRulesetsBlockRuleActionParametersResponse(BaseModel): - content: str - """The content to return.""" - - content_type: str - """The type of the content to return.""" - - status_code: int - """The status code to return.""" - - -class RuleRulesetsBlockRuleActionParameters(BaseModel): - response: Optional[RuleRulesetsBlockRuleActionParametersResponse] = None - """The response to show when the block is applied.""" - - -class RuleRulesetsBlockRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsBlockRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["block"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsBlockRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsBlockRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsExecuteRuleActionParametersMatchedData(BaseModel): - public_key: str - """The public key to encrypt matched data logs with.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesCategory(BaseModel): - category: str - """The name of the category to override.""" - - action: Optional[str] = None - """The action to override rules in the category with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of rules in the category.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for rules in the category.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesRule(BaseModel): - id: str - """The ID of the rule to override.""" - - action: Optional[str] = None - """The action to override the rule with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of the rule.""" - - score_threshold: Optional[int] = None - """The score threshold to use for the rule.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for the rule.""" - - -class RuleRulesetsExecuteRuleActionParametersOverrides(BaseModel): - action: Optional[str] = None - """An action to override all rules with. - - This option has lower precedence than rule and category overrides. - """ - - categories: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesCategory]] = None - """A list of category-level overrides. - - This option has the second-highest precedence after rule-level overrides. - """ - - enabled: Optional[bool] = None - """Whether to enable execution of all rules. - - This option has lower precedence than rule and category overrides. - """ - - rules: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesRule]] = None - """A list of rule-level overrides. This option has the highest precedence.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """A sensitivity level to set for all rules. - - This option has lower precedence than rule and category overrides and is only - applicable for DDoS phases. - """ - - -class RuleRulesetsExecuteRuleActionParameters(BaseModel): - id: str - """The ID of the ruleset to execute.""" - - matched_data: Optional[RuleRulesetsExecuteRuleActionParametersMatchedData] = None - """The configuration to use for matched data logging.""" - - overrides: Optional[RuleRulesetsExecuteRuleActionParametersOverrides] = None - """A set of overrides to apply to the target ruleset.""" - - -class RuleRulesetsExecuteRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsExecuteRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["execute"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsExecuteRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsExecuteRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsLogRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsLogRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["log"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[object] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsLogRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsSkipRuleActionParameters(BaseModel): - phases: Optional[ - List[ - 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", - ] - ] - ] = None - """A list of phases to skip the execution of. - - This option is incompatible with the ruleset and rulesets options. - """ - - products: Optional[ - List[Literal["bic", "hot", "rateLimit", "securityLevel", "uaBlock", "waf", "zoneLockdown"]] - ] = None - """A list of legacy security products to skip the execution of.""" - - rules: Optional[Dict[str, List[str]]] = None - """ - A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the - execution of. This option is incompatible with the ruleset option. - """ - - ruleset: Optional[Literal["current"]] = None - """A ruleset to skip the execution of. - - This option is incompatible with the rulesets, rules and phases options. - """ - - rulesets: Optional[List[str]] = None - """A list of ruleset IDs to skip the execution of. - - This option is incompatible with the ruleset and phases options. - """ - - -class RuleRulesetsSkipRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsSkipRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["skip"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsSkipRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsSkipRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -Rule = Union[RuleRulesetsBlockRule, RuleRulesetsExecuteRule, RuleRulesetsLogRule, RuleRulesetsSkipRule] - - -class RuleCreateResponse(BaseModel): - id: str - """The unique ID of the ruleset.""" - - kind: Literal["managed", "custom", "root", "zone"] - """The kind of the ruleset.""" - - last_updated: datetime - """The timestamp of when the ruleset was last modified.""" - - 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.""" - - rules: List[Rule] - """The list of rules in the ruleset.""" - - version: str - """The version of the ruleset.""" - - description: Optional[str] = None - """An informative description of the ruleset.""" diff --git a/src/cloudflare/types/rulesets/rule_delete_response.py b/src/cloudflare/types/rulesets/rule_delete_response.py deleted file mode 100644 index 8daf9745e..000000000 --- a/src/cloudflare/types/rulesets/rule_delete_response.py +++ /dev/null @@ -1,393 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Dict, List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = [ - "RuleDeleteResponse", - "Rule", - "RuleRulesetsBlockRule", - "RuleRulesetsBlockRuleActionParameters", - "RuleRulesetsBlockRuleActionParametersResponse", - "RuleRulesetsBlockRuleLogging", - "RuleRulesetsExecuteRule", - "RuleRulesetsExecuteRuleActionParameters", - "RuleRulesetsExecuteRuleActionParametersMatchedData", - "RuleRulesetsExecuteRuleActionParametersOverrides", - "RuleRulesetsExecuteRuleActionParametersOverridesCategory", - "RuleRulesetsExecuteRuleActionParametersOverridesRule", - "RuleRulesetsExecuteRuleLogging", - "RuleRulesetsLogRule", - "RuleRulesetsLogRuleLogging", - "RuleRulesetsSkipRule", - "RuleRulesetsSkipRuleActionParameters", - "RuleRulesetsSkipRuleLogging", -] - - -class RuleRulesetsBlockRuleActionParametersResponse(BaseModel): - content: str - """The content to return.""" - - content_type: str - """The type of the content to return.""" - - status_code: int - """The status code to return.""" - - -class RuleRulesetsBlockRuleActionParameters(BaseModel): - response: Optional[RuleRulesetsBlockRuleActionParametersResponse] = None - """The response to show when the block is applied.""" - - -class RuleRulesetsBlockRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsBlockRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["block"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsBlockRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsBlockRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsExecuteRuleActionParametersMatchedData(BaseModel): - public_key: str - """The public key to encrypt matched data logs with.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesCategory(BaseModel): - category: str - """The name of the category to override.""" - - action: Optional[str] = None - """The action to override rules in the category with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of rules in the category.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for rules in the category.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesRule(BaseModel): - id: str - """The ID of the rule to override.""" - - action: Optional[str] = None - """The action to override the rule with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of the rule.""" - - score_threshold: Optional[int] = None - """The score threshold to use for the rule.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for the rule.""" - - -class RuleRulesetsExecuteRuleActionParametersOverrides(BaseModel): - action: Optional[str] = None - """An action to override all rules with. - - This option has lower precedence than rule and category overrides. - """ - - categories: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesCategory]] = None - """A list of category-level overrides. - - This option has the second-highest precedence after rule-level overrides. - """ - - enabled: Optional[bool] = None - """Whether to enable execution of all rules. - - This option has lower precedence than rule and category overrides. - """ - - rules: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesRule]] = None - """A list of rule-level overrides. This option has the highest precedence.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """A sensitivity level to set for all rules. - - This option has lower precedence than rule and category overrides and is only - applicable for DDoS phases. - """ - - -class RuleRulesetsExecuteRuleActionParameters(BaseModel): - id: str - """The ID of the ruleset to execute.""" - - matched_data: Optional[RuleRulesetsExecuteRuleActionParametersMatchedData] = None - """The configuration to use for matched data logging.""" - - overrides: Optional[RuleRulesetsExecuteRuleActionParametersOverrides] = None - """A set of overrides to apply to the target ruleset.""" - - -class RuleRulesetsExecuteRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsExecuteRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["execute"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsExecuteRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsExecuteRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsLogRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsLogRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["log"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[object] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsLogRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsSkipRuleActionParameters(BaseModel): - phases: Optional[ - List[ - 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", - ] - ] - ] = None - """A list of phases to skip the execution of. - - This option is incompatible with the ruleset and rulesets options. - """ - - products: Optional[ - List[Literal["bic", "hot", "rateLimit", "securityLevel", "uaBlock", "waf", "zoneLockdown"]] - ] = None - """A list of legacy security products to skip the execution of.""" - - rules: Optional[Dict[str, List[str]]] = None - """ - A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the - execution of. This option is incompatible with the ruleset option. - """ - - ruleset: Optional[Literal["current"]] = None - """A ruleset to skip the execution of. - - This option is incompatible with the rulesets, rules and phases options. - """ - - rulesets: Optional[List[str]] = None - """A list of ruleset IDs to skip the execution of. - - This option is incompatible with the ruleset and phases options. - """ - - -class RuleRulesetsSkipRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsSkipRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["skip"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsSkipRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsSkipRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -Rule = Union[RuleRulesetsBlockRule, RuleRulesetsExecuteRule, RuleRulesetsLogRule, RuleRulesetsSkipRule] - - -class RuleDeleteResponse(BaseModel): - id: str - """The unique ID of the ruleset.""" - - kind: Literal["managed", "custom", "root", "zone"] - """The kind of the ruleset.""" - - last_updated: datetime - """The timestamp of when the ruleset was last modified.""" - - 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.""" - - rules: List[Rule] - """The list of rules in the ruleset.""" - - version: str - """The version of the ruleset.""" - - description: Optional[str] = None - """An informative description of the ruleset.""" diff --git a/src/cloudflare/types/rulesets/rule_edit_response.py b/src/cloudflare/types/rulesets/rule_edit_response.py deleted file mode 100644 index fd7eb2081..000000000 --- a/src/cloudflare/types/rulesets/rule_edit_response.py +++ /dev/null @@ -1,393 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Dict, List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = [ - "RuleEditResponse", - "Rule", - "RuleRulesetsBlockRule", - "RuleRulesetsBlockRuleActionParameters", - "RuleRulesetsBlockRuleActionParametersResponse", - "RuleRulesetsBlockRuleLogging", - "RuleRulesetsExecuteRule", - "RuleRulesetsExecuteRuleActionParameters", - "RuleRulesetsExecuteRuleActionParametersMatchedData", - "RuleRulesetsExecuteRuleActionParametersOverrides", - "RuleRulesetsExecuteRuleActionParametersOverridesCategory", - "RuleRulesetsExecuteRuleActionParametersOverridesRule", - "RuleRulesetsExecuteRuleLogging", - "RuleRulesetsLogRule", - "RuleRulesetsLogRuleLogging", - "RuleRulesetsSkipRule", - "RuleRulesetsSkipRuleActionParameters", - "RuleRulesetsSkipRuleLogging", -] - - -class RuleRulesetsBlockRuleActionParametersResponse(BaseModel): - content: str - """The content to return.""" - - content_type: str - """The type of the content to return.""" - - status_code: int - """The status code to return.""" - - -class RuleRulesetsBlockRuleActionParameters(BaseModel): - response: Optional[RuleRulesetsBlockRuleActionParametersResponse] = None - """The response to show when the block is applied.""" - - -class RuleRulesetsBlockRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsBlockRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["block"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsBlockRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsBlockRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsExecuteRuleActionParametersMatchedData(BaseModel): - public_key: str - """The public key to encrypt matched data logs with.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesCategory(BaseModel): - category: str - """The name of the category to override.""" - - action: Optional[str] = None - """The action to override rules in the category with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of rules in the category.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for rules in the category.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesRule(BaseModel): - id: str - """The ID of the rule to override.""" - - action: Optional[str] = None - """The action to override the rule with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of the rule.""" - - score_threshold: Optional[int] = None - """The score threshold to use for the rule.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for the rule.""" - - -class RuleRulesetsExecuteRuleActionParametersOverrides(BaseModel): - action: Optional[str] = None - """An action to override all rules with. - - This option has lower precedence than rule and category overrides. - """ - - categories: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesCategory]] = None - """A list of category-level overrides. - - This option has the second-highest precedence after rule-level overrides. - """ - - enabled: Optional[bool] = None - """Whether to enable execution of all rules. - - This option has lower precedence than rule and category overrides. - """ - - rules: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesRule]] = None - """A list of rule-level overrides. This option has the highest precedence.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """A sensitivity level to set for all rules. - - This option has lower precedence than rule and category overrides and is only - applicable for DDoS phases. - """ - - -class RuleRulesetsExecuteRuleActionParameters(BaseModel): - id: str - """The ID of the ruleset to execute.""" - - matched_data: Optional[RuleRulesetsExecuteRuleActionParametersMatchedData] = None - """The configuration to use for matched data logging.""" - - overrides: Optional[RuleRulesetsExecuteRuleActionParametersOverrides] = None - """A set of overrides to apply to the target ruleset.""" - - -class RuleRulesetsExecuteRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsExecuteRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["execute"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsExecuteRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsExecuteRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsLogRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsLogRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["log"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[object] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsLogRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsSkipRuleActionParameters(BaseModel): - phases: Optional[ - List[ - 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", - ] - ] - ] = None - """A list of phases to skip the execution of. - - This option is incompatible with the ruleset and rulesets options. - """ - - products: Optional[ - List[Literal["bic", "hot", "rateLimit", "securityLevel", "uaBlock", "waf", "zoneLockdown"]] - ] = None - """A list of legacy security products to skip the execution of.""" - - rules: Optional[Dict[str, List[str]]] = None - """ - A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the - execution of. This option is incompatible with the ruleset option. - """ - - ruleset: Optional[Literal["current"]] = None - """A ruleset to skip the execution of. - - This option is incompatible with the rulesets, rules and phases options. - """ - - rulesets: Optional[List[str]] = None - """A list of ruleset IDs to skip the execution of. - - This option is incompatible with the ruleset and phases options. - """ - - -class RuleRulesetsSkipRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsSkipRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["skip"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsSkipRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsSkipRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -Rule = Union[RuleRulesetsBlockRule, RuleRulesetsExecuteRule, RuleRulesetsLogRule, RuleRulesetsSkipRule] - - -class RuleEditResponse(BaseModel): - id: str - """The unique ID of the ruleset.""" - - kind: Literal["managed", "custom", "root", "zone"] - """The kind of the ruleset.""" - - last_updated: datetime - """The timestamp of when the ruleset was last modified.""" - - 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.""" - - rules: List[Rule] - """The list of rules in the ruleset.""" - - version: str - """The version of the ruleset.""" - - description: Optional[str] = None - """An informative description of the ruleset.""" diff --git a/src/cloudflare/types/rulesets/version_get_response.py b/src/cloudflare/types/rulesets/version_get_response.py deleted file mode 100644 index 16ebe52c5..000000000 --- a/src/cloudflare/types/rulesets/version_get_response.py +++ /dev/null @@ -1,393 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Dict, List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = [ - "VersionGetResponse", - "Rule", - "RuleRulesetsBlockRule", - "RuleRulesetsBlockRuleActionParameters", - "RuleRulesetsBlockRuleActionParametersResponse", - "RuleRulesetsBlockRuleLogging", - "RuleRulesetsExecuteRule", - "RuleRulesetsExecuteRuleActionParameters", - "RuleRulesetsExecuteRuleActionParametersMatchedData", - "RuleRulesetsExecuteRuleActionParametersOverrides", - "RuleRulesetsExecuteRuleActionParametersOverridesCategory", - "RuleRulesetsExecuteRuleActionParametersOverridesRule", - "RuleRulesetsExecuteRuleLogging", - "RuleRulesetsLogRule", - "RuleRulesetsLogRuleLogging", - "RuleRulesetsSkipRule", - "RuleRulesetsSkipRuleActionParameters", - "RuleRulesetsSkipRuleLogging", -] - - -class RuleRulesetsBlockRuleActionParametersResponse(BaseModel): - content: str - """The content to return.""" - - content_type: str - """The type of the content to return.""" - - status_code: int - """The status code to return.""" - - -class RuleRulesetsBlockRuleActionParameters(BaseModel): - response: Optional[RuleRulesetsBlockRuleActionParametersResponse] = None - """The response to show when the block is applied.""" - - -class RuleRulesetsBlockRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsBlockRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["block"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsBlockRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsBlockRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsExecuteRuleActionParametersMatchedData(BaseModel): - public_key: str - """The public key to encrypt matched data logs with.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesCategory(BaseModel): - category: str - """The name of the category to override.""" - - action: Optional[str] = None - """The action to override rules in the category with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of rules in the category.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for rules in the category.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesRule(BaseModel): - id: str - """The ID of the rule to override.""" - - action: Optional[str] = None - """The action to override the rule with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of the rule.""" - - score_threshold: Optional[int] = None - """The score threshold to use for the rule.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for the rule.""" - - -class RuleRulesetsExecuteRuleActionParametersOverrides(BaseModel): - action: Optional[str] = None - """An action to override all rules with. - - This option has lower precedence than rule and category overrides. - """ - - categories: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesCategory]] = None - """A list of category-level overrides. - - This option has the second-highest precedence after rule-level overrides. - """ - - enabled: Optional[bool] = None - """Whether to enable execution of all rules. - - This option has lower precedence than rule and category overrides. - """ - - rules: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesRule]] = None - """A list of rule-level overrides. This option has the highest precedence.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """A sensitivity level to set for all rules. - - This option has lower precedence than rule and category overrides and is only - applicable for DDoS phases. - """ - - -class RuleRulesetsExecuteRuleActionParameters(BaseModel): - id: str - """The ID of the ruleset to execute.""" - - matched_data: Optional[RuleRulesetsExecuteRuleActionParametersMatchedData] = None - """The configuration to use for matched data logging.""" - - overrides: Optional[RuleRulesetsExecuteRuleActionParametersOverrides] = None - """A set of overrides to apply to the target ruleset.""" - - -class RuleRulesetsExecuteRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsExecuteRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["execute"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsExecuteRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsExecuteRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsLogRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsLogRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["log"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[object] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsLogRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsSkipRuleActionParameters(BaseModel): - phases: Optional[ - List[ - 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", - ] - ] - ] = None - """A list of phases to skip the execution of. - - This option is incompatible with the ruleset and rulesets options. - """ - - products: Optional[ - List[Literal["bic", "hot", "rateLimit", "securityLevel", "uaBlock", "waf", "zoneLockdown"]] - ] = None - """A list of legacy security products to skip the execution of.""" - - rules: Optional[Dict[str, List[str]]] = None - """ - A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the - execution of. This option is incompatible with the ruleset option. - """ - - ruleset: Optional[Literal["current"]] = None - """A ruleset to skip the execution of. - - This option is incompatible with the rulesets, rules and phases options. - """ - - rulesets: Optional[List[str]] = None - """A list of ruleset IDs to skip the execution of. - - This option is incompatible with the ruleset and phases options. - """ - - -class RuleRulesetsSkipRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsSkipRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["skip"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsSkipRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsSkipRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -Rule = Union[RuleRulesetsBlockRule, RuleRulesetsExecuteRule, RuleRulesetsLogRule, RuleRulesetsSkipRule] - - -class VersionGetResponse(BaseModel): - id: str - """The unique ID of the ruleset.""" - - kind: Literal["managed", "custom", "root", "zone"] - """The kind of the ruleset.""" - - last_updated: datetime - """The timestamp of when the ruleset was last modified.""" - - 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.""" - - rules: List[Rule] - """The list of rules in the ruleset.""" - - version: str - """The version of the ruleset.""" - - description: Optional[str] = None - """An informative description of the ruleset.""" diff --git a/src/cloudflare/types/rulesets/version_list_response.py b/src/cloudflare/types/rulesets/version_list_response.py deleted file mode 100644 index 526ef132c..000000000 --- a/src/cloudflare/types/rulesets/version_list_response.py +++ /dev/null @@ -1,59 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["VersionListResponse", "VersionListResponseItem"] - - -class VersionListResponseItem(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.""" - - -VersionListResponse = List[VersionListResponseItem] diff --git a/src/cloudflare/types/rulesets/versions/__init__.py b/src/cloudflare/types/rulesets/versions/__init__.py index 87c1dfc64..b2f53e352 100644 --- a/src/cloudflare/types/rulesets/versions/__init__.py +++ b/src/cloudflare/types/rulesets/versions/__init__.py @@ -1,5 +1,3 @@ # File generated from our OpenAPI spec by Stainless. from __future__ import annotations - -from .by_tag_get_response import ByTagGetResponse as ByTagGetResponse diff --git a/src/cloudflare/types/rulesets/versions/by_tag_get_response.py b/src/cloudflare/types/rulesets/versions/by_tag_get_response.py deleted file mode 100644 index f82072db3..000000000 --- a/src/cloudflare/types/rulesets/versions/by_tag_get_response.py +++ /dev/null @@ -1,393 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Dict, List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = [ - "ByTagGetResponse", - "Rule", - "RuleRulesetsBlockRule", - "RuleRulesetsBlockRuleActionParameters", - "RuleRulesetsBlockRuleActionParametersResponse", - "RuleRulesetsBlockRuleLogging", - "RuleRulesetsExecuteRule", - "RuleRulesetsExecuteRuleActionParameters", - "RuleRulesetsExecuteRuleActionParametersMatchedData", - "RuleRulesetsExecuteRuleActionParametersOverrides", - "RuleRulesetsExecuteRuleActionParametersOverridesCategory", - "RuleRulesetsExecuteRuleActionParametersOverridesRule", - "RuleRulesetsExecuteRuleLogging", - "RuleRulesetsLogRule", - "RuleRulesetsLogRuleLogging", - "RuleRulesetsSkipRule", - "RuleRulesetsSkipRuleActionParameters", - "RuleRulesetsSkipRuleLogging", -] - - -class RuleRulesetsBlockRuleActionParametersResponse(BaseModel): - content: str - """The content to return.""" - - content_type: str - """The type of the content to return.""" - - status_code: int - """The status code to return.""" - - -class RuleRulesetsBlockRuleActionParameters(BaseModel): - response: Optional[RuleRulesetsBlockRuleActionParametersResponse] = None - """The response to show when the block is applied.""" - - -class RuleRulesetsBlockRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsBlockRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["block"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsBlockRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsBlockRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsExecuteRuleActionParametersMatchedData(BaseModel): - public_key: str - """The public key to encrypt matched data logs with.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesCategory(BaseModel): - category: str - """The name of the category to override.""" - - action: Optional[str] = None - """The action to override rules in the category with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of rules in the category.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for rules in the category.""" - - -class RuleRulesetsExecuteRuleActionParametersOverridesRule(BaseModel): - id: str - """The ID of the rule to override.""" - - action: Optional[str] = None - """The action to override the rule with.""" - - enabled: Optional[bool] = None - """Whether to enable execution of the rule.""" - - score_threshold: Optional[int] = None - """The score threshold to use for the rule.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """The sensitivity level to use for the rule.""" - - -class RuleRulesetsExecuteRuleActionParametersOverrides(BaseModel): - action: Optional[str] = None - """An action to override all rules with. - - This option has lower precedence than rule and category overrides. - """ - - categories: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesCategory]] = None - """A list of category-level overrides. - - This option has the second-highest precedence after rule-level overrides. - """ - - enabled: Optional[bool] = None - """Whether to enable execution of all rules. - - This option has lower precedence than rule and category overrides. - """ - - rules: Optional[List[RuleRulesetsExecuteRuleActionParametersOverridesRule]] = None - """A list of rule-level overrides. This option has the highest precedence.""" - - sensitivity_level: Optional[Literal["default", "medium", "low", "eoff"]] = None - """A sensitivity level to set for all rules. - - This option has lower precedence than rule and category overrides and is only - applicable for DDoS phases. - """ - - -class RuleRulesetsExecuteRuleActionParameters(BaseModel): - id: str - """The ID of the ruleset to execute.""" - - matched_data: Optional[RuleRulesetsExecuteRuleActionParametersMatchedData] = None - """The configuration to use for matched data logging.""" - - overrides: Optional[RuleRulesetsExecuteRuleActionParametersOverrides] = None - """A set of overrides to apply to the target ruleset.""" - - -class RuleRulesetsExecuteRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsExecuteRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["execute"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsExecuteRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsExecuteRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsLogRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsLogRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["log"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[object] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsLogRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -class RuleRulesetsSkipRuleActionParameters(BaseModel): - phases: Optional[ - List[ - 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", - ] - ] - ] = None - """A list of phases to skip the execution of. - - This option is incompatible with the ruleset and rulesets options. - """ - - products: Optional[ - List[Literal["bic", "hot", "rateLimit", "securityLevel", "uaBlock", "waf", "zoneLockdown"]] - ] = None - """A list of legacy security products to skip the execution of.""" - - rules: Optional[Dict[str, List[str]]] = None - """ - A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the - execution of. This option is incompatible with the ruleset option. - """ - - ruleset: Optional[Literal["current"]] = None - """A ruleset to skip the execution of. - - This option is incompatible with the rulesets, rules and phases options. - """ - - rulesets: Optional[List[str]] = None - """A list of ruleset IDs to skip the execution of. - - This option is incompatible with the ruleset and phases options. - """ - - -class RuleRulesetsSkipRuleLogging(BaseModel): - enabled: bool - """Whether to generate a log when the rule matches.""" - - -class RuleRulesetsSkipRule(BaseModel): - last_updated: datetime - """The timestamp of when the rule was last modified.""" - - version: str - """The version of the rule.""" - - id: Optional[str] = None - """The unique ID of the rule.""" - - action: Optional[Literal["skip"]] = None - """The action to perform when the rule matches.""" - - action_parameters: Optional[RuleRulesetsSkipRuleActionParameters] = None - """The parameters configuring the rule's action.""" - - categories: Optional[List[str]] = None - """The categories of the rule.""" - - description: Optional[str] = None - """An informative description of the rule.""" - - enabled: Optional[bool] = None - """Whether the rule should be executed.""" - - expression: Optional[str] = None - """The expression defining which traffic will match the rule.""" - - logging: Optional[RuleRulesetsSkipRuleLogging] = None - """An object configuring the rule's logging behavior.""" - - ref: Optional[str] = None - """The reference of the rule (the rule ID by default).""" - - -Rule = Union[RuleRulesetsBlockRule, RuleRulesetsExecuteRule, RuleRulesetsLogRule, RuleRulesetsSkipRule] - - -class ByTagGetResponse(BaseModel): - id: str - """The unique ID of the ruleset.""" - - kind: Literal["managed", "custom", "root", "zone"] - """The kind of the ruleset.""" - - last_updated: datetime - """The timestamp of when the ruleset was last modified.""" - - 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.""" - - rules: List[Rule] - """The list of rules in the ruleset.""" - - version: str - """The version of the ruleset.""" - - description: Optional[str] = None - """An informative description of the ruleset.""" diff --git a/src/cloudflare/types/ruleset_create_response.py b/src/cloudflare/types/rulesets_ruleset_response.py similarity index 99% rename from src/cloudflare/types/ruleset_create_response.py rename to src/cloudflare/types/rulesets_ruleset_response.py index ed4e9785f..ded5b209e 100644 --- a/src/cloudflare/types/ruleset_create_response.py +++ b/src/cloudflare/types/rulesets_ruleset_response.py @@ -7,7 +7,7 @@ from typing_extensions import Literal from .._models import BaseModel __all__ = [ - "RulesetCreateResponse", + "RulesetsRulesetResponse", "Rule", "RuleRulesetsBlockRule", "RuleRulesetsBlockRuleActionParameters", @@ -343,7 +343,7 @@ class RuleRulesetsSkipRule(BaseModel): Rule = Union[RuleRulesetsBlockRule, RuleRulesetsExecuteRule, RuleRulesetsLogRule, RuleRulesetsSkipRule] -class RulesetCreateResponse(BaseModel): +class RulesetsRulesetResponse(BaseModel): id: str """The unique ID of the ruleset.""" diff --git a/src/cloudflare/types/ruleset_list_response.py b/src/cloudflare/types/rulesets_rulesets_response.py similarity index 89% rename from src/cloudflare/types/ruleset_list_response.py rename to src/cloudflare/types/rulesets_rulesets_response.py index 60cd593f9..c8763c20b 100644 --- a/src/cloudflare/types/ruleset_list_response.py +++ b/src/cloudflare/types/rulesets_rulesets_response.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from .._models import BaseModel -__all__ = ["RulesetListResponse", "RulesetListResponseItem"] +__all__ = ["RulesetsRulesetsResponse", "RulesetsRulesetsResponseItem"] -class RulesetListResponseItem(BaseModel): +class RulesetsRulesetsResponseItem(BaseModel): kind: Literal["managed", "custom", "root", "zone"] """The kind of the ruleset.""" @@ -56,4 +56,4 @@ class RulesetListResponseItem(BaseModel): """The version of the ruleset.""" -RulesetListResponse = List[RulesetListResponseItem] +RulesetsRulesetsResponse = List[RulesetsRulesetsResponseItem] diff --git a/src/cloudflare/types/rum/__init__.py b/src/cloudflare/types/rum/__init__.py index 2c3ccbddb..78a5fbad5 100644 --- a/src/cloudflare/types/rum/__init__.py +++ b/src/cloudflare/types/rum/__init__.py @@ -2,17 +2,13 @@ from __future__ import annotations +from .rum_rule import RUMRule as RUMRule +from .rum_site import RUMSite as RUMSite 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 .rule_create_response import RuleCreateResponse as RuleCreateResponse from .rule_delete_response import RuleDeleteResponse as RuleDeleteResponse -from .rule_update_response import RuleUpdateResponse as RuleUpdateResponse from .site_info_list_params import SiteInfoListParams as SiteInfoListParams -from .site_info_get_response import SiteInfoGetResponse as SiteInfoGetResponse from .site_info_create_params import SiteInfoCreateParams as SiteInfoCreateParams -from .site_info_list_response import SiteInfoListResponse as SiteInfoListResponse from .site_info_update_params import SiteInfoUpdateParams as SiteInfoUpdateParams -from .site_info_create_response import SiteInfoCreateResponse as SiteInfoCreateResponse from .site_info_delete_response import SiteInfoDeleteResponse as SiteInfoDeleteResponse -from .site_info_update_response import SiteInfoUpdateResponse as SiteInfoUpdateResponse diff --git a/src/cloudflare/types/rum/rule_list_response.py b/src/cloudflare/types/rum/rule_list_response.py index 62ced4263..d1165f931 100644 --- a/src/cloudflare/types/rum/rule_list_response.py +++ b/src/cloudflare/types/rum/rule_list_response.py @@ -1,32 +1,11 @@ # File generated from our OpenAPI spec by Stainless. from typing import List, Optional -from datetime import datetime +from .rum_rule import RUMRule from ..._models import BaseModel -__all__ = ["RuleListResponse", "Rule", "Ruleset"] - - -class Rule(BaseModel): - id: Optional[str] = None - """The Web Analytics rule identifier.""" - - created: Optional[datetime] = None - - host: Optional[str] = None - """The hostname the rule will be applied to.""" - - inclusive: Optional[bool] = None - """Whether the rule includes or excludes traffic from being measured.""" - - is_paused: Optional[bool] = None - """Whether the rule is paused or not.""" - - paths: Optional[List[str]] = None - """The paths the rule will be applied to.""" - - priority: Optional[float] = None +__all__ = ["RuleListResponse", "Ruleset"] class Ruleset(BaseModel): @@ -43,7 +22,7 @@ class Ruleset(BaseModel): class RuleListResponse(BaseModel): - rules: Optional[List[Rule]] = None + rules: Optional[List[RUMRule]] = None """A list of rules.""" ruleset: Optional[Ruleset] = None diff --git a/src/cloudflare/types/rum/rule_update_response.py b/src/cloudflare/types/rum/rule_update_response.py deleted file mode 100644 index 22859a7f1..000000000 --- a/src/cloudflare/types/rum/rule_update_response.py +++ /dev/null @@ -1,29 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["RuleUpdateResponse"] - - -class RuleUpdateResponse(BaseModel): - id: Optional[str] = None - """The Web Analytics rule identifier.""" - - created: Optional[datetime] = None - - host: Optional[str] = None - """The hostname the rule will be applied to.""" - - inclusive: Optional[bool] = None - """Whether the rule includes or excludes traffic from being measured.""" - - is_paused: Optional[bool] = None - """Whether the rule is paused or not.""" - - paths: Optional[List[str]] = None - """The paths the rule will be applied to.""" - - priority: Optional[float] = None diff --git a/src/cloudflare/types/rum/rule_create_response.py b/src/cloudflare/types/rum/rum_rule.py similarity index 90% rename from src/cloudflare/types/rum/rule_create_response.py rename to src/cloudflare/types/rum/rum_rule.py index 64675d8a5..71e36f2b0 100644 --- a/src/cloudflare/types/rum/rule_create_response.py +++ b/src/cloudflare/types/rum/rum_rule.py @@ -5,10 +5,10 @@ from datetime import datetime from ..._models import BaseModel -__all__ = ["RuleCreateResponse"] +__all__ = ["RUMRule"] -class RuleCreateResponse(BaseModel): +class RUMRule(BaseModel): id: Optional[str] = None """The Web Analytics rule identifier.""" diff --git a/src/cloudflare/types/rum/site_info_get_response.py b/src/cloudflare/types/rum/rum_site.py similarity index 57% rename from src/cloudflare/types/rum/site_info_get_response.py rename to src/cloudflare/types/rum/rum_site.py index cfa455605..cf74c62fd 100644 --- a/src/cloudflare/types/rum/site_info_get_response.py +++ b/src/cloudflare/types/rum/rum_site.py @@ -3,30 +3,10 @@ from typing import List, Optional from datetime import datetime +from .rum_rule import RUMRule from ..._models import BaseModel -__all__ = ["SiteInfoGetResponse", "Rule", "Ruleset"] - - -class Rule(BaseModel): - id: Optional[str] = None - """The Web Analytics rule identifier.""" - - created: Optional[datetime] = None - - host: Optional[str] = None - """The hostname the rule will be applied to.""" - - inclusive: Optional[bool] = None - """Whether the rule includes or excludes traffic from being measured.""" - - is_paused: Optional[bool] = None - """Whether the rule is paused or not.""" - - paths: Optional[List[str]] = None - """The paths the rule will be applied to.""" - - priority: Optional[float] = None +__all__ = ["RUMSite", "Ruleset"] class Ruleset(BaseModel): @@ -42,7 +22,7 @@ class Ruleset(BaseModel): """The zone identifier.""" -class SiteInfoGetResponse(BaseModel): +class RUMSite(BaseModel): auto_install: Optional[bool] = None """ If enabled, the JavaScript snippet is automatically injected for orange-clouded @@ -51,7 +31,7 @@ class SiteInfoGetResponse(BaseModel): created: Optional[datetime] = None - rules: Optional[List[Rule]] = None + rules: Optional[List[RUMRule]] = None """A list of rules.""" ruleset: Optional[Ruleset] = None diff --git a/src/cloudflare/types/rum/site_info_create_response.py b/src/cloudflare/types/rum/site_info_create_response.py deleted file mode 100644 index 6007b4dc6..000000000 --- a/src/cloudflare/types/rum/site_info_create_response.py +++ /dev/null @@ -1,66 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["SiteInfoCreateResponse", "Rule", "Ruleset"] - - -class Rule(BaseModel): - id: Optional[str] = None - """The Web Analytics rule identifier.""" - - created: Optional[datetime] = None - - host: Optional[str] = None - """The hostname the rule will be applied to.""" - - inclusive: Optional[bool] = None - """Whether the rule includes or excludes traffic from being measured.""" - - is_paused: Optional[bool] = None - """Whether the rule is paused or not.""" - - paths: Optional[List[str]] = None - """The paths the rule will be applied to.""" - - priority: Optional[float] = None - - -class Ruleset(BaseModel): - id: Optional[str] = None - """The Web Analytics ruleset identifier.""" - - enabled: Optional[bool] = None - """Whether the ruleset is enabled.""" - - zone_name: Optional[str] = None - - zone_tag: Optional[str] = None - """The zone identifier.""" - - -class SiteInfoCreateResponse(BaseModel): - auto_install: Optional[bool] = None - """ - If enabled, the JavaScript snippet is automatically injected for orange-clouded - sites. - """ - - created: Optional[datetime] = None - - rules: Optional[List[Rule]] = None - """A list of rules.""" - - ruleset: Optional[Ruleset] = None - - site_tag: Optional[str] = None - """The Web Analytics site identifier.""" - - site_token: Optional[str] = None - """The Web Analytics site token.""" - - snippet: Optional[str] = None - """Encoded JavaScript snippet.""" diff --git a/src/cloudflare/types/rum/site_info_list_response.py b/src/cloudflare/types/rum/site_info_list_response.py deleted file mode 100644 index a9f044f6b..000000000 --- a/src/cloudflare/types/rum/site_info_list_response.py +++ /dev/null @@ -1,66 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["SiteInfoListResponse", "Rule", "Ruleset"] - - -class Rule(BaseModel): - id: Optional[str] = None - """The Web Analytics rule identifier.""" - - created: Optional[datetime] = None - - host: Optional[str] = None - """The hostname the rule will be applied to.""" - - inclusive: Optional[bool] = None - """Whether the rule includes or excludes traffic from being measured.""" - - is_paused: Optional[bool] = None - """Whether the rule is paused or not.""" - - paths: Optional[List[str]] = None - """The paths the rule will be applied to.""" - - priority: Optional[float] = None - - -class Ruleset(BaseModel): - id: Optional[str] = None - """The Web Analytics ruleset identifier.""" - - enabled: Optional[bool] = None - """Whether the ruleset is enabled.""" - - zone_name: Optional[str] = None - - zone_tag: Optional[str] = None - """The zone identifier.""" - - -class SiteInfoListResponse(BaseModel): - auto_install: Optional[bool] = None - """ - If enabled, the JavaScript snippet is automatically injected for orange-clouded - sites. - """ - - created: Optional[datetime] = None - - rules: Optional[List[Rule]] = None - """A list of rules.""" - - ruleset: Optional[Ruleset] = None - - site_tag: Optional[str] = None - """The Web Analytics site identifier.""" - - site_token: Optional[str] = None - """The Web Analytics site token.""" - - snippet: Optional[str] = None - """Encoded JavaScript snippet.""" diff --git a/src/cloudflare/types/rum/site_info_update_response.py b/src/cloudflare/types/rum/site_info_update_response.py deleted file mode 100644 index 7af87f1b4..000000000 --- a/src/cloudflare/types/rum/site_info_update_response.py +++ /dev/null @@ -1,66 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["SiteInfoUpdateResponse", "Rule", "Ruleset"] - - -class Rule(BaseModel): - id: Optional[str] = None - """The Web Analytics rule identifier.""" - - created: Optional[datetime] = None - - host: Optional[str] = None - """The hostname the rule will be applied to.""" - - inclusive: Optional[bool] = None - """Whether the rule includes or excludes traffic from being measured.""" - - is_paused: Optional[bool] = None - """Whether the rule is paused or not.""" - - paths: Optional[List[str]] = None - """The paths the rule will be applied to.""" - - priority: Optional[float] = None - - -class Ruleset(BaseModel): - id: Optional[str] = None - """The Web Analytics ruleset identifier.""" - - enabled: Optional[bool] = None - """Whether the ruleset is enabled.""" - - zone_name: Optional[str] = None - - zone_tag: Optional[str] = None - """The zone identifier.""" - - -class SiteInfoUpdateResponse(BaseModel): - auto_install: Optional[bool] = None - """ - If enabled, the JavaScript snippet is automatically injected for orange-clouded - sites. - """ - - created: Optional[datetime] = None - - rules: Optional[List[Rule]] = None - """A list of rules.""" - - ruleset: Optional[Ruleset] = None - - site_tag: Optional[str] = None - """The Web Analytics site identifier.""" - - site_token: Optional[str] = None - """The Web Analytics site token.""" - - snippet: Optional[str] = None - """Encoded JavaScript snippet.""" diff --git a/src/cloudflare/types/secondary_dns/__init__.py b/src/cloudflare/types/secondary_dns/__init__.py index 010d30765..8e42e2a0e 100644 --- a/src/cloudflare/types/secondary_dns/__init__.py +++ b/src/cloudflare/types/secondary_dns/__init__.py @@ -2,27 +2,21 @@ from __future__ import annotations -from .acl_get_response import ACLGetResponse as ACLGetResponse 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 .peer_get_response import PeerGetResponse as PeerGetResponse -from .tsig_get_response import TSIGGetResponse as TSIGGetResponse +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_create_response import ACLCreateResponse as ACLCreateResponse from .acl_delete_response import ACLDeleteResponse as ACLDeleteResponse -from .acl_update_response import ACLUpdateResponse as ACLUpdateResponse -from .peer_create_response import PeerCreateResponse as PeerCreateResponse from .peer_delete_response import PeerDeleteResponse as PeerDeleteResponse -from .peer_update_response import PeerUpdateResponse as PeerUpdateResponse -from .tsig_create_response import TSIGCreateResponse as TSIGCreateResponse from .tsig_delete_response import TSIGDeleteResponse as TSIGDeleteResponse -from .tsig_update_response import TSIGUpdateResponse as TSIGUpdateResponse from .incoming_get_response import IncomingGetResponse as IncomingGetResponse from .outgoing_get_response import OutgoingGetResponse as OutgoingGetResponse from .incoming_create_params import IncomingCreateParams as IncomingCreateParams @@ -34,8 +28,10 @@ from .incoming_delete_response import IncomingDeleteResponse as IncomingDeleteRe from .incoming_update_response import IncomingUpdateResponse as IncomingUpdateResponse from .outgoing_create_response import OutgoingCreateResponse as OutgoingCreateResponse from .outgoing_delete_response import OutgoingDeleteResponse as OutgoingDeleteResponse -from .outgoing_enable_response import OutgoingEnableResponse as OutgoingEnableResponse from .outgoing_update_response import OutgoingUpdateResponse as OutgoingUpdateResponse -from .outgoing_disable_response import OutgoingDisableResponse as OutgoingDisableResponse -from .force_axfr_create_response import ForceAxfrCreateResponse as ForceAxfrCreateResponse -from .outgoing_force_notify_response import OutgoingForceNotifyResponse as OutgoingForceNotifyResponse +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, +) diff --git a/src/cloudflare/types/secondary_dns/acl_create_response.py b/src/cloudflare/types/secondary_dns/acl_create_response.py deleted file mode 100644 index e0d8947b2..000000000 --- a/src/cloudflare/types/secondary_dns/acl_create_response.py +++ /dev/null @@ -1,21 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from ..._models import BaseModel - -__all__ = ["ACLCreateResponse"] - - -class ACLCreateResponse(BaseModel): - id: object - - ip_range: str - """Allowed IPv4/IPv6 address range of primary or secondary nameservers. - - This will be applied for the entire account. The IP range is used to allow - additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR - requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 - and /64 for IPv6 respectively. - """ - - name: str - """The name of the acl.""" diff --git a/src/cloudflare/types/secondary_dns/acl_list_response.py b/src/cloudflare/types/secondary_dns/acl_list_response.py index 589692b37..801d4ccc2 100644 --- a/src/cloudflare/types/secondary_dns/acl_list_response.py +++ b/src/cloudflare/types/secondary_dns/acl_list_response.py @@ -2,25 +2,8 @@ from typing import List -from ..._models import BaseModel +from .secondary_dns_acl import SecondaryDNSACL -__all__ = ["ACLListResponse", "ACLListResponseItem"] +__all__ = ["ACLListResponse"] - -class ACLListResponseItem(BaseModel): - id: object - - ip_range: str - """Allowed IPv4/IPv6 address range of primary or secondary nameservers. - - This will be applied for the entire account. The IP range is used to allow - additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR - requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 - and /64 for IPv6 respectively. - """ - - name: str - """The name of the acl.""" - - -ACLListResponse = List[ACLListResponseItem] +ACLListResponse = List[SecondaryDNSACL] diff --git a/src/cloudflare/types/secondary_dns/acl_update_response.py b/src/cloudflare/types/secondary_dns/acl_update_response.py deleted file mode 100644 index 4dd2562cb..000000000 --- a/src/cloudflare/types/secondary_dns/acl_update_response.py +++ /dev/null @@ -1,21 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from ..._models import BaseModel - -__all__ = ["ACLUpdateResponse"] - - -class ACLUpdateResponse(BaseModel): - id: object - - ip_range: str - """Allowed IPv4/IPv6 address range of primary or secondary nameservers. - - This will be applied for the entire account. The IP range is used to allow - additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR - requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 - and /64 for IPv6 respectively. - """ - - name: str - """The name of the acl.""" diff --git a/src/cloudflare/types/secondary_dns/force_axfr_create_response.py b/src/cloudflare/types/secondary_dns/force_axfr_create_response.py deleted file mode 100644 index f3fb2bc16..000000000 --- a/src/cloudflare/types/secondary_dns/force_axfr_create_response.py +++ /dev/null @@ -1,6 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - - -__all__ = ["ForceAxfrCreateResponse"] - -ForceAxfrCreateResponse = str diff --git a/src/cloudflare/types/secondary_dns/outgoing/__init__.py b/src/cloudflare/types/secondary_dns/outgoing/__init__.py index a0e59278b..b2f53e352 100644 --- a/src/cloudflare/types/secondary_dns/outgoing/__init__.py +++ b/src/cloudflare/types/secondary_dns/outgoing/__init__.py @@ -1,5 +1,3 @@ # File generated from our OpenAPI spec by Stainless. from __future__ import annotations - -from .status_get_response import StatusGetResponse as StatusGetResponse diff --git a/src/cloudflare/types/secondary_dns/outgoing_disable_response.py b/src/cloudflare/types/secondary_dns/outgoing_disable_response.py deleted file mode 100644 index 7b68055ab..000000000 --- a/src/cloudflare/types/secondary_dns/outgoing_disable_response.py +++ /dev/null @@ -1,6 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - - -__all__ = ["OutgoingDisableResponse"] - -OutgoingDisableResponse = str diff --git a/src/cloudflare/types/secondary_dns/outgoing_enable_response.py b/src/cloudflare/types/secondary_dns/outgoing_enable_response.py deleted file mode 100644 index 448f5e1c1..000000000 --- a/src/cloudflare/types/secondary_dns/outgoing_enable_response.py +++ /dev/null @@ -1,6 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - - -__all__ = ["OutgoingEnableResponse"] - -OutgoingEnableResponse = str diff --git a/src/cloudflare/types/secondary_dns/outgoing_force_notify_response.py b/src/cloudflare/types/secondary_dns/outgoing_force_notify_response.py deleted file mode 100644 index 4e80f8c69..000000000 --- a/src/cloudflare/types/secondary_dns/outgoing_force_notify_response.py +++ /dev/null @@ -1,6 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - - -__all__ = ["OutgoingForceNotifyResponse"] - -OutgoingForceNotifyResponse = str diff --git a/src/cloudflare/types/secondary_dns/peer_create_response.py b/src/cloudflare/types/secondary_dns/peer_create_response.py deleted file mode 100644 index 6e2418bc7..000000000 --- a/src/cloudflare/types/secondary_dns/peer_create_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["PeerCreateResponse"] - - -class PeerCreateResponse(BaseModel): - id: object - - name: str - """The name of the peer.""" - - ip: Optional[str] = None - """ - IPv4/IPv6 address of primary or secondary nameserver, depending on what zone - this peer is linked to. For primary zones this IP defines the IP of the - secondary nameserver Cloudflare will NOTIFY upon zone changes. For secondary - zones this IP defines the IP of the primary nameserver Cloudflare will send - AXFR/IXFR requests to. - """ - - ixfr_enable: Optional[bool] = None - """Enable IXFR transfer protocol, default is AXFR. - - Only applicable to secondary zones. - """ - - port: Optional[float] = None - """ - DNS port of primary or secondary nameserver, depending on what zone this peer is - linked to. - """ - - tsig_id: Optional[str] = None - """TSIG authentication will be used for zone transfer if configured.""" diff --git a/src/cloudflare/types/secondary_dns/peer_list_response.py b/src/cloudflare/types/secondary_dns/peer_list_response.py index a17bc13de..dd1a84113 100644 --- a/src/cloudflare/types/secondary_dns/peer_list_response.py +++ b/src/cloudflare/types/secondary_dns/peer_list_response.py @@ -1,41 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ..._models import BaseModel +from .secondary_dns_peer import SecondaryDNSPeer -__all__ = ["PeerListResponse", "PeerListResponseItem"] +__all__ = ["PeerListResponse"] - -class PeerListResponseItem(BaseModel): - id: object - - name: str - """The name of the peer.""" - - ip: Optional[str] = None - """ - IPv4/IPv6 address of primary or secondary nameserver, depending on what zone - this peer is linked to. For primary zones this IP defines the IP of the - secondary nameserver Cloudflare will NOTIFY upon zone changes. For secondary - zones this IP defines the IP of the primary nameserver Cloudflare will send - AXFR/IXFR requests to. - """ - - ixfr_enable: Optional[bool] = None - """Enable IXFR transfer protocol, default is AXFR. - - Only applicable to secondary zones. - """ - - port: Optional[float] = None - """ - DNS port of primary or secondary nameserver, depending on what zone this peer is - linked to. - """ - - tsig_id: Optional[str] = None - """TSIG authentication will be used for zone transfer if configured.""" - - -PeerListResponse = List[PeerListResponseItem] +PeerListResponse = List[SecondaryDNSPeer] diff --git a/src/cloudflare/types/secondary_dns/peer_update_response.py b/src/cloudflare/types/secondary_dns/peer_update_response.py deleted file mode 100644 index 0b81e771c..000000000 --- a/src/cloudflare/types/secondary_dns/peer_update_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["PeerUpdateResponse"] - - -class PeerUpdateResponse(BaseModel): - id: object - - name: str - """The name of the peer.""" - - ip: Optional[str] = None - """ - IPv4/IPv6 address of primary or secondary nameserver, depending on what zone - this peer is linked to. For primary zones this IP defines the IP of the - secondary nameserver Cloudflare will NOTIFY upon zone changes. For secondary - zones this IP defines the IP of the primary nameserver Cloudflare will send - AXFR/IXFR requests to. - """ - - ixfr_enable: Optional[bool] = None - """Enable IXFR transfer protocol, default is AXFR. - - Only applicable to secondary zones. - """ - - port: Optional[float] = None - """ - DNS port of primary or secondary nameserver, depending on what zone this peer is - linked to. - """ - - tsig_id: Optional[str] = None - """TSIG authentication will be used for zone transfer if configured.""" diff --git a/src/cloudflare/types/secondary_dns/acl_get_response.py b/src/cloudflare/types/secondary_dns/secondary_dns_acl.py similarity index 89% rename from src/cloudflare/types/secondary_dns/acl_get_response.py rename to src/cloudflare/types/secondary_dns/secondary_dns_acl.py index 88a314019..a7bba9e1e 100644 --- a/src/cloudflare/types/secondary_dns/acl_get_response.py +++ b/src/cloudflare/types/secondary_dns/secondary_dns_acl.py @@ -2,10 +2,10 @@ from ..._models import BaseModel -__all__ = ["ACLGetResponse"] +__all__ = ["SecondaryDNSACL"] -class ACLGetResponse(BaseModel): +class SecondaryDNSACL(BaseModel): id: object ip_range: 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 new file mode 100644 index 000000000..e849e09a2 --- /dev/null +++ b/src/cloudflare/types/secondary_dns/secondary_dns_disable_transfer_result.py @@ -0,0 +1,6 @@ +# File generated from our OpenAPI spec by Stainless. + + +__all__ = ["SecondaryDNSDisableTransferResult"] + +SecondaryDNSDisableTransferResult = 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 new file mode 100644 index 000000000..bc7ac873b --- /dev/null +++ b/src/cloudflare/types/secondary_dns/secondary_dns_enable_transfer_result.py @@ -0,0 +1,6 @@ +# File generated from our OpenAPI spec by Stainless. + + +__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_result.py new file mode 100644 index 000000000..c81a72eec --- /dev/null +++ b/src/cloudflare/types/secondary_dns/secondary_dns_force_result.py @@ -0,0 +1,6 @@ +# File generated from our OpenAPI spec by Stainless. + + +__all__ = ["SecondaryDNSForceResult"] + +SecondaryDNSForceResult = str diff --git a/src/cloudflare/types/secondary_dns/peer_get_response.py b/src/cloudflare/types/secondary_dns/secondary_dns_peer.py similarity index 93% rename from src/cloudflare/types/secondary_dns/peer_get_response.py rename to src/cloudflare/types/secondary_dns/secondary_dns_peer.py index 33e63a6a7..c65faf65d 100644 --- a/src/cloudflare/types/secondary_dns/peer_get_response.py +++ b/src/cloudflare/types/secondary_dns/secondary_dns_peer.py @@ -4,10 +4,10 @@ from typing import Optional from ..._models import BaseModel -__all__ = ["PeerGetResponse"] +__all__ = ["SecondaryDNSPeer"] -class PeerGetResponse(BaseModel): +class SecondaryDNSPeer(BaseModel): id: object name: str diff --git a/src/cloudflare/types/secondary_dns/secondary_dns_schemas_force_result.py b/src/cloudflare/types/secondary_dns/secondary_dns_schemas_force_result.py new file mode 100644 index 000000000..cee4184c6 --- /dev/null +++ b/src/cloudflare/types/secondary_dns/secondary_dns_schemas_force_result.py @@ -0,0 +1,6 @@ +# File generated from our OpenAPI spec by Stainless. + + +__all__ = ["SecondaryDNSSchemasForceResult"] + +SecondaryDNSSchemasForceResult = str diff --git a/src/cloudflare/types/secondary_dns/tsig_get_response.py b/src/cloudflare/types/secondary_dns/secondary_dns_tsig.py similarity index 77% rename from src/cloudflare/types/secondary_dns/tsig_get_response.py rename to src/cloudflare/types/secondary_dns/secondary_dns_tsig.py index adcb3b541..4dce08ada 100644 --- a/src/cloudflare/types/secondary_dns/tsig_get_response.py +++ b/src/cloudflare/types/secondary_dns/secondary_dns_tsig.py @@ -2,10 +2,10 @@ from ..._models import BaseModel -__all__ = ["TSIGGetResponse"] +__all__ = ["SecondaryDNSTSIG"] -class TSIGGetResponse(BaseModel): +class SecondaryDNSTSIG(BaseModel): id: object algo: str diff --git a/src/cloudflare/types/secondary_dns/tsig_create_response.py b/src/cloudflare/types/secondary_dns/tsig_create_response.py deleted file mode 100644 index d875a9d4e..000000000 --- a/src/cloudflare/types/secondary_dns/tsig_create_response.py +++ /dev/null @@ -1,18 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from ..._models import BaseModel - -__all__ = ["TSIGCreateResponse"] - - -class TSIGCreateResponse(BaseModel): - id: object - - algo: str - """TSIG algorithm.""" - - name: str - """TSIG key name.""" - - secret: str - """TSIG secret.""" diff --git a/src/cloudflare/types/secondary_dns/tsig_list_response.py b/src/cloudflare/types/secondary_dns/tsig_list_response.py index 0b8902bbb..0ae0072e5 100644 --- a/src/cloudflare/types/secondary_dns/tsig_list_response.py +++ b/src/cloudflare/types/secondary_dns/tsig_list_response.py @@ -2,22 +2,8 @@ from typing import List -from ..._models import BaseModel +from .secondary_dns_tsig import SecondaryDNSTSIG -__all__ = ["TSIGListResponse", "TSIGListResponseItem"] +__all__ = ["TSIGListResponse"] - -class TSIGListResponseItem(BaseModel): - id: object - - algo: str - """TSIG algorithm.""" - - name: str - """TSIG key name.""" - - secret: str - """TSIG secret.""" - - -TSIGListResponse = List[TSIGListResponseItem] +TSIGListResponse = List[SecondaryDNSTSIG] diff --git a/src/cloudflare/types/secondary_dns/tsig_update_response.py b/src/cloudflare/types/secondary_dns/tsig_update_response.py deleted file mode 100644 index b43584e92..000000000 --- a/src/cloudflare/types/secondary_dns/tsig_update_response.py +++ /dev/null @@ -1,18 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from ..._models import BaseModel - -__all__ = ["TSIGUpdateResponse"] - - -class TSIGUpdateResponse(BaseModel): - id: object - - algo: str - """TSIG algorithm.""" - - name: str - """TSIG key name.""" - - secret: str - """TSIG secret.""" diff --git a/src/cloudflare/types/snippet_get_response.py b/src/cloudflare/types/snippet.py similarity index 83% rename from src/cloudflare/types/snippet_get_response.py rename to src/cloudflare/types/snippet.py index d8289ff7e..c2e1e66f6 100644 --- a/src/cloudflare/types/snippet_get_response.py +++ b/src/cloudflare/types/snippet.py @@ -4,10 +4,10 @@ from typing import Optional from .._models import BaseModel -__all__ = ["SnippetGetResponse"] +__all__ = ["Snippet"] -class SnippetGetResponse(BaseModel): +class Snippet(BaseModel): created_on: Optional[str] = None """Creation time of the snippet""" diff --git a/src/cloudflare/types/snippet_list_response.py b/src/cloudflare/types/snippet_list_response.py index 62600ae25..442e1f3bf 100644 --- a/src/cloudflare/types/snippet_list_response.py +++ b/src/cloudflare/types/snippet_list_response.py @@ -1,21 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from .._models import BaseModel +from .snippet import Snippet -__all__ = ["SnippetListResponse", "SnippetListResponseItem"] +__all__ = ["SnippetListResponse"] - -class SnippetListResponseItem(BaseModel): - created_on: Optional[str] = None - """Creation time of the snippet""" - - modified_on: Optional[str] = None - """Modification time of the snippet""" - - snippet_name: Optional[str] = None - """Snippet identifying name""" - - -SnippetListResponse = List[SnippetListResponseItem] +SnippetListResponse = List[Snippet] diff --git a/src/cloudflare/types/snippet_update_response.py b/src/cloudflare/types/snippet_update_response.py deleted file mode 100644 index bf7b42054..000000000 --- a/src/cloudflare/types/snippet_update_response.py +++ /dev/null @@ -1,18 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional - -from .._models import BaseModel - -__all__ = ["SnippetUpdateResponse"] - - -class SnippetUpdateResponse(BaseModel): - created_on: Optional[str] = None - """Creation time of the snippet""" - - modified_on: Optional[str] = None - """Modification time of the snippet""" - - snippet_name: Optional[str] = None - """Snippet identifying name""" diff --git a/src/cloudflare/types/speed/__init__.py b/src/cloudflare/types/speed/__init__.py index 31fde96bf..50394e282 100644 --- a/src/cloudflare/types/speed/__init__.py +++ b/src/cloudflare/types/speed/__init__.py @@ -3,13 +3,12 @@ from __future__ import annotations from .test_list_params import TestListParams as TestListParams -from .test_get_response import TestGetResponse as TestGetResponse from .page_list_response import PageListResponse as PageListResponse from .test_create_params import TestCreateParams as TestCreateParams from .test_delete_params import TestDeleteParams as TestDeleteParams from .test_list_response import TestListResponse as TestListResponse -from .test_create_response import TestCreateResponse as TestCreateResponse from .test_delete_response import TestDeleteResponse as TestDeleteResponse +from .observatory_page_test import ObservatoryPageTest as ObservatoryPageTest from .schedule_create_params import ScheduleCreateParams as ScheduleCreateParams from .schedule_create_response import ScheduleCreateResponse as ScheduleCreateResponse -from .availability_list_response import AvailabilityListResponse as AvailabilityListResponse +from .observatory_availabilities import ObservatoryAvailabilities as ObservatoryAvailabilities diff --git a/src/cloudflare/types/speed/availability_list_response.py b/src/cloudflare/types/speed/observatory_availabilities.py similarity index 94% rename from src/cloudflare/types/speed/availability_list_response.py rename to src/cloudflare/types/speed/observatory_availabilities.py index 06ba86842..fa22529e5 100644 --- a/src/cloudflare/types/speed/availability_list_response.py +++ b/src/cloudflare/types/speed/observatory_availabilities.py @@ -7,7 +7,7 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel -__all__ = ["AvailabilityListResponse", "Quota", "Region"] +__all__ = ["ObservatoryAvailabilities", "Quota", "Region"] class Quota(BaseModel): @@ -58,7 +58,7 @@ class Region(BaseModel): """A test region.""" -class AvailabilityListResponse(BaseModel): +class ObservatoryAvailabilities(BaseModel): quota: Optional[Quota] = None regions: Optional[List[Region]] = None diff --git a/src/cloudflare/types/speed/test_get_response.py b/src/cloudflare/types/speed/observatory_page_test.py similarity index 96% rename from src/cloudflare/types/speed/test_get_response.py rename to src/cloudflare/types/speed/observatory_page_test.py index 10b74cbd6..094093ab9 100644 --- a/src/cloudflare/types/speed/test_get_response.py +++ b/src/cloudflare/types/speed/observatory_page_test.py @@ -8,7 +8,7 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel -__all__ = ["TestGetResponse", "DesktopReport", "DesktopReportError", "MobileReport", "MobileReportError", "Region"] +__all__ = ["ObservatoryPageTest", "DesktopReport", "DesktopReportError", "MobileReport", "MobileReportError", "Region"] class DesktopReportError(BaseModel): @@ -138,8 +138,7 @@ class Region(BaseModel): """A test region.""" -class TestGetResponse(BaseModel): - __test__ = False +class ObservatoryPageTest(BaseModel): id: Optional[str] = None """UUID""" diff --git a/src/cloudflare/types/speed/page_list_response.py b/src/cloudflare/types/speed/page_list_response.py index db9b01065..f0b815678 100644 --- a/src/cloudflare/types/speed/page_list_response.py +++ b/src/cloudflare/types/speed/page_list_response.py @@ -1,24 +1,14 @@ # File generated from our OpenAPI spec by Stainless. from typing import List, Optional -from datetime import datetime from typing_extensions import Literal from pydantic import Field as FieldInfo from ..._models import BaseModel +from .observatory_page_test import ObservatoryPageTest -__all__ = [ - "PageListResponse", - "PageListResponseItem", - "PageListResponseItemRegion", - "PageListResponseItemTest", - "PageListResponseItemTestDesktopReport", - "PageListResponseItemTestDesktopReportError", - "PageListResponseItemTestMobileReport", - "PageListResponseItemTestMobileReportError", - "PageListResponseItemTestRegion", -] +__all__ = ["PageListResponse", "PageListResponseItem", "PageListResponseItemRegion"] class PageListResponseItemRegion(BaseModel): @@ -52,155 +42,6 @@ class PageListResponseItemRegion(BaseModel): """A test region.""" -class PageListResponseItemTestDesktopReportError(BaseModel): - code: Optional[Literal["NOT_REACHABLE", "DNS_FAILURE", "NOT_HTML", "LIGHTHOUSE_TIMEOUT", "UNKNOWN"]] = None - """The error code of the Lighthouse result.""" - - detail: Optional[str] = None - """Detailed error message.""" - - final_displayed_url: Optional[str] = FieldInfo(alias="finalDisplayedUrl", default=None) - """The final URL displayed to the user.""" - - -class PageListResponseItemTestDesktopReport(BaseModel): - cls: Optional[float] = None - """Cumulative Layout Shift.""" - - device_type: Optional[Literal["DESKTOP", "MOBILE"]] = FieldInfo(alias="deviceType", default=None) - """The type of device.""" - - error: Optional[PageListResponseItemTestDesktopReportError] = None - - fcp: Optional[float] = None - """First Contentful Paint.""" - - json_report_url: Optional[str] = FieldInfo(alias="jsonReportUrl", default=None) - """The URL to the full Lighthouse JSON report.""" - - lcp: Optional[float] = None - """Largest Contentful Paint.""" - - performance_score: Optional[float] = FieldInfo(alias="performanceScore", default=None) - """The Lighthouse performance score.""" - - si: Optional[float] = None - """Speed Index.""" - - state: Optional[Literal["RUNNING", "COMPLETE", "FAILED"]] = None - """The state of the Lighthouse report.""" - - tbt: Optional[float] = None - """Total Blocking Time.""" - - ttfb: Optional[float] = None - """Time To First Byte.""" - - tti: Optional[float] = None - """Time To Interactive.""" - - -class PageListResponseItemTestMobileReportError(BaseModel): - code: Optional[Literal["NOT_REACHABLE", "DNS_FAILURE", "NOT_HTML", "LIGHTHOUSE_TIMEOUT", "UNKNOWN"]] = None - """The error code of the Lighthouse result.""" - - detail: Optional[str] = None - """Detailed error message.""" - - final_displayed_url: Optional[str] = FieldInfo(alias="finalDisplayedUrl", default=None) - """The final URL displayed to the user.""" - - -class PageListResponseItemTestMobileReport(BaseModel): - cls: Optional[float] = None - """Cumulative Layout Shift.""" - - device_type: Optional[Literal["DESKTOP", "MOBILE"]] = FieldInfo(alias="deviceType", default=None) - """The type of device.""" - - error: Optional[PageListResponseItemTestMobileReportError] = None - - fcp: Optional[float] = None - """First Contentful Paint.""" - - json_report_url: Optional[str] = FieldInfo(alias="jsonReportUrl", default=None) - """The URL to the full Lighthouse JSON report.""" - - lcp: Optional[float] = None - """Largest Contentful Paint.""" - - performance_score: Optional[float] = FieldInfo(alias="performanceScore", default=None) - """The Lighthouse performance score.""" - - si: Optional[float] = None - """Speed Index.""" - - state: Optional[Literal["RUNNING", "COMPLETE", "FAILED"]] = None - """The state of the Lighthouse report.""" - - tbt: Optional[float] = None - """Total Blocking Time.""" - - ttfb: Optional[float] = None - """Time To First Byte.""" - - tti: Optional[float] = None - """Time To Interactive.""" - - -class PageListResponseItemTestRegion(BaseModel): - label: Optional[str] = None - - value: Optional[ - Literal[ - "asia-east1", - "asia-northeast1", - "asia-northeast2", - "asia-south1", - "asia-southeast1", - "australia-southeast1", - "europe-north1", - "europe-southwest1", - "europe-west1", - "europe-west2", - "europe-west3", - "europe-west4", - "europe-west8", - "europe-west9", - "me-west1", - "southamerica-east1", - "us-central1", - "us-east1", - "us-east4", - "us-south1", - "us-west1", - ] - ] = None - """A test region.""" - - -class PageListResponseItemTest(BaseModel): - id: Optional[str] = None - """UUID""" - - date: Optional[datetime] = None - - desktop_report: Optional[PageListResponseItemTestDesktopReport] = FieldInfo(alias="desktopReport", default=None) - """The Lighthouse report.""" - - mobile_report: Optional[PageListResponseItemTestMobileReport] = FieldInfo(alias="mobileReport", default=None) - """The Lighthouse report.""" - - region: Optional[PageListResponseItemTestRegion] = None - """A test region with a label.""" - - schedule_frequency: Optional[Literal["DAILY", "WEEKLY"]] = FieldInfo(alias="scheduleFrequency", default=None) - """The frequency of the test.""" - - url: Optional[str] = None - """A URL.""" - - class PageListResponseItem(BaseModel): region: Optional[PageListResponseItemRegion] = None """A test region with a label.""" @@ -208,7 +49,7 @@ class PageListResponseItem(BaseModel): schedule_frequency: Optional[Literal["DAILY", "WEEKLY"]] = FieldInfo(alias="scheduleFrequency", default=None) """The frequency of the test.""" - tests: Optional[List[PageListResponseItemTest]] = None + tests: Optional[List[ObservatoryPageTest]] = None url: Optional[str] = None """A URL.""" diff --git a/src/cloudflare/types/speed/schedule_create_response.py b/src/cloudflare/types/speed/schedule_create_response.py index fc71e4460..2d0698cc9 100644 --- a/src/cloudflare/types/speed/schedule_create_response.py +++ b/src/cloudflare/types/speed/schedule_create_response.py @@ -1,217 +1,16 @@ # File generated from our OpenAPI spec by Stainless. from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from pydantic import Field as FieldInfo from ..._models import BaseModel +from ..observatory_schedule import ObservatorySchedule +from .observatory_page_test import ObservatoryPageTest -__all__ = [ - "ScheduleCreateResponse", - "Schedule", - "Test", - "TestDesktopReport", - "TestDesktopReportError", - "TestMobileReport", - "TestMobileReportError", - "TestRegion", -] - - -class Schedule(BaseModel): - frequency: Optional[Literal["DAILY", "WEEKLY"]] = None - """The frequency of the test.""" - - region: Optional[ - Literal[ - "asia-east1", - "asia-northeast1", - "asia-northeast2", - "asia-south1", - "asia-southeast1", - "australia-southeast1", - "europe-north1", - "europe-southwest1", - "europe-west1", - "europe-west2", - "europe-west3", - "europe-west4", - "europe-west8", - "europe-west9", - "me-west1", - "southamerica-east1", - "us-central1", - "us-east1", - "us-east4", - "us-south1", - "us-west1", - ] - ] = None - """A test region.""" - - url: Optional[str] = None - """A URL.""" - - -class TestDesktopReportError(BaseModel): - __test__ = False - code: Optional[Literal["NOT_REACHABLE", "DNS_FAILURE", "NOT_HTML", "LIGHTHOUSE_TIMEOUT", "UNKNOWN"]] = None - """The error code of the Lighthouse result.""" - - detail: Optional[str] = None - """Detailed error message.""" - - final_displayed_url: Optional[str] = FieldInfo(alias="finalDisplayedUrl", default=None) - """The final URL displayed to the user.""" - - -class TestDesktopReport(BaseModel): - __test__ = False - cls: Optional[float] = None - """Cumulative Layout Shift.""" - - device_type: Optional[Literal["DESKTOP", "MOBILE"]] = FieldInfo(alias="deviceType", default=None) - """The type of device.""" - - error: Optional[TestDesktopReportError] = None - - fcp: Optional[float] = None - """First Contentful Paint.""" - - json_report_url: Optional[str] = FieldInfo(alias="jsonReportUrl", default=None) - """The URL to the full Lighthouse JSON report.""" - - lcp: Optional[float] = None - """Largest Contentful Paint.""" - - performance_score: Optional[float] = FieldInfo(alias="performanceScore", default=None) - """The Lighthouse performance score.""" - - si: Optional[float] = None - """Speed Index.""" - - state: Optional[Literal["RUNNING", "COMPLETE", "FAILED"]] = None - """The state of the Lighthouse report.""" - - tbt: Optional[float] = None - """Total Blocking Time.""" - - ttfb: Optional[float] = None - """Time To First Byte.""" - - tti: Optional[float] = None - """Time To Interactive.""" - - -class TestMobileReportError(BaseModel): - __test__ = False - code: Optional[Literal["NOT_REACHABLE", "DNS_FAILURE", "NOT_HTML", "LIGHTHOUSE_TIMEOUT", "UNKNOWN"]] = None - """The error code of the Lighthouse result.""" - - detail: Optional[str] = None - """Detailed error message.""" - - final_displayed_url: Optional[str] = FieldInfo(alias="finalDisplayedUrl", default=None) - """The final URL displayed to the user.""" - - -class TestMobileReport(BaseModel): - __test__ = False - cls: Optional[float] = None - """Cumulative Layout Shift.""" - - device_type: Optional[Literal["DESKTOP", "MOBILE"]] = FieldInfo(alias="deviceType", default=None) - """The type of device.""" - - error: Optional[TestMobileReportError] = None - - fcp: Optional[float] = None - """First Contentful Paint.""" - - json_report_url: Optional[str] = FieldInfo(alias="jsonReportUrl", default=None) - """The URL to the full Lighthouse JSON report.""" - - lcp: Optional[float] = None - """Largest Contentful Paint.""" - - performance_score: Optional[float] = FieldInfo(alias="performanceScore", default=None) - """The Lighthouse performance score.""" - - si: Optional[float] = None - """Speed Index.""" - - state: Optional[Literal["RUNNING", "COMPLETE", "FAILED"]] = None - """The state of the Lighthouse report.""" - - tbt: Optional[float] = None - """Total Blocking Time.""" - - ttfb: Optional[float] = None - """Time To First Byte.""" - - tti: Optional[float] = None - """Time To Interactive.""" - - -class TestRegion(BaseModel): - __test__ = False - label: Optional[str] = None - - value: Optional[ - Literal[ - "asia-east1", - "asia-northeast1", - "asia-northeast2", - "asia-south1", - "asia-southeast1", - "australia-southeast1", - "europe-north1", - "europe-southwest1", - "europe-west1", - "europe-west2", - "europe-west3", - "europe-west4", - "europe-west8", - "europe-west9", - "me-west1", - "southamerica-east1", - "us-central1", - "us-east1", - "us-east4", - "us-south1", - "us-west1", - ] - ] = None - """A test region.""" - - -class Test(BaseModel): - __test__ = False - id: Optional[str] = None - """UUID""" - - date: Optional[datetime] = None - - desktop_report: Optional[TestDesktopReport] = FieldInfo(alias="desktopReport", default=None) - """The Lighthouse report.""" - - mobile_report: Optional[TestMobileReport] = FieldInfo(alias="mobileReport", default=None) - """The Lighthouse report.""" - - region: Optional[TestRegion] = None - """A test region with a label.""" - - schedule_frequency: Optional[Literal["DAILY", "WEEKLY"]] = FieldInfo(alias="scheduleFrequency", default=None) - """The frequency of the test.""" - - url: Optional[str] = None - """A URL.""" +__all__ = ["ScheduleCreateResponse"] class ScheduleCreateResponse(BaseModel): - schedule: Optional[Schedule] = None + schedule: Optional[ObservatorySchedule] = None """The test schedule.""" - test: Optional[Test] = None + test: Optional[ObservatoryPageTest] = None diff --git a/src/cloudflare/types/speed/test_create_response.py b/src/cloudflare/types/speed/test_create_response.py deleted file mode 100644 index 3393b9965..000000000 --- a/src/cloudflare/types/speed/test_create_response.py +++ /dev/null @@ -1,161 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = ["TestCreateResponse", "DesktopReport", "DesktopReportError", "MobileReport", "MobileReportError", "Region"] - - -class DesktopReportError(BaseModel): - code: Optional[Literal["NOT_REACHABLE", "DNS_FAILURE", "NOT_HTML", "LIGHTHOUSE_TIMEOUT", "UNKNOWN"]] = None - """The error code of the Lighthouse result.""" - - detail: Optional[str] = None - """Detailed error message.""" - - final_displayed_url: Optional[str] = FieldInfo(alias="finalDisplayedUrl", default=None) - """The final URL displayed to the user.""" - - -class DesktopReport(BaseModel): - cls: Optional[float] = None - """Cumulative Layout Shift.""" - - device_type: Optional[Literal["DESKTOP", "MOBILE"]] = FieldInfo(alias="deviceType", default=None) - """The type of device.""" - - error: Optional[DesktopReportError] = None - - fcp: Optional[float] = None - """First Contentful Paint.""" - - json_report_url: Optional[str] = FieldInfo(alias="jsonReportUrl", default=None) - """The URL to the full Lighthouse JSON report.""" - - lcp: Optional[float] = None - """Largest Contentful Paint.""" - - performance_score: Optional[float] = FieldInfo(alias="performanceScore", default=None) - """The Lighthouse performance score.""" - - si: Optional[float] = None - """Speed Index.""" - - state: Optional[Literal["RUNNING", "COMPLETE", "FAILED"]] = None - """The state of the Lighthouse report.""" - - tbt: Optional[float] = None - """Total Blocking Time.""" - - ttfb: Optional[float] = None - """Time To First Byte.""" - - tti: Optional[float] = None - """Time To Interactive.""" - - -class MobileReportError(BaseModel): - code: Optional[Literal["NOT_REACHABLE", "DNS_FAILURE", "NOT_HTML", "LIGHTHOUSE_TIMEOUT", "UNKNOWN"]] = None - """The error code of the Lighthouse result.""" - - detail: Optional[str] = None - """Detailed error message.""" - - final_displayed_url: Optional[str] = FieldInfo(alias="finalDisplayedUrl", default=None) - """The final URL displayed to the user.""" - - -class MobileReport(BaseModel): - cls: Optional[float] = None - """Cumulative Layout Shift.""" - - device_type: Optional[Literal["DESKTOP", "MOBILE"]] = FieldInfo(alias="deviceType", default=None) - """The type of device.""" - - error: Optional[MobileReportError] = None - - fcp: Optional[float] = None - """First Contentful Paint.""" - - json_report_url: Optional[str] = FieldInfo(alias="jsonReportUrl", default=None) - """The URL to the full Lighthouse JSON report.""" - - lcp: Optional[float] = None - """Largest Contentful Paint.""" - - performance_score: Optional[float] = FieldInfo(alias="performanceScore", default=None) - """The Lighthouse performance score.""" - - si: Optional[float] = None - """Speed Index.""" - - state: Optional[Literal["RUNNING", "COMPLETE", "FAILED"]] = None - """The state of the Lighthouse report.""" - - tbt: Optional[float] = None - """Total Blocking Time.""" - - ttfb: Optional[float] = None - """Time To First Byte.""" - - tti: Optional[float] = None - """Time To Interactive.""" - - -class Region(BaseModel): - label: Optional[str] = None - - value: Optional[ - Literal[ - "asia-east1", - "asia-northeast1", - "asia-northeast2", - "asia-south1", - "asia-southeast1", - "australia-southeast1", - "europe-north1", - "europe-southwest1", - "europe-west1", - "europe-west2", - "europe-west3", - "europe-west4", - "europe-west8", - "europe-west9", - "me-west1", - "southamerica-east1", - "us-central1", - "us-east1", - "us-east4", - "us-south1", - "us-west1", - ] - ] = None - """A test region.""" - - -class TestCreateResponse(BaseModel): - __test__ = False - id: Optional[str] = None - """UUID""" - - date: Optional[datetime] = None - - desktop_report: Optional[DesktopReport] = FieldInfo(alias="desktopReport", default=None) - """The Lighthouse report.""" - - mobile_report: Optional[MobileReport] = FieldInfo(alias="mobileReport", default=None) - """The Lighthouse report.""" - - region: Optional[Region] = None - """A test region with a label.""" - - schedule_frequency: Optional[Literal["DAILY", "WEEKLY"]] = FieldInfo(alias="scheduleFrequency", default=None) - """The frequency of the test.""" - - url: Optional[str] = None - """A URL.""" diff --git a/src/cloudflare/types/ssl/__init__.py b/src/cloudflare/types/ssl/__init__.py index 70d528e75..c431f5825 100644 --- a/src/cloudflare/types/ssl/__init__.py +++ b/src/cloudflare/types/ssl/__init__.py @@ -14,3 +14,6 @@ from .certificate_pack_get_response import CertificatePackGetResponse as Certifi 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_certificates_and_hostnames_verification.py new file mode 100644 index 000000000..fc0795052 --- /dev/null +++ b/src/cloudflare/types/ssl/tls_certificates_and_hostnames_verification.py @@ -0,0 +1,47 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["TLSCertificatesAndHostnamesVerification", "VerificationInfo"] + + +class VerificationInfo(BaseModel): + record_name: Optional[Literal["record_name", "http_url", "cname", "txt_name"]] = None + """Name of CNAME record.""" + + record_target: Optional[Literal["record_value", "http_body", "cname_target", "txt_value"]] = None + """Target of CNAME record.""" + + +class TLSCertificatesAndHostnamesVerification(BaseModel): + certificate_status: Literal[ + "initializing", "authorizing", "active", "expired", "issuing", "timing_out", "pending_deployment" + ] + """Current status of certificate.""" + + brand_check: Optional[bool] = None + """Certificate Authority is manually reviewing the order.""" + + cert_pack_uuid: Optional[str] = None + """Certificate Pack UUID.""" + + signature: Optional[Literal["ECDSAWithSHA256", "SHA1WithRSA", "SHA256WithRSA"]] = None + """Certificate's signature algorithm.""" + + validation_method: Optional[Literal["http", "cname", "txt"]] = None + """Validation method in use for a certificate pack order.""" + + verification_info: Optional[VerificationInfo] = None + """Certificate's required verification information.""" + + verification_status: Optional[bool] = None + """ + Status of the required verification information, omitted if verification status + is unknown. + """ + + verification_type: Optional[Literal["cname", "meta tag"]] = None + """Method of verification.""" diff --git a/src/cloudflare/types/ssl/universal/__init__.py b/src/cloudflare/types/ssl/universal/__init__.py index 5bdf1e2ca..219aa3890 100644 --- a/src/cloudflare/types/ssl/universal/__init__.py +++ b/src/cloudflare/types/ssl/universal/__init__.py @@ -3,5 +3,6 @@ from __future__ import annotations from .setting_edit_params import SettingEditParams as SettingEditParams -from .setting_get_response import SettingGetResponse as SettingGetResponse -from .setting_edit_response import SettingEditResponse as SettingEditResponse +from .tls_certificates_and_hostnames_universal import ( + TLSCertificatesAndHostnamesUniversal as TLSCertificatesAndHostnamesUniversal, +) diff --git a/src/cloudflare/types/ssl/universal/setting_get_response.py b/src/cloudflare/types/ssl/universal/setting_get_response.py deleted file mode 100644 index c6aa49682..000000000 --- a/src/cloudflare/types/ssl/universal/setting_get_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional - -from ...._models import BaseModel - -__all__ = ["SettingGetResponse"] - - -class SettingGetResponse(BaseModel): - enabled: Optional[bool] = None - """ - Disabling Universal SSL removes any currently active Universal SSL certificates - for your zone from the edge and prevents any future Universal SSL certificates - from being ordered. If there are no advanced certificates or custom certificates - uploaded for the domain, visitors will be unable to access the domain over - HTTPS. - - By disabling Universal SSL, you understand that the following Cloudflare - settings and preferences will result in visitors being unable to visit your - domain unless you have uploaded a custom certificate or purchased an advanced - certificate. - - - HSTS - - Always Use HTTPS - - Opportunistic Encryption - - Onion Routing - - Any Page Rules redirecting traffic to HTTPS - - Similarly, any HTTP redirect to HTTPS at the origin while the Cloudflare proxy - is enabled will result in users being unable to visit your site without a valid - certificate at Cloudflare's edge. - - If you do not have a valid custom or advanced certificate at Cloudflare's edge - and are unsure if any of the above Cloudflare settings are enabled, or if any - HTTP redirects exist at your origin, we advise leaving Universal SSL enabled for - your domain. - """ diff --git a/src/cloudflare/types/ssl/universal/setting_edit_response.py b/src/cloudflare/types/ssl/universal/tls_certificates_and_hostnames_universal.py similarity index 92% rename from src/cloudflare/types/ssl/universal/setting_edit_response.py rename to src/cloudflare/types/ssl/universal/tls_certificates_and_hostnames_universal.py index 3732f096c..b4794bcf9 100644 --- a/src/cloudflare/types/ssl/universal/setting_edit_response.py +++ b/src/cloudflare/types/ssl/universal/tls_certificates_and_hostnames_universal.py @@ -4,10 +4,10 @@ from typing import Optional from ...._models import BaseModel -__all__ = ["SettingEditResponse"] +__all__ = ["TLSCertificatesAndHostnamesUniversal"] -class SettingEditResponse(BaseModel): +class TLSCertificatesAndHostnamesUniversal(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 2f9e63c87..3aec431d2 100644 --- a/src/cloudflare/types/ssl/verification_get_response.py +++ b/src/cloudflare/types/ssl/verification_get_response.py @@ -1,50 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .tls_certificates_and_hostnames_verification import TLSCertificatesAndHostnamesVerification -__all__ = ["VerificationGetResponse", "VerificationGetResponseItem", "VerificationGetResponseItemVerificationInfo"] +__all__ = ["VerificationGetResponse"] - -class VerificationGetResponseItemVerificationInfo(BaseModel): - record_name: Optional[Literal["record_name", "http_url", "cname", "txt_name"]] = None - """Name of CNAME record.""" - - record_target: Optional[Literal["record_value", "http_body", "cname_target", "txt_value"]] = None - """Target of CNAME record.""" - - -class VerificationGetResponseItem(BaseModel): - certificate_status: Literal[ - "initializing", "authorizing", "active", "expired", "issuing", "timing_out", "pending_deployment" - ] - """Current status of certificate.""" - - brand_check: Optional[bool] = None - """Certificate Authority is manually reviewing the order.""" - - cert_pack_uuid: Optional[str] = None - """Certificate Pack UUID.""" - - signature: Optional[Literal["ECDSAWithSHA256", "SHA1WithRSA", "SHA256WithRSA"]] = None - """Certificate's signature algorithm.""" - - validation_method: Optional[Literal["http", "cname", "txt"]] = None - """Validation method in use for a certificate pack order.""" - - verification_info: Optional[VerificationGetResponseItemVerificationInfo] = None - """Certificate's required verification information.""" - - verification_status: Optional[bool] = None - """ - Status of the required verification information, omitted if verification status - is unknown. - """ - - verification_type: Optional[Literal["cname", "meta tag"]] = None - """Method of verification.""" - - -VerificationGetResponse = List[VerificationGetResponseItem] +VerificationGetResponse = List[TLSCertificatesAndHostnamesVerification] diff --git a/src/cloudflare/types/storage/__init__.py b/src/cloudflare/types/storage/__init__.py index a9ab3d306..290a96c32 100644 --- a/src/cloudflare/types/storage/__init__.py +++ b/src/cloudflare/types/storage/__init__.py @@ -3,6 +3,6 @@ from __future__ import annotations from .analytics_list_params import AnalyticsListParams as AnalyticsListParams -from .analytics_list_response import AnalyticsListResponse as AnalyticsListResponse from .analytics_stored_params import AnalyticsStoredParams as AnalyticsStoredParams -from .analytics_stored_response import AnalyticsStoredResponse as AnalyticsStoredResponse +from .workers_kv_schemas_result import WorkersKVSchemasResult as WorkersKVSchemasResult +from .workers_kv_components_schemas_result import WorkersKVComponentsSchemasResult as WorkersKVComponentsSchemasResult diff --git a/src/cloudflare/types/storage/analytics_stored_response.py b/src/cloudflare/types/storage/workers_kv_components_schemas_result.py similarity index 95% rename from src/cloudflare/types/storage/analytics_stored_response.py rename to src/cloudflare/types/storage/workers_kv_components_schemas_result.py index 2e060b222..10adde3fc 100644 --- a/src/cloudflare/types/storage/analytics_stored_response.py +++ b/src/cloudflare/types/storage/workers_kv_components_schemas_result.py @@ -5,7 +5,7 @@ from datetime import datetime from ..._models import BaseModel -__all__ = ["AnalyticsStoredResponse", "Data", "Query"] +__all__ = ["WorkersKVComponentsSchemasResult", "Data", "Query"] class Data(BaseModel): @@ -56,7 +56,7 @@ class Query(BaseModel): """End of time interval to query, defaults to current time.""" -class AnalyticsStoredResponse(BaseModel): +class WorkersKVComponentsSchemasResult(BaseModel): data: Optional[List[Data]] = None data_lag: float diff --git a/src/cloudflare/types/storage/analytics_list_response.py b/src/cloudflare/types/storage/workers_kv_schemas_result.py similarity index 96% rename from src/cloudflare/types/storage/analytics_list_response.py rename to src/cloudflare/types/storage/workers_kv_schemas_result.py index 032409352..3aef8e84d 100644 --- a/src/cloudflare/types/storage/analytics_list_response.py +++ b/src/cloudflare/types/storage/workers_kv_schemas_result.py @@ -5,7 +5,7 @@ from datetime import datetime from ..._models import BaseModel -__all__ = ["AnalyticsListResponse", "Data", "Query"] +__all__ = ["WorkersKVSchemasResult", "Data", "Query"] class Data(BaseModel): @@ -56,7 +56,7 @@ class Query(BaseModel): """End of time interval to query, defaults to current time.""" -class AnalyticsListResponse(BaseModel): +class WorkersKVSchemasResult(BaseModel): data: Optional[List[Data]] = None data_lag: float diff --git a/src/cloudflare/types/stream/__init__.py b/src/cloudflare/types/stream/__init__.py index 968a170a8..ade775bf4 100644 --- a/src/cloudflare/types/stream/__init__.py +++ b/src/cloudflare/types/stream/__init__.py @@ -2,15 +2,17 @@ from __future__ import annotations +from .stream_keys import StreamKeys as StreamKeys +from .stream_captions import StreamCaptions as StreamCaptions +from .stream_clipping import StreamClipping as StreamClipping from .key_get_response import KeyGetResponse as KeyGetResponse +from .stream_live_input import StreamLiveInput as StreamLiveInput +from .stream_watermarks import StreamWatermarks as StreamWatermarks from .clip_create_params import ClipCreateParams as ClipCreateParams from .copy_create_params import CopyCreateParams as CopyCreateParams -from .key_create_response import KeyCreateResponse as KeyCreateResponse from .key_delete_response import KeyDeleteResponse as KeyDeleteResponse from .token_create_params import TokenCreateParams as TokenCreateParams from .caption_get_response import CaptionGetResponse as CaptionGetResponse -from .clip_create_response import ClipCreateResponse as ClipCreateResponse -from .copy_create_response import CopyCreateResponse as CopyCreateResponse from .webhook_get_response import WebhookGetResponse as WebhookGetResponse from .caption_update_params import CaptionUpdateParams as CaptionUpdateParams from .download_get_response import DownloadGetResponse as DownloadGetResponse @@ -22,7 +24,7 @@ from .audio_track_copy_params import AudioTrackCopyParams as AudioTrackCopyParam 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 .live_input_get_response import LiveInputGetResponse as LiveInputGetResponse +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 @@ -33,12 +35,8 @@ from .download_delete_response import DownloadDeleteResponse as DownloadDeleteRe from .live_input_create_params import LiveInputCreateParams as LiveInputCreateParams from .live_input_list_response import LiveInputListResponse as LiveInputListResponse from .live_input_update_params import LiveInputUpdateParams as LiveInputUpdateParams -from .audio_track_copy_response import AudioTrackCopyResponse as AudioTrackCopyResponse -from .audio_track_edit_response import AudioTrackEditResponse as AudioTrackEditResponse from .watermark_create_response import WatermarkCreateResponse as WatermarkCreateResponse from .watermark_delete_response import WatermarkDeleteResponse as WatermarkDeleteResponse -from .live_input_create_response import LiveInputCreateResponse as LiveInputCreateResponse -from .live_input_update_response import LiveInputUpdateResponse as LiveInputUpdateResponse from .video_storage_usage_params import VideoStorageUsageParams as VideoStorageUsageParams from .audio_track_delete_response import AudioTrackDeleteResponse as AudioTrackDeleteResponse from .direct_upload_create_params import DirectUploadCreateParams as DirectUploadCreateParams diff --git a/src/cloudflare/types/stream/audio_track_copy_response.py b/src/cloudflare/types/stream/audio_track_copy_response.py deleted file mode 100644 index 6704328c5..000000000 --- a/src/cloudflare/types/stream/audio_track_copy_response.py +++ /dev/null @@ -1,25 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["AudioTrackCopyResponse"] - - -class AudioTrackCopyResponse(BaseModel): - default: Optional[bool] = None - """Denotes whether the audio track will be played by default in a player.""" - - label: Optional[str] = None - """ - A string to uniquely identify the track amongst other audio track labels for the - specified video. - """ - - status: Optional[Literal["queued", "ready", "error"]] = None - """Specifies the processing status of the video.""" - - uid: Optional[str] = None - """A Cloudflare-generated unique identifier for a media item.""" diff --git a/src/cloudflare/types/stream/audio_track_get_response.py b/src/cloudflare/types/stream/audio_track_get_response.py index 64cdb2ac3..2b5223dc2 100644 --- a/src/cloudflare/types/stream/audio_track_get_response.py +++ b/src/cloudflare/types/stream/audio_track_get_response.py @@ -1,28 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .stream_additional_audio import StreamAdditionalAudio -__all__ = ["AudioTrackGetResponse", "AudioTrackGetResponseItem"] +__all__ = ["AudioTrackGetResponse"] - -class AudioTrackGetResponseItem(BaseModel): - default: Optional[bool] = None - """Denotes whether the audio track will be played by default in a player.""" - - label: Optional[str] = None - """ - A string to uniquely identify the track amongst other audio track labels for the - specified video. - """ - - status: Optional[Literal["queued", "ready", "error"]] = None - """Specifies the processing status of the video.""" - - uid: Optional[str] = None - """A Cloudflare-generated unique identifier for a media item.""" - - -AudioTrackGetResponse = List[AudioTrackGetResponseItem] +AudioTrackGetResponse = List[StreamAdditionalAudio] diff --git a/src/cloudflare/types/stream/caption_get_response.py b/src/cloudflare/types/stream/caption_get_response.py index 3b090bafd..e2670de4c 100644 --- a/src/cloudflare/types/stream/caption_get_response.py +++ b/src/cloudflare/types/stream/caption_get_response.py @@ -1,18 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ..._models import BaseModel +from .stream_captions import StreamCaptions -__all__ = ["CaptionGetResponse", "CaptionGetResponseItem"] +__all__ = ["CaptionGetResponse"] - -class CaptionGetResponseItem(BaseModel): - label: Optional[str] = None - """The language label displayed in the native language to users.""" - - language: Optional[str] = None - """The language tag in BCP 47 format.""" - - -CaptionGetResponse = List[CaptionGetResponseItem] +CaptionGetResponse = List[StreamCaptions] diff --git a/src/cloudflare/types/stream/copy_create_response.py b/src/cloudflare/types/stream/copy_create_response.py deleted file mode 100644 index 86aeabcad..000000000 --- a/src/cloudflare/types/stream/copy_create_response.py +++ /dev/null @@ -1,234 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = ["CopyCreateResponse", "Input", "Playback", "Status", "Watermark"] - - -class Input(BaseModel): - height: Optional[int] = None - """The video height in pixels. - - A value of `-1` means the height is unknown. The value becomes available after - the upload and before the video is ready. - """ - - width: Optional[int] = None - """The video width in pixels. - - A value of `-1` means the width is unknown. The value becomes available after - the upload and before the video is ready. - """ - - -class Playback(BaseModel): - dash: Optional[str] = None - """DASH Media Presentation Description for the video.""" - - hls: Optional[str] = None - """The HLS manifest for the video.""" - - -class Status(BaseModel): - error_reason_code: Optional[str] = FieldInfo(alias="errorReasonCode", default=None) - """Specifies why the video failed to encode. - - This field is empty if the video is not in an `error` state. Preferred for - programmatic use. - """ - - error_reason_text: Optional[str] = FieldInfo(alias="errorReasonText", default=None) - """ - Specifies why the video failed to encode using a human readable error message in - English. This field is empty if the video is not in an `error` state. - """ - - pct_complete: Optional[str] = FieldInfo(alias="pctComplete", default=None) - """Indicates the size of the entire upload in bytes. - - The value must be a non-negative integer. - """ - - state: Optional[Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error"]] = None - """Specifies the processing status for all quality levels for a video.""" - - -class Watermark(BaseModel): - created: Optional[datetime] = None - """The date and a time a watermark profile was created.""" - - downloaded_from: Optional[str] = FieldInfo(alias="downloadedFrom", default=None) - """The source URL for a downloaded image. - - If the watermark profile was created via direct upload, this field is null. - """ - - height: Optional[int] = None - """The height of the image in pixels.""" - - name: Optional[str] = None - """A short description of the watermark profile.""" - - opacity: Optional[float] = None - """The translucency of the image. - - A value of `0.0` makes the image completely transparent, and `1.0` makes the - image completely opaque. Note that if the image is already semi-transparent, - setting this to `1.0` will not make the image completely opaque. - """ - - padding: Optional[float] = None - """ - The whitespace between the adjacent edges (determined by position) of the video - and the image. `0.0` indicates no padding, and `1.0` indicates a fully padded - video width or length, as determined by the algorithm. - """ - - position: Optional[str] = None - """The location of the image. - - Valid positions are: `upperRight`, `upperLeft`, `lowerLeft`, `lowerRight`, and - `center`. Note that `center` ignores the `padding` parameter. - """ - - scale: Optional[float] = None - """The size of the image relative to the overall size of the video. - - This parameter will adapt to horizontal and vertical videos automatically. `0.0` - indicates no scaling (use the size of the image as-is), and `1.0 `fills the - entire video. - """ - - size: Optional[float] = None - """The size of the image in bytes.""" - - uid: Optional[str] = None - """The unique identifier for a watermark profile.""" - - width: Optional[int] = None - """The width of the image in pixels.""" - - -class CopyCreateResponse(BaseModel): - allowed_origins: Optional[List[str]] = FieldInfo(alias="allowedOrigins", default=None) - """Lists the origins allowed to display the video. - - Enter allowed origin domains in an array and use `*` for wildcard subdomains. - Empty arrays allow the video to be viewed on any origin. - """ - - created: Optional[datetime] = None - """The date and time the media item was created.""" - - creator: Optional[str] = None - """A user-defined identifier for the media creator.""" - - duration: Optional[float] = None - """The duration of the video in seconds. - - A value of `-1` means the duration is unknown. The duration becomes available - after the upload and before the video is ready. - """ - - input: Optional[Input] = None - - live_input: Optional[str] = FieldInfo(alias="liveInput", default=None) - """The live input ID used to upload a video with Stream Live.""" - - max_duration_seconds: Optional[int] = FieldInfo(alias="maxDurationSeconds", default=None) - """The maximum duration in seconds for a video upload. - - Can be set for a video that is not yet uploaded to limit its duration. Uploads - that exceed the specified duration will fail during processing. A value of `-1` - means the value is unknown. - """ - - meta: Optional[object] = None - """ - A user modifiable key-value store used to reference other systems of record for - managing videos. - """ - - modified: Optional[datetime] = None - """The date and time the media item was last modified.""" - - playback: Optional[Playback] = None - - preview: Optional[str] = None - """The video's preview page URI. This field is omitted until encoding is complete.""" - - ready_to_stream: Optional[bool] = FieldInfo(alias="readyToStream", default=None) - """Indicates whether the video is playable. - - The field is empty if the video is not ready for viewing or the live stream is - still in progress. - """ - - ready_to_stream_at: Optional[datetime] = FieldInfo(alias="readyToStreamAt", default=None) - """Indicates the time at which the video became playable. - - The field is empty if the video is not ready for viewing or the live stream is - still in progress. - """ - - require_signed_urls: Optional[bool] = FieldInfo(alias="requireSignedURLs", default=None) - """Indicates whether the video can be a accessed using the UID. - - When set to `true`, a signed token must be generated with a signing key to view - the video. - """ - - scheduled_deletion: Optional[datetime] = FieldInfo(alias="scheduledDeletion", default=None) - """Indicates the date and time at which the video will be deleted. - - Omit the field to indicate no change, or include with a `null` value to remove - an existing scheduled deletion. If specified, must be at least 30 days from - upload time. - """ - - size: Optional[float] = None - """The size of the media item in bytes.""" - - status: Optional[Status] = None - """Specifies a detailed status for a video. - - If the `state` is `inprogress` or `error`, the `step` field returns `encoding` - or `manifest`. If the `state` is `inprogress`, `pctComplete` returns a number - between 0 and 100 to indicate the approximate percent of completion. If the - `state` is `error`, `errorReasonCode` and `errorReasonText` provide additional - details. - """ - - thumbnail: Optional[str] = None - """The media item's thumbnail URI. - - This field is omitted until encoding is complete. - """ - - thumbnail_timestamp_pct: Optional[float] = FieldInfo(alias="thumbnailTimestampPct", default=None) - """ - The timestamp for a thumbnail image calculated as a percentage value of the - video's duration. To convert from a second-wise timestamp to a percentage, - divide the desired timestamp by the total duration of the video. If this value - is not set, the default thumbnail image is taken from 0s of the video. - """ - - uid: Optional[str] = None - """A Cloudflare-generated unique identifier for a media item.""" - - uploaded: Optional[datetime] = None - """The date and time the media item was uploaded.""" - - upload_expiry: Optional[datetime] = FieldInfo(alias="uploadExpiry", default=None) - """ - The date and time when the video upload URL is no longer valid for direct user - uploads. - """ - - watermark: Optional[Watermark] = None diff --git a/src/cloudflare/types/stream/direct_upload_create_response.py b/src/cloudflare/types/stream/direct_upload_create_response.py index ca46e9b3d..bdf3c5ceb 100644 --- a/src/cloudflare/types/stream/direct_upload_create_response.py +++ b/src/cloudflare/types/stream/direct_upload_create_response.py @@ -6,64 +6,9 @@ from datetime import datetime from pydantic import Field as FieldInfo from ..._models import BaseModel +from .stream_watermarks import StreamWatermarks -__all__ = ["DirectUploadCreateResponse", "Watermark"] - - -class Watermark(BaseModel): - created: Optional[datetime] = None - """The date and a time a watermark profile was created.""" - - downloaded_from: Optional[str] = FieldInfo(alias="downloadedFrom", default=None) - """The source URL for a downloaded image. - - If the watermark profile was created via direct upload, this field is null. - """ - - height: Optional[int] = None - """The height of the image in pixels.""" - - name: Optional[str] = None - """A short description of the watermark profile.""" - - opacity: Optional[float] = None - """The translucency of the image. - - A value of `0.0` makes the image completely transparent, and `1.0` makes the - image completely opaque. Note that if the image is already semi-transparent, - setting this to `1.0` will not make the image completely opaque. - """ - - padding: Optional[float] = None - """ - The whitespace between the adjacent edges (determined by position) of the video - and the image. `0.0` indicates no padding, and `1.0` indicates a fully padded - video width or length, as determined by the algorithm. - """ - - position: Optional[str] = None - """The location of the image. - - Valid positions are: `upperRight`, `upperLeft`, `lowerLeft`, `lowerRight`, and - `center`. Note that `center` ignores the `padding` parameter. - """ - - scale: Optional[float] = None - """The size of the image relative to the overall size of the video. - - This parameter will adapt to horizontal and vertical videos automatically. `0.0` - indicates no scaling (use the size of the image as-is), and `1.0 `fills the - entire video. - """ - - size: Optional[float] = None - """The size of the image in bytes.""" - - uid: Optional[str] = None - """The unique identifier for a watermark profile.""" - - width: Optional[int] = None - """The width of the image in pixels.""" +__all__ = ["DirectUploadCreateResponse"] class DirectUploadCreateResponse(BaseModel): @@ -84,4 +29,4 @@ class DirectUploadCreateResponse(BaseModel): `HTTP POST multipart/form-data` request. """ - watermark: Optional[Watermark] = None + watermark: Optional[StreamWatermarks] = None diff --git a/src/cloudflare/types/stream/live_input_create_response.py b/src/cloudflare/types/stream/live_input_create_response.py deleted file mode 100644 index 1464d4a48..000000000 --- a/src/cloudflare/types/stream/live_input_create_response.py +++ /dev/null @@ -1,165 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = [ - "LiveInputCreateResponse", - "Recording", - "Rtmps", - "RtmpsPlayback", - "Srt", - "SrtPlayback", - "WebRtc", - "WebRtcPlayback", -] - - -class Recording(BaseModel): - allowed_origins: Optional[List[str]] = FieldInfo(alias="allowedOrigins", default=None) - """Lists the origins allowed to display videos created with this input. - - Enter allowed origin domains in an array and use `*` for wildcard subdomains. An - empty array allows videos to be viewed on any origin. - """ - - mode: Optional[Literal["off", "automatic"]] = None - """Specifies the recording behavior for the live input. - - Set this value to `off` to prevent a recording. Set the value to `automatic` to - begin a recording and transition to on-demand after Stream Live stops receiving - input. - """ - - require_signed_urls: Optional[bool] = FieldInfo(alias="requireSignedURLs", default=None) - """ - Indicates if a video using the live input has the `requireSignedURLs` property - set. Also enforces access controls on any video recording of the livestream with - the live input. - """ - - timeout_seconds: Optional[int] = FieldInfo(alias="timeoutSeconds", default=None) - """ - Determines the amount of time a live input configured in `automatic` mode should - wait before a recording transitions from live to on-demand. `0` is recommended - for most use cases and indicates the platform default should be used. - """ - - -class Rtmps(BaseModel): - stream_key: Optional[str] = FieldInfo(alias="streamKey", default=None) - """The secret key to use when streaming via RTMPS to a live input.""" - - url: Optional[str] = None - """The RTMPS URL you provide to the broadcaster, which they stream live video to.""" - - -class RtmpsPlayback(BaseModel): - stream_key: Optional[str] = FieldInfo(alias="streamKey", default=None) - """The secret key to use for playback via RTMPS.""" - - url: Optional[str] = None - """The URL used to play live video over RTMPS.""" - - -class Srt(BaseModel): - passphrase: Optional[str] = None - """The secret key to use when streaming via SRT to a live input.""" - - stream_id: Optional[str] = FieldInfo(alias="streamId", default=None) - """The identifier of the live input to use when streaming via SRT.""" - - url: Optional[str] = None - """The SRT URL you provide to the broadcaster, which they stream live video to.""" - - -class SrtPlayback(BaseModel): - passphrase: Optional[str] = None - """The secret key to use for playback via SRT.""" - - stream_id: Optional[str] = FieldInfo(alias="streamId", default=None) - """The identifier of the live input to use for playback via SRT.""" - - url: Optional[str] = None - """The URL used to play live video over SRT.""" - - -class WebRtc(BaseModel): - url: Optional[str] = None - """The WebRTC URL you provide to the broadcaster, which they stream live video to.""" - - -class WebRtcPlayback(BaseModel): - url: Optional[str] = None - """The URL used to play live video over WebRTC.""" - - -class LiveInputCreateResponse(BaseModel): - created: Optional[datetime] = None - """The date and time the live input was created.""" - - delete_recording_after_days: Optional[float] = FieldInfo(alias="deleteRecordingAfterDays", default=None) - """ - Indicates the number of days after which the live inputs recordings will be - deleted. When a stream completes and the recording is ready, the value is used - to calculate a scheduled deletion date for that recording. Omit the field to - indicate no change, or include with a `null` value to remove an existing - scheduled deletion. - """ - - meta: Optional[object] = None - """ - A user modifiable key-value store used to reference other systems of record for - managing live inputs. - """ - - modified: Optional[datetime] = None - """The date and time the live input was last modified.""" - - recording: Optional[Recording] = None - """Records the input to a Cloudflare Stream video. - - Behavior depends on the mode. In most cases, the video will initially be - viewable as a live video and transition to on-demand after a condition is - satisfied. - """ - - rtmps: Optional[Rtmps] = None - """Details for streaming to an live input using RTMPS.""" - - rtmps_playback: Optional[RtmpsPlayback] = FieldInfo(alias="rtmpsPlayback", default=None) - """Details for playback from an live input using RTMPS.""" - - srt: Optional[Srt] = None - """Details for streaming to a live input using SRT.""" - - srt_playback: Optional[SrtPlayback] = FieldInfo(alias="srtPlayback", default=None) - """Details for playback from an live input using SRT.""" - - status: Optional[ - Literal[ - "connected", - "reconnected", - "reconnecting", - "client_disconnect", - "ttl_exceeded", - "failed_to_connect", - "failed_to_reconnect", - "new_configuration_accepted", - ] - ] = None - """The connection status of a live input.""" - - uid: Optional[str] = None - """A unique identifier for a live input.""" - - web_rtc: Optional[WebRtc] = FieldInfo(alias="webRTC", default=None) - """Details for streaming to a live input using WebRTC.""" - - web_rtc_playback: Optional[WebRtcPlayback] = FieldInfo(alias="webRTCPlayback", default=None) - """Details for playback from a live input using WebRTC.""" diff --git a/src/cloudflare/types/stream/live_input_update_response.py b/src/cloudflare/types/stream/live_input_update_response.py deleted file mode 100644 index 62d2e51ec..000000000 --- a/src/cloudflare/types/stream/live_input_update_response.py +++ /dev/null @@ -1,165 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = [ - "LiveInputUpdateResponse", - "Recording", - "Rtmps", - "RtmpsPlayback", - "Srt", - "SrtPlayback", - "WebRtc", - "WebRtcPlayback", -] - - -class Recording(BaseModel): - allowed_origins: Optional[List[str]] = FieldInfo(alias="allowedOrigins", default=None) - """Lists the origins allowed to display videos created with this input. - - Enter allowed origin domains in an array and use `*` for wildcard subdomains. An - empty array allows videos to be viewed on any origin. - """ - - mode: Optional[Literal["off", "automatic"]] = None - """Specifies the recording behavior for the live input. - - Set this value to `off` to prevent a recording. Set the value to `automatic` to - begin a recording and transition to on-demand after Stream Live stops receiving - input. - """ - - require_signed_urls: Optional[bool] = FieldInfo(alias="requireSignedURLs", default=None) - """ - Indicates if a video using the live input has the `requireSignedURLs` property - set. Also enforces access controls on any video recording of the livestream with - the live input. - """ - - timeout_seconds: Optional[int] = FieldInfo(alias="timeoutSeconds", default=None) - """ - Determines the amount of time a live input configured in `automatic` mode should - wait before a recording transitions from live to on-demand. `0` is recommended - for most use cases and indicates the platform default should be used. - """ - - -class Rtmps(BaseModel): - stream_key: Optional[str] = FieldInfo(alias="streamKey", default=None) - """The secret key to use when streaming via RTMPS to a live input.""" - - url: Optional[str] = None - """The RTMPS URL you provide to the broadcaster, which they stream live video to.""" - - -class RtmpsPlayback(BaseModel): - stream_key: Optional[str] = FieldInfo(alias="streamKey", default=None) - """The secret key to use for playback via RTMPS.""" - - url: Optional[str] = None - """The URL used to play live video over RTMPS.""" - - -class Srt(BaseModel): - passphrase: Optional[str] = None - """The secret key to use when streaming via SRT to a live input.""" - - stream_id: Optional[str] = FieldInfo(alias="streamId", default=None) - """The identifier of the live input to use when streaming via SRT.""" - - url: Optional[str] = None - """The SRT URL you provide to the broadcaster, which they stream live video to.""" - - -class SrtPlayback(BaseModel): - passphrase: Optional[str] = None - """The secret key to use for playback via SRT.""" - - stream_id: Optional[str] = FieldInfo(alias="streamId", default=None) - """The identifier of the live input to use for playback via SRT.""" - - url: Optional[str] = None - """The URL used to play live video over SRT.""" - - -class WebRtc(BaseModel): - url: Optional[str] = None - """The WebRTC URL you provide to the broadcaster, which they stream live video to.""" - - -class WebRtcPlayback(BaseModel): - url: Optional[str] = None - """The URL used to play live video over WebRTC.""" - - -class LiveInputUpdateResponse(BaseModel): - created: Optional[datetime] = None - """The date and time the live input was created.""" - - delete_recording_after_days: Optional[float] = FieldInfo(alias="deleteRecordingAfterDays", default=None) - """ - Indicates the number of days after which the live inputs recordings will be - deleted. When a stream completes and the recording is ready, the value is used - to calculate a scheduled deletion date for that recording. Omit the field to - indicate no change, or include with a `null` value to remove an existing - scheduled deletion. - """ - - meta: Optional[object] = None - """ - A user modifiable key-value store used to reference other systems of record for - managing live inputs. - """ - - modified: Optional[datetime] = None - """The date and time the live input was last modified.""" - - recording: Optional[Recording] = None - """Records the input to a Cloudflare Stream video. - - Behavior depends on the mode. In most cases, the video will initially be - viewable as a live video and transition to on-demand after a condition is - satisfied. - """ - - rtmps: Optional[Rtmps] = None - """Details for streaming to an live input using RTMPS.""" - - rtmps_playback: Optional[RtmpsPlayback] = FieldInfo(alias="rtmpsPlayback", default=None) - """Details for playback from an live input using RTMPS.""" - - srt: Optional[Srt] = None - """Details for streaming to a live input using SRT.""" - - srt_playback: Optional[SrtPlayback] = FieldInfo(alias="srtPlayback", default=None) - """Details for playback from an live input using SRT.""" - - status: Optional[ - Literal[ - "connected", - "reconnected", - "reconnecting", - "client_disconnect", - "ttl_exceeded", - "failed_to_connect", - "failed_to_reconnect", - "new_configuration_accepted", - ] - ] = None - """The connection status of a live input.""" - - uid: Optional[str] = None - """A unique identifier for a live input.""" - - web_rtc: Optional[WebRtc] = FieldInfo(alias="webRTC", default=None) - """Details for streaming to a live input using WebRTC.""" - - web_rtc_playback: Optional[WebRtcPlayback] = FieldInfo(alias="webRTCPlayback", default=None) - """Details for playback from a live input using WebRTC.""" diff --git a/src/cloudflare/types/stream/live_inputs/__init__.py b/src/cloudflare/types/stream/live_inputs/__init__.py index cafcaa3df..8b55423f2 100644 --- a/src/cloudflare/types/stream/live_inputs/__init__.py +++ b/src/cloudflare/types/stream/live_inputs/__init__.py @@ -2,8 +2,7 @@ from __future__ import annotations +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 -from .output_create_response import OutputCreateResponse as OutputCreateResponse -from .output_update_response import OutputUpdateResponse as OutputUpdateResponse diff --git a/src/cloudflare/types/stream/live_inputs/output_list_response.py b/src/cloudflare/types/stream/live_inputs/output_list_response.py index 99c7c896f..e65e03261 100644 --- a/src/cloudflare/types/stream/live_inputs/output_list_response.py +++ b/src/cloudflare/types/stream/live_inputs/output_list_response.py @@ -1,32 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from pydantic import Field as FieldInfo +from .stream_output import StreamOutput -from ...._models import BaseModel +__all__ = ["OutputListResponse"] -__all__ = ["OutputListResponse", "OutputListResponseItem"] - - -class OutputListResponseItem(BaseModel): - enabled: Optional[bool] = None - """ - When enabled, live video streamed to the associated live input will be sent to - the output URL. When disabled, live video will not be sent to the output URL, - even when streaming to the associated live input. Use this to control precisely - when you start and stop simulcasting to specific destinations like YouTube and - Twitch. - """ - - stream_key: Optional[str] = FieldInfo(alias="streamKey", default=None) - """The streamKey used to authenticate against an output's target.""" - - uid: Optional[str] = None - """A unique identifier for the output.""" - - url: Optional[str] = None - """The URL an output uses to restream.""" - - -OutputListResponse = List[OutputListResponseItem] +OutputListResponse = List[StreamOutput] diff --git a/src/cloudflare/types/stream/live_inputs/output_update_response.py b/src/cloudflare/types/stream/live_inputs/output_update_response.py deleted file mode 100644 index 160ec9f97..000000000 --- a/src/cloudflare/types/stream/live_inputs/output_update_response.py +++ /dev/null @@ -1,29 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional - -from pydantic import Field as FieldInfo - -from ...._models import BaseModel - -__all__ = ["OutputUpdateResponse"] - - -class OutputUpdateResponse(BaseModel): - enabled: Optional[bool] = None - """ - When enabled, live video streamed to the associated live input will be sent to - the output URL. When disabled, live video will not be sent to the output URL, - even when streaming to the associated live input. Use this to control precisely - when you start and stop simulcasting to specific destinations like YouTube and - Twitch. - """ - - stream_key: Optional[str] = FieldInfo(alias="streamKey", default=None) - """The streamKey used to authenticate against an output's target.""" - - uid: Optional[str] = None - """A unique identifier for the output.""" - - url: Optional[str] = None - """The URL an output uses to restream.""" diff --git a/src/cloudflare/types/stream/live_inputs/output_create_response.py b/src/cloudflare/types/stream/live_inputs/stream_output.py similarity index 92% rename from src/cloudflare/types/stream/live_inputs/output_create_response.py rename to src/cloudflare/types/stream/live_inputs/stream_output.py index 019b33b30..14d9d919a 100644 --- a/src/cloudflare/types/stream/live_inputs/output_create_response.py +++ b/src/cloudflare/types/stream/live_inputs/stream_output.py @@ -6,10 +6,10 @@ from pydantic import Field as FieldInfo from ...._models import BaseModel -__all__ = ["OutputCreateResponse"] +__all__ = ["StreamOutput"] -class OutputCreateResponse(BaseModel): +class StreamOutput(BaseModel): enabled: Optional[bool] = None """ When enabled, live video streamed to the associated live input will be sent to diff --git a/src/cloudflare/types/stream/audio_track_edit_response.py b/src/cloudflare/types/stream/stream_additional_audio.py similarity index 89% rename from src/cloudflare/types/stream/audio_track_edit_response.py rename to src/cloudflare/types/stream/stream_additional_audio.py index d06d8c4dd..ca75ad6fb 100644 --- a/src/cloudflare/types/stream/audio_track_edit_response.py +++ b/src/cloudflare/types/stream/stream_additional_audio.py @@ -5,10 +5,10 @@ from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["AudioTrackEditResponse"] +__all__ = ["StreamAdditionalAudio"] -class AudioTrackEditResponse(BaseModel): +class StreamAdditionalAudio(BaseModel): default: Optional[bool] = None """Denotes whether the audio track will be played by default in a player.""" diff --git a/src/cloudflare/types/stream/stream_captions.py b/src/cloudflare/types/stream/stream_captions.py new file mode 100644 index 000000000..7f5043582 --- /dev/null +++ b/src/cloudflare/types/stream/stream_captions.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["StreamCaptions"] + + +class StreamCaptions(BaseModel): + label: Optional[str] = None + """The language label displayed in the native language to users.""" + + language: Optional[str] = None + """The language tag in BCP 47 format.""" diff --git a/src/cloudflare/types/stream/clip_create_response.py b/src/cloudflare/types/stream/stream_clipping.py similarity index 97% rename from src/cloudflare/types/stream/clip_create_response.py rename to src/cloudflare/types/stream/stream_clipping.py index de045994e..0945db4f7 100644 --- a/src/cloudflare/types/stream/clip_create_response.py +++ b/src/cloudflare/types/stream/stream_clipping.py @@ -8,7 +8,7 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel -__all__ = ["ClipCreateResponse", "Playback", "Watermark"] +__all__ = ["StreamClipping", "Playback", "Watermark"] class Playback(BaseModel): @@ -24,7 +24,7 @@ class Watermark(BaseModel): """The unique identifier for the watermark profile.""" -class ClipCreateResponse(BaseModel): +class StreamClipping(BaseModel): allowed_origins: Optional[List[str]] = FieldInfo(alias="allowedOrigins", default=None) """Lists the origins allowed to display the video. diff --git a/src/cloudflare/types/stream/key_create_response.py b/src/cloudflare/types/stream/stream_keys.py similarity index 86% rename from src/cloudflare/types/stream/key_create_response.py rename to src/cloudflare/types/stream/stream_keys.py index a6c2c5825..4745b27ed 100644 --- a/src/cloudflare/types/stream/key_create_response.py +++ b/src/cloudflare/types/stream/stream_keys.py @@ -5,10 +5,10 @@ from datetime import datetime from ..._models import BaseModel -__all__ = ["KeyCreateResponse"] +__all__ = ["StreamKeys"] -class KeyCreateResponse(BaseModel): +class StreamKeys(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/stream/live_input_get_response.py b/src/cloudflare/types/stream/stream_live_input.py similarity index 96% rename from src/cloudflare/types/stream/live_input_get_response.py rename to src/cloudflare/types/stream/stream_live_input.py index 4c602dd0e..62aff33a6 100644 --- a/src/cloudflare/types/stream/live_input_get_response.py +++ b/src/cloudflare/types/stream/stream_live_input.py @@ -8,16 +8,7 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel -__all__ = [ - "LiveInputGetResponse", - "Recording", - "Rtmps", - "RtmpsPlayback", - "Srt", - "SrtPlayback", - "WebRtc", - "WebRtcPlayback", -] +__all__ = ["StreamLiveInput", "Recording", "Rtmps", "RtmpsPlayback", "Srt", "SrtPlayback", "WebRtc", "WebRtcPlayback"] class Recording(BaseModel): @@ -99,7 +90,7 @@ class WebRtcPlayback(BaseModel): """The URL used to play live video over WebRTC.""" -class LiveInputGetResponse(BaseModel): +class StreamLiveInput(BaseModel): created: Optional[datetime] = None """The date and time the live input was created.""" diff --git a/src/cloudflare/types/stream/stream_watermarks.py b/src/cloudflare/types/stream/stream_watermarks.py new file mode 100644 index 000000000..b6cfcaf47 --- /dev/null +++ b/src/cloudflare/types/stream/stream_watermarks.py @@ -0,0 +1,66 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional +from datetime import datetime + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel + +__all__ = ["StreamWatermarks"] + + +class StreamWatermarks(BaseModel): + created: Optional[datetime] = None + """The date and a time a watermark profile was created.""" + + downloaded_from: Optional[str] = FieldInfo(alias="downloadedFrom", default=None) + """The source URL for a downloaded image. + + If the watermark profile was created via direct upload, this field is null. + """ + + height: Optional[int] = None + """The height of the image in pixels.""" + + name: Optional[str] = None + """A short description of the watermark profile.""" + + opacity: Optional[float] = None + """The translucency of the image. + + A value of `0.0` makes the image completely transparent, and `1.0` makes the + image completely opaque. Note that if the image is already semi-transparent, + setting this to `1.0` will not make the image completely opaque. + """ + + padding: Optional[float] = None + """ + The whitespace between the adjacent edges (determined by position) of the video + and the image. `0.0` indicates no padding, and `1.0` indicates a fully padded + video width or length, as determined by the algorithm. + """ + + position: Optional[str] = None + """The location of the image. + + Valid positions are: `upperRight`, `upperLeft`, `lowerLeft`, `lowerRight`, and + `center`. Note that `center` ignores the `padding` parameter. + """ + + scale: Optional[float] = None + """The size of the image relative to the overall size of the video. + + This parameter will adapt to horizontal and vertical videos automatically. `0.0` + indicates no scaling (use the size of the image as-is), and `1.0 `fills the + entire video. + """ + + size: Optional[float] = None + """The size of the image in bytes.""" + + uid: Optional[str] = None + """The unique identifier for a watermark profile.""" + + width: Optional[int] = None + """The width of the image in pixels.""" diff --git a/src/cloudflare/types/stream/watermark_list_response.py b/src/cloudflare/types/stream/watermark_list_response.py index 2a280e2ea..e24423c06 100644 --- a/src/cloudflare/types/stream/watermark_list_response.py +++ b/src/cloudflare/types/stream/watermark_list_response.py @@ -1,69 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from pydantic import Field as FieldInfo +from .stream_watermarks import StreamWatermarks -from ..._models import BaseModel +__all__ = ["WatermarkListResponse"] -__all__ = ["WatermarkListResponse", "WatermarkListResponseItem"] - - -class WatermarkListResponseItem(BaseModel): - created: Optional[datetime] = None - """The date and a time a watermark profile was created.""" - - downloaded_from: Optional[str] = FieldInfo(alias="downloadedFrom", default=None) - """The source URL for a downloaded image. - - If the watermark profile was created via direct upload, this field is null. - """ - - height: Optional[int] = None - """The height of the image in pixels.""" - - name: Optional[str] = None - """A short description of the watermark profile.""" - - opacity: Optional[float] = None - """The translucency of the image. - - A value of `0.0` makes the image completely transparent, and `1.0` makes the - image completely opaque. Note that if the image is already semi-transparent, - setting this to `1.0` will not make the image completely opaque. - """ - - padding: Optional[float] = None - """ - The whitespace between the adjacent edges (determined by position) of the video - and the image. `0.0` indicates no padding, and `1.0` indicates a fully padded - video width or length, as determined by the algorithm. - """ - - position: Optional[str] = None - """The location of the image. - - Valid positions are: `upperRight`, `upperLeft`, `lowerLeft`, `lowerRight`, and - `center`. Note that `center` ignores the `padding` parameter. - """ - - scale: Optional[float] = None - """The size of the image relative to the overall size of the video. - - This parameter will adapt to horizontal and vertical videos automatically. `0.0` - indicates no scaling (use the size of the image as-is), and `1.0 `fills the - entire video. - """ - - size: Optional[float] = None - """The size of the image in bytes.""" - - uid: Optional[str] = None - """The unique identifier for a watermark profile.""" - - width: Optional[int] = None - """The width of the image in pixels.""" - - -WatermarkListResponse = List[WatermarkListResponseItem] +WatermarkListResponse = List[StreamWatermarks] diff --git a/src/cloudflare/types/stream_list_response.py b/src/cloudflare/types/stream_list_response.py index 86d428062..2de4f4f74 100644 --- a/src/cloudflare/types/stream_list_response.py +++ b/src/cloudflare/types/stream_list_response.py @@ -1,244 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from pydantic import Field as FieldInfo +from .stream_videos import StreamVideos -from .._models import BaseModel +__all__ = ["StreamListResponse"] -__all__ = [ - "StreamListResponse", - "StreamListResponseItem", - "StreamListResponseItemInput", - "StreamListResponseItemPlayback", - "StreamListResponseItemStatus", - "StreamListResponseItemWatermark", -] - - -class StreamListResponseItemInput(BaseModel): - height: Optional[int] = None - """The video height in pixels. - - A value of `-1` means the height is unknown. The value becomes available after - the upload and before the video is ready. - """ - - width: Optional[int] = None - """The video width in pixels. - - A value of `-1` means the width is unknown. The value becomes available after - the upload and before the video is ready. - """ - - -class StreamListResponseItemPlayback(BaseModel): - dash: Optional[str] = None - """DASH Media Presentation Description for the video.""" - - hls: Optional[str] = None - """The HLS manifest for the video.""" - - -class StreamListResponseItemStatus(BaseModel): - error_reason_code: Optional[str] = FieldInfo(alias="errorReasonCode", default=None) - """Specifies why the video failed to encode. - - This field is empty if the video is not in an `error` state. Preferred for - programmatic use. - """ - - error_reason_text: Optional[str] = FieldInfo(alias="errorReasonText", default=None) - """ - Specifies why the video failed to encode using a human readable error message in - English. This field is empty if the video is not in an `error` state. - """ - - pct_complete: Optional[str] = FieldInfo(alias="pctComplete", default=None) - """Indicates the size of the entire upload in bytes. - - The value must be a non-negative integer. - """ - - state: Optional[Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error"]] = None - """Specifies the processing status for all quality levels for a video.""" - - -class StreamListResponseItemWatermark(BaseModel): - created: Optional[datetime] = None - """The date and a time a watermark profile was created.""" - - downloaded_from: Optional[str] = FieldInfo(alias="downloadedFrom", default=None) - """The source URL for a downloaded image. - - If the watermark profile was created via direct upload, this field is null. - """ - - height: Optional[int] = None - """The height of the image in pixels.""" - - name: Optional[str] = None - """A short description of the watermark profile.""" - - opacity: Optional[float] = None - """The translucency of the image. - - A value of `0.0` makes the image completely transparent, and `1.0` makes the - image completely opaque. Note that if the image is already semi-transparent, - setting this to `1.0` will not make the image completely opaque. - """ - - padding: Optional[float] = None - """ - The whitespace between the adjacent edges (determined by position) of the video - and the image. `0.0` indicates no padding, and `1.0` indicates a fully padded - video width or length, as determined by the algorithm. - """ - - position: Optional[str] = None - """The location of the image. - - Valid positions are: `upperRight`, `upperLeft`, `lowerLeft`, `lowerRight`, and - `center`. Note that `center` ignores the `padding` parameter. - """ - - scale: Optional[float] = None - """The size of the image relative to the overall size of the video. - - This parameter will adapt to horizontal and vertical videos automatically. `0.0` - indicates no scaling (use the size of the image as-is), and `1.0 `fills the - entire video. - """ - - size: Optional[float] = None - """The size of the image in bytes.""" - - uid: Optional[str] = None - """The unique identifier for a watermark profile.""" - - width: Optional[int] = None - """The width of the image in pixels.""" - - -class StreamListResponseItem(BaseModel): - allowed_origins: Optional[List[str]] = FieldInfo(alias="allowedOrigins", default=None) - """Lists the origins allowed to display the video. - - Enter allowed origin domains in an array and use `*` for wildcard subdomains. - Empty arrays allow the video to be viewed on any origin. - """ - - created: Optional[datetime] = None - """The date and time the media item was created.""" - - creator: Optional[str] = None - """A user-defined identifier for the media creator.""" - - duration: Optional[float] = None - """The duration of the video in seconds. - - A value of `-1` means the duration is unknown. The duration becomes available - after the upload and before the video is ready. - """ - - input: Optional[StreamListResponseItemInput] = None - - live_input: Optional[str] = FieldInfo(alias="liveInput", default=None) - """The live input ID used to upload a video with Stream Live.""" - - max_duration_seconds: Optional[int] = FieldInfo(alias="maxDurationSeconds", default=None) - """The maximum duration in seconds for a video upload. - - Can be set for a video that is not yet uploaded to limit its duration. Uploads - that exceed the specified duration will fail during processing. A value of `-1` - means the value is unknown. - """ - - meta: Optional[object] = None - """ - A user modifiable key-value store used to reference other systems of record for - managing videos. - """ - - modified: Optional[datetime] = None - """The date and time the media item was last modified.""" - - playback: Optional[StreamListResponseItemPlayback] = None - - preview: Optional[str] = None - """The video's preview page URI. This field is omitted until encoding is complete.""" - - ready_to_stream: Optional[bool] = FieldInfo(alias="readyToStream", default=None) - """Indicates whether the video is playable. - - The field is empty if the video is not ready for viewing or the live stream is - still in progress. - """ - - ready_to_stream_at: Optional[datetime] = FieldInfo(alias="readyToStreamAt", default=None) - """Indicates the time at which the video became playable. - - The field is empty if the video is not ready for viewing or the live stream is - still in progress. - """ - - require_signed_urls: Optional[bool] = FieldInfo(alias="requireSignedURLs", default=None) - """Indicates whether the video can be a accessed using the UID. - - When set to `true`, a signed token must be generated with a signing key to view - the video. - """ - - scheduled_deletion: Optional[datetime] = FieldInfo(alias="scheduledDeletion", default=None) - """Indicates the date and time at which the video will be deleted. - - Omit the field to indicate no change, or include with a `null` value to remove - an existing scheduled deletion. If specified, must be at least 30 days from - upload time. - """ - - size: Optional[float] = None - """The size of the media item in bytes.""" - - status: Optional[StreamListResponseItemStatus] = None - """Specifies a detailed status for a video. - - If the `state` is `inprogress` or `error`, the `step` field returns `encoding` - or `manifest`. If the `state` is `inprogress`, `pctComplete` returns a number - between 0 and 100 to indicate the approximate percent of completion. If the - `state` is `error`, `errorReasonCode` and `errorReasonText` provide additional - details. - """ - - thumbnail: Optional[str] = None - """The media item's thumbnail URI. - - This field is omitted until encoding is complete. - """ - - thumbnail_timestamp_pct: Optional[float] = FieldInfo(alias="thumbnailTimestampPct", default=None) - """ - The timestamp for a thumbnail image calculated as a percentage value of the - video's duration. To convert from a second-wise timestamp to a percentage, - divide the desired timestamp by the total duration of the video. If this value - is not set, the default thumbnail image is taken from 0s of the video. - """ - - uid: Optional[str] = None - """A Cloudflare-generated unique identifier for a media item.""" - - uploaded: Optional[datetime] = None - """The date and time the media item was uploaded.""" - - upload_expiry: Optional[datetime] = FieldInfo(alias="uploadExpiry", default=None) - """ - The date and time when the video upload URL is no longer valid for direct user - uploads. - """ - - watermark: Optional[StreamListResponseItemWatermark] = None - - -StreamListResponse = List[StreamListResponseItem] +StreamListResponse = List[StreamVideos] diff --git a/src/cloudflare/types/stream_get_response.py b/src/cloudflare/types/stream_videos.py similarity index 74% rename from src/cloudflare/types/stream_get_response.py rename to src/cloudflare/types/stream_videos.py index 7002be757..1ee7880b0 100644 --- a/src/cloudflare/types/stream_get_response.py +++ b/src/cloudflare/types/stream_videos.py @@ -6,9 +6,10 @@ from typing_extensions import Literal from pydantic import Field as FieldInfo +from .stream import StreamWatermarks from .._models import BaseModel -__all__ = ["StreamGetResponse", "Input", "Playback", "Status", "Watermark"] +__all__ = ["StreamVideos", "Input", "Playback", "Status"] class Input(BaseModel): @@ -59,63 +60,7 @@ class Status(BaseModel): """Specifies the processing status for all quality levels for a video.""" -class Watermark(BaseModel): - created: Optional[datetime] = None - """The date and a time a watermark profile was created.""" - - downloaded_from: Optional[str] = FieldInfo(alias="downloadedFrom", default=None) - """The source URL for a downloaded image. - - If the watermark profile was created via direct upload, this field is null. - """ - - height: Optional[int] = None - """The height of the image in pixels.""" - - name: Optional[str] = None - """A short description of the watermark profile.""" - - opacity: Optional[float] = None - """The translucency of the image. - - A value of `0.0` makes the image completely transparent, and `1.0` makes the - image completely opaque. Note that if the image is already semi-transparent, - setting this to `1.0` will not make the image completely opaque. - """ - - padding: Optional[float] = None - """ - The whitespace between the adjacent edges (determined by position) of the video - and the image. `0.0` indicates no padding, and `1.0` indicates a fully padded - video width or length, as determined by the algorithm. - """ - - position: Optional[str] = None - """The location of the image. - - Valid positions are: `upperRight`, `upperLeft`, `lowerLeft`, `lowerRight`, and - `center`. Note that `center` ignores the `padding` parameter. - """ - - scale: Optional[float] = None - """The size of the image relative to the overall size of the video. - - This parameter will adapt to horizontal and vertical videos automatically. `0.0` - indicates no scaling (use the size of the image as-is), and `1.0 `fills the - entire video. - """ - - size: Optional[float] = None - """The size of the image in bytes.""" - - uid: Optional[str] = None - """The unique identifier for a watermark profile.""" - - width: Optional[int] = None - """The width of the image in pixels.""" - - -class StreamGetResponse(BaseModel): +class StreamVideos(BaseModel): allowed_origins: Optional[List[str]] = FieldInfo(alias="allowedOrigins", default=None) """Lists the origins allowed to display the video. @@ -231,4 +176,4 @@ class StreamGetResponse(BaseModel): uploads. """ - watermark: Optional[Watermark] = None + watermark: Optional[StreamWatermarks] = None diff --git a/src/cloudflare/types/keyless_certificate_edit_response.py b/src/cloudflare/types/tls_certificates_and_hostnames_base.py similarity index 91% rename from src/cloudflare/types/keyless_certificate_edit_response.py rename to src/cloudflare/types/tls_certificates_and_hostnames_base.py index 1c5f05295..a226af500 100644 --- a/src/cloudflare/types/keyless_certificate_edit_response.py +++ b/src/cloudflare/types/tls_certificates_and_hostnames_base.py @@ -6,7 +6,7 @@ from typing_extensions import Literal from .._models import BaseModel -__all__ = ["KeylessCertificateEditResponse", "Tunnel"] +__all__ = ["TLSCertificatesAndHostnamesBase", "Tunnel"] class Tunnel(BaseModel): @@ -17,7 +17,7 @@ class Tunnel(BaseModel): """Cloudflare Tunnel Virtual Network ID""" -class KeylessCertificateEditResponse(BaseModel): +class TLSCertificatesAndHostnamesBase(BaseModel): id: str """Keyless certificate identifier tag.""" diff --git a/src/cloudflare/types/mtls_certificate_create_response.py b/src/cloudflare/types/tls_certificates_and_hostnames_certificate_object_post.py similarity index 89% rename from src/cloudflare/types/mtls_certificate_create_response.py rename to src/cloudflare/types/tls_certificates_and_hostnames_certificate_object_post.py index 84a7f7bac..196afdddf 100644 --- a/src/cloudflare/types/mtls_certificate_create_response.py +++ b/src/cloudflare/types/tls_certificates_and_hostnames_certificate_object_post.py @@ -5,10 +5,10 @@ from datetime import datetime from .._models import BaseModel -__all__ = ["MTLSCertificateCreateResponse"] +__all__ = ["TLSCertificatesAndHostnamesCertificateObjectPost"] -class MTLSCertificateCreateResponse(BaseModel): +class TLSCertificatesAndHostnamesCertificateObjectPost(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/client_certificate_get_response.py b/src/cloudflare/types/tls_certificates_and_hostnames_client_certificate.py similarity index 93% rename from src/cloudflare/types/client_certificate_get_response.py rename to src/cloudflare/types/tls_certificates_and_hostnames_client_certificate.py index fff142af9..0bd2e642d 100644 --- a/src/cloudflare/types/client_certificate_get_response.py +++ b/src/cloudflare/types/tls_certificates_and_hostnames_client_certificate.py @@ -5,7 +5,7 @@ from typing_extensions import Literal from .._models import BaseModel -__all__ = ["ClientCertificateGetResponse", "CertificateAuthority"] +__all__ = ["TLSCertificatesAndHostnamesClientCertificate", "CertificateAuthority"] class CertificateAuthority(BaseModel): @@ -14,7 +14,7 @@ class CertificateAuthority(BaseModel): name: Optional[str] = None -class ClientCertificateGetResponse(BaseModel): +class TLSCertificatesAndHostnamesClientCertificate(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/mtls_certificate_get_response.py b/src/cloudflare/types/tls_certificates_and_hostnames_components_schemas_certificate_object.py similarity index 85% rename from src/cloudflare/types/mtls_certificate_get_response.py rename to src/cloudflare/types/tls_certificates_and_hostnames_components_schemas_certificate_object.py index e91f079d3..233746cb7 100644 --- a/src/cloudflare/types/mtls_certificate_get_response.py +++ b/src/cloudflare/types/tls_certificates_and_hostnames_components_schemas_certificate_object.py @@ -5,10 +5,10 @@ from datetime import datetime from .._models import BaseModel -__all__ = ["MTLSCertificateGetResponse"] +__all__ = ["TLSCertificatesAndHostnamesComponentsSchemasCertificateObject"] -class MTLSCertificateGetResponse(BaseModel): +class TLSCertificatesAndHostnamesComponentsSchemasCertificateObject(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/custom_certificate_list_response.py b/src/cloudflare/types/tls_certificates_and_hostnames_custom_certificate.py similarity index 69% rename from src/cloudflare/types/custom_certificate_list_response.py rename to src/cloudflare/types/tls_certificates_and_hostnames_custom_certificate.py index 2b833b6ce..42deade35 100644 --- a/src/cloudflare/types/custom_certificate_list_response.py +++ b/src/cloudflare/types/tls_certificates_and_hostnames_custom_certificate.py @@ -5,61 +5,16 @@ from datetime import datetime from typing_extensions import Literal from .._models import BaseModel +from .tls_certificates_and_hostnames_base import TLSCertificatesAndHostnamesBase -__all__ = ["CustomCertificateListResponse", "GeoRestrictions", "KeylessServer", "KeylessServerTunnel"] +__all__ = ["TLSCertificatesAndHostnamesCustomCertificate", "GeoRestrictions"] class GeoRestrictions(BaseModel): label: Optional[Literal["us", "eu", "highest_security"]] = None -class KeylessServerTunnel(BaseModel): - private_ip: str - """Private IP of the Key Server Host""" - - vnet_id: str - """Cloudflare Tunnel Virtual Network ID""" - - -class KeylessServer(BaseModel): - id: str - """Keyless certificate identifier tag.""" - - created_on: datetime - """When the Keyless SSL was created.""" - - enabled: bool - """Whether or not the Keyless SSL is on or off.""" - - host: str - """The keyless SSL name.""" - - modified_on: datetime - """When the Keyless SSL was last modified.""" - - name: str - """The keyless SSL name.""" - - permissions: List[object] - """ - Available permissions for the Keyless SSL for the current user requesting the - item. - """ - - port: float - """ - The keyless SSL port used to communicate between Cloudflare and the client's - Keyless SSL server. - """ - - status: Literal["active", "deleted"] - """Status of the Keyless SSL.""" - - tunnel: Optional[KeylessServerTunnel] = None - """Configuration for using Keyless SSL through a Cloudflare Tunnel""" - - -class CustomCertificateListResponse(BaseModel): +class TLSCertificatesAndHostnamesCustomCertificate(BaseModel): id: str """Identifier""" @@ -113,7 +68,7 @@ class CustomCertificateListResponse(BaseModel): for optimal performance. """ - keyless_server: Optional[KeylessServer] = None + keyless_server: Optional[TLSCertificatesAndHostnamesBase] = None policy: Optional[str] = None """ diff --git a/src/cloudflare/types/user/__init__.py b/src/cloudflare/types/user/__init__.py index 4d780bf96..3f42a7f54 100644 --- a/src/cloudflare/types/user/__init__.py +++ b/src/cloudflare/types/user/__init__.py @@ -3,6 +3,7 @@ from __future__ import annotations from .user import User as User +from .iam_organization import IamOrganization as IamOrganization from .token_list_params import TokenListParams as TokenListParams from .invite_edit_params import InviteEditParams as InviteEditParams from .token_get_response import TokenGetResponse as TokenGetResponse @@ -21,7 +22,6 @@ from .organization_list_params import OrganizationListParams as OrganizationList from .subscription_edit_params import SubscriptionEditParams as SubscriptionEditParams from .organization_get_response import OrganizationGetResponse as OrganizationGetResponse from .subscription_get_response import SubscriptionGetResponse as SubscriptionGetResponse -from .organization_list_response import OrganizationListResponse as OrganizationListResponse from .subscription_edit_response import SubscriptionEditResponse as SubscriptionEditResponse from .subscription_update_params import SubscriptionUpdateParams as SubscriptionUpdateParams from .organization_delete_response import OrganizationDeleteResponse as OrganizationDeleteResponse diff --git a/src/cloudflare/types/user/billing/__init__.py b/src/cloudflare/types/user/billing/__init__.py index bb208e1fe..78905720c 100644 --- a/src/cloudflare/types/user/billing/__init__.py +++ b/src/cloudflare/types/user/billing/__init__.py @@ -5,3 +5,4 @@ from __future__ import annotations 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/bill_subs_api_billing_history.py new file mode 100644 index 000000000..98ef5e8d7 --- /dev/null +++ b/src/cloudflare/types/user/billing/bill_subs_api_billing_history.py @@ -0,0 +1,37 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional +from datetime import datetime + +from ...._models import BaseModel + +__all__ = ["BillSubsAPIBillingHistory", "Zone"] + + +class Zone(BaseModel): + name: Optional[object] = None + + +class BillSubsAPIBillingHistory(BaseModel): + id: str + """Billing item identifier tag.""" + + action: str + """The billing item action.""" + + amount: float + """The amount associated with this billing item.""" + + currency: str + """The monetary unit in which pricing information is displayed.""" + + description: str + """The billing item description.""" + + occurred_at: datetime + """When the billing item was created.""" + + type: str + """The billing item type.""" + + zone: Zone diff --git a/src/cloudflare/types/user/billing/history_get_response.py b/src/cloudflare/types/user/billing/history_get_response.py index 1586a198f..8400309d3 100644 --- a/src/cloudflare/types/user/billing/history_get_response.py +++ b/src/cloudflare/types/user/billing/history_get_response.py @@ -1,40 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ...._models import BaseModel +from .bill_subs_api_billing_history import BillSubsAPIBillingHistory -__all__ = ["HistoryGetResponse", "HistoryGetResponseItem", "HistoryGetResponseItemZone"] +__all__ = ["HistoryGetResponse"] - -class HistoryGetResponseItemZone(BaseModel): - name: Optional[object] = None - - -class HistoryGetResponseItem(BaseModel): - id: str - """Billing item identifier tag.""" - - action: str - """The billing item action.""" - - amount: float - """The amount associated with this billing item.""" - - currency: str - """The monetary unit in which pricing information is displayed.""" - - description: str - """The billing item description.""" - - occurred_at: datetime - """When the billing item was created.""" - - type: str - """The billing item type.""" - - zone: HistoryGetResponseItemZone - - -HistoryGetResponse = List[HistoryGetResponseItem] +HistoryGetResponse = List[BillSubsAPIBillingHistory] diff --git a/src/cloudflare/types/user/firewall/__init__.py b/src/cloudflare/types/user/firewall/__init__.py index 73af4ecee..174de3115 100644 --- a/src/cloudflare/types/user/firewall/__init__.py +++ b/src/cloudflare/types/user/firewall/__init__.py @@ -2,10 +2,8 @@ from __future__ import annotations +from .legacy_jhs_rule import LegacyJhsRule as LegacyJhsRule 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 -from .access_rule_edit_response import AccessRuleEditResponse as AccessRuleEditResponse -from .access_rule_list_response import AccessRuleListResponse as AccessRuleListResponse -from .access_rule_create_response import AccessRuleCreateResponse as AccessRuleCreateResponse from .access_rule_delete_response import AccessRuleDeleteResponse as AccessRuleDeleteResponse diff --git a/src/cloudflare/types/user/firewall/access_rule_create_response.py b/src/cloudflare/types/user/firewall/access_rule_create_response.py deleted file mode 100644 index 54015551c..000000000 --- a/src/cloudflare/types/user/firewall/access_rule_create_response.py +++ /dev/null @@ -1,119 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = [ - "AccessRuleCreateResponse", - "Configuration", - "ConfigurationLegacyJhsIPConfiguration", - "ConfigurationLegacyJhsIPV6Configuration", - "ConfigurationLegacyJhsCidrConfiguration", - "ConfigurationLegacyJhsASNConfiguration", - "ConfigurationLegacyJhsCountryConfiguration", -] - - -class ConfigurationLegacyJhsIPConfiguration(BaseModel): - target: Optional[Literal["ip"]] = None - """The configuration target. - - You must set the target to `ip` when specifying an IP address in the rule. - """ - - value: Optional[str] = None - """The IP address to match. - - This address will be compared to the IP address of incoming requests. - """ - - -class ConfigurationLegacyJhsIPV6Configuration(BaseModel): - target: Optional[Literal["ip6"]] = None - """The configuration target. - - You must set the target to `ip6` when specifying an IPv6 address in the rule. - """ - - value: Optional[str] = None - """The IPv6 address to match.""" - - -class ConfigurationLegacyJhsCidrConfiguration(BaseModel): - target: Optional[Literal["ip_range"]] = None - """The configuration target. - - You must set the target to `ip_range` when specifying an IP address range in the - rule. - """ - - value: Optional[str] = None - """The IP address range to match. - - You can only use prefix lengths `/16` and `/24` for IPv4 ranges, and prefix - lengths `/32`, `/48`, and `/64` for IPv6 ranges. - """ - - -class ConfigurationLegacyJhsASNConfiguration(BaseModel): - target: Optional[Literal["asn"]] = None - """The configuration target. - - You must set the target to `asn` when specifying an Autonomous System Number - (ASN) in the rule. - """ - - value: Optional[str] = None - """The AS number to match.""" - - -class ConfigurationLegacyJhsCountryConfiguration(BaseModel): - target: Optional[Literal["country"]] = None - """The configuration target. - - You must set the target to `country` when specifying a country code in the rule. - """ - - value: Optional[str] = None - """The two-letter ISO-3166-1 alpha-2 code to match. - - For more information, refer to - [IP Access rules: Parameters](https://developers.cloudflare.com/waf/tools/ip-access-rules/parameters/#country). - """ - - -Configuration = Union[ - ConfigurationLegacyJhsIPConfiguration, - ConfigurationLegacyJhsIPV6Configuration, - ConfigurationLegacyJhsCidrConfiguration, - ConfigurationLegacyJhsASNConfiguration, - ConfigurationLegacyJhsCountryConfiguration, -] - - -class AccessRuleCreateResponse(BaseModel): - id: str - """The unique identifier of the IP Access rule.""" - - allowed_modes: List[Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"]] - """The available actions that a rule can apply to a matched request.""" - - configuration: Configuration - """The rule configuration.""" - - mode: Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"] - """The action to apply to a matched request.""" - - created_on: Optional[datetime] = None - """The timestamp of when the rule was created.""" - - modified_on: Optional[datetime] = None - """The timestamp of when the rule was last modified.""" - - notes: Optional[str] = None - """ - An informative summary of the rule, typically used as a reminder or explanation. - """ diff --git a/src/cloudflare/types/user/firewall/access_rule_list_response.py b/src/cloudflare/types/user/firewall/access_rule_list_response.py deleted file mode 100644 index e3902497f..000000000 --- a/src/cloudflare/types/user/firewall/access_rule_list_response.py +++ /dev/null @@ -1,119 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = [ - "AccessRuleListResponse", - "Configuration", - "ConfigurationLegacyJhsIPConfiguration", - "ConfigurationLegacyJhsIPV6Configuration", - "ConfigurationLegacyJhsCidrConfiguration", - "ConfigurationLegacyJhsASNConfiguration", - "ConfigurationLegacyJhsCountryConfiguration", -] - - -class ConfigurationLegacyJhsIPConfiguration(BaseModel): - target: Optional[Literal["ip"]] = None - """The configuration target. - - You must set the target to `ip` when specifying an IP address in the rule. - """ - - value: Optional[str] = None - """The IP address to match. - - This address will be compared to the IP address of incoming requests. - """ - - -class ConfigurationLegacyJhsIPV6Configuration(BaseModel): - target: Optional[Literal["ip6"]] = None - """The configuration target. - - You must set the target to `ip6` when specifying an IPv6 address in the rule. - """ - - value: Optional[str] = None - """The IPv6 address to match.""" - - -class ConfigurationLegacyJhsCidrConfiguration(BaseModel): - target: Optional[Literal["ip_range"]] = None - """The configuration target. - - You must set the target to `ip_range` when specifying an IP address range in the - rule. - """ - - value: Optional[str] = None - """The IP address range to match. - - You can only use prefix lengths `/16` and `/24` for IPv4 ranges, and prefix - lengths `/32`, `/48`, and `/64` for IPv6 ranges. - """ - - -class ConfigurationLegacyJhsASNConfiguration(BaseModel): - target: Optional[Literal["asn"]] = None - """The configuration target. - - You must set the target to `asn` when specifying an Autonomous System Number - (ASN) in the rule. - """ - - value: Optional[str] = None - """The AS number to match.""" - - -class ConfigurationLegacyJhsCountryConfiguration(BaseModel): - target: Optional[Literal["country"]] = None - """The configuration target. - - You must set the target to `country` when specifying a country code in the rule. - """ - - value: Optional[str] = None - """The two-letter ISO-3166-1 alpha-2 code to match. - - For more information, refer to - [IP Access rules: Parameters](https://developers.cloudflare.com/waf/tools/ip-access-rules/parameters/#country). - """ - - -Configuration = Union[ - ConfigurationLegacyJhsIPConfiguration, - ConfigurationLegacyJhsIPV6Configuration, - ConfigurationLegacyJhsCidrConfiguration, - ConfigurationLegacyJhsASNConfiguration, - ConfigurationLegacyJhsCountryConfiguration, -] - - -class AccessRuleListResponse(BaseModel): - id: str - """The unique identifier of the IP Access rule.""" - - allowed_modes: List[Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"]] - """The available actions that a rule can apply to a matched request.""" - - configuration: Configuration - """The rule configuration.""" - - mode: Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"] - """The action to apply to a matched request.""" - - created_on: Optional[datetime] = None - """The timestamp of when the rule was created.""" - - modified_on: Optional[datetime] = None - """The timestamp of when the rule was last modified.""" - - notes: Optional[str] = None - """ - An informative summary of the rule, typically used as a reminder or explanation. - """ diff --git a/src/cloudflare/types/user/firewall/access_rule_edit_response.py b/src/cloudflare/types/user/firewall/legacy_jhs_rule.py similarity index 97% rename from src/cloudflare/types/user/firewall/access_rule_edit_response.py rename to src/cloudflare/types/user/firewall/legacy_jhs_rule.py index 1ac60c468..b942e35c3 100644 --- a/src/cloudflare/types/user/firewall/access_rule_edit_response.py +++ b/src/cloudflare/types/user/firewall/legacy_jhs_rule.py @@ -7,7 +7,7 @@ from typing_extensions import Literal from ...._models import BaseModel __all__ = [ - "AccessRuleEditResponse", + "LegacyJhsRule", "Configuration", "ConfigurationLegacyJhsIPConfiguration", "ConfigurationLegacyJhsIPV6Configuration", @@ -94,7 +94,7 @@ Configuration = Union[ ] -class AccessRuleEditResponse(BaseModel): +class LegacyJhsRule(BaseModel): id: str """The unique identifier of the IP Access rule.""" diff --git a/src/cloudflare/types/user/organization_list_response.py b/src/cloudflare/types/user/iam_organization.py similarity index 88% rename from src/cloudflare/types/user/organization_list_response.py rename to src/cloudflare/types/user/iam_organization.py index 34edda74d..8f73ec568 100644 --- a/src/cloudflare/types/user/organization_list_response.py +++ b/src/cloudflare/types/user/iam_organization.py @@ -5,10 +5,10 @@ from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["OrganizationListResponse"] +__all__ = ["IamOrganization"] -class OrganizationListResponse(BaseModel): +class IamOrganization(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/user/invite_list_response.py b/src/cloudflare/types/user/invite_list_response.py index c492bc936..bba2020ad 100644 --- a/src/cloudflare/types/user/invite_list_response.py +++ b/src/cloudflare/types/user/invite_list_response.py @@ -5,22 +5,9 @@ from datetime import datetime from typing_extensions import Literal from ..._models import BaseModel +from ..accounts import IamSchemasRole -__all__ = ["InviteListResponse", "InviteListResponseItem", "InviteListResponseItemRole"] - - -class InviteListResponseItemRole(BaseModel): - id: str - """Role identifier tag.""" - - description: str - """Description of role's permissions.""" - - name: str - """Role Name.""" - - permissions: List[str] - """Access permissions for this User.""" +__all__ = ["InviteListResponse", "InviteListResponseItem"] class InviteListResponseItem(BaseModel): @@ -48,7 +35,7 @@ class InviteListResponseItem(BaseModel): organization_name: Optional[str] = None """Organization name.""" - roles: Optional[List[InviteListResponseItemRole]] = None + roles: Optional[List[IamSchemasRole]] = 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 ddf5ac402..c9c877ab3 100644 --- a/src/cloudflare/types/user/load_balancers/__init__.py +++ b/src/cloudflare/types/user/load_balancers/__init__.py @@ -4,28 +4,22 @@ from __future__ import annotations from .pool_edit_params import PoolEditParams as PoolEditParams from .pool_list_params import PoolListParams as PoolListParams -from .pool_get_response import PoolGetResponse as PoolGetResponse from .pool_create_params import PoolCreateParams as PoolCreateParams -from .pool_edit_response import PoolEditResponse as PoolEditResponse 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 from .pool_preview_params import PoolPreviewParams as PoolPreviewParams -from .monitor_get_response import MonitorGetResponse as MonitorGetResponse -from .pool_create_response import PoolCreateResponse as PoolCreateResponse from .pool_delete_response import PoolDeleteResponse as PoolDeleteResponse from .pool_health_response import PoolHealthResponse as PoolHealthResponse -from .pool_update_response import PoolUpdateResponse as PoolUpdateResponse -from .preview_get_response import PreviewGetResponse as PreviewGetResponse from .monitor_create_params import MonitorCreateParams as MonitorCreateParams -from .monitor_edit_response import MonitorEditResponse as MonitorEditResponse 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 from .monitor_preview_params import MonitorPreviewParams as MonitorPreviewParams -from .monitor_create_response import MonitorCreateResponse as MonitorCreateResponse from .monitor_delete_response import MonitorDeleteResponse as MonitorDeleteResponse -from .monitor_update_response import MonitorUpdateResponse as MonitorUpdateResponse 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/analytics/__init__.py b/src/cloudflare/types/user/load_balancers/analytics/__init__.py index 51516ebdb..8006d6aae 100644 --- a/src/cloudflare/types/user/load_balancers/analytics/__init__.py +++ b/src/cloudflare/types/user/load_balancers/analytics/__init__.py @@ -4,3 +4,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 index f7e2656bc..9837cdbba 100644 --- a/src/cloudflare/types/user/load_balancers/analytics/event_list_response.py +++ b/src/cloudflare/types/user/load_balancers/analytics/event_list_response.py @@ -1,21 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ....._models import BaseModel +from .load_balancing_analytics import LoadBalancingAnalytics -__all__ = ["EventListResponse", "EventListResponseItem"] +__all__ = ["EventListResponse"] - -class EventListResponseItem(BaseModel): - id: Optional[int] = None - - origins: Optional[List[object]] = None - - pool: Optional[object] = None - - timestamp: Optional[datetime] = None - - -EventListResponse = List[EventListResponseItem] +EventListResponse = List[LoadBalancingAnalytics] diff --git a/src/cloudflare/types/user/load_balancers/analytics/load_balancing_analytics.py b/src/cloudflare/types/user/load_balancers/analytics/load_balancing_analytics.py new file mode 100644 index 000000000..007df1dbb --- /dev/null +++ b/src/cloudflare/types/user/load_balancers/analytics/load_balancing_analytics.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import List, Optional +from datetime import datetime + +from ....._models import BaseModel + +__all__ = ["LoadBalancingAnalytics"] + + +class LoadBalancingAnalytics(BaseModel): + id: Optional[int] = None + + origins: Optional[List[object]] = None + + pool: Optional[object] = None + + timestamp: Optional[datetime] = None diff --git a/src/cloudflare/types/user/load_balancers/monitor_get_response.py b/src/cloudflare/types/user/load_balancers/load_balancing_monitor.py similarity index 97% rename from src/cloudflare/types/user/load_balancers/monitor_get_response.py rename to src/cloudflare/types/user/load_balancers/load_balancing_monitor.py index c6c63edee..bfb00311d 100644 --- a/src/cloudflare/types/user/load_balancers/monitor_get_response.py +++ b/src/cloudflare/types/user/load_balancers/load_balancing_monitor.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["MonitorGetResponse"] +__all__ = ["LoadBalancingMonitor"] -class MonitorGetResponse(BaseModel): +class LoadBalancingMonitor(BaseModel): id: Optional[str] = None allow_insecure: Optional[bool] = None diff --git a/src/cloudflare/types/user/load_balancers/pool_get_response.py b/src/cloudflare/types/user/load_balancers/load_balancing_pool.py similarity index 99% rename from src/cloudflare/types/user/load_balancers/pool_get_response.py rename to src/cloudflare/types/user/load_balancers/load_balancing_pool.py index c335c0eb0..62b7a8c39 100644 --- a/src/cloudflare/types/user/load_balancers/pool_get_response.py +++ b/src/cloudflare/types/user/load_balancers/load_balancing_pool.py @@ -9,7 +9,7 @@ from pydantic import Field as FieldInfo from ...._models import BaseModel __all__ = [ - "PoolGetResponse", + "LoadBalancingPool", "LoadShedding", "NotificationFilter", "NotificationFilterOrigin", @@ -160,7 +160,7 @@ class Origin(BaseModel): """ -class PoolGetResponse(BaseModel): +class LoadBalancingPool(BaseModel): id: Optional[str] = None check_regions: Optional[ 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 new file mode 100644 index 000000000..b02b3139e --- /dev/null +++ b/src/cloudflare/types/user/load_balancers/load_balancing_preview_result.py @@ -0,0 +1,32 @@ +# File generated from our OpenAPI spec by Stainless. + +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/load_balancers/monitor_create_response.py b/src/cloudflare/types/user/load_balancers/monitor_create_response.py deleted file mode 100644 index a331afbd8..000000000 --- a/src/cloudflare/types/user/load_balancers/monitor_create_response.py +++ /dev/null @@ -1,113 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["MonitorCreateResponse"] - - -class MonitorCreateResponse(BaseModel): - id: Optional[str] = None - - allow_insecure: Optional[bool] = None - """Do not validate the certificate when monitor use HTTPS. - - This parameter is currently only valid for HTTP and HTTPS monitors. - """ - - consecutive_down: Optional[int] = None - """ - To be marked unhealthy the monitored origin must fail this healthcheck N - consecutive times. - """ - - consecutive_up: Optional[int] = None - """ - To be marked healthy the monitored origin must pass this healthcheck N - consecutive times. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """Object description.""" - - expected_body: Optional[str] = None - """A case-insensitive sub-string to look for in the response body. - - If this string is not found, the origin will be marked as unhealthy. This - parameter is only valid for HTTP and HTTPS monitors. - """ - - expected_codes: Optional[str] = None - """The expected HTTP response code or code range of the health check. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - follow_redirects: Optional[bool] = None - """Follow redirects if returned by the origin. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - header: Optional[object] = None - """The HTTP request headers to send in the health check. - - It is recommended you set a Host header by default. The User-Agent header cannot - be overridden. This parameter is only valid for HTTP and HTTPS monitors. - """ - - interval: Optional[int] = None - """The interval between each health check. - - Shorter intervals may improve failover time, but will increase load on the - origins as we check from multiple locations. - """ - - method: Optional[str] = None - """The method to use for the health check. - - This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' - for TCP based health checks. - """ - - modified_on: Optional[datetime] = None - - path: Optional[str] = None - """The endpoint path you want to conduct a health check against. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - port: Optional[int] = None - """The port number to connect to for the health check. - - Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define - the port when using a non-standard port (HTTP: default 80, HTTPS: default 443). - """ - - probe_zone: Optional[str] = None - """Assign this monitor to emulate the specified zone while probing. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - retries: Optional[int] = None - """ - The number of retries to attempt in case of a timeout before marking the origin - as unhealthy. Retries are attempted immediately. - """ - - timeout: Optional[int] = None - """The timeout (in seconds) before marking the health check as failed.""" - - type: Optional[Literal["http", "https", "tcp", "udp_icmp", "icmp_ping", "smtp"]] = None - """The protocol to use for the health check. - - Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', - 'UDP-ICMP', and 'SMTP'. - """ diff --git a/src/cloudflare/types/user/load_balancers/monitor_edit_response.py b/src/cloudflare/types/user/load_balancers/monitor_edit_response.py deleted file mode 100644 index 9ed0f082f..000000000 --- a/src/cloudflare/types/user/load_balancers/monitor_edit_response.py +++ /dev/null @@ -1,113 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["MonitorEditResponse"] - - -class MonitorEditResponse(BaseModel): - id: Optional[str] = None - - allow_insecure: Optional[bool] = None - """Do not validate the certificate when monitor use HTTPS. - - This parameter is currently only valid for HTTP and HTTPS monitors. - """ - - consecutive_down: Optional[int] = None - """ - To be marked unhealthy the monitored origin must fail this healthcheck N - consecutive times. - """ - - consecutive_up: Optional[int] = None - """ - To be marked healthy the monitored origin must pass this healthcheck N - consecutive times. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """Object description.""" - - expected_body: Optional[str] = None - """A case-insensitive sub-string to look for in the response body. - - If this string is not found, the origin will be marked as unhealthy. This - parameter is only valid for HTTP and HTTPS monitors. - """ - - expected_codes: Optional[str] = None - """The expected HTTP response code or code range of the health check. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - follow_redirects: Optional[bool] = None - """Follow redirects if returned by the origin. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - header: Optional[object] = None - """The HTTP request headers to send in the health check. - - It is recommended you set a Host header by default. The User-Agent header cannot - be overridden. This parameter is only valid for HTTP and HTTPS monitors. - """ - - interval: Optional[int] = None - """The interval between each health check. - - Shorter intervals may improve failover time, but will increase load on the - origins as we check from multiple locations. - """ - - method: Optional[str] = None - """The method to use for the health check. - - This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' - for TCP based health checks. - """ - - modified_on: Optional[datetime] = None - - path: Optional[str] = None - """The endpoint path you want to conduct a health check against. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - port: Optional[int] = None - """The port number to connect to for the health check. - - Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define - the port when using a non-standard port (HTTP: default 80, HTTPS: default 443). - """ - - probe_zone: Optional[str] = None - """Assign this monitor to emulate the specified zone while probing. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - retries: Optional[int] = None - """ - The number of retries to attempt in case of a timeout before marking the origin - as unhealthy. Retries are attempted immediately. - """ - - timeout: Optional[int] = None - """The timeout (in seconds) before marking the health check as failed.""" - - type: Optional[Literal["http", "https", "tcp", "udp_icmp", "icmp_ping", "smtp"]] = None - """The protocol to use for the health check. - - Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', - 'UDP-ICMP', and 'SMTP'. - """ diff --git a/src/cloudflare/types/user/load_balancers/monitor_list_response.py b/src/cloudflare/types/user/load_balancers/monitor_list_response.py index 9e222ad7f..8830fd8c5 100644 --- a/src/cloudflare/types/user/load_balancers/monitor_list_response.py +++ b/src/cloudflare/types/user/load_balancers/monitor_list_response.py @@ -1,116 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ...._models import BaseModel +from .load_balancing_monitor import LoadBalancingMonitor -__all__ = ["MonitorListResponse", "MonitorListResponseItem"] +__all__ = ["MonitorListResponse"] - -class MonitorListResponseItem(BaseModel): - id: Optional[str] = None - - allow_insecure: Optional[bool] = None - """Do not validate the certificate when monitor use HTTPS. - - This parameter is currently only valid for HTTP and HTTPS monitors. - """ - - consecutive_down: Optional[int] = None - """ - To be marked unhealthy the monitored origin must fail this healthcheck N - consecutive times. - """ - - consecutive_up: Optional[int] = None - """ - To be marked healthy the monitored origin must pass this healthcheck N - consecutive times. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """Object description.""" - - expected_body: Optional[str] = None - """A case-insensitive sub-string to look for in the response body. - - If this string is not found, the origin will be marked as unhealthy. This - parameter is only valid for HTTP and HTTPS monitors. - """ - - expected_codes: Optional[str] = None - """The expected HTTP response code or code range of the health check. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - follow_redirects: Optional[bool] = None - """Follow redirects if returned by the origin. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - header: Optional[object] = None - """The HTTP request headers to send in the health check. - - It is recommended you set a Host header by default. The User-Agent header cannot - be overridden. This parameter is only valid for HTTP and HTTPS monitors. - """ - - interval: Optional[int] = None - """The interval between each health check. - - Shorter intervals may improve failover time, but will increase load on the - origins as we check from multiple locations. - """ - - method: Optional[str] = None - """The method to use for the health check. - - This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' - for TCP based health checks. - """ - - modified_on: Optional[datetime] = None - - path: Optional[str] = None - """The endpoint path you want to conduct a health check against. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - port: Optional[int] = None - """The port number to connect to for the health check. - - Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define - the port when using a non-standard port (HTTP: default 80, HTTPS: default 443). - """ - - probe_zone: Optional[str] = None - """Assign this monitor to emulate the specified zone while probing. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - retries: Optional[int] = None - """ - The number of retries to attempt in case of a timeout before marking the origin - as unhealthy. Retries are attempted immediately. - """ - - timeout: Optional[int] = None - """The timeout (in seconds) before marking the health check as failed.""" - - type: Optional[Literal["http", "https", "tcp", "udp_icmp", "icmp_ping", "smtp"]] = None - """The protocol to use for the health check. - - Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', - 'UDP-ICMP', and 'SMTP'. - """ - - -MonitorListResponse = List[MonitorListResponseItem] +MonitorListResponse = List[LoadBalancingMonitor] diff --git a/src/cloudflare/types/user/load_balancers/monitor_update_response.py b/src/cloudflare/types/user/load_balancers/monitor_update_response.py deleted file mode 100644 index 1a86dd843..000000000 --- a/src/cloudflare/types/user/load_balancers/monitor_update_response.py +++ /dev/null @@ -1,113 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["MonitorUpdateResponse"] - - -class MonitorUpdateResponse(BaseModel): - id: Optional[str] = None - - allow_insecure: Optional[bool] = None - """Do not validate the certificate when monitor use HTTPS. - - This parameter is currently only valid for HTTP and HTTPS monitors. - """ - - consecutive_down: Optional[int] = None - """ - To be marked unhealthy the monitored origin must fail this healthcheck N - consecutive times. - """ - - consecutive_up: Optional[int] = None - """ - To be marked healthy the monitored origin must pass this healthcheck N - consecutive times. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """Object description.""" - - expected_body: Optional[str] = None - """A case-insensitive sub-string to look for in the response body. - - If this string is not found, the origin will be marked as unhealthy. This - parameter is only valid for HTTP and HTTPS monitors. - """ - - expected_codes: Optional[str] = None - """The expected HTTP response code or code range of the health check. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - follow_redirects: Optional[bool] = None - """Follow redirects if returned by the origin. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - header: Optional[object] = None - """The HTTP request headers to send in the health check. - - It is recommended you set a Host header by default. The User-Agent header cannot - be overridden. This parameter is only valid for HTTP and HTTPS monitors. - """ - - interval: Optional[int] = None - """The interval between each health check. - - Shorter intervals may improve failover time, but will increase load on the - origins as we check from multiple locations. - """ - - method: Optional[str] = None - """The method to use for the health check. - - This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' - for TCP based health checks. - """ - - modified_on: Optional[datetime] = None - - path: Optional[str] = None - """The endpoint path you want to conduct a health check against. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - port: Optional[int] = None - """The port number to connect to for the health check. - - Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define - the port when using a non-standard port (HTTP: default 80, HTTPS: default 443). - """ - - probe_zone: Optional[str] = None - """Assign this monitor to emulate the specified zone while probing. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - - retries: Optional[int] = None - """ - The number of retries to attempt in case of a timeout before marking the origin - as unhealthy. Retries are attempted immediately. - """ - - timeout: Optional[int] = None - """The timeout (in seconds) before marking the health check as failed.""" - - type: Optional[Literal["http", "https", "tcp", "udp_icmp", "icmp_ping", "smtp"]] = None - """The protocol to use for the health check. - - Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', - 'UDP-ICMP', and 'SMTP'. - """ diff --git a/src/cloudflare/types/user/load_balancers/pool_create_response.py b/src/cloudflare/types/user/load_balancers/pool_create_response.py deleted file mode 100644 index 4068222ad..000000000 --- a/src/cloudflare/types/user/load_balancers/pool_create_response.py +++ /dev/null @@ -1,273 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ...._models import BaseModel - -__all__ = [ - "PoolCreateResponse", - "LoadShedding", - "NotificationFilter", - "NotificationFilterOrigin", - "NotificationFilterPool", - "OriginSteering", - "Origin", - "OriginHeader", -] - - -class LoadShedding(BaseModel): - default_percent: Optional[float] = None - """The percent of traffic to shed from the pool, according to the default policy. - - Applies to new sessions and traffic without session affinity. - """ - - default_policy: Optional[Literal["random", "hash"]] = None - """The default policy to use when load shedding. - - A random policy randomly sheds a given percent of requests. A hash policy - computes a hash over the CF-Connecting-IP address and sheds all requests - originating from a percent of IPs. - """ - - session_percent: Optional[float] = None - """ - The percent of existing sessions to shed from the pool, according to the session - policy. - """ - - session_policy: Optional[Literal["hash"]] = None - """ - Only the hash policy is supported for existing sessions (to avoid exponential - decay). - """ - - -class NotificationFilterOrigin(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class NotificationFilterPool(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class NotificationFilter(BaseModel): - origin: Optional[NotificationFilterOrigin] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - pool: Optional[NotificationFilterPool] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - -class OriginSteering(BaseModel): - policy: Optional[Literal["random", "hash", "least_outstanding_requests", "least_connections"]] = None - """The type of origin steering policy to use. - - - `"random"`: Select an origin randomly. - - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP - address. - - `"least_outstanding_requests"`: Select an origin by taking into consideration - origin weights, as well as each origin's number of outstanding requests. - Origins with more pending requests are weighted proportionately less relative - to others. - - `"least_connections"`: Select an origin by taking into consideration origin - weights, as well as each origin's number of open connections. Origins with - more open connections are weighted proportionately less relative to others. - Supported for HTTP/1 and HTTP/2 connections. - """ - - -class OriginHeader(BaseModel): - host: Optional[List[str]] = FieldInfo(alias="Host", default=None) - """The 'Host' header allows to override the hostname set in the HTTP request. - - Current support is 1 'Host' header override per origin. - """ - - -class Origin(BaseModel): - address: Optional[str] = None - """ - The IP address (IPv4 or IPv6) of the origin, or its publicly addressable - hostname. Hostnames entered here should resolve directly to the origin, and not - be a hostname proxied by Cloudflare. To set an internal/reserved address, - virtual_network_id must also be set. - """ - - disabled_at: Optional[datetime] = None - """This field shows up only if the origin is disabled. - - This field is set with the time the origin was disabled. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) this origin within the pool. - - Disabled origins will not receive traffic and are excluded from health checks. - The origin will only be disabled for the current pool. - """ - - header: Optional[OriginHeader] = None - """The request header is used to pass additional information with an HTTP request. - - Currently supported header is 'Host'. - """ - - name: Optional[str] = None - """A human-identifiable name for the origin.""" - - virtual_network_id: Optional[str] = None - """The virtual network subnet ID the origin belongs in. - - Virtual network must also belong to the account. - """ - - weight: Optional[float] = None - """The weight of this origin relative to other origins in the pool. - - Based on the configured weight the total traffic is distributed among origins - within the pool. - - - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the - origin's outstanding requests. - - `origin_steering.policy="least_connections"`: Use weight to scale the origin's - open connections. - """ - - -class PoolCreateResponse(BaseModel): - id: Optional[str] = None - - check_regions: Optional[ - List[ - Literal[ - "WNAM", - "ENAM", - "WEU", - "EEU", - "NSAM", - "SSAM", - "OC", - "ME", - "NAF", - "SAF", - "SAS", - "SEAS", - "NEAS", - "ALL_REGIONS", - ] - ] - ] = None - """A list of regions from which to run health checks. - - Null means every Cloudflare data center. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """A human-readable description of the pool.""" - - disabled_at: Optional[datetime] = None - """This field shows up only if the pool is disabled. - - This field is set with the time the pool was disabled at. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) or disable this pool. - - Disabled pools will not receive traffic and are excluded from health checks. - Disabling a pool will cause any load balancers using it to failover to the next - pool (if any). - """ - - latitude: Optional[float] = None - """ - The latitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, longitude must also be set. - """ - - load_shedding: Optional[LoadShedding] = None - """Configures load shedding policies and percentages for the pool.""" - - longitude: Optional[float] = None - """ - The longitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, latitude must also be set. - """ - - minimum_origins: Optional[int] = None - """ - The minimum number of origins that must be healthy for this pool to serve - traffic. If the number of healthy origins falls below this number, the pool will - be marked unhealthy and will failover to the next available pool. - """ - - modified_on: Optional[datetime] = None - - monitor: Optional[object] = None - """ - The ID of the Monitor to use for checking the health of origins within this - pool. - """ - - name: Optional[str] = None - """A short name (tag) for the pool. - - Only alphanumeric characters, hyphens, and underscores are allowed. - """ - - notification_email: Optional[str] = None - """This field is now deprecated. - - It has been moved to Cloudflare's Centralized Notification service - https://developers.cloudflare.com/fundamentals/notifications/. The email address - to send health status notifications to. This can be an individual mailbox or a - mailing list. Multiple emails can be supplied as a comma delimited list. - """ - - notification_filter: Optional[NotificationFilter] = None - """Filter pool and origin health notifications by resource type or health status. - - Use null to reset. - """ - - origin_steering: Optional[OriginSteering] = None - """Configures origin steering for the pool. - - Controls how origins are selected for new sessions and traffic without session - affinity. - """ - - origins: Optional[List[Origin]] = None - """The list of origins within this pool. - - Traffic directed at this pool is balanced across all currently healthy origins, - provided the pool itself is healthy. - """ diff --git a/src/cloudflare/types/user/load_balancers/pool_edit_response.py b/src/cloudflare/types/user/load_balancers/pool_edit_response.py deleted file mode 100644 index 179908d6f..000000000 --- a/src/cloudflare/types/user/load_balancers/pool_edit_response.py +++ /dev/null @@ -1,273 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ...._models import BaseModel - -__all__ = [ - "PoolEditResponse", - "LoadShedding", - "NotificationFilter", - "NotificationFilterOrigin", - "NotificationFilterPool", - "OriginSteering", - "Origin", - "OriginHeader", -] - - -class LoadShedding(BaseModel): - default_percent: Optional[float] = None - """The percent of traffic to shed from the pool, according to the default policy. - - Applies to new sessions and traffic without session affinity. - """ - - default_policy: Optional[Literal["random", "hash"]] = None - """The default policy to use when load shedding. - - A random policy randomly sheds a given percent of requests. A hash policy - computes a hash over the CF-Connecting-IP address and sheds all requests - originating from a percent of IPs. - """ - - session_percent: Optional[float] = None - """ - The percent of existing sessions to shed from the pool, according to the session - policy. - """ - - session_policy: Optional[Literal["hash"]] = None - """ - Only the hash policy is supported for existing sessions (to avoid exponential - decay). - """ - - -class NotificationFilterOrigin(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class NotificationFilterPool(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class NotificationFilter(BaseModel): - origin: Optional[NotificationFilterOrigin] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - pool: Optional[NotificationFilterPool] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - -class OriginSteering(BaseModel): - policy: Optional[Literal["random", "hash", "least_outstanding_requests", "least_connections"]] = None - """The type of origin steering policy to use. - - - `"random"`: Select an origin randomly. - - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP - address. - - `"least_outstanding_requests"`: Select an origin by taking into consideration - origin weights, as well as each origin's number of outstanding requests. - Origins with more pending requests are weighted proportionately less relative - to others. - - `"least_connections"`: Select an origin by taking into consideration origin - weights, as well as each origin's number of open connections. Origins with - more open connections are weighted proportionately less relative to others. - Supported for HTTP/1 and HTTP/2 connections. - """ - - -class OriginHeader(BaseModel): - host: Optional[List[str]] = FieldInfo(alias="Host", default=None) - """The 'Host' header allows to override the hostname set in the HTTP request. - - Current support is 1 'Host' header override per origin. - """ - - -class Origin(BaseModel): - address: Optional[str] = None - """ - The IP address (IPv4 or IPv6) of the origin, or its publicly addressable - hostname. Hostnames entered here should resolve directly to the origin, and not - be a hostname proxied by Cloudflare. To set an internal/reserved address, - virtual_network_id must also be set. - """ - - disabled_at: Optional[datetime] = None - """This field shows up only if the origin is disabled. - - This field is set with the time the origin was disabled. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) this origin within the pool. - - Disabled origins will not receive traffic and are excluded from health checks. - The origin will only be disabled for the current pool. - """ - - header: Optional[OriginHeader] = None - """The request header is used to pass additional information with an HTTP request. - - Currently supported header is 'Host'. - """ - - name: Optional[str] = None - """A human-identifiable name for the origin.""" - - virtual_network_id: Optional[str] = None - """The virtual network subnet ID the origin belongs in. - - Virtual network must also belong to the account. - """ - - weight: Optional[float] = None - """The weight of this origin relative to other origins in the pool. - - Based on the configured weight the total traffic is distributed among origins - within the pool. - - - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the - origin's outstanding requests. - - `origin_steering.policy="least_connections"`: Use weight to scale the origin's - open connections. - """ - - -class PoolEditResponse(BaseModel): - id: Optional[str] = None - - check_regions: Optional[ - List[ - Literal[ - "WNAM", - "ENAM", - "WEU", - "EEU", - "NSAM", - "SSAM", - "OC", - "ME", - "NAF", - "SAF", - "SAS", - "SEAS", - "NEAS", - "ALL_REGIONS", - ] - ] - ] = None - """A list of regions from which to run health checks. - - Null means every Cloudflare data center. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """A human-readable description of the pool.""" - - disabled_at: Optional[datetime] = None - """This field shows up only if the pool is disabled. - - This field is set with the time the pool was disabled at. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) or disable this pool. - - Disabled pools will not receive traffic and are excluded from health checks. - Disabling a pool will cause any load balancers using it to failover to the next - pool (if any). - """ - - latitude: Optional[float] = None - """ - The latitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, longitude must also be set. - """ - - load_shedding: Optional[LoadShedding] = None - """Configures load shedding policies and percentages for the pool.""" - - longitude: Optional[float] = None - """ - The longitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, latitude must also be set. - """ - - minimum_origins: Optional[int] = None - """ - The minimum number of origins that must be healthy for this pool to serve - traffic. If the number of healthy origins falls below this number, the pool will - be marked unhealthy and will failover to the next available pool. - """ - - modified_on: Optional[datetime] = None - - monitor: Optional[object] = None - """ - The ID of the Monitor to use for checking the health of origins within this - pool. - """ - - name: Optional[str] = None - """A short name (tag) for the pool. - - Only alphanumeric characters, hyphens, and underscores are allowed. - """ - - notification_email: Optional[str] = None - """This field is now deprecated. - - It has been moved to Cloudflare's Centralized Notification service - https://developers.cloudflare.com/fundamentals/notifications/. The email address - to send health status notifications to. This can be an individual mailbox or a - mailing list. Multiple emails can be supplied as a comma delimited list. - """ - - notification_filter: Optional[NotificationFilter] = None - """Filter pool and origin health notifications by resource type or health status. - - Use null to reset. - """ - - origin_steering: Optional[OriginSteering] = None - """Configures origin steering for the pool. - - Controls how origins are selected for new sessions and traffic without session - affinity. - """ - - origins: Optional[List[Origin]] = None - """The list of origins within this pool. - - Traffic directed at this pool is balanced across all currently healthy origins, - provided the pool itself is healthy. - """ diff --git a/src/cloudflare/types/user/load_balancers/pool_list_response.py b/src/cloudflare/types/user/load_balancers/pool_list_response.py index 833a94ca2..47bece899 100644 --- a/src/cloudflare/types/user/load_balancers/pool_list_response.py +++ b/src/cloudflare/types/user/load_balancers/pool_list_response.py @@ -1,277 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from pydantic import Field as FieldInfo +from .load_balancing_pool import LoadBalancingPool -from ...._models import BaseModel +__all__ = ["PoolListResponse"] -__all__ = [ - "PoolListResponse", - "PoolListResponseItem", - "PoolListResponseItemLoadShedding", - "PoolListResponseItemNotificationFilter", - "PoolListResponseItemNotificationFilterOrigin", - "PoolListResponseItemNotificationFilterPool", - "PoolListResponseItemOriginSteering", - "PoolListResponseItemOrigin", - "PoolListResponseItemOriginHeader", -] - - -class PoolListResponseItemLoadShedding(BaseModel): - default_percent: Optional[float] = None - """The percent of traffic to shed from the pool, according to the default policy. - - Applies to new sessions and traffic without session affinity. - """ - - default_policy: Optional[Literal["random", "hash"]] = None - """The default policy to use when load shedding. - - A random policy randomly sheds a given percent of requests. A hash policy - computes a hash over the CF-Connecting-IP address and sheds all requests - originating from a percent of IPs. - """ - - session_percent: Optional[float] = None - """ - The percent of existing sessions to shed from the pool, according to the session - policy. - """ - - session_policy: Optional[Literal["hash"]] = None - """ - Only the hash policy is supported for existing sessions (to avoid exponential - decay). - """ - - -class PoolListResponseItemNotificationFilterOrigin(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class PoolListResponseItemNotificationFilterPool(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class PoolListResponseItemNotificationFilter(BaseModel): - origin: Optional[PoolListResponseItemNotificationFilterOrigin] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - pool: Optional[PoolListResponseItemNotificationFilterPool] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - -class PoolListResponseItemOriginSteering(BaseModel): - policy: Optional[Literal["random", "hash", "least_outstanding_requests", "least_connections"]] = None - """The type of origin steering policy to use. - - - `"random"`: Select an origin randomly. - - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP - address. - - `"least_outstanding_requests"`: Select an origin by taking into consideration - origin weights, as well as each origin's number of outstanding requests. - Origins with more pending requests are weighted proportionately less relative - to others. - - `"least_connections"`: Select an origin by taking into consideration origin - weights, as well as each origin's number of open connections. Origins with - more open connections are weighted proportionately less relative to others. - Supported for HTTP/1 and HTTP/2 connections. - """ - - -class PoolListResponseItemOriginHeader(BaseModel): - host: Optional[List[str]] = FieldInfo(alias="Host", default=None) - """The 'Host' header allows to override the hostname set in the HTTP request. - - Current support is 1 'Host' header override per origin. - """ - - -class PoolListResponseItemOrigin(BaseModel): - address: Optional[str] = None - """ - The IP address (IPv4 or IPv6) of the origin, or its publicly addressable - hostname. Hostnames entered here should resolve directly to the origin, and not - be a hostname proxied by Cloudflare. To set an internal/reserved address, - virtual_network_id must also be set. - """ - - disabled_at: Optional[datetime] = None - """This field shows up only if the origin is disabled. - - This field is set with the time the origin was disabled. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) this origin within the pool. - - Disabled origins will not receive traffic and are excluded from health checks. - The origin will only be disabled for the current pool. - """ - - header: Optional[PoolListResponseItemOriginHeader] = None - """The request header is used to pass additional information with an HTTP request. - - Currently supported header is 'Host'. - """ - - name: Optional[str] = None - """A human-identifiable name for the origin.""" - - virtual_network_id: Optional[str] = None - """The virtual network subnet ID the origin belongs in. - - Virtual network must also belong to the account. - """ - - weight: Optional[float] = None - """The weight of this origin relative to other origins in the pool. - - Based on the configured weight the total traffic is distributed among origins - within the pool. - - - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the - origin's outstanding requests. - - `origin_steering.policy="least_connections"`: Use weight to scale the origin's - open connections. - """ - - -class PoolListResponseItem(BaseModel): - id: Optional[str] = None - - check_regions: Optional[ - List[ - Literal[ - "WNAM", - "ENAM", - "WEU", - "EEU", - "NSAM", - "SSAM", - "OC", - "ME", - "NAF", - "SAF", - "SAS", - "SEAS", - "NEAS", - "ALL_REGIONS", - ] - ] - ] = None - """A list of regions from which to run health checks. - - Null means every Cloudflare data center. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """A human-readable description of the pool.""" - - disabled_at: Optional[datetime] = None - """This field shows up only if the pool is disabled. - - This field is set with the time the pool was disabled at. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) or disable this pool. - - Disabled pools will not receive traffic and are excluded from health checks. - Disabling a pool will cause any load balancers using it to failover to the next - pool (if any). - """ - - latitude: Optional[float] = None - """ - The latitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, longitude must also be set. - """ - - load_shedding: Optional[PoolListResponseItemLoadShedding] = None - """Configures load shedding policies and percentages for the pool.""" - - longitude: Optional[float] = None - """ - The longitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, latitude must also be set. - """ - - minimum_origins: Optional[int] = None - """ - The minimum number of origins that must be healthy for this pool to serve - traffic. If the number of healthy origins falls below this number, the pool will - be marked unhealthy and will failover to the next available pool. - """ - - modified_on: Optional[datetime] = None - - monitor: Optional[object] = None - """ - The ID of the Monitor to use for checking the health of origins within this - pool. - """ - - name: Optional[str] = None - """A short name (tag) for the pool. - - Only alphanumeric characters, hyphens, and underscores are allowed. - """ - - notification_email: Optional[str] = None - """This field is now deprecated. - - It has been moved to Cloudflare's Centralized Notification service - https://developers.cloudflare.com/fundamentals/notifications/. The email address - to send health status notifications to. This can be an individual mailbox or a - mailing list. Multiple emails can be supplied as a comma delimited list. - """ - - notification_filter: Optional[PoolListResponseItemNotificationFilter] = None - """Filter pool and origin health notifications by resource type or health status. - - Use null to reset. - """ - - origin_steering: Optional[PoolListResponseItemOriginSteering] = None - """Configures origin steering for the pool. - - Controls how origins are selected for new sessions and traffic without session - affinity. - """ - - origins: Optional[List[PoolListResponseItemOrigin]] = None - """The list of origins within this pool. - - Traffic directed at this pool is balanced across all currently healthy origins, - provided the pool itself is healthy. - """ - - -PoolListResponse = List[PoolListResponseItem] +PoolListResponse = List[LoadBalancingPool] diff --git a/src/cloudflare/types/user/load_balancers/pool_update_response.py b/src/cloudflare/types/user/load_balancers/pool_update_response.py deleted file mode 100644 index 1a033b65b..000000000 --- a/src/cloudflare/types/user/load_balancers/pool_update_response.py +++ /dev/null @@ -1,273 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ...._models import BaseModel - -__all__ = [ - "PoolUpdateResponse", - "LoadShedding", - "NotificationFilter", - "NotificationFilterOrigin", - "NotificationFilterPool", - "OriginSteering", - "Origin", - "OriginHeader", -] - - -class LoadShedding(BaseModel): - default_percent: Optional[float] = None - """The percent of traffic to shed from the pool, according to the default policy. - - Applies to new sessions and traffic without session affinity. - """ - - default_policy: Optional[Literal["random", "hash"]] = None - """The default policy to use when load shedding. - - A random policy randomly sheds a given percent of requests. A hash policy - computes a hash over the CF-Connecting-IP address and sheds all requests - originating from a percent of IPs. - """ - - session_percent: Optional[float] = None - """ - The percent of existing sessions to shed from the pool, according to the session - policy. - """ - - session_policy: Optional[Literal["hash"]] = None - """ - Only the hash policy is supported for existing sessions (to avoid exponential - decay). - """ - - -class NotificationFilterOrigin(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class NotificationFilterPool(BaseModel): - disable: Optional[bool] = None - """If set true, disable notifications for this type of resource (pool or origin).""" - - healthy: Optional[bool] = None - """If present, send notifications only for this health status (e.g. - - false for only DOWN events). Use null to reset (all events). - """ - - -class NotificationFilter(BaseModel): - origin: Optional[NotificationFilterOrigin] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - pool: Optional[NotificationFilterPool] = None - """Filter options for a particular resource type (pool or origin). - - Use null to reset. - """ - - -class OriginSteering(BaseModel): - policy: Optional[Literal["random", "hash", "least_outstanding_requests", "least_connections"]] = None - """The type of origin steering policy to use. - - - `"random"`: Select an origin randomly. - - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP - address. - - `"least_outstanding_requests"`: Select an origin by taking into consideration - origin weights, as well as each origin's number of outstanding requests. - Origins with more pending requests are weighted proportionately less relative - to others. - - `"least_connections"`: Select an origin by taking into consideration origin - weights, as well as each origin's number of open connections. Origins with - more open connections are weighted proportionately less relative to others. - Supported for HTTP/1 and HTTP/2 connections. - """ - - -class OriginHeader(BaseModel): - host: Optional[List[str]] = FieldInfo(alias="Host", default=None) - """The 'Host' header allows to override the hostname set in the HTTP request. - - Current support is 1 'Host' header override per origin. - """ - - -class Origin(BaseModel): - address: Optional[str] = None - """ - The IP address (IPv4 or IPv6) of the origin, or its publicly addressable - hostname. Hostnames entered here should resolve directly to the origin, and not - be a hostname proxied by Cloudflare. To set an internal/reserved address, - virtual_network_id must also be set. - """ - - disabled_at: Optional[datetime] = None - """This field shows up only if the origin is disabled. - - This field is set with the time the origin was disabled. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) this origin within the pool. - - Disabled origins will not receive traffic and are excluded from health checks. - The origin will only be disabled for the current pool. - """ - - header: Optional[OriginHeader] = None - """The request header is used to pass additional information with an HTTP request. - - Currently supported header is 'Host'. - """ - - name: Optional[str] = None - """A human-identifiable name for the origin.""" - - virtual_network_id: Optional[str] = None - """The virtual network subnet ID the origin belongs in. - - Virtual network must also belong to the account. - """ - - weight: Optional[float] = None - """The weight of this origin relative to other origins in the pool. - - Based on the configured weight the total traffic is distributed among origins - within the pool. - - - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the - origin's outstanding requests. - - `origin_steering.policy="least_connections"`: Use weight to scale the origin's - open connections. - """ - - -class PoolUpdateResponse(BaseModel): - id: Optional[str] = None - - check_regions: Optional[ - List[ - Literal[ - "WNAM", - "ENAM", - "WEU", - "EEU", - "NSAM", - "SSAM", - "OC", - "ME", - "NAF", - "SAF", - "SAS", - "SEAS", - "NEAS", - "ALL_REGIONS", - ] - ] - ] = None - """A list of regions from which to run health checks. - - Null means every Cloudflare data center. - """ - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """A human-readable description of the pool.""" - - disabled_at: Optional[datetime] = None - """This field shows up only if the pool is disabled. - - This field is set with the time the pool was disabled at. - """ - - enabled: Optional[bool] = None - """Whether to enable (the default) or disable this pool. - - Disabled pools will not receive traffic and are excluded from health checks. - Disabling a pool will cause any load balancers using it to failover to the next - pool (if any). - """ - - latitude: Optional[float] = None - """ - The latitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, longitude must also be set. - """ - - load_shedding: Optional[LoadShedding] = None - """Configures load shedding policies and percentages for the pool.""" - - longitude: Optional[float] = None - """ - The longitude of the data center containing the origins used in this pool in - decimal degrees. If this is set, latitude must also be set. - """ - - minimum_origins: Optional[int] = None - """ - The minimum number of origins that must be healthy for this pool to serve - traffic. If the number of healthy origins falls below this number, the pool will - be marked unhealthy and will failover to the next available pool. - """ - - modified_on: Optional[datetime] = None - - monitor: Optional[object] = None - """ - The ID of the Monitor to use for checking the health of origins within this - pool. - """ - - name: Optional[str] = None - """A short name (tag) for the pool. - - Only alphanumeric characters, hyphens, and underscores are allowed. - """ - - notification_email: Optional[str] = None - """This field is now deprecated. - - It has been moved to Cloudflare's Centralized Notification service - https://developers.cloudflare.com/fundamentals/notifications/. The email address - to send health status notifications to. This can be an individual mailbox or a - mailing list. Multiple emails can be supplied as a comma delimited list. - """ - - notification_filter: Optional[NotificationFilter] = None - """Filter pool and origin health notifications by resource type or health status. - - Use null to reset. - """ - - origin_steering: Optional[OriginSteering] = None - """Configures origin steering for the pool. - - Controls how origins are selected for new sessions and traffic without session - affinity. - """ - - origins: Optional[List[Origin]] = None - """The list of origins within this pool. - - Traffic directed at this pool is balanced across all currently healthy origins, - provided the pool itself is healthy. - """ diff --git a/src/cloudflare/types/user/load_balancers/preview_get_response.py b/src/cloudflare/types/user/load_balancers/preview_get_response.py deleted file mode 100644 index 50d154e16..000000000 --- a/src/cloudflare/types/user/load_balancers/preview_get_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Dict, List, Optional - -from ...._models import BaseModel - -__all__ = [ - "PreviewGetResponse", - "PreviewGetResponseItem", - "PreviewGetResponseItemOriginPreviewGetResponseItemOriginItem", -] - - -class PreviewGetResponseItemOriginPreviewGetResponseItemOriginItem(BaseModel): - failure_reason: Optional[str] = None - - healthy: Optional[bool] = None - - response_code: Optional[float] = None - - rtt: Optional[str] = None - - -class PreviewGetResponseItem(BaseModel): - healthy: Optional[bool] = None - - origins: Optional[List[Dict[str, PreviewGetResponseItemOriginPreviewGetResponseItemOriginItem]]] = None - - -PreviewGetResponse = Dict[str, PreviewGetResponseItem] diff --git a/src/cloudflare/types/user/token_create_response.py b/src/cloudflare/types/user/token_create_response.py index 21c9b8422..556d4282f 100644 --- a/src/cloudflare/types/user/token_create_response.py +++ b/src/cloudflare/types/user/token_create_response.py @@ -2,11 +2,12 @@ from typing import Optional +from .tokens import IamValue from ..._models import BaseModel __all__ = ["TokenCreateResponse"] class TokenCreateResponse(BaseModel): - value: Optional[str] = None + value: Optional[IamValue] = None """The token value.""" diff --git a/src/cloudflare/types/user/tokens/__init__.py b/src/cloudflare/types/user/tokens/__init__.py index 2754164dc..e38b7ccae 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 .value_update_params import ValueUpdateParams as ValueUpdateParams -from .value_update_response import ValueUpdateResponse as ValueUpdateResponse from .permission_group_list_response import PermissionGroupListResponse as PermissionGroupListResponse diff --git a/src/cloudflare/types/secondary_dns/outgoing/status_get_response.py b/src/cloudflare/types/user/tokens/iam_value.py similarity index 50% rename from src/cloudflare/types/secondary_dns/outgoing/status_get_response.py rename to src/cloudflare/types/user/tokens/iam_value.py index 664658d74..620efc3bf 100644 --- a/src/cloudflare/types/secondary_dns/outgoing/status_get_response.py +++ b/src/cloudflare/types/user/tokens/iam_value.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. -__all__ = ["StatusGetResponse"] +__all__ = ["IamValue"] -StatusGetResponse = str +IamValue = str diff --git a/src/cloudflare/types/user/tokens/value_update_response.py b/src/cloudflare/types/user/tokens/value_update_response.py deleted file mode 100644 index 03c05cbb6..000000000 --- a/src/cloudflare/types/user/tokens/value_update_response.py +++ /dev/null @@ -1,6 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - - -__all__ = ["ValueUpdateResponse"] - -ValueUpdateResponse = str diff --git a/src/cloudflare/types/vectorize/__init__.py b/src/cloudflare/types/vectorize/__init__.py index 59b67e5a9..dc225f275 100644 --- a/src/cloudflare/types/vectorize/__init__.py +++ b/src/cloudflare/types/vectorize/__init__.py @@ -2,17 +2,15 @@ from __future__ import annotations -from .index_get_response import IndexGetResponse as IndexGetResponse 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_query_response import IndexQueryResponse as IndexQueryResponse -from .index_create_response import IndexCreateResponse as IndexCreateResponse from .index_delete_response import IndexDeleteResponse as IndexDeleteResponse -from .index_insert_response import IndexInsertResponse as IndexInsertResponse -from .index_update_response import IndexUpdateResponse as IndexUpdateResponse -from .index_upsert_response import IndexUpsertResponse as IndexUpsertResponse +from .vectorize_index_query import VectorizeIndexQuery as VectorizeIndexQuery +from .vectorize_create_index import VectorizeCreateIndex as VectorizeCreateIndex +from .vectorize_index_insert import VectorizeIndexInsert as VectorizeIndexInsert +from .vectorize_index_upsert import VectorizeIndexUpsert as VectorizeIndexUpsert from .index_get_by_ids_params import IndexGetByIDsParams as IndexGetByIDsParams from .index_delete_by_ids_params import IndexDeleteByIDsParams as IndexDeleteByIDsParams -from .index_delete_by_ids_response import IndexDeleteByIDsResponse as IndexDeleteByIDsResponse +from .vectorize_index_delete_vectors_by_id import VectorizeIndexDeleteVectorsByID as VectorizeIndexDeleteVectorsByID diff --git a/src/cloudflare/types/vectorize/index_get_response.py b/src/cloudflare/types/vectorize/index_get_response.py deleted file mode 100644 index 580e0d248..000000000 --- a/src/cloudflare/types/vectorize/index_get_response.py +++ /dev/null @@ -1,31 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["IndexGetResponse", "Config"] - - -class Config(BaseModel): - dimensions: int - """Specifies the number of dimensions for the index""" - - metric: Literal["cosine", "euclidean", "dot-product"] - """Specifies the type of metric to use calculating distance.""" - - -class IndexGetResponse(BaseModel): - config: Optional[Config] = None - - created_on: Optional[object] = None - """Specifies the timestamp the resource was created as an ISO8601 string.""" - - description: Optional[str] = None - """Specifies the description of the index.""" - - modified_on: Optional[object] = None - """Specifies the timestamp the resource was modified as an ISO8601 string.""" - - name: Optional[str] = None diff --git a/src/cloudflare/types/vectorize/index_list_response.py b/src/cloudflare/types/vectorize/index_list_response.py index 928fc4191..01d41a946 100644 --- a/src/cloudflare/types/vectorize/index_list_response.py +++ b/src/cloudflare/types/vectorize/index_list_response.py @@ -1,34 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .vectorize_create_index import VectorizeCreateIndex -__all__ = ["IndexListResponse", "IndexListResponseItem", "IndexListResponseItemConfig"] +__all__ = ["IndexListResponse"] - -class IndexListResponseItemConfig(BaseModel): - dimensions: int - """Specifies the number of dimensions for the index""" - - metric: Literal["cosine", "euclidean", "dot-product"] - """Specifies the type of metric to use calculating distance.""" - - -class IndexListResponseItem(BaseModel): - config: Optional[IndexListResponseItemConfig] = None - - created_on: Optional[object] = None - """Specifies the timestamp the resource was created as an ISO8601 string.""" - - description: Optional[str] = None - """Specifies the description of the index.""" - - modified_on: Optional[object] = None - """Specifies the timestamp the resource was modified as an ISO8601 string.""" - - name: Optional[str] = None - - -IndexListResponse = List[IndexListResponseItem] +IndexListResponse = List[VectorizeCreateIndex] diff --git a/src/cloudflare/types/vectorize/index_update_response.py b/src/cloudflare/types/vectorize/index_update_response.py deleted file mode 100644 index 8e43d03e5..000000000 --- a/src/cloudflare/types/vectorize/index_update_response.py +++ /dev/null @@ -1,31 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["IndexUpdateResponse", "Config"] - - -class Config(BaseModel): - dimensions: int - """Specifies the number of dimensions for the index""" - - metric: Literal["cosine", "euclidean", "dot-product"] - """Specifies the type of metric to use calculating distance.""" - - -class IndexUpdateResponse(BaseModel): - config: Optional[Config] = None - - created_on: Optional[object] = None - """Specifies the timestamp the resource was created as an ISO8601 string.""" - - description: Optional[str] = None - """Specifies the description of the index.""" - - modified_on: Optional[object] = None - """Specifies the timestamp the resource was modified as an ISO8601 string.""" - - name: Optional[str] = None diff --git a/src/cloudflare/types/vectorize/index_create_response.py b/src/cloudflare/types/vectorize/vectorize_create_index.py similarity index 90% rename from src/cloudflare/types/vectorize/index_create_response.py rename to src/cloudflare/types/vectorize/vectorize_create_index.py index 295ec2998..14f1389ff 100644 --- a/src/cloudflare/types/vectorize/index_create_response.py +++ b/src/cloudflare/types/vectorize/vectorize_create_index.py @@ -5,7 +5,7 @@ from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["IndexCreateResponse", "Config"] +__all__ = ["VectorizeCreateIndex", "Config"] class Config(BaseModel): @@ -16,7 +16,7 @@ class Config(BaseModel): """Specifies the type of metric to use calculating distance.""" -class IndexCreateResponse(BaseModel): +class VectorizeCreateIndex(BaseModel): config: Optional[Config] = None created_on: Optional[object] = None diff --git a/src/cloudflare/types/vectorize/index_delete_by_ids_response.py b/src/cloudflare/types/vectorize/vectorize_index_delete_vectors_by_id.py similarity index 79% rename from src/cloudflare/types/vectorize/index_delete_by_ids_response.py rename to src/cloudflare/types/vectorize/vectorize_index_delete_vectors_by_id.py index b0d46d281..1d442cecb 100644 --- a/src/cloudflare/types/vectorize/index_delete_by_ids_response.py +++ b/src/cloudflare/types/vectorize/vectorize_index_delete_vectors_by_id.py @@ -4,10 +4,10 @@ from typing import List, Optional from ..._models import BaseModel -__all__ = ["IndexDeleteByIDsResponse"] +__all__ = ["VectorizeIndexDeleteVectorsByID"] -class IndexDeleteByIDsResponse(BaseModel): +class VectorizeIndexDeleteVectorsByID(BaseModel): count: Optional[int] = None """The count of the vectors successfully deleted.""" diff --git a/src/cloudflare/types/vectorize/index_upsert_response.py b/src/cloudflare/types/vectorize/vectorize_index_insert.py similarity index 82% rename from src/cloudflare/types/vectorize/index_upsert_response.py rename to src/cloudflare/types/vectorize/vectorize_index_insert.py index 724a1c3d5..4b455f10e 100644 --- a/src/cloudflare/types/vectorize/index_upsert_response.py +++ b/src/cloudflare/types/vectorize/vectorize_index_insert.py @@ -4,10 +4,10 @@ from typing import List, Optional from ..._models import BaseModel -__all__ = ["IndexUpsertResponse"] +__all__ = ["VectorizeIndexInsert"] -class IndexUpsertResponse(BaseModel): +class VectorizeIndexInsert(BaseModel): count: Optional[int] = None """Specifies the count of the vectors successfully inserted.""" diff --git a/src/cloudflare/types/vectorize/index_query_response.py b/src/cloudflare/types/vectorize/vectorize_index_query.py similarity index 87% rename from src/cloudflare/types/vectorize/index_query_response.py rename to src/cloudflare/types/vectorize/vectorize_index_query.py index abbc99dc0..ba1b281a4 100644 --- a/src/cloudflare/types/vectorize/index_query_response.py +++ b/src/cloudflare/types/vectorize/vectorize_index_query.py @@ -4,7 +4,7 @@ from typing import List, Optional from ..._models import BaseModel -__all__ = ["IndexQueryResponse", "Match"] +__all__ = ["VectorizeIndexQuery", "Match"] class Match(BaseModel): @@ -19,7 +19,7 @@ class Match(BaseModel): values: Optional[List[float]] = None -class IndexQueryResponse(BaseModel): +class VectorizeIndexQuery(BaseModel): count: Optional[int] = None """Specifies the count of vectors returned by the search""" diff --git a/src/cloudflare/types/vectorize/index_insert_response.py b/src/cloudflare/types/vectorize/vectorize_index_upsert.py similarity index 82% rename from src/cloudflare/types/vectorize/index_insert_response.py rename to src/cloudflare/types/vectorize/vectorize_index_upsert.py index 15a744cf9..0640d254e 100644 --- a/src/cloudflare/types/vectorize/index_insert_response.py +++ b/src/cloudflare/types/vectorize/vectorize_index_upsert.py @@ -4,10 +4,10 @@ from typing import List, Optional from ..._models import BaseModel -__all__ = ["IndexInsertResponse"] +__all__ = ["VectorizeIndexUpsert"] -class IndexInsertResponse(BaseModel): +class VectorizeIndexUpsert(BaseModel): count: Optional[int] = None """Specifies the count of the vectors successfully inserted.""" diff --git a/src/cloudflare/types/waiting_room_create_response.py b/src/cloudflare/types/waiting_room_create_response.py deleted file mode 100644 index 3727d8693..000000000 --- a/src/cloudflare/types/waiting_room_create_response.py +++ /dev/null @@ -1,388 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["WaitingRoomCreateResponse", "AdditionalRoute", "CookieAttributes"] - - -class AdditionalRoute(BaseModel): - host: Optional[str] = None - """The hostname to which this waiting room will be applied (no wildcards). - - The hostname must be the primary domain, subdomain, or custom hostname (if using - SSL for SaaS) of this zone. Please do not include the scheme (http:// or - https://). - """ - - path: Optional[str] = None - """Sets the path within the host to enable the waiting room on. - - The waiting room will be enabled for all subpaths as well. If there are two - waiting rooms on the same subpath, the waiting room for the most specific path - will be chosen. Wildcards and query parameters are not supported. - """ - - -class CookieAttributes(BaseModel): - samesite: Optional[Literal["auto", "lax", "none", "strict"]] = None - """Configures the SameSite attribute on the waiting room cookie. - - Value `auto` will be translated to `lax` or `none` depending if **Always Use - HTTPS** is enabled. Note that when using value `none`, the secure attribute - cannot be set to `never`. - """ - - secure: Optional[Literal["auto", "always", "never"]] = None - """Configures the Secure attribute on the waiting room cookie. - - Value `always` indicates that the Secure attribute will be set in the Set-Cookie - header, `never` indicates that the Secure attribute will not be set, and `auto` - will set the Secure attribute depending if **Always Use HTTPS** is enabled. - """ - - -class WaitingRoomCreateResponse(BaseModel): - id: Optional[object] = None - - additional_routes: Optional[List[AdditionalRoute]] = None - """Only available for the Waiting Room Advanced subscription. - - Additional hostname and path combinations to which this waiting room will be - applied. There is an implied wildcard at the end of the path. The hostname and - path combination must be unique to this and all other waiting rooms. - """ - - cookie_attributes: Optional[CookieAttributes] = None - """Configures cookie attributes for the waiting room cookie. - - This encrypted cookie stores a user's status in the waiting room, such as queue - position. - """ - - cookie_suffix: Optional[str] = None - """ - Appends a '\\__' + a custom suffix to the end of Cloudflare Waiting Room's cookie - name(**cf_waitingroom). If `cookie_suffix` is "abcd", the cookie name will be - `**cf_waitingroom_abcd`. This field is required if using `additional_routes`. - """ - - created_on: Optional[datetime] = None - - custom_page_html: Optional[str] = None - """Only available for the Waiting Room Advanced subscription. - - This is a template html file that will be rendered at the edge. If no - custom_page_html is provided, the default waiting room will be used. The - template is based on mustache ( https://mustache.github.io/ ). There are several - variables that are evaluated by the Cloudflare edge: - - 1. {{`waitTimeKnown`}} Acts like a boolean value that indicates the behavior to - take when wait time is not available, for instance when queue_all is - **true**. - 2. {{`waitTimeFormatted`}} Estimated wait time for the user. For example, five - minutes. Alternatively, you can use: - 3. {{`waitTime`}} Number of minutes of estimated wait for a user. - 4. {{`waitTimeHours`}} Number of hours of estimated wait for a user - (`Math.floor(waitTime/60)`). - 5. {{`waitTimeHourMinutes`}} Number of minutes above the `waitTimeHours` value - (`waitTime%60`). - 6. {{`queueIsFull`}} Changes to **true** when no more people can be added to the - queue. - - To view the full list of variables, look at the `cfWaitingRoom` object described - under the `json_response_enabled` property in other Waiting Room API calls. - """ - - default_template_language: Optional[ - Literal[ - "en-US", - "es-ES", - "de-DE", - "fr-FR", - "it-IT", - "ja-JP", - "ko-KR", - "pt-BR", - "zh-CN", - "zh-TW", - "nl-NL", - "pl-PL", - "id-ID", - "tr-TR", - "ar-EG", - "ru-RU", - "fa-IR", - ] - ] = None - """The language of the default page template. - - If no default_template_language is provided, then `en-US` (English) will be - used. - """ - - description: Optional[str] = None - """A note that you can use to add more details about the waiting room.""" - - disable_session_renewal: Optional[bool] = None - """Only available for the Waiting Room Advanced subscription. - - Disables automatic renewal of session cookies. If `true`, an accepted user will - have session_duration minutes to browse the site. After that, they will have to - go through the waiting room again. If `false`, a user's session cookie will be - automatically renewed on every request. - """ - - host: Optional[str] = None - """The host name to which the waiting room will be applied (no wildcards). - - Please do not include the scheme (http:// or https://). The host and path - combination must be unique. - """ - - json_response_enabled: Optional[bool] = None - """Only available for the Waiting Room Advanced subscription. - - If `true`, requests to the waiting room with the header - `Accept: application/json` will receive a JSON response object with information - on the user's status in the waiting room as opposed to the configured static - HTML page. This JSON response object has one property `cfWaitingRoom` which is - an object containing the following fields: - - 1. `inWaitingRoom`: Boolean indicating if the user is in the waiting room - (always **true**). - 2. `waitTimeKnown`: Boolean indicating if the current estimated wait times are - accurate. If **false**, they are not available. - 3. `waitTime`: Valid only when `waitTimeKnown` is **true**. Integer indicating - the current estimated time in minutes the user will wait in the waiting room. - When `queueingMethod` is **random**, this is set to `waitTime50Percentile`. - 4. `waitTime25Percentile`: Valid only when `queueingMethod` is **random** and - `waitTimeKnown` is **true**. Integer indicating the current estimated maximum - wait time for the 25% of users that gain entry the fastest (25th percentile). - 5. `waitTime50Percentile`: Valid only when `queueingMethod` is **random** and - `waitTimeKnown` is **true**. Integer indicating the current estimated maximum - wait time for the 50% of users that gain entry the fastest (50th percentile). - In other words, half of the queued users are expected to let into the origin - website before `waitTime50Percentile` and half are expected to be let in - after it. - 6. `waitTime75Percentile`: Valid only when `queueingMethod` is **random** and - `waitTimeKnown` is **true**. Integer indicating the current estimated maximum - wait time for the 75% of users that gain entry the fastest (75th percentile). - 7. `waitTimeFormatted`: String displaying the `waitTime` formatted in English - for users. If `waitTimeKnown` is **false**, `waitTimeFormatted` will display - **unavailable**. - 8. `queueIsFull`: Boolean indicating if the waiting room's queue is currently - full and not accepting new users at the moment. - 9. `queueAll`: Boolean indicating if all users will be queued in the waiting - room and no one will be let into the origin website. - 10. `lastUpdated`: String displaying the timestamp as an ISO 8601 string of the - user's last attempt to leave the waiting room and be let into the origin - website. The user is able to make another attempt after - `refreshIntervalSeconds` past this time. If the user makes a request too - soon, it will be ignored and `lastUpdated` will not change. - 11. `refreshIntervalSeconds`: Integer indicating the number of seconds after - `lastUpdated` until the user is able to make another attempt to leave the - waiting room and be let into the origin website. When the `queueingMethod` - is `reject`, there is no specified refresh time — it will always be - **zero**. - 12. `queueingMethod`: The queueing method currently used by the waiting room. It - is either **fifo**, **random**, **passthrough**, or **reject**. - 13. `isFIFOQueue`: Boolean indicating if the waiting room uses a FIFO - (First-In-First-Out) queue. - 14. `isRandomQueue`: Boolean indicating if the waiting room uses a Random queue - where users gain access randomly. - 15. `isPassthroughQueue`: Boolean indicating if the waiting room uses a - passthrough queue. Keep in mind that when passthrough is enabled, this JSON - response will only exist when `queueAll` is **true** or `isEventPrequeueing` - is **true** because in all other cases requests will go directly to the - origin. - 16. `isRejectQueue`: Boolean indicating if the waiting room uses a reject queue. - 17. `isEventActive`: Boolean indicating if an event is currently occurring. - Events are able to change a waiting room's behavior during a specified - period of time. For additional information, look at the event properties - `prequeue_start_time`, `event_start_time`, and `event_end_time` in the - documentation for creating waiting room events. Events are considered active - between these start and end times, as well as during the prequeueing period - if it exists. - 18. `isEventPrequeueing`: Valid only when `isEventActive` is **true**. Boolean - indicating if an event is currently prequeueing users before it starts. - 19. `timeUntilEventStart`: Valid only when `isEventPrequeueing` is **true**. - Integer indicating the number of minutes until the event starts. - 20. `timeUntilEventStartFormatted`: String displaying the `timeUntilEventStart` - formatted in English for users. If `isEventPrequeueing` is **false**, - `timeUntilEventStartFormatted` will display **unavailable**. - 21. `timeUntilEventEnd`: Valid only when `isEventActive` is **true**. Integer - indicating the number of minutes until the event ends. - 22. `timeUntilEventEndFormatted`: String displaying the `timeUntilEventEnd` - formatted in English for users. If `isEventActive` is **false**, - `timeUntilEventEndFormatted` will display **unavailable**. - 23. `shuffleAtEventStart`: Valid only when `isEventActive` is **true**. Boolean - indicating if the users in the prequeue are shuffled randomly when the event - starts. - - An example cURL to a waiting room could be: - - curl -X GET "https://example.com/waitingroom" \\ - -H "Accept: application/json" - - If `json_response_enabled` is **true** and the request hits the waiting room, an - example JSON response when `queueingMethod` is **fifo** and no event is active - could be: - - { - "cfWaitingRoom": { - "inWaitingRoom": true, - "waitTimeKnown": true, - "waitTime": 10, - "waitTime25Percentile": 0, - "waitTime50Percentile": 0, - "waitTime75Percentile": 0, - "waitTimeFormatted": "10 minutes", - "queueIsFull": false, - "queueAll": false, - "lastUpdated": "2020-08-03T23:46:00.000Z", - "refreshIntervalSeconds": 20, - "queueingMethod": "fifo", - "isFIFOQueue": true, - "isRandomQueue": false, - "isPassthroughQueue": false, - "isRejectQueue": false, - "isEventActive": false, - "isEventPrequeueing": false, - "timeUntilEventStart": 0, - "timeUntilEventStartFormatted": "unavailable", - "timeUntilEventEnd": 0, - "timeUntilEventEndFormatted": "unavailable", - "shuffleAtEventStart": false - } - } - - If `json_response_enabled` is **true** and the request hits the waiting room, an - example JSON response when `queueingMethod` is **random** and an event is active - could be: - - { - "cfWaitingRoom": { - "inWaitingRoom": true, - "waitTimeKnown": true, - "waitTime": 10, - "waitTime25Percentile": 5, - "waitTime50Percentile": 10, - "waitTime75Percentile": 15, - "waitTimeFormatted": "5 minutes to 15 minutes", - "queueIsFull": false, - "queueAll": false, - "lastUpdated": "2020-08-03T23:46:00.000Z", - "refreshIntervalSeconds": 20, - "queueingMethod": "random", - "isFIFOQueue": false, - "isRandomQueue": true, - "isPassthroughQueue": false, - "isRejectQueue": false, - "isEventActive": true, - "isEventPrequeueing": false, - "timeUntilEventStart": 0, - "timeUntilEventStartFormatted": "unavailable", - "timeUntilEventEnd": 15, - "timeUntilEventEndFormatted": "15 minutes", - "shuffleAtEventStart": true - } - }. - """ - - modified_on: Optional[datetime] = None - - name: Optional[str] = None - """A unique name to identify the waiting room. - - Only alphanumeric characters, hyphens and underscores are allowed. - """ - - new_users_per_minute: Optional[int] = None - """Sets the number of new users that will be let into the route every minute. - - This value is used as baseline for the number of users that are let in per - minute. So it is possible that there is a little more or little less traffic - coming to the route based on the traffic patterns at that time around the world. - """ - - next_event_prequeue_start_time: Optional[str] = None - """An ISO 8601 timestamp that marks when the next event will begin queueing.""" - - next_event_start_time: Optional[str] = None - """An ISO 8601 timestamp that marks when the next event will start.""" - - path: Optional[str] = None - """Sets the path within the host to enable the waiting room on. - - The waiting room will be enabled for all subpaths as well. If there are two - waiting rooms on the same subpath, the waiting room for the most specific path - will be chosen. Wildcards and query parameters are not supported. - """ - - queue_all: Optional[bool] = None - """ - If queue_all is `true`, all the traffic that is coming to a route will be sent - to the waiting room. No new traffic can get to the route once this field is set - and estimated time will become unavailable. - """ - - queueing_method: Optional[Literal["fifo", "random", "passthrough", "reject"]] = None - """Sets the queueing method used by the waiting room. - - Changing this parameter from the **default** queueing method is only available - for the Waiting Room Advanced subscription. Regardless of the queueing method, - if `queue_all` is enabled or an event is prequeueing, users in the waiting room - will not be accepted to the origin. These users will always see a waiting room - page that refreshes automatically. The valid queueing methods are: - - 1. `fifo` **(default)**: First-In-First-Out queue where customers gain access in - the order they arrived. - 2. `random`: Random queue where customers gain access randomly, regardless of - arrival time. - 3. `passthrough`: Users will pass directly through the waiting room and into the - origin website. As a result, any configured limits will not be respected - while this is enabled. This method can be used as an alternative to disabling - a waiting room (with `suspended`) so that analytics are still reported. This - can be used if you wish to allow all traffic normally, but want to restrict - traffic during a waiting room event, or vice versa. - 4. `reject`: Users will be immediately rejected from the waiting room. As a - result, no users will reach the origin website while this is enabled. This - can be used if you wish to reject all traffic while performing maintenance, - block traffic during a specified period of time (an event), or block traffic - while events are not occurring. Consider a waiting room used for vaccine - distribution that only allows traffic during sign-up events, and otherwise - blocks all traffic. For this case, the waiting room uses `reject`, and its - events override this with `fifo`, `random`, or `passthrough`. When this - queueing method is enabled and neither `queueAll` is enabled nor an event is - prequeueing, the waiting room page **will not refresh automatically**. - """ - - queueing_status_code: Optional[Literal[200, 202, 429]] = None - """HTTP status code returned to a user while in the queue.""" - - session_duration: Optional[int] = None - """ - Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to - the route. If a user is not seen by Cloudflare again in that time period, they - will be treated as a new user that visits the route. - """ - - suspended: Optional[bool] = None - """Suspends or allows traffic going to the waiting room. - - If set to `true`, the traffic will not go to the waiting room. - """ - - total_active_users: Optional[int] = None - """Sets the total number of active user sessions on the route at a point in time. - - A route is a combination of host and path on which a waiting room is available. - This value is used as a baseline for the total number of active user sessions on - the route. It is possible to have a situation where there are more or less - active users sessions on the route based on the traffic patterns at that time - around the world. - """ diff --git a/src/cloudflare/types/waiting_room_edit_response.py b/src/cloudflare/types/waiting_room_edit_response.py deleted file mode 100644 index 0bffb83f9..000000000 --- a/src/cloudflare/types/waiting_room_edit_response.py +++ /dev/null @@ -1,388 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["WaitingRoomEditResponse", "AdditionalRoute", "CookieAttributes"] - - -class AdditionalRoute(BaseModel): - host: Optional[str] = None - """The hostname to which this waiting room will be applied (no wildcards). - - The hostname must be the primary domain, subdomain, or custom hostname (if using - SSL for SaaS) of this zone. Please do not include the scheme (http:// or - https://). - """ - - path: Optional[str] = None - """Sets the path within the host to enable the waiting room on. - - The waiting room will be enabled for all subpaths as well. If there are two - waiting rooms on the same subpath, the waiting room for the most specific path - will be chosen. Wildcards and query parameters are not supported. - """ - - -class CookieAttributes(BaseModel): - samesite: Optional[Literal["auto", "lax", "none", "strict"]] = None - """Configures the SameSite attribute on the waiting room cookie. - - Value `auto` will be translated to `lax` or `none` depending if **Always Use - HTTPS** is enabled. Note that when using value `none`, the secure attribute - cannot be set to `never`. - """ - - secure: Optional[Literal["auto", "always", "never"]] = None - """Configures the Secure attribute on the waiting room cookie. - - Value `always` indicates that the Secure attribute will be set in the Set-Cookie - header, `never` indicates that the Secure attribute will not be set, and `auto` - will set the Secure attribute depending if **Always Use HTTPS** is enabled. - """ - - -class WaitingRoomEditResponse(BaseModel): - id: Optional[object] = None - - additional_routes: Optional[List[AdditionalRoute]] = None - """Only available for the Waiting Room Advanced subscription. - - Additional hostname and path combinations to which this waiting room will be - applied. There is an implied wildcard at the end of the path. The hostname and - path combination must be unique to this and all other waiting rooms. - """ - - cookie_attributes: Optional[CookieAttributes] = None - """Configures cookie attributes for the waiting room cookie. - - This encrypted cookie stores a user's status in the waiting room, such as queue - position. - """ - - cookie_suffix: Optional[str] = None - """ - Appends a '\\__' + a custom suffix to the end of Cloudflare Waiting Room's cookie - name(**cf_waitingroom). If `cookie_suffix` is "abcd", the cookie name will be - `**cf_waitingroom_abcd`. This field is required if using `additional_routes`. - """ - - created_on: Optional[datetime] = None - - custom_page_html: Optional[str] = None - """Only available for the Waiting Room Advanced subscription. - - This is a template html file that will be rendered at the edge. If no - custom_page_html is provided, the default waiting room will be used. The - template is based on mustache ( https://mustache.github.io/ ). There are several - variables that are evaluated by the Cloudflare edge: - - 1. {{`waitTimeKnown`}} Acts like a boolean value that indicates the behavior to - take when wait time is not available, for instance when queue_all is - **true**. - 2. {{`waitTimeFormatted`}} Estimated wait time for the user. For example, five - minutes. Alternatively, you can use: - 3. {{`waitTime`}} Number of minutes of estimated wait for a user. - 4. {{`waitTimeHours`}} Number of hours of estimated wait for a user - (`Math.floor(waitTime/60)`). - 5. {{`waitTimeHourMinutes`}} Number of minutes above the `waitTimeHours` value - (`waitTime%60`). - 6. {{`queueIsFull`}} Changes to **true** when no more people can be added to the - queue. - - To view the full list of variables, look at the `cfWaitingRoom` object described - under the `json_response_enabled` property in other Waiting Room API calls. - """ - - default_template_language: Optional[ - Literal[ - "en-US", - "es-ES", - "de-DE", - "fr-FR", - "it-IT", - "ja-JP", - "ko-KR", - "pt-BR", - "zh-CN", - "zh-TW", - "nl-NL", - "pl-PL", - "id-ID", - "tr-TR", - "ar-EG", - "ru-RU", - "fa-IR", - ] - ] = None - """The language of the default page template. - - If no default_template_language is provided, then `en-US` (English) will be - used. - """ - - description: Optional[str] = None - """A note that you can use to add more details about the waiting room.""" - - disable_session_renewal: Optional[bool] = None - """Only available for the Waiting Room Advanced subscription. - - Disables automatic renewal of session cookies. If `true`, an accepted user will - have session_duration minutes to browse the site. After that, they will have to - go through the waiting room again. If `false`, a user's session cookie will be - automatically renewed on every request. - """ - - host: Optional[str] = None - """The host name to which the waiting room will be applied (no wildcards). - - Please do not include the scheme (http:// or https://). The host and path - combination must be unique. - """ - - json_response_enabled: Optional[bool] = None - """Only available for the Waiting Room Advanced subscription. - - If `true`, requests to the waiting room with the header - `Accept: application/json` will receive a JSON response object with information - on the user's status in the waiting room as opposed to the configured static - HTML page. This JSON response object has one property `cfWaitingRoom` which is - an object containing the following fields: - - 1. `inWaitingRoom`: Boolean indicating if the user is in the waiting room - (always **true**). - 2. `waitTimeKnown`: Boolean indicating if the current estimated wait times are - accurate. If **false**, they are not available. - 3. `waitTime`: Valid only when `waitTimeKnown` is **true**. Integer indicating - the current estimated time in minutes the user will wait in the waiting room. - When `queueingMethod` is **random**, this is set to `waitTime50Percentile`. - 4. `waitTime25Percentile`: Valid only when `queueingMethod` is **random** and - `waitTimeKnown` is **true**. Integer indicating the current estimated maximum - wait time for the 25% of users that gain entry the fastest (25th percentile). - 5. `waitTime50Percentile`: Valid only when `queueingMethod` is **random** and - `waitTimeKnown` is **true**. Integer indicating the current estimated maximum - wait time for the 50% of users that gain entry the fastest (50th percentile). - In other words, half of the queued users are expected to let into the origin - website before `waitTime50Percentile` and half are expected to be let in - after it. - 6. `waitTime75Percentile`: Valid only when `queueingMethod` is **random** and - `waitTimeKnown` is **true**. Integer indicating the current estimated maximum - wait time for the 75% of users that gain entry the fastest (75th percentile). - 7. `waitTimeFormatted`: String displaying the `waitTime` formatted in English - for users. If `waitTimeKnown` is **false**, `waitTimeFormatted` will display - **unavailable**. - 8. `queueIsFull`: Boolean indicating if the waiting room's queue is currently - full and not accepting new users at the moment. - 9. `queueAll`: Boolean indicating if all users will be queued in the waiting - room and no one will be let into the origin website. - 10. `lastUpdated`: String displaying the timestamp as an ISO 8601 string of the - user's last attempt to leave the waiting room and be let into the origin - website. The user is able to make another attempt after - `refreshIntervalSeconds` past this time. If the user makes a request too - soon, it will be ignored and `lastUpdated` will not change. - 11. `refreshIntervalSeconds`: Integer indicating the number of seconds after - `lastUpdated` until the user is able to make another attempt to leave the - waiting room and be let into the origin website. When the `queueingMethod` - is `reject`, there is no specified refresh time — it will always be - **zero**. - 12. `queueingMethod`: The queueing method currently used by the waiting room. It - is either **fifo**, **random**, **passthrough**, or **reject**. - 13. `isFIFOQueue`: Boolean indicating if the waiting room uses a FIFO - (First-In-First-Out) queue. - 14. `isRandomQueue`: Boolean indicating if the waiting room uses a Random queue - where users gain access randomly. - 15. `isPassthroughQueue`: Boolean indicating if the waiting room uses a - passthrough queue. Keep in mind that when passthrough is enabled, this JSON - response will only exist when `queueAll` is **true** or `isEventPrequeueing` - is **true** because in all other cases requests will go directly to the - origin. - 16. `isRejectQueue`: Boolean indicating if the waiting room uses a reject queue. - 17. `isEventActive`: Boolean indicating if an event is currently occurring. - Events are able to change a waiting room's behavior during a specified - period of time. For additional information, look at the event properties - `prequeue_start_time`, `event_start_time`, and `event_end_time` in the - documentation for creating waiting room events. Events are considered active - between these start and end times, as well as during the prequeueing period - if it exists. - 18. `isEventPrequeueing`: Valid only when `isEventActive` is **true**. Boolean - indicating if an event is currently prequeueing users before it starts. - 19. `timeUntilEventStart`: Valid only when `isEventPrequeueing` is **true**. - Integer indicating the number of minutes until the event starts. - 20. `timeUntilEventStartFormatted`: String displaying the `timeUntilEventStart` - formatted in English for users. If `isEventPrequeueing` is **false**, - `timeUntilEventStartFormatted` will display **unavailable**. - 21. `timeUntilEventEnd`: Valid only when `isEventActive` is **true**. Integer - indicating the number of minutes until the event ends. - 22. `timeUntilEventEndFormatted`: String displaying the `timeUntilEventEnd` - formatted in English for users. If `isEventActive` is **false**, - `timeUntilEventEndFormatted` will display **unavailable**. - 23. `shuffleAtEventStart`: Valid only when `isEventActive` is **true**. Boolean - indicating if the users in the prequeue are shuffled randomly when the event - starts. - - An example cURL to a waiting room could be: - - curl -X GET "https://example.com/waitingroom" \\ - -H "Accept: application/json" - - If `json_response_enabled` is **true** and the request hits the waiting room, an - example JSON response when `queueingMethod` is **fifo** and no event is active - could be: - - { - "cfWaitingRoom": { - "inWaitingRoom": true, - "waitTimeKnown": true, - "waitTime": 10, - "waitTime25Percentile": 0, - "waitTime50Percentile": 0, - "waitTime75Percentile": 0, - "waitTimeFormatted": "10 minutes", - "queueIsFull": false, - "queueAll": false, - "lastUpdated": "2020-08-03T23:46:00.000Z", - "refreshIntervalSeconds": 20, - "queueingMethod": "fifo", - "isFIFOQueue": true, - "isRandomQueue": false, - "isPassthroughQueue": false, - "isRejectQueue": false, - "isEventActive": false, - "isEventPrequeueing": false, - "timeUntilEventStart": 0, - "timeUntilEventStartFormatted": "unavailable", - "timeUntilEventEnd": 0, - "timeUntilEventEndFormatted": "unavailable", - "shuffleAtEventStart": false - } - } - - If `json_response_enabled` is **true** and the request hits the waiting room, an - example JSON response when `queueingMethod` is **random** and an event is active - could be: - - { - "cfWaitingRoom": { - "inWaitingRoom": true, - "waitTimeKnown": true, - "waitTime": 10, - "waitTime25Percentile": 5, - "waitTime50Percentile": 10, - "waitTime75Percentile": 15, - "waitTimeFormatted": "5 minutes to 15 minutes", - "queueIsFull": false, - "queueAll": false, - "lastUpdated": "2020-08-03T23:46:00.000Z", - "refreshIntervalSeconds": 20, - "queueingMethod": "random", - "isFIFOQueue": false, - "isRandomQueue": true, - "isPassthroughQueue": false, - "isRejectQueue": false, - "isEventActive": true, - "isEventPrequeueing": false, - "timeUntilEventStart": 0, - "timeUntilEventStartFormatted": "unavailable", - "timeUntilEventEnd": 15, - "timeUntilEventEndFormatted": "15 minutes", - "shuffleAtEventStart": true - } - }. - """ - - modified_on: Optional[datetime] = None - - name: Optional[str] = None - """A unique name to identify the waiting room. - - Only alphanumeric characters, hyphens and underscores are allowed. - """ - - new_users_per_minute: Optional[int] = None - """Sets the number of new users that will be let into the route every minute. - - This value is used as baseline for the number of users that are let in per - minute. So it is possible that there is a little more or little less traffic - coming to the route based on the traffic patterns at that time around the world. - """ - - next_event_prequeue_start_time: Optional[str] = None - """An ISO 8601 timestamp that marks when the next event will begin queueing.""" - - next_event_start_time: Optional[str] = None - """An ISO 8601 timestamp that marks when the next event will start.""" - - path: Optional[str] = None - """Sets the path within the host to enable the waiting room on. - - The waiting room will be enabled for all subpaths as well. If there are two - waiting rooms on the same subpath, the waiting room for the most specific path - will be chosen. Wildcards and query parameters are not supported. - """ - - queue_all: Optional[bool] = None - """ - If queue_all is `true`, all the traffic that is coming to a route will be sent - to the waiting room. No new traffic can get to the route once this field is set - and estimated time will become unavailable. - """ - - queueing_method: Optional[Literal["fifo", "random", "passthrough", "reject"]] = None - """Sets the queueing method used by the waiting room. - - Changing this parameter from the **default** queueing method is only available - for the Waiting Room Advanced subscription. Regardless of the queueing method, - if `queue_all` is enabled or an event is prequeueing, users in the waiting room - will not be accepted to the origin. These users will always see a waiting room - page that refreshes automatically. The valid queueing methods are: - - 1. `fifo` **(default)**: First-In-First-Out queue where customers gain access in - the order they arrived. - 2. `random`: Random queue where customers gain access randomly, regardless of - arrival time. - 3. `passthrough`: Users will pass directly through the waiting room and into the - origin website. As a result, any configured limits will not be respected - while this is enabled. This method can be used as an alternative to disabling - a waiting room (with `suspended`) so that analytics are still reported. This - can be used if you wish to allow all traffic normally, but want to restrict - traffic during a waiting room event, or vice versa. - 4. `reject`: Users will be immediately rejected from the waiting room. As a - result, no users will reach the origin website while this is enabled. This - can be used if you wish to reject all traffic while performing maintenance, - block traffic during a specified period of time (an event), or block traffic - while events are not occurring. Consider a waiting room used for vaccine - distribution that only allows traffic during sign-up events, and otherwise - blocks all traffic. For this case, the waiting room uses `reject`, and its - events override this with `fifo`, `random`, or `passthrough`. When this - queueing method is enabled and neither `queueAll` is enabled nor an event is - prequeueing, the waiting room page **will not refresh automatically**. - """ - - queueing_status_code: Optional[Literal[200, 202, 429]] = None - """HTTP status code returned to a user while in the queue.""" - - session_duration: Optional[int] = None - """ - Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to - the route. If a user is not seen by Cloudflare again in that time period, they - will be treated as a new user that visits the route. - """ - - suspended: Optional[bool] = None - """Suspends or allows traffic going to the waiting room. - - If set to `true`, the traffic will not go to the waiting room. - """ - - total_active_users: Optional[int] = None - """Sets the total number of active user sessions on the route at a point in time. - - A route is a combination of host and path on which a waiting room is available. - This value is used as a baseline for the total number of active user sessions on - the route. It is possible to have a situation where there are more or less - active users sessions on the route based on the traffic patterns at that time - around the world. - """ diff --git a/src/cloudflare/types/waiting_room_list_response.py b/src/cloudflare/types/waiting_room_list_response.py index f09bc58fb..177930a5f 100644 --- a/src/cloudflare/types/waiting_room_list_response.py +++ b/src/cloudflare/types/waiting_room_list_response.py @@ -1,396 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from .._models import BaseModel +from .waitingroom_waitingroom import WaitingroomWaitingroom -__all__ = [ - "WaitingRoomListResponse", - "WaitingRoomListResponseItem", - "WaitingRoomListResponseItemAdditionalRoute", - "WaitingRoomListResponseItemCookieAttributes", -] +__all__ = ["WaitingRoomListResponse"] - -class WaitingRoomListResponseItemAdditionalRoute(BaseModel): - host: Optional[str] = None - """The hostname to which this waiting room will be applied (no wildcards). - - The hostname must be the primary domain, subdomain, or custom hostname (if using - SSL for SaaS) of this zone. Please do not include the scheme (http:// or - https://). - """ - - path: Optional[str] = None - """Sets the path within the host to enable the waiting room on. - - The waiting room will be enabled for all subpaths as well. If there are two - waiting rooms on the same subpath, the waiting room for the most specific path - will be chosen. Wildcards and query parameters are not supported. - """ - - -class WaitingRoomListResponseItemCookieAttributes(BaseModel): - samesite: Optional[Literal["auto", "lax", "none", "strict"]] = None - """Configures the SameSite attribute on the waiting room cookie. - - Value `auto` will be translated to `lax` or `none` depending if **Always Use - HTTPS** is enabled. Note that when using value `none`, the secure attribute - cannot be set to `never`. - """ - - secure: Optional[Literal["auto", "always", "never"]] = None - """Configures the Secure attribute on the waiting room cookie. - - Value `always` indicates that the Secure attribute will be set in the Set-Cookie - header, `never` indicates that the Secure attribute will not be set, and `auto` - will set the Secure attribute depending if **Always Use HTTPS** is enabled. - """ - - -class WaitingRoomListResponseItem(BaseModel): - id: Optional[object] = None - - additional_routes: Optional[List[WaitingRoomListResponseItemAdditionalRoute]] = None - """Only available for the Waiting Room Advanced subscription. - - Additional hostname and path combinations to which this waiting room will be - applied. There is an implied wildcard at the end of the path. The hostname and - path combination must be unique to this and all other waiting rooms. - """ - - cookie_attributes: Optional[WaitingRoomListResponseItemCookieAttributes] = None - """Configures cookie attributes for the waiting room cookie. - - This encrypted cookie stores a user's status in the waiting room, such as queue - position. - """ - - cookie_suffix: Optional[str] = None - """ - Appends a '\\__' + a custom suffix to the end of Cloudflare Waiting Room's cookie - name(**cf_waitingroom). If `cookie_suffix` is "abcd", the cookie name will be - `**cf_waitingroom_abcd`. This field is required if using `additional_routes`. - """ - - created_on: Optional[datetime] = None - - custom_page_html: Optional[str] = None - """Only available for the Waiting Room Advanced subscription. - - This is a template html file that will be rendered at the edge. If no - custom_page_html is provided, the default waiting room will be used. The - template is based on mustache ( https://mustache.github.io/ ). There are several - variables that are evaluated by the Cloudflare edge: - - 1. {{`waitTimeKnown`}} Acts like a boolean value that indicates the behavior to - take when wait time is not available, for instance when queue_all is - **true**. - 2. {{`waitTimeFormatted`}} Estimated wait time for the user. For example, five - minutes. Alternatively, you can use: - 3. {{`waitTime`}} Number of minutes of estimated wait for a user. - 4. {{`waitTimeHours`}} Number of hours of estimated wait for a user - (`Math.floor(waitTime/60)`). - 5. {{`waitTimeHourMinutes`}} Number of minutes above the `waitTimeHours` value - (`waitTime%60`). - 6. {{`queueIsFull`}} Changes to **true** when no more people can be added to the - queue. - - To view the full list of variables, look at the `cfWaitingRoom` object described - under the `json_response_enabled` property in other Waiting Room API calls. - """ - - default_template_language: Optional[ - Literal[ - "en-US", - "es-ES", - "de-DE", - "fr-FR", - "it-IT", - "ja-JP", - "ko-KR", - "pt-BR", - "zh-CN", - "zh-TW", - "nl-NL", - "pl-PL", - "id-ID", - "tr-TR", - "ar-EG", - "ru-RU", - "fa-IR", - ] - ] = None - """The language of the default page template. - - If no default_template_language is provided, then `en-US` (English) will be - used. - """ - - description: Optional[str] = None - """A note that you can use to add more details about the waiting room.""" - - disable_session_renewal: Optional[bool] = None - """Only available for the Waiting Room Advanced subscription. - - Disables automatic renewal of session cookies. If `true`, an accepted user will - have session_duration minutes to browse the site. After that, they will have to - go through the waiting room again. If `false`, a user's session cookie will be - automatically renewed on every request. - """ - - host: Optional[str] = None - """The host name to which the waiting room will be applied (no wildcards). - - Please do not include the scheme (http:// or https://). The host and path - combination must be unique. - """ - - json_response_enabled: Optional[bool] = None - """Only available for the Waiting Room Advanced subscription. - - If `true`, requests to the waiting room with the header - `Accept: application/json` will receive a JSON response object with information - on the user's status in the waiting room as opposed to the configured static - HTML page. This JSON response object has one property `cfWaitingRoom` which is - an object containing the following fields: - - 1. `inWaitingRoom`: Boolean indicating if the user is in the waiting room - (always **true**). - 2. `waitTimeKnown`: Boolean indicating if the current estimated wait times are - accurate. If **false**, they are not available. - 3. `waitTime`: Valid only when `waitTimeKnown` is **true**. Integer indicating - the current estimated time in minutes the user will wait in the waiting room. - When `queueingMethod` is **random**, this is set to `waitTime50Percentile`. - 4. `waitTime25Percentile`: Valid only when `queueingMethod` is **random** and - `waitTimeKnown` is **true**. Integer indicating the current estimated maximum - wait time for the 25% of users that gain entry the fastest (25th percentile). - 5. `waitTime50Percentile`: Valid only when `queueingMethod` is **random** and - `waitTimeKnown` is **true**. Integer indicating the current estimated maximum - wait time for the 50% of users that gain entry the fastest (50th percentile). - In other words, half of the queued users are expected to let into the origin - website before `waitTime50Percentile` and half are expected to be let in - after it. - 6. `waitTime75Percentile`: Valid only when `queueingMethod` is **random** and - `waitTimeKnown` is **true**. Integer indicating the current estimated maximum - wait time for the 75% of users that gain entry the fastest (75th percentile). - 7. `waitTimeFormatted`: String displaying the `waitTime` formatted in English - for users. If `waitTimeKnown` is **false**, `waitTimeFormatted` will display - **unavailable**. - 8. `queueIsFull`: Boolean indicating if the waiting room's queue is currently - full and not accepting new users at the moment. - 9. `queueAll`: Boolean indicating if all users will be queued in the waiting - room and no one will be let into the origin website. - 10. `lastUpdated`: String displaying the timestamp as an ISO 8601 string of the - user's last attempt to leave the waiting room and be let into the origin - website. The user is able to make another attempt after - `refreshIntervalSeconds` past this time. If the user makes a request too - soon, it will be ignored and `lastUpdated` will not change. - 11. `refreshIntervalSeconds`: Integer indicating the number of seconds after - `lastUpdated` until the user is able to make another attempt to leave the - waiting room and be let into the origin website. When the `queueingMethod` - is `reject`, there is no specified refresh time — it will always be - **zero**. - 12. `queueingMethod`: The queueing method currently used by the waiting room. It - is either **fifo**, **random**, **passthrough**, or **reject**. - 13. `isFIFOQueue`: Boolean indicating if the waiting room uses a FIFO - (First-In-First-Out) queue. - 14. `isRandomQueue`: Boolean indicating if the waiting room uses a Random queue - where users gain access randomly. - 15. `isPassthroughQueue`: Boolean indicating if the waiting room uses a - passthrough queue. Keep in mind that when passthrough is enabled, this JSON - response will only exist when `queueAll` is **true** or `isEventPrequeueing` - is **true** because in all other cases requests will go directly to the - origin. - 16. `isRejectQueue`: Boolean indicating if the waiting room uses a reject queue. - 17. `isEventActive`: Boolean indicating if an event is currently occurring. - Events are able to change a waiting room's behavior during a specified - period of time. For additional information, look at the event properties - `prequeue_start_time`, `event_start_time`, and `event_end_time` in the - documentation for creating waiting room events. Events are considered active - between these start and end times, as well as during the prequeueing period - if it exists. - 18. `isEventPrequeueing`: Valid only when `isEventActive` is **true**. Boolean - indicating if an event is currently prequeueing users before it starts. - 19. `timeUntilEventStart`: Valid only when `isEventPrequeueing` is **true**. - Integer indicating the number of minutes until the event starts. - 20. `timeUntilEventStartFormatted`: String displaying the `timeUntilEventStart` - formatted in English for users. If `isEventPrequeueing` is **false**, - `timeUntilEventStartFormatted` will display **unavailable**. - 21. `timeUntilEventEnd`: Valid only when `isEventActive` is **true**. Integer - indicating the number of minutes until the event ends. - 22. `timeUntilEventEndFormatted`: String displaying the `timeUntilEventEnd` - formatted in English for users. If `isEventActive` is **false**, - `timeUntilEventEndFormatted` will display **unavailable**. - 23. `shuffleAtEventStart`: Valid only when `isEventActive` is **true**. Boolean - indicating if the users in the prequeue are shuffled randomly when the event - starts. - - An example cURL to a waiting room could be: - - curl -X GET "https://example.com/waitingroom" \\ - -H "Accept: application/json" - - If `json_response_enabled` is **true** and the request hits the waiting room, an - example JSON response when `queueingMethod` is **fifo** and no event is active - could be: - - { - "cfWaitingRoom": { - "inWaitingRoom": true, - "waitTimeKnown": true, - "waitTime": 10, - "waitTime25Percentile": 0, - "waitTime50Percentile": 0, - "waitTime75Percentile": 0, - "waitTimeFormatted": "10 minutes", - "queueIsFull": false, - "queueAll": false, - "lastUpdated": "2020-08-03T23:46:00.000Z", - "refreshIntervalSeconds": 20, - "queueingMethod": "fifo", - "isFIFOQueue": true, - "isRandomQueue": false, - "isPassthroughQueue": false, - "isRejectQueue": false, - "isEventActive": false, - "isEventPrequeueing": false, - "timeUntilEventStart": 0, - "timeUntilEventStartFormatted": "unavailable", - "timeUntilEventEnd": 0, - "timeUntilEventEndFormatted": "unavailable", - "shuffleAtEventStart": false - } - } - - If `json_response_enabled` is **true** and the request hits the waiting room, an - example JSON response when `queueingMethod` is **random** and an event is active - could be: - - { - "cfWaitingRoom": { - "inWaitingRoom": true, - "waitTimeKnown": true, - "waitTime": 10, - "waitTime25Percentile": 5, - "waitTime50Percentile": 10, - "waitTime75Percentile": 15, - "waitTimeFormatted": "5 minutes to 15 minutes", - "queueIsFull": false, - "queueAll": false, - "lastUpdated": "2020-08-03T23:46:00.000Z", - "refreshIntervalSeconds": 20, - "queueingMethod": "random", - "isFIFOQueue": false, - "isRandomQueue": true, - "isPassthroughQueue": false, - "isRejectQueue": false, - "isEventActive": true, - "isEventPrequeueing": false, - "timeUntilEventStart": 0, - "timeUntilEventStartFormatted": "unavailable", - "timeUntilEventEnd": 15, - "timeUntilEventEndFormatted": "15 minutes", - "shuffleAtEventStart": true - } - }. - """ - - modified_on: Optional[datetime] = None - - name: Optional[str] = None - """A unique name to identify the waiting room. - - Only alphanumeric characters, hyphens and underscores are allowed. - """ - - new_users_per_minute: Optional[int] = None - """Sets the number of new users that will be let into the route every minute. - - This value is used as baseline for the number of users that are let in per - minute. So it is possible that there is a little more or little less traffic - coming to the route based on the traffic patterns at that time around the world. - """ - - next_event_prequeue_start_time: Optional[str] = None - """An ISO 8601 timestamp that marks when the next event will begin queueing.""" - - next_event_start_time: Optional[str] = None - """An ISO 8601 timestamp that marks when the next event will start.""" - - path: Optional[str] = None - """Sets the path within the host to enable the waiting room on. - - The waiting room will be enabled for all subpaths as well. If there are two - waiting rooms on the same subpath, the waiting room for the most specific path - will be chosen. Wildcards and query parameters are not supported. - """ - - queue_all: Optional[bool] = None - """ - If queue_all is `true`, all the traffic that is coming to a route will be sent - to the waiting room. No new traffic can get to the route once this field is set - and estimated time will become unavailable. - """ - - queueing_method: Optional[Literal["fifo", "random", "passthrough", "reject"]] = None - """Sets the queueing method used by the waiting room. - - Changing this parameter from the **default** queueing method is only available - for the Waiting Room Advanced subscription. Regardless of the queueing method, - if `queue_all` is enabled or an event is prequeueing, users in the waiting room - will not be accepted to the origin. These users will always see a waiting room - page that refreshes automatically. The valid queueing methods are: - - 1. `fifo` **(default)**: First-In-First-Out queue where customers gain access in - the order they arrived. - 2. `random`: Random queue where customers gain access randomly, regardless of - arrival time. - 3. `passthrough`: Users will pass directly through the waiting room and into the - origin website. As a result, any configured limits will not be respected - while this is enabled. This method can be used as an alternative to disabling - a waiting room (with `suspended`) so that analytics are still reported. This - can be used if you wish to allow all traffic normally, but want to restrict - traffic during a waiting room event, or vice versa. - 4. `reject`: Users will be immediately rejected from the waiting room. As a - result, no users will reach the origin website while this is enabled. This - can be used if you wish to reject all traffic while performing maintenance, - block traffic during a specified period of time (an event), or block traffic - while events are not occurring. Consider a waiting room used for vaccine - distribution that only allows traffic during sign-up events, and otherwise - blocks all traffic. For this case, the waiting room uses `reject`, and its - events override this with `fifo`, `random`, or `passthrough`. When this - queueing method is enabled and neither `queueAll` is enabled nor an event is - prequeueing, the waiting room page **will not refresh automatically**. - """ - - queueing_status_code: Optional[Literal[200, 202, 429]] = None - """HTTP status code returned to a user while in the queue.""" - - session_duration: Optional[int] = None - """ - Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to - the route. If a user is not seen by Cloudflare again in that time period, they - will be treated as a new user that visits the route. - """ - - suspended: Optional[bool] = None - """Suspends or allows traffic going to the waiting room. - - If set to `true`, the traffic will not go to the waiting room. - """ - - total_active_users: Optional[int] = None - """Sets the total number of active user sessions on the route at a point in time. - - A route is a combination of host and path on which a waiting room is available. - This value is used as a baseline for the total number of active user sessions on - the route. It is possible to have a situation where there are more or less - active users sessions on the route based on the traffic patterns at that time - around the world. - """ - - -WaitingRoomListResponse = List[WaitingRoomListResponseItem] +WaitingRoomListResponse = List[WaitingroomWaitingroom] diff --git a/src/cloudflare/types/waiting_room_update_response.py b/src/cloudflare/types/waiting_room_update_response.py deleted file mode 100644 index 92963736a..000000000 --- a/src/cloudflare/types/waiting_room_update_response.py +++ /dev/null @@ -1,388 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["WaitingRoomUpdateResponse", "AdditionalRoute", "CookieAttributes"] - - -class AdditionalRoute(BaseModel): - host: Optional[str] = None - """The hostname to which this waiting room will be applied (no wildcards). - - The hostname must be the primary domain, subdomain, or custom hostname (if using - SSL for SaaS) of this zone. Please do not include the scheme (http:// or - https://). - """ - - path: Optional[str] = None - """Sets the path within the host to enable the waiting room on. - - The waiting room will be enabled for all subpaths as well. If there are two - waiting rooms on the same subpath, the waiting room for the most specific path - will be chosen. Wildcards and query parameters are not supported. - """ - - -class CookieAttributes(BaseModel): - samesite: Optional[Literal["auto", "lax", "none", "strict"]] = None - """Configures the SameSite attribute on the waiting room cookie. - - Value `auto` will be translated to `lax` or `none` depending if **Always Use - HTTPS** is enabled. Note that when using value `none`, the secure attribute - cannot be set to `never`. - """ - - secure: Optional[Literal["auto", "always", "never"]] = None - """Configures the Secure attribute on the waiting room cookie. - - Value `always` indicates that the Secure attribute will be set in the Set-Cookie - header, `never` indicates that the Secure attribute will not be set, and `auto` - will set the Secure attribute depending if **Always Use HTTPS** is enabled. - """ - - -class WaitingRoomUpdateResponse(BaseModel): - id: Optional[object] = None - - additional_routes: Optional[List[AdditionalRoute]] = None - """Only available for the Waiting Room Advanced subscription. - - Additional hostname and path combinations to which this waiting room will be - applied. There is an implied wildcard at the end of the path. The hostname and - path combination must be unique to this and all other waiting rooms. - """ - - cookie_attributes: Optional[CookieAttributes] = None - """Configures cookie attributes for the waiting room cookie. - - This encrypted cookie stores a user's status in the waiting room, such as queue - position. - """ - - cookie_suffix: Optional[str] = None - """ - Appends a '\\__' + a custom suffix to the end of Cloudflare Waiting Room's cookie - name(**cf_waitingroom). If `cookie_suffix` is "abcd", the cookie name will be - `**cf_waitingroom_abcd`. This field is required if using `additional_routes`. - """ - - created_on: Optional[datetime] = None - - custom_page_html: Optional[str] = None - """Only available for the Waiting Room Advanced subscription. - - This is a template html file that will be rendered at the edge. If no - custom_page_html is provided, the default waiting room will be used. The - template is based on mustache ( https://mustache.github.io/ ). There are several - variables that are evaluated by the Cloudflare edge: - - 1. {{`waitTimeKnown`}} Acts like a boolean value that indicates the behavior to - take when wait time is not available, for instance when queue_all is - **true**. - 2. {{`waitTimeFormatted`}} Estimated wait time for the user. For example, five - minutes. Alternatively, you can use: - 3. {{`waitTime`}} Number of minutes of estimated wait for a user. - 4. {{`waitTimeHours`}} Number of hours of estimated wait for a user - (`Math.floor(waitTime/60)`). - 5. {{`waitTimeHourMinutes`}} Number of minutes above the `waitTimeHours` value - (`waitTime%60`). - 6. {{`queueIsFull`}} Changes to **true** when no more people can be added to the - queue. - - To view the full list of variables, look at the `cfWaitingRoom` object described - under the `json_response_enabled` property in other Waiting Room API calls. - """ - - default_template_language: Optional[ - Literal[ - "en-US", - "es-ES", - "de-DE", - "fr-FR", - "it-IT", - "ja-JP", - "ko-KR", - "pt-BR", - "zh-CN", - "zh-TW", - "nl-NL", - "pl-PL", - "id-ID", - "tr-TR", - "ar-EG", - "ru-RU", - "fa-IR", - ] - ] = None - """The language of the default page template. - - If no default_template_language is provided, then `en-US` (English) will be - used. - """ - - description: Optional[str] = None - """A note that you can use to add more details about the waiting room.""" - - disable_session_renewal: Optional[bool] = None - """Only available for the Waiting Room Advanced subscription. - - Disables automatic renewal of session cookies. If `true`, an accepted user will - have session_duration minutes to browse the site. After that, they will have to - go through the waiting room again. If `false`, a user's session cookie will be - automatically renewed on every request. - """ - - host: Optional[str] = None - """The host name to which the waiting room will be applied (no wildcards). - - Please do not include the scheme (http:// or https://). The host and path - combination must be unique. - """ - - json_response_enabled: Optional[bool] = None - """Only available for the Waiting Room Advanced subscription. - - If `true`, requests to the waiting room with the header - `Accept: application/json` will receive a JSON response object with information - on the user's status in the waiting room as opposed to the configured static - HTML page. This JSON response object has one property `cfWaitingRoom` which is - an object containing the following fields: - - 1. `inWaitingRoom`: Boolean indicating if the user is in the waiting room - (always **true**). - 2. `waitTimeKnown`: Boolean indicating if the current estimated wait times are - accurate. If **false**, they are not available. - 3. `waitTime`: Valid only when `waitTimeKnown` is **true**. Integer indicating - the current estimated time in minutes the user will wait in the waiting room. - When `queueingMethod` is **random**, this is set to `waitTime50Percentile`. - 4. `waitTime25Percentile`: Valid only when `queueingMethod` is **random** and - `waitTimeKnown` is **true**. Integer indicating the current estimated maximum - wait time for the 25% of users that gain entry the fastest (25th percentile). - 5. `waitTime50Percentile`: Valid only when `queueingMethod` is **random** and - `waitTimeKnown` is **true**. Integer indicating the current estimated maximum - wait time for the 50% of users that gain entry the fastest (50th percentile). - In other words, half of the queued users are expected to let into the origin - website before `waitTime50Percentile` and half are expected to be let in - after it. - 6. `waitTime75Percentile`: Valid only when `queueingMethod` is **random** and - `waitTimeKnown` is **true**. Integer indicating the current estimated maximum - wait time for the 75% of users that gain entry the fastest (75th percentile). - 7. `waitTimeFormatted`: String displaying the `waitTime` formatted in English - for users. If `waitTimeKnown` is **false**, `waitTimeFormatted` will display - **unavailable**. - 8. `queueIsFull`: Boolean indicating if the waiting room's queue is currently - full and not accepting new users at the moment. - 9. `queueAll`: Boolean indicating if all users will be queued in the waiting - room and no one will be let into the origin website. - 10. `lastUpdated`: String displaying the timestamp as an ISO 8601 string of the - user's last attempt to leave the waiting room and be let into the origin - website. The user is able to make another attempt after - `refreshIntervalSeconds` past this time. If the user makes a request too - soon, it will be ignored and `lastUpdated` will not change. - 11. `refreshIntervalSeconds`: Integer indicating the number of seconds after - `lastUpdated` until the user is able to make another attempt to leave the - waiting room and be let into the origin website. When the `queueingMethod` - is `reject`, there is no specified refresh time — it will always be - **zero**. - 12. `queueingMethod`: The queueing method currently used by the waiting room. It - is either **fifo**, **random**, **passthrough**, or **reject**. - 13. `isFIFOQueue`: Boolean indicating if the waiting room uses a FIFO - (First-In-First-Out) queue. - 14. `isRandomQueue`: Boolean indicating if the waiting room uses a Random queue - where users gain access randomly. - 15. `isPassthroughQueue`: Boolean indicating if the waiting room uses a - passthrough queue. Keep in mind that when passthrough is enabled, this JSON - response will only exist when `queueAll` is **true** or `isEventPrequeueing` - is **true** because in all other cases requests will go directly to the - origin. - 16. `isRejectQueue`: Boolean indicating if the waiting room uses a reject queue. - 17. `isEventActive`: Boolean indicating if an event is currently occurring. - Events are able to change a waiting room's behavior during a specified - period of time. For additional information, look at the event properties - `prequeue_start_time`, `event_start_time`, and `event_end_time` in the - documentation for creating waiting room events. Events are considered active - between these start and end times, as well as during the prequeueing period - if it exists. - 18. `isEventPrequeueing`: Valid only when `isEventActive` is **true**. Boolean - indicating if an event is currently prequeueing users before it starts. - 19. `timeUntilEventStart`: Valid only when `isEventPrequeueing` is **true**. - Integer indicating the number of minutes until the event starts. - 20. `timeUntilEventStartFormatted`: String displaying the `timeUntilEventStart` - formatted in English for users. If `isEventPrequeueing` is **false**, - `timeUntilEventStartFormatted` will display **unavailable**. - 21. `timeUntilEventEnd`: Valid only when `isEventActive` is **true**. Integer - indicating the number of minutes until the event ends. - 22. `timeUntilEventEndFormatted`: String displaying the `timeUntilEventEnd` - formatted in English for users. If `isEventActive` is **false**, - `timeUntilEventEndFormatted` will display **unavailable**. - 23. `shuffleAtEventStart`: Valid only when `isEventActive` is **true**. Boolean - indicating if the users in the prequeue are shuffled randomly when the event - starts. - - An example cURL to a waiting room could be: - - curl -X GET "https://example.com/waitingroom" \\ - -H "Accept: application/json" - - If `json_response_enabled` is **true** and the request hits the waiting room, an - example JSON response when `queueingMethod` is **fifo** and no event is active - could be: - - { - "cfWaitingRoom": { - "inWaitingRoom": true, - "waitTimeKnown": true, - "waitTime": 10, - "waitTime25Percentile": 0, - "waitTime50Percentile": 0, - "waitTime75Percentile": 0, - "waitTimeFormatted": "10 minutes", - "queueIsFull": false, - "queueAll": false, - "lastUpdated": "2020-08-03T23:46:00.000Z", - "refreshIntervalSeconds": 20, - "queueingMethod": "fifo", - "isFIFOQueue": true, - "isRandomQueue": false, - "isPassthroughQueue": false, - "isRejectQueue": false, - "isEventActive": false, - "isEventPrequeueing": false, - "timeUntilEventStart": 0, - "timeUntilEventStartFormatted": "unavailable", - "timeUntilEventEnd": 0, - "timeUntilEventEndFormatted": "unavailable", - "shuffleAtEventStart": false - } - } - - If `json_response_enabled` is **true** and the request hits the waiting room, an - example JSON response when `queueingMethod` is **random** and an event is active - could be: - - { - "cfWaitingRoom": { - "inWaitingRoom": true, - "waitTimeKnown": true, - "waitTime": 10, - "waitTime25Percentile": 5, - "waitTime50Percentile": 10, - "waitTime75Percentile": 15, - "waitTimeFormatted": "5 minutes to 15 minutes", - "queueIsFull": false, - "queueAll": false, - "lastUpdated": "2020-08-03T23:46:00.000Z", - "refreshIntervalSeconds": 20, - "queueingMethod": "random", - "isFIFOQueue": false, - "isRandomQueue": true, - "isPassthroughQueue": false, - "isRejectQueue": false, - "isEventActive": true, - "isEventPrequeueing": false, - "timeUntilEventStart": 0, - "timeUntilEventStartFormatted": "unavailable", - "timeUntilEventEnd": 15, - "timeUntilEventEndFormatted": "15 minutes", - "shuffleAtEventStart": true - } - }. - """ - - modified_on: Optional[datetime] = None - - name: Optional[str] = None - """A unique name to identify the waiting room. - - Only alphanumeric characters, hyphens and underscores are allowed. - """ - - new_users_per_minute: Optional[int] = None - """Sets the number of new users that will be let into the route every minute. - - This value is used as baseline for the number of users that are let in per - minute. So it is possible that there is a little more or little less traffic - coming to the route based on the traffic patterns at that time around the world. - """ - - next_event_prequeue_start_time: Optional[str] = None - """An ISO 8601 timestamp that marks when the next event will begin queueing.""" - - next_event_start_time: Optional[str] = None - """An ISO 8601 timestamp that marks when the next event will start.""" - - path: Optional[str] = None - """Sets the path within the host to enable the waiting room on. - - The waiting room will be enabled for all subpaths as well. If there are two - waiting rooms on the same subpath, the waiting room for the most specific path - will be chosen. Wildcards and query parameters are not supported. - """ - - queue_all: Optional[bool] = None - """ - If queue_all is `true`, all the traffic that is coming to a route will be sent - to the waiting room. No new traffic can get to the route once this field is set - and estimated time will become unavailable. - """ - - queueing_method: Optional[Literal["fifo", "random", "passthrough", "reject"]] = None - """Sets the queueing method used by the waiting room. - - Changing this parameter from the **default** queueing method is only available - for the Waiting Room Advanced subscription. Regardless of the queueing method, - if `queue_all` is enabled or an event is prequeueing, users in the waiting room - will not be accepted to the origin. These users will always see a waiting room - page that refreshes automatically. The valid queueing methods are: - - 1. `fifo` **(default)**: First-In-First-Out queue where customers gain access in - the order they arrived. - 2. `random`: Random queue where customers gain access randomly, regardless of - arrival time. - 3. `passthrough`: Users will pass directly through the waiting room and into the - origin website. As a result, any configured limits will not be respected - while this is enabled. This method can be used as an alternative to disabling - a waiting room (with `suspended`) so that analytics are still reported. This - can be used if you wish to allow all traffic normally, but want to restrict - traffic during a waiting room event, or vice versa. - 4. `reject`: Users will be immediately rejected from the waiting room. As a - result, no users will reach the origin website while this is enabled. This - can be used if you wish to reject all traffic while performing maintenance, - block traffic during a specified period of time (an event), or block traffic - while events are not occurring. Consider a waiting room used for vaccine - distribution that only allows traffic during sign-up events, and otherwise - blocks all traffic. For this case, the waiting room uses `reject`, and its - events override this with `fifo`, `random`, or `passthrough`. When this - queueing method is enabled and neither `queueAll` is enabled nor an event is - prequeueing, the waiting room page **will not refresh automatically**. - """ - - queueing_status_code: Optional[Literal[200, 202, 429]] = None - """HTTP status code returned to a user while in the queue.""" - - session_duration: Optional[int] = None - """ - Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to - the route. If a user is not seen by Cloudflare again in that time period, they - will be treated as a new user that visits the route. - """ - - suspended: Optional[bool] = None - """Suspends or allows traffic going to the waiting room. - - If set to `true`, the traffic will not go to the waiting room. - """ - - total_active_users: Optional[int] = None - """Sets the total number of active user sessions on the route at a point in time. - - A route is a combination of host and path on which a waiting room is available. - This value is used as a baseline for the total number of active user sessions on - the route. It is possible to have a situation where there are more or less - active users sessions on the route based on the traffic patterns at that time - around the world. - """ diff --git a/src/cloudflare/types/waiting_rooms/__init__.py b/src/cloudflare/types/waiting_rooms/__init__.py index a17e0ed45..a6c2d9036 100644 --- a/src/cloudflare/types/waiting_rooms/__init__.py +++ b/src/cloudflare/types/waiting_rooms/__init__.py @@ -4,13 +4,11 @@ from __future__ import annotations from .rule_edit_params import RuleEditParams as RuleEditParams from .event_edit_params import EventEditParams as EventEditParams -from .event_get_response import EventGetResponse as EventGetResponse 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_edit_response import EventEditResponse as EventEditResponse from .event_list_response import EventListResponse as EventListResponse from .event_update_params import EventUpdateParams as EventUpdateParams from .setting_edit_params import SettingEditParams as SettingEditParams @@ -19,9 +17,9 @@ from .rule_create_response import RuleCreateResponse as RuleCreateResponse from .rule_delete_response import RuleDeleteResponse as RuleDeleteResponse from .rule_update_response import RuleUpdateResponse as RuleUpdateResponse from .setting_get_response import SettingGetResponse as SettingGetResponse -from .event_create_response import EventCreateResponse as EventCreateResponse from .event_delete_response import EventDeleteResponse as EventDeleteResponse -from .event_update_response import EventUpdateResponse as EventUpdateResponse 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_create_response.py b/src/cloudflare/types/waiting_rooms/event_create_response.py deleted file mode 100644 index 74badd439..000000000 --- a/src/cloudflare/types/waiting_rooms/event_create_response.py +++ /dev/null @@ -1,97 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["EventCreateResponse"] - - -class EventCreateResponse(BaseModel): - id: Optional[object] = None - - created_on: Optional[datetime] = None - - custom_page_html: Optional[str] = None - """ - If set, the event will override the waiting room's `custom_page_html` property - while it is active. If null, the event will inherit it. - """ - - description: Optional[str] = None - """A note that you can use to add more details about the event.""" - - disable_session_renewal: Optional[bool] = None - """ - If set, the event will override the waiting room's `disable_session_renewal` - property while it is active. If null, the event will inherit it. - """ - - event_end_time: Optional[str] = None - """An ISO 8601 timestamp that marks the end of the event.""" - - event_start_time: Optional[str] = None - """An ISO 8601 timestamp that marks the start of the event. - - At this time, queued users will be processed with the event's configuration. The - start time must be at least one minute before `event_end_time`. - """ - - modified_on: Optional[datetime] = None - - name: Optional[str] = None - """A unique name to identify the event. - - Only alphanumeric characters, hyphens and underscores are allowed. - """ - - new_users_per_minute: Optional[int] = None - """ - If set, the event will override the waiting room's `new_users_per_minute` - property while it is active. If null, the event will inherit it. This can only - be set if the event's `total_active_users` property is also set. - """ - - prequeue_start_time: Optional[str] = None - """ - An ISO 8601 timestamp that marks when to begin queueing all users before the - event starts. The prequeue must start at least five minutes before - `event_start_time`. - """ - - queueing_method: Optional[str] = None - """ - If set, the event will override the waiting room's `queueing_method` property - while it is active. If null, the event will inherit it. - """ - - session_duration: Optional[int] = None - """ - If set, the event will override the waiting room's `session_duration` property - while it is active. If null, the event will inherit it. - """ - - shuffle_at_event_start: Optional[bool] = None - """ - If enabled, users in the prequeue will be shuffled randomly at the - `event_start_time`. Requires that `prequeue_start_time` is not null. This is - useful for situations when many users will join the event prequeue at the same - time and you want to shuffle them to ensure fairness. Naturally, it makes the - most sense to enable this feature when the `queueing_method` during the event - respects ordering such as **fifo**, or else the shuffling may be unnecessary. - """ - - suspended: Optional[bool] = None - """Suspends or allows an event. - - If set to `true`, the event is ignored and traffic will be handled based on the - waiting room configuration. - """ - - total_active_users: Optional[int] = None - """ - If set, the event will override the waiting room's `total_active_users` property - while it is active. If null, the event will inherit it. This can only be set if - the event's `new_users_per_minute` property is also set. - """ diff --git a/src/cloudflare/types/waiting_rooms/event_edit_response.py b/src/cloudflare/types/waiting_rooms/event_edit_response.py deleted file mode 100644 index 328c09857..000000000 --- a/src/cloudflare/types/waiting_rooms/event_edit_response.py +++ /dev/null @@ -1,97 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["EventEditResponse"] - - -class EventEditResponse(BaseModel): - id: Optional[object] = None - - created_on: Optional[datetime] = None - - custom_page_html: Optional[str] = None - """ - If set, the event will override the waiting room's `custom_page_html` property - while it is active. If null, the event will inherit it. - """ - - description: Optional[str] = None - """A note that you can use to add more details about the event.""" - - disable_session_renewal: Optional[bool] = None - """ - If set, the event will override the waiting room's `disable_session_renewal` - property while it is active. If null, the event will inherit it. - """ - - event_end_time: Optional[str] = None - """An ISO 8601 timestamp that marks the end of the event.""" - - event_start_time: Optional[str] = None - """An ISO 8601 timestamp that marks the start of the event. - - At this time, queued users will be processed with the event's configuration. The - start time must be at least one minute before `event_end_time`. - """ - - modified_on: Optional[datetime] = None - - name: Optional[str] = None - """A unique name to identify the event. - - Only alphanumeric characters, hyphens and underscores are allowed. - """ - - new_users_per_minute: Optional[int] = None - """ - If set, the event will override the waiting room's `new_users_per_minute` - property while it is active. If null, the event will inherit it. This can only - be set if the event's `total_active_users` property is also set. - """ - - prequeue_start_time: Optional[str] = None - """ - An ISO 8601 timestamp that marks when to begin queueing all users before the - event starts. The prequeue must start at least five minutes before - `event_start_time`. - """ - - queueing_method: Optional[str] = None - """ - If set, the event will override the waiting room's `queueing_method` property - while it is active. If null, the event will inherit it. - """ - - session_duration: Optional[int] = None - """ - If set, the event will override the waiting room's `session_duration` property - while it is active. If null, the event will inherit it. - """ - - shuffle_at_event_start: Optional[bool] = None - """ - If enabled, users in the prequeue will be shuffled randomly at the - `event_start_time`. Requires that `prequeue_start_time` is not null. This is - useful for situations when many users will join the event prequeue at the same - time and you want to shuffle them to ensure fairness. Naturally, it makes the - most sense to enable this feature when the `queueing_method` during the event - respects ordering such as **fifo**, or else the shuffling may be unnecessary. - """ - - suspended: Optional[bool] = None - """Suspends or allows an event. - - If set to `true`, the event is ignored and traffic will be handled based on the - waiting room configuration. - """ - - total_active_users: Optional[int] = None - """ - If set, the event will override the waiting room's `total_active_users` property - while it is active. If null, the event will inherit it. This can only be set if - the event's `new_users_per_minute` property is also set. - """ diff --git a/src/cloudflare/types/waiting_rooms/event_get_response.py b/src/cloudflare/types/waiting_rooms/event_get_response.py deleted file mode 100644 index 383b52619..000000000 --- a/src/cloudflare/types/waiting_rooms/event_get_response.py +++ /dev/null @@ -1,97 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["EventGetResponse"] - - -class EventGetResponse(BaseModel): - id: Optional[object] = None - - created_on: Optional[datetime] = None - - custom_page_html: Optional[str] = None - """ - If set, the event will override the waiting room's `custom_page_html` property - while it is active. If null, the event will inherit it. - """ - - description: Optional[str] = None - """A note that you can use to add more details about the event.""" - - disable_session_renewal: Optional[bool] = None - """ - If set, the event will override the waiting room's `disable_session_renewal` - property while it is active. If null, the event will inherit it. - """ - - event_end_time: Optional[str] = None - """An ISO 8601 timestamp that marks the end of the event.""" - - event_start_time: Optional[str] = None - """An ISO 8601 timestamp that marks the start of the event. - - At this time, queued users will be processed with the event's configuration. The - start time must be at least one minute before `event_end_time`. - """ - - modified_on: Optional[datetime] = None - - name: Optional[str] = None - """A unique name to identify the event. - - Only alphanumeric characters, hyphens and underscores are allowed. - """ - - new_users_per_minute: Optional[int] = None - """ - If set, the event will override the waiting room's `new_users_per_minute` - property while it is active. If null, the event will inherit it. This can only - be set if the event's `total_active_users` property is also set. - """ - - prequeue_start_time: Optional[str] = None - """ - An ISO 8601 timestamp that marks when to begin queueing all users before the - event starts. The prequeue must start at least five minutes before - `event_start_time`. - """ - - queueing_method: Optional[str] = None - """ - If set, the event will override the waiting room's `queueing_method` property - while it is active. If null, the event will inherit it. - """ - - session_duration: Optional[int] = None - """ - If set, the event will override the waiting room's `session_duration` property - while it is active. If null, the event will inherit it. - """ - - shuffle_at_event_start: Optional[bool] = None - """ - If enabled, users in the prequeue will be shuffled randomly at the - `event_start_time`. Requires that `prequeue_start_time` is not null. This is - useful for situations when many users will join the event prequeue at the same - time and you want to shuffle them to ensure fairness. Naturally, it makes the - most sense to enable this feature when the `queueing_method` during the event - respects ordering such as **fifo**, or else the shuffling may be unnecessary. - """ - - suspended: Optional[bool] = None - """Suspends or allows an event. - - If set to `true`, the event is ignored and traffic will be handled based on the - waiting room configuration. - """ - - total_active_users: Optional[int] = None - """ - If set, the event will override the waiting room's `total_active_users` property - while it is active. If null, the event will inherit it. This can only be set if - the event's `new_users_per_minute` property is also set. - """ diff --git a/src/cloudflare/types/waiting_rooms/event_list_response.py b/src/cloudflare/types/waiting_rooms/event_list_response.py index 5b27adb6d..eb5b179c0 100644 --- a/src/cloudflare/types/waiting_rooms/event_list_response.py +++ b/src/cloudflare/types/waiting_rooms/event_list_response.py @@ -1,100 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ..._models import BaseModel +from .waitingroom_event_result import WaitingroomEventResult -__all__ = ["EventListResponse", "EventListResponseItem"] +__all__ = ["EventListResponse"] - -class EventListResponseItem(BaseModel): - id: Optional[object] = None - - created_on: Optional[datetime] = None - - custom_page_html: Optional[str] = None - """ - If set, the event will override the waiting room's `custom_page_html` property - while it is active. If null, the event will inherit it. - """ - - description: Optional[str] = None - """A note that you can use to add more details about the event.""" - - disable_session_renewal: Optional[bool] = None - """ - If set, the event will override the waiting room's `disable_session_renewal` - property while it is active. If null, the event will inherit it. - """ - - event_end_time: Optional[str] = None - """An ISO 8601 timestamp that marks the end of the event.""" - - event_start_time: Optional[str] = None - """An ISO 8601 timestamp that marks the start of the event. - - At this time, queued users will be processed with the event's configuration. The - start time must be at least one minute before `event_end_time`. - """ - - modified_on: Optional[datetime] = None - - name: Optional[str] = None - """A unique name to identify the event. - - Only alphanumeric characters, hyphens and underscores are allowed. - """ - - new_users_per_minute: Optional[int] = None - """ - If set, the event will override the waiting room's `new_users_per_minute` - property while it is active. If null, the event will inherit it. This can only - be set if the event's `total_active_users` property is also set. - """ - - prequeue_start_time: Optional[str] = None - """ - An ISO 8601 timestamp that marks when to begin queueing all users before the - event starts. The prequeue must start at least five minutes before - `event_start_time`. - """ - - queueing_method: Optional[str] = None - """ - If set, the event will override the waiting room's `queueing_method` property - while it is active. If null, the event will inherit it. - """ - - session_duration: Optional[int] = None - """ - If set, the event will override the waiting room's `session_duration` property - while it is active. If null, the event will inherit it. - """ - - shuffle_at_event_start: Optional[bool] = None - """ - If enabled, users in the prequeue will be shuffled randomly at the - `event_start_time`. Requires that `prequeue_start_time` is not null. This is - useful for situations when many users will join the event prequeue at the same - time and you want to shuffle them to ensure fairness. Naturally, it makes the - most sense to enable this feature when the `queueing_method` during the event - respects ordering such as **fifo**, or else the shuffling may be unnecessary. - """ - - suspended: Optional[bool] = None - """Suspends or allows an event. - - If set to `true`, the event is ignored and traffic will be handled based on the - waiting room configuration. - """ - - total_active_users: Optional[int] = None - """ - If set, the event will override the waiting room's `total_active_users` property - while it is active. If null, the event will inherit it. This can only be set if - the event's `new_users_per_minute` property is also set. - """ - - -EventListResponse = List[EventListResponseItem] +EventListResponse = List[WaitingroomEventResult] diff --git a/src/cloudflare/types/waiting_rooms/events/__init__.py b/src/cloudflare/types/waiting_rooms/events/__init__.py index 288e46945..58e827610 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 .detail_get_response import DetailGetResponse as DetailGetResponse +from .waitingroom_event_details_result import WaitingroomEventDetailsResult as WaitingroomEventDetailsResult diff --git a/src/cloudflare/types/waiting_rooms/events/detail_get_response.py b/src/cloudflare/types/waiting_rooms/events/waitingroom_event_details_result.py similarity index 95% rename from src/cloudflare/types/waiting_rooms/events/detail_get_response.py rename to src/cloudflare/types/waiting_rooms/events/waitingroom_event_details_result.py index f93cd51ca..891370920 100644 --- a/src/cloudflare/types/waiting_rooms/events/detail_get_response.py +++ b/src/cloudflare/types/waiting_rooms/events/waitingroom_event_details_result.py @@ -5,10 +5,10 @@ from datetime import datetime from ...._models import BaseModel -__all__ = ["DetailGetResponse"] +__all__ = ["WaitingroomEventDetailsResult"] -class DetailGetResponse(BaseModel): +class WaitingroomEventDetailsResult(BaseModel): id: Optional[object] = 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 060750011..067080608 100644 --- a/src/cloudflare/types/waiting_rooms/rule_create_response.py +++ b/src/cloudflare/types/waiting_rooms/rule_create_response.py @@ -1,34 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .waitingroom_rule_result import WaitingroomRuleResult -__all__ = ["RuleCreateResponse", "RuleCreateResponseItem"] +__all__ = ["RuleCreateResponse"] - -class RuleCreateResponseItem(BaseModel): - id: Optional[str] = None - """The ID of the rule.""" - - action: Optional[Literal["bypass_waiting_room"]] = None - """The action to take when the expression matches.""" - - description: Optional[str] = None - """The description of the rule.""" - - enabled: Optional[bool] = None - """When set to true, the rule is enabled.""" - - expression: Optional[str] = None - """Criteria defining when there is a match for the current rule.""" - - last_updated: Optional[datetime] = None - - version: Optional[str] = None - """The version of the rule.""" - - -RuleCreateResponse = List[RuleCreateResponseItem] +RuleCreateResponse = List[WaitingroomRuleResult] diff --git a/src/cloudflare/types/waiting_rooms/rule_delete_response.py b/src/cloudflare/types/waiting_rooms/rule_delete_response.py index 1b24c35be..a1aaf0c29 100644 --- a/src/cloudflare/types/waiting_rooms/rule_delete_response.py +++ b/src/cloudflare/types/waiting_rooms/rule_delete_response.py @@ -1,34 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .waitingroom_rule_result import WaitingroomRuleResult -__all__ = ["RuleDeleteResponse", "RuleDeleteResponseItem"] +__all__ = ["RuleDeleteResponse"] - -class RuleDeleteResponseItem(BaseModel): - id: Optional[str] = None - """The ID of the rule.""" - - action: Optional[Literal["bypass_waiting_room"]] = None - """The action to take when the expression matches.""" - - description: Optional[str] = None - """The description of the rule.""" - - enabled: Optional[bool] = None - """When set to true, the rule is enabled.""" - - expression: Optional[str] = None - """Criteria defining when there is a match for the current rule.""" - - last_updated: Optional[datetime] = None - - version: Optional[str] = None - """The version of the rule.""" - - -RuleDeleteResponse = List[RuleDeleteResponseItem] +RuleDeleteResponse = List[WaitingroomRuleResult] diff --git a/src/cloudflare/types/waiting_rooms/rule_edit_response.py b/src/cloudflare/types/waiting_rooms/rule_edit_response.py index 534f379d0..fef2562bf 100644 --- a/src/cloudflare/types/waiting_rooms/rule_edit_response.py +++ b/src/cloudflare/types/waiting_rooms/rule_edit_response.py @@ -1,34 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .waitingroom_rule_result import WaitingroomRuleResult -__all__ = ["RuleEditResponse", "RuleEditResponseItem"] +__all__ = ["RuleEditResponse"] - -class RuleEditResponseItem(BaseModel): - id: Optional[str] = None - """The ID of the rule.""" - - action: Optional[Literal["bypass_waiting_room"]] = None - """The action to take when the expression matches.""" - - description: Optional[str] = None - """The description of the rule.""" - - enabled: Optional[bool] = None - """When set to true, the rule is enabled.""" - - expression: Optional[str] = None - """Criteria defining when there is a match for the current rule.""" - - last_updated: Optional[datetime] = None - - version: Optional[str] = None - """The version of the rule.""" - - -RuleEditResponse = List[RuleEditResponseItem] +RuleEditResponse = List[WaitingroomRuleResult] diff --git a/src/cloudflare/types/waiting_rooms/rule_list_response.py b/src/cloudflare/types/waiting_rooms/rule_list_response.py index aa546a4e2..a9b73edf0 100644 --- a/src/cloudflare/types/waiting_rooms/rule_list_response.py +++ b/src/cloudflare/types/waiting_rooms/rule_list_response.py @@ -1,34 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .waitingroom_rule_result import WaitingroomRuleResult -__all__ = ["RuleListResponse", "RuleListResponseItem"] +__all__ = ["RuleListResponse"] - -class RuleListResponseItem(BaseModel): - id: Optional[str] = None - """The ID of the rule.""" - - action: Optional[Literal["bypass_waiting_room"]] = None - """The action to take when the expression matches.""" - - description: Optional[str] = None - """The description of the rule.""" - - enabled: Optional[bool] = None - """When set to true, the rule is enabled.""" - - expression: Optional[str] = None - """Criteria defining when there is a match for the current rule.""" - - last_updated: Optional[datetime] = None - - version: Optional[str] = None - """The version of the rule.""" - - -RuleListResponse = List[RuleListResponseItem] +RuleListResponse = List[WaitingroomRuleResult] diff --git a/src/cloudflare/types/waiting_rooms/rule_update_response.py b/src/cloudflare/types/waiting_rooms/rule_update_response.py index e947a9d52..59bdce7d3 100644 --- a/src/cloudflare/types/waiting_rooms/rule_update_response.py +++ b/src/cloudflare/types/waiting_rooms/rule_update_response.py @@ -1,34 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .waitingroom_rule_result import WaitingroomRuleResult -__all__ = ["RuleUpdateResponse", "RuleUpdateResponseItem"] +__all__ = ["RuleUpdateResponse"] - -class RuleUpdateResponseItem(BaseModel): - id: Optional[str] = None - """The ID of the rule.""" - - action: Optional[Literal["bypass_waiting_room"]] = None - """The action to take when the expression matches.""" - - description: Optional[str] = None - """The description of the rule.""" - - enabled: Optional[bool] = None - """When set to true, the rule is enabled.""" - - expression: Optional[str] = None - """Criteria defining when there is a match for the current rule.""" - - last_updated: Optional[datetime] = None - - version: Optional[str] = None - """The version of the rule.""" - - -RuleUpdateResponse = List[RuleUpdateResponseItem] +RuleUpdateResponse = List[WaitingroomRuleResult] diff --git a/src/cloudflare/types/waiting_rooms/event_update_response.py b/src/cloudflare/types/waiting_rooms/waitingroom_event_result.py similarity index 97% rename from src/cloudflare/types/waiting_rooms/event_update_response.py rename to src/cloudflare/types/waiting_rooms/waitingroom_event_result.py index cbc05d746..7cad0a6cf 100644 --- a/src/cloudflare/types/waiting_rooms/event_update_response.py +++ b/src/cloudflare/types/waiting_rooms/waitingroom_event_result.py @@ -5,10 +5,10 @@ from datetime import datetime from ..._models import BaseModel -__all__ = ["EventUpdateResponse"] +__all__ = ["WaitingroomEventResult"] -class EventUpdateResponse(BaseModel): +class WaitingroomEventResult(BaseModel): id: Optional[object] = 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_result.py new file mode 100644 index 000000000..7f3e55f69 --- /dev/null +++ b/src/cloudflare/types/waiting_rooms/waitingroom_rule_result.py @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["WaitingroomRuleResult"] + + +class WaitingroomRuleResult(BaseModel): + id: Optional[str] = None + """The ID of the rule.""" + + action: Optional[Literal["bypass_waiting_room"]] = None + """The action to take when the expression matches.""" + + description: Optional[str] = None + """The description of the rule.""" + + enabled: Optional[bool] = None + """When set to true, the rule is enabled.""" + + expression: Optional[str] = None + """Criteria defining when there is a match for the current rule.""" + + last_updated: Optional[datetime] = None + + version: Optional[str] = None + """The version of the rule.""" diff --git a/src/cloudflare/types/waiting_room_get_response.py b/src/cloudflare/types/waitingroom_waitingroom.py similarity index 99% rename from src/cloudflare/types/waiting_room_get_response.py rename to src/cloudflare/types/waitingroom_waitingroom.py index ee502be5d..2e8a2969c 100644 --- a/src/cloudflare/types/waiting_room_get_response.py +++ b/src/cloudflare/types/waitingroom_waitingroom.py @@ -6,7 +6,7 @@ from typing_extensions import Literal from .._models import BaseModel -__all__ = ["WaitingRoomGetResponse", "AdditionalRoute", "CookieAttributes"] +__all__ = ["WaitingroomWaitingroom", "AdditionalRoute", "CookieAttributes"] class AdditionalRoute(BaseModel): @@ -45,7 +45,7 @@ class CookieAttributes(BaseModel): """ -class WaitingRoomGetResponse(BaseModel): +class WaitingroomWaitingroom(BaseModel): id: Optional[object] = None additional_routes: Optional[List[AdditionalRoute]] = None diff --git a/src/cloudflare/types/web3/__init__.py b/src/cloudflare/types/web3/__init__.py index 44bc1fe76..ddc8969e5 100644 --- a/src/cloudflare/types/web3/__init__.py +++ b/src/cloudflare/types/web3/__init__.py @@ -3,9 +3,7 @@ from __future__ import annotations from .hostname_edit_params import HostnameEditParams as HostnameEditParams -from .hostname_get_response import HostnameGetResponse as HostnameGetResponse from .hostname_create_params import HostnameCreateParams as HostnameCreateParams -from .hostname_edit_response import HostnameEditResponse as HostnameEditResponse from .hostname_list_response import HostnameListResponse as HostnameListResponse -from .hostname_create_response import HostnameCreateResponse as HostnameCreateResponse from .hostname_delete_response import HostnameDeleteResponse as HostnameDeleteResponse +from .dweb_config_web3_hostname import DwebConfigWeb3Hostname as DwebConfigWeb3Hostname diff --git a/src/cloudflare/types/web3/hostname_create_response.py b/src/cloudflare/types/web3/dweb_config_web3_hostname.py similarity index 91% rename from src/cloudflare/types/web3/hostname_create_response.py rename to src/cloudflare/types/web3/dweb_config_web3_hostname.py index f0bc3677a..103327ba7 100644 --- a/src/cloudflare/types/web3/hostname_create_response.py +++ b/src/cloudflare/types/web3/dweb_config_web3_hostname.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["HostnameCreateResponse"] +__all__ = ["DwebConfigWeb3Hostname"] -class HostnameCreateResponse(BaseModel): +class DwebConfigWeb3Hostname(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/web3/hostname_edit_response.py b/src/cloudflare/types/web3/hostname_edit_response.py deleted file mode 100644 index 9b06f2ed4..000000000 --- a/src/cloudflare/types/web3/hostname_edit_response.py +++ /dev/null @@ -1,33 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["HostnameEditResponse"] - - -class HostnameEditResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """An optional description of the hostname.""" - - dnslink: Optional[str] = None - """DNSLink value used if the target is ipfs.""" - - modified_on: Optional[datetime] = None - - name: Optional[str] = None - """The hostname that will point to the target gateway via CNAME.""" - - status: Optional[Literal["active", "pending", "deleting", "error"]] = None - """Status of the hostname's activation.""" - - target: Optional[Literal["ethereum", "ipfs", "ipfs_universal_path"]] = None - """Target gateway of the hostname.""" diff --git a/src/cloudflare/types/web3/hostname_get_response.py b/src/cloudflare/types/web3/hostname_get_response.py deleted file mode 100644 index 3621c423d..000000000 --- a/src/cloudflare/types/web3/hostname_get_response.py +++ /dev/null @@ -1,33 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["HostnameGetResponse"] - - -class HostnameGetResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """An optional description of the hostname.""" - - dnslink: Optional[str] = None - """DNSLink value used if the target is ipfs.""" - - modified_on: Optional[datetime] = None - - name: Optional[str] = None - """The hostname that will point to the target gateway via CNAME.""" - - status: Optional[Literal["active", "pending", "deleting", "error"]] = None - """Status of the hostname's activation.""" - - target: Optional[Literal["ethereum", "ipfs", "ipfs_universal_path"]] = None - """Target gateway of the hostname.""" diff --git a/src/cloudflare/types/web3/hostname_list_response.py b/src/cloudflare/types/web3/hostname_list_response.py index 6a53f568d..6bf5b681b 100644 --- a/src/cloudflare/types/web3/hostname_list_response.py +++ b/src/cloudflare/types/web3/hostname_list_response.py @@ -1,36 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .dweb_config_web3_hostname import DwebConfigWeb3Hostname -__all__ = ["HostnameListResponse", "HostnameListResponseItem"] +__all__ = ["HostnameListResponse"] - -class HostnameListResponseItem(BaseModel): - id: Optional[str] = None - """Identifier""" - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """An optional description of the hostname.""" - - dnslink: Optional[str] = None - """DNSLink value used if the target is ipfs.""" - - modified_on: Optional[datetime] = None - - name: Optional[str] = None - """The hostname that will point to the target gateway via CNAME.""" - - status: Optional[Literal["active", "pending", "deleting", "error"]] = None - """Status of the hostname's activation.""" - - target: Optional[Literal["ethereum", "ipfs", "ipfs_universal_path"]] = None - """Target gateway of the hostname.""" - - -HostnameListResponse = List[HostnameListResponseItem] +HostnameListResponse = List[DwebConfigWeb3Hostname] 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 967058fab..24b80ce5c 100644 --- a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/__init__.py +++ b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/__init__.py @@ -2,6 +2,5 @@ from __future__ import annotations -from .content_list_get_response import ContentListGetResponse as ContentListGetResponse from .content_list_update_params import ContentListUpdateParams as ContentListUpdateParams -from .content_list_update_response import ContentListUpdateResponse as ContentListUpdateResponse +from .dweb_config_content_list_details import DwebConfigContentListDetails as DwebConfigContentListDetails diff --git a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_list_get_response.py b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_list_get_response.py deleted file mode 100644 index 3759efde3..000000000 --- a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_list_get_response.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from ....._models import BaseModel - -__all__ = ["ContentListGetResponse"] - - -class ContentListGetResponse(BaseModel): - action: Optional[Literal["block"]] = None - """Behavior of the content list.""" 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 6c7de5d24..de073e191 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,9 @@ from __future__ import annotations from typing import Iterable from typing_extensions import Literal, Required, TypedDict -__all__ = ["ContentListUpdateParams", "Entry"] +from .content_lists import DwebConfigContentListEntryParam + +__all__ = ["ContentListUpdateParams"] class ContentListUpdateParams(TypedDict, total=False): @@ -15,16 +17,5 @@ class ContentListUpdateParams(TypedDict, total=False): action: Required[Literal["block"]] """Behavior of the content list.""" - entries: Required[Iterable[Entry]] + entries: Required[Iterable[DwebConfigContentListEntryParam]] """Content list entries.""" - - -class Entry(TypedDict, total=False): - content: str - """CID or content path of content to block.""" - - description: str - """An optional description of the content list entry.""" - - type: Literal["cid", "content_path"] - """Type of content list entry to block.""" 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 9050d08ea..58392c6eb 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 @@ -2,10 +2,9 @@ from __future__ import annotations -from .entry_get_response import EntryGetResponse as EntryGetResponse from .entry_create_params import EntryCreateParams as EntryCreateParams from .entry_list_response import EntryListResponse as EntryListResponse from .entry_update_params import EntryUpdateParams as EntryUpdateParams -from .entry_create_response import EntryCreateResponse as EntryCreateResponse from .entry_delete_response import EntryDeleteResponse as EntryDeleteResponse -from .entry_update_response import EntryUpdateResponse as EntryUpdateResponse +from .dweb_config_content_list_entry import DwebConfigContentListEntry as DwebConfigContentListEntry +from .dweb_config_content_list_entry_param import DwebConfigContentListEntryParam as DwebConfigContentListEntryParam diff --git a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_create_response.py b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/dweb_config_content_list_entry.py similarity index 87% rename from src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_create_response.py rename to src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/dweb_config_content_list_entry.py index 7397aacd4..04a5a9c95 100644 --- a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_create_response.py +++ b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/dweb_config_content_list_entry.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ......_models import BaseModel -__all__ = ["EntryCreateResponse"] +__all__ = ["DwebConfigContentListEntry"] -class EntryCreateResponse(BaseModel): +class DwebConfigContentListEntry(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/dweb_config_content_list_entry_param.py new file mode 100644 index 000000000..d9cfe51e1 --- /dev/null +++ b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/dweb_config_content_list_entry_param.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, TypedDict + +__all__ = ["DwebConfigContentListEntryParam"] + + +class DwebConfigContentListEntryParam(TypedDict, total=False): + content: str + """CID or content path of content to block.""" + + description: str + """An optional description of the content list entry.""" + + type: Literal["cid", "content_path"] + """Type of content list entry to block.""" diff --git a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_get_response.py b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_get_response.py deleted file mode 100644 index 2090ded63..000000000 --- a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_get_response.py +++ /dev/null @@ -1,27 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ......_models import BaseModel - -__all__ = ["EntryGetResponse"] - - -class EntryGetResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - content: Optional[str] = None - """CID or content path of content to block.""" - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """An optional description of the content list entry.""" - - modified_on: Optional[datetime] = None - - type: Optional[Literal["cid", "content_path"]] = None - """Type of content list entry 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 135144213..8ca6f5ebe 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 @@ -1,32 +1,13 @@ # File generated from our OpenAPI spec by Stainless. from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal from ......_models import BaseModel +from .dweb_config_content_list_entry import DwebConfigContentListEntry -__all__ = ["EntryListResponse", "Entry"] - - -class Entry(BaseModel): - id: Optional[str] = None - """Identifier""" - - content: Optional[str] = None - """CID or content path of content to block.""" - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """An optional description of the content list entry.""" - - modified_on: Optional[datetime] = None - - type: Optional[Literal["cid", "content_path"]] = None - """Type of content list entry to block.""" +__all__ = ["EntryListResponse"] class EntryListResponse(BaseModel): - entries: Optional[List[Entry]] = None + entries: Optional[List[DwebConfigContentListEntry]] = None """Content list entries.""" diff --git a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_update_response.py b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_update_response.py deleted file mode 100644 index 78a731657..000000000 --- a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_update_response.py +++ /dev/null @@ -1,27 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ......_models import BaseModel - -__all__ = ["EntryUpdateResponse"] - - -class EntryUpdateResponse(BaseModel): - id: Optional[str] = None - """Identifier""" - - content: Optional[str] = None - """CID or content path of content to block.""" - - created_on: Optional[datetime] = None - - description: Optional[str] = None - """An optional description of the content list entry.""" - - modified_on: Optional[datetime] = None - - type: Optional[Literal["cid", "content_path"]] = None - """Type of content list entry to block.""" diff --git a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_list_update_response.py b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/dweb_config_content_list_details.py similarity index 73% rename from src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_list_update_response.py rename to src/cloudflare/types/web3/hostnames/ipfs_universal_paths/dweb_config_content_list_details.py index f0877f53b..9831577a2 100644 --- a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_list_update_response.py +++ b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/dweb_config_content_list_details.py @@ -5,9 +5,9 @@ from typing_extensions import Literal from ....._models import BaseModel -__all__ = ["ContentListUpdateResponse"] +__all__ = ["DwebConfigContentListDetails"] -class ContentListUpdateResponse(BaseModel): +class DwebConfigContentListDetails(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 200b55a80..f89c0072c 100644 --- a/src/cloudflare/types/workers/__init__.py +++ b/src/cloudflare/types/workers/__init__.py @@ -3,9 +3,11 @@ from __future__ import annotations from .ai_run_params import AIRunParams as AIRunParams +from .workers_domain import WorkersDomain as WorkersDomain +from .workers_routes import WorkersRoutes as WorkersRoutes +from .workers_script import WorkersScript as WorkersScript +from .workers_filters import WorkersFilters as WorkersFilters from .domain_list_params import DomainListParams as DomainListParams -from .route_get_response import RouteGetResponse as RouteGetResponse -from .domain_get_response import DomainGetResponse as DomainGetResponse from .route_create_params import RouteCreateParams as RouteCreateParams from .route_list_response import RouteListResponse as RouteListResponse from .route_update_params import RouteUpdateParams as RouteUpdateParams @@ -19,12 +21,8 @@ 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 -from .route_update_response import RouteUpdateResponse as RouteUpdateResponse -from .domain_update_response import DomainUpdateResponse as DomainUpdateResponse from .filter_create_response import FilterCreateResponse as FilterCreateResponse from .filter_delete_response import FilterDeleteResponse as FilterDeleteResponse -from .filter_update_response import FilterUpdateResponse as FilterUpdateResponse -from .script_update_response import ScriptUpdateResponse as ScriptUpdateResponse from .subdomain_get_response import SubdomainGetResponse as SubdomainGetResponse from .subdomain_update_params import SubdomainUpdateParams as SubdomainUpdateParams from .subdomain_update_response import SubdomainUpdateResponse as SubdomainUpdateResponse diff --git a/src/cloudflare/types/workers/domain_list_response.py b/src/cloudflare/types/workers/domain_list_response.py index 47d232e2d..8234bd222 100644 --- a/src/cloudflare/types/workers/domain_list_response.py +++ b/src/cloudflare/types/workers/domain_list_response.py @@ -1,30 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ..._models import BaseModel +from .workers_domain import WorkersDomain -__all__ = ["DomainListResponse", "DomainListResponseItem"] +__all__ = ["DomainListResponse"] - -class DomainListResponseItem(BaseModel): - id: Optional[object] = None - """Identifer of the Worker Domain.""" - - environment: Optional[str] = None - """Worker environment associated with the zone and hostname.""" - - hostname: Optional[str] = None - """Hostname of the Worker Domain.""" - - service: Optional[str] = None - """Worker service associated with the zone and hostname.""" - - zone_id: Optional[object] = None - """Identifier of the zone.""" - - zone_name: Optional[str] = None - """Name of the zone.""" - - -DomainListResponse = List[DomainListResponseItem] +DomainListResponse = List[WorkersDomain] diff --git a/src/cloudflare/types/workers/domain_update_response.py b/src/cloudflare/types/workers/domain_update_response.py deleted file mode 100644 index 80103574e..000000000 --- a/src/cloudflare/types/workers/domain_update_response.py +++ /dev/null @@ -1,27 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["DomainUpdateResponse"] - - -class DomainUpdateResponse(BaseModel): - id: Optional[object] = None - """Identifer of the Worker Domain.""" - - environment: Optional[str] = None - """Worker environment associated with the zone and hostname.""" - - hostname: Optional[str] = None - """Hostname of the Worker Domain.""" - - service: Optional[str] = None - """Worker service associated with the zone and hostname.""" - - zone_id: Optional[object] = None - """Identifier of the zone.""" - - zone_name: Optional[str] = None - """Name of the zone.""" diff --git a/src/cloudflare/types/workers/filter_list_response.py b/src/cloudflare/types/workers/filter_list_response.py index c4cee4840..cfec4ecd6 100644 --- a/src/cloudflare/types/workers/filter_list_response.py +++ b/src/cloudflare/types/workers/filter_list_response.py @@ -2,18 +2,8 @@ from typing import List -from ..._models import BaseModel +from .workers_filters import WorkersFilters -__all__ = ["FilterListResponse", "FilterListResponseItem"] +__all__ = ["FilterListResponse"] - -class FilterListResponseItem(BaseModel): - id: str - """Identifier""" - - enabled: bool - - pattern: str - - -FilterListResponse = List[FilterListResponseItem] +FilterListResponse = List[WorkersFilters] diff --git a/src/cloudflare/types/workers/route_list_response.py b/src/cloudflare/types/workers/route_list_response.py index c809e0aa2..b595e65e6 100644 --- a/src/cloudflare/types/workers/route_list_response.py +++ b/src/cloudflare/types/workers/route_list_response.py @@ -2,19 +2,8 @@ from typing import List -from ..._models import BaseModel +from .workers_routes import WorkersRoutes -__all__ = ["RouteListResponse", "RouteListResponseItem"] +__all__ = ["RouteListResponse"] - -class RouteListResponseItem(BaseModel): - id: str - """Identifier""" - - pattern: str - - script: str - """Name of the script, used in URLs and route configuration.""" - - -RouteListResponse = List[RouteListResponseItem] +RouteListResponse = List[WorkersRoutes] diff --git a/src/cloudflare/types/workers/route_update_response.py b/src/cloudflare/types/workers/route_update_response.py deleted file mode 100644 index a2e2a848c..000000000 --- a/src/cloudflare/types/workers/route_update_response.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from ..._models import BaseModel - -__all__ = ["RouteUpdateResponse"] - - -class RouteUpdateResponse(BaseModel): - id: str - """Identifier""" - - pattern: str - - script: str - """Name of the script, used in URLs and route configuration.""" diff --git a/src/cloudflare/types/workers/script_list_response.py b/src/cloudflare/types/workers/script_list_response.py index 62eabae9a..de94b1552 100644 --- a/src/cloudflare/types/workers/script_list_response.py +++ b/src/cloudflare/types/workers/script_list_response.py @@ -1,51 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ..._models import BaseModel +from .workers_script import WorkersScript -__all__ = ["ScriptListResponse", "ScriptListResponseItem", "ScriptListResponseItemTailConsumer"] +__all__ = ["ScriptListResponse"] - -class ScriptListResponseItemTailConsumer(BaseModel): - service: str - """Name of Worker that is to be the consumer.""" - - environment: Optional[str] = None - """Optional environment if the Worker utilizes one.""" - - namespace: Optional[str] = None - """Optional dispatch namespace the script belongs to.""" - - -class ScriptListResponseItem(BaseModel): - id: Optional[str] = None - """The id of the script in the Workers system. Usually the script name.""" - - created_on: Optional[datetime] = None - """When the script was created.""" - - etag: Optional[str] = None - """Hashed script content, can be used in a If-None-Match header when updating.""" - - logpush: Optional[bool] = None - """Whether Logpush is turned on for the Worker.""" - - modified_on: Optional[datetime] = None - """When the script was last modified.""" - - pipeline_hash: Optional[str] = None - """Deprecated. Deployment metadata for internal usage.""" - - placement_mode: Optional[str] = None - """Specifies the placement mode for the Worker (e.g. 'smart').""" - - tail_consumers: Optional[List[ScriptListResponseItemTailConsumer]] = None - """List of Workers that will consume logs from the attached Worker.""" - - usage_model: Optional[str] = None - """Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').""" - - -ScriptListResponse = List[ScriptListResponseItem] +ScriptListResponse = List[WorkersScript] diff --git a/src/cloudflare/types/workers/scripts/__init__.py b/src/cloudflare/types/workers/scripts/__init__.py index 70cf5e199..09ce656d1 100644 --- a/src/cloudflare/types/workers/scripts/__init__.py +++ b/src/cloudflare/types/workers/scripts/__init__.py @@ -12,7 +12,7 @@ from .content_update_params import ContentUpdateParams as ContentUpdateParams 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 .content_update_response import ContentUpdateResponse as ContentUpdateResponse +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 fd22c68f6..ffbf4215f 100644 --- a/src/cloudflare/types/workers/scripts/binding_get_response.py +++ b/src/cloudflare/types/workers/scripts/binding_get_response.py @@ -1,39 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Union -from typing_extensions import Literal +from typing import List -from ...._models import BaseModel +from .workers_schemas_binding import WorkersSchemasBinding -__all__ = [ - "BindingGetResponse", - "BindingGetResponseItem", - "BindingGetResponseItemWorkersKVNamespaceBinding", - "BindingGetResponseItemWorkersWasmModuleBinding", -] +__all__ = ["BindingGetResponse"] - -class BindingGetResponseItemWorkersKVNamespaceBinding(BaseModel): - name: str - """A JavaScript variable name for the binding.""" - - namespace_id: str - """Namespace identifier tag.""" - - type: Literal["kv_namespace"] - """The class of resource that the binding provides.""" - - -class BindingGetResponseItemWorkersWasmModuleBinding(BaseModel): - name: str - """A JavaScript variable name for the binding.""" - - type: Literal["wasm_module"] - """The class of resource that the binding provides.""" - - -BindingGetResponseItem = Union[ - BindingGetResponseItemWorkersKVNamespaceBinding, BindingGetResponseItemWorkersWasmModuleBinding -] - -BindingGetResponse = List[BindingGetResponseItem] +BindingGetResponse = List[WorkersSchemasBinding] diff --git a/src/cloudflare/types/workers/scripts/content_update_response.py b/src/cloudflare/types/workers/scripts/content_update_response.py deleted file mode 100644 index d97cee510..000000000 --- a/src/cloudflare/types/workers/scripts/content_update_response.py +++ /dev/null @@ -1,48 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["ContentUpdateResponse", "TailConsumer"] - - -class TailConsumer(BaseModel): - service: str - """Name of Worker that is to be the consumer.""" - - environment: Optional[str] = None - """Optional environment if the Worker utilizes one.""" - - namespace: Optional[str] = None - """Optional dispatch namespace the script belongs to.""" - - -class ContentUpdateResponse(BaseModel): - id: Optional[str] = None - """The id of the script in the Workers system. Usually the script name.""" - - created_on: Optional[datetime] = None - """When the script was created.""" - - etag: Optional[str] = None - """Hashed script content, can be used in a If-None-Match header when updating.""" - - logpush: Optional[bool] = None - """Whether Logpush is turned on for the Worker.""" - - modified_on: Optional[datetime] = None - """When the script was last modified.""" - - pipeline_hash: Optional[str] = None - """Deprecated. Deployment metadata for internal usage.""" - - placement_mode: Optional[str] = None - """Specifies the placement mode for the Worker (e.g. 'smart').""" - - tail_consumers: Optional[List[TailConsumer]] = None - """List of Workers that will consume logs from the attached Worker.""" - - usage_model: Optional[str] = None - """Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').""" diff --git a/src/cloudflare/types/workers/scripts/workers_schemas_binding.py b/src/cloudflare/types/workers/scripts/workers_schemas_binding.py new file mode 100644 index 000000000..25d175079 --- /dev/null +++ b/src/cloudflare/types/workers/scripts/workers_schemas_binding.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Union +from typing_extensions import Literal + +from ...._models import BaseModel + +__all__ = ["WorkersSchemasBinding", "WorkersKVNamespaceBinding", "WorkersWasmModuleBinding"] + + +class WorkersKVNamespaceBinding(BaseModel): + name: str + """A JavaScript variable name for the binding.""" + + namespace_id: str + """Namespace identifier tag.""" + + type: Literal["kv_namespace"] + """The class of resource that the binding provides.""" + + +class WorkersWasmModuleBinding(BaseModel): + name: str + """A JavaScript variable name for the binding.""" + + type: Literal["wasm_module"] + """The class of resource that the binding provides.""" + + +WorkersSchemasBinding = Union[WorkersKVNamespaceBinding, WorkersWasmModuleBinding] diff --git a/src/cloudflare/types/workers/services/environments/__init__.py b/src/cloudflare/types/workers/services/environments/__init__.py index 5258b212c..f04884e32 100644 --- a/src/cloudflare/types/workers/services/environments/__init__.py +++ b/src/cloudflare/types/workers/services/environments/__init__.py @@ -6,4 +6,3 @@ from .setting_edit_params import SettingEditParams as SettingEditParams from .setting_get_response import SettingGetResponse as SettingGetResponse from .content_update_params import ContentUpdateParams as ContentUpdateParams from .setting_edit_response import SettingEditResponse as SettingEditResponse -from .content_update_response import ContentUpdateResponse as ContentUpdateResponse diff --git a/src/cloudflare/types/workers/services/environments/content_update_response.py b/src/cloudflare/types/workers/services/environments/content_update_response.py deleted file mode 100644 index a9e7c2f50..000000000 --- a/src/cloudflare/types/workers/services/environments/content_update_response.py +++ /dev/null @@ -1,48 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ....._models import BaseModel - -__all__ = ["ContentUpdateResponse", "TailConsumer"] - - -class TailConsumer(BaseModel): - service: str - """Name of Worker that is to be the consumer.""" - - environment: Optional[str] = None - """Optional environment if the Worker utilizes one.""" - - namespace: Optional[str] = None - """Optional dispatch namespace the script belongs to.""" - - -class ContentUpdateResponse(BaseModel): - id: Optional[str] = None - """The id of the script in the Workers system. Usually the script name.""" - - created_on: Optional[datetime] = None - """When the script was created.""" - - etag: Optional[str] = None - """Hashed script content, can be used in a If-None-Match header when updating.""" - - logpush: Optional[bool] = None - """Whether Logpush is turned on for the Worker.""" - - modified_on: Optional[datetime] = None - """When the script was last modified.""" - - pipeline_hash: Optional[str] = None - """Deprecated. Deployment metadata for internal usage.""" - - placement_mode: Optional[str] = None - """Specifies the placement mode for the Worker (e.g. 'smart').""" - - tail_consumers: Optional[List[TailConsumer]] = None - """List of Workers that will consume logs from the attached Worker.""" - - usage_model: Optional[str] = None - """Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').""" diff --git a/src/cloudflare/types/workers/domain_get_response.py b/src/cloudflare/types/workers/workers_domain.py similarity index 90% rename from src/cloudflare/types/workers/domain_get_response.py rename to src/cloudflare/types/workers/workers_domain.py index a97634efe..d0cc0bf5a 100644 --- a/src/cloudflare/types/workers/domain_get_response.py +++ b/src/cloudflare/types/workers/workers_domain.py @@ -4,10 +4,10 @@ from typing import Optional from ..._models import BaseModel -__all__ = ["DomainGetResponse"] +__all__ = ["WorkersDomain"] -class DomainGetResponse(BaseModel): +class WorkersDomain(BaseModel): id: Optional[object] = None """Identifer of the Worker Domain.""" diff --git a/src/cloudflare/types/workers/filter_update_response.py b/src/cloudflare/types/workers/workers_filters.py similarity index 68% rename from src/cloudflare/types/workers/filter_update_response.py rename to src/cloudflare/types/workers/workers_filters.py index b18956509..2617fe7ec 100644 --- a/src/cloudflare/types/workers/filter_update_response.py +++ b/src/cloudflare/types/workers/workers_filters.py @@ -2,10 +2,10 @@ from ..._models import BaseModel -__all__ = ["FilterUpdateResponse"] +__all__ = ["WorkersFilters"] -class FilterUpdateResponse(BaseModel): +class WorkersFilters(BaseModel): id: str """Identifier""" diff --git a/src/cloudflare/types/workers/route_get_response.py b/src/cloudflare/types/workers/workers_routes.py similarity index 77% rename from src/cloudflare/types/workers/route_get_response.py rename to src/cloudflare/types/workers/workers_routes.py index 094acab8b..0225794af 100644 --- a/src/cloudflare/types/workers/route_get_response.py +++ b/src/cloudflare/types/workers/workers_routes.py @@ -2,10 +2,10 @@ from ..._models import BaseModel -__all__ = ["RouteGetResponse"] +__all__ = ["WorkersRoutes"] -class RouteGetResponse(BaseModel): +class WorkersRoutes(BaseModel): id: str """Identifier""" diff --git a/src/cloudflare/types/workers/script_update_response.py b/src/cloudflare/types/workers/workers_script.py similarity index 94% rename from src/cloudflare/types/workers/script_update_response.py rename to src/cloudflare/types/workers/workers_script.py index 98be45339..28c0ade10 100644 --- a/src/cloudflare/types/workers/script_update_response.py +++ b/src/cloudflare/types/workers/workers_script.py @@ -5,7 +5,7 @@ from datetime import datetime from ..._models import BaseModel -__all__ = ["ScriptUpdateResponse", "TailConsumer"] +__all__ = ["WorkersScript", "TailConsumer"] class TailConsumer(BaseModel): @@ -19,7 +19,7 @@ class TailConsumer(BaseModel): """Optional dispatch namespace the script belongs to.""" -class ScriptUpdateResponse(BaseModel): +class WorkersScript(BaseModel): id: Optional[str] = None """The id of the script in the Workers system. Usually the script name.""" 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 fc27379f5..f668d054b 100644 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/__init__.py +++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/__init__.py @@ -2,7 +2,6 @@ from __future__ import annotations -from .script_get_response import ScriptGetResponse as ScriptGetResponse from .script_delete_params import ScriptDeleteParams as ScriptDeleteParams from .script_update_params import ScriptUpdateParams as ScriptUpdateParams -from .script_update_response import ScriptUpdateResponse as ScriptUpdateResponse +from .workers_namespace_script import WorkersNamespaceScript as WorkersNamespaceScript diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_get_response.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_get_response.py deleted file mode 100644 index bc807c9ec..000000000 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_get_response.py +++ /dev/null @@ -1,61 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ....._models import BaseModel - -__all__ = ["ScriptGetResponse", "Script", "ScriptTailConsumer"] - - -class ScriptTailConsumer(BaseModel): - service: str - """Name of Worker that is to be the consumer.""" - - environment: Optional[str] = None - """Optional environment if the Worker utilizes one.""" - - namespace: Optional[str] = None - """Optional dispatch namespace the script belongs to.""" - - -class Script(BaseModel): - id: Optional[str] = None - """The id of the script in the Workers system. Usually the script name.""" - - created_on: Optional[datetime] = None - """When the script was created.""" - - etag: Optional[str] = None - """Hashed script content, can be used in a If-None-Match header when updating.""" - - logpush: Optional[bool] = None - """Whether Logpush is turned on for the Worker.""" - - modified_on: Optional[datetime] = None - """When the script was last modified.""" - - pipeline_hash: Optional[str] = None - """Deprecated. Deployment metadata for internal usage.""" - - placement_mode: Optional[str] = None - """Specifies the placement mode for the Worker (e.g. 'smart').""" - - tail_consumers: Optional[List[ScriptTailConsumer]] = None - """List of Workers that will consume logs from the attached Worker.""" - - usage_model: Optional[str] = None - """Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').""" - - -class ScriptGetResponse(BaseModel): - created_on: Optional[datetime] = None - """When the script was created.""" - - dispatch_namespace: Optional[str] = None - """Name of the Workers for Platforms dispatch namespace.""" - - modified_on: Optional[datetime] = None - """When the script was last modified.""" - - script: Optional[Script] = None diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_response.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_response.py deleted file mode 100644 index 157301d89..000000000 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_response.py +++ /dev/null @@ -1,48 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ....._models import BaseModel - -__all__ = ["ScriptUpdateResponse", "TailConsumer"] - - -class TailConsumer(BaseModel): - service: str - """Name of Worker that is to be the consumer.""" - - environment: Optional[str] = None - """Optional environment if the Worker utilizes one.""" - - namespace: Optional[str] = None - """Optional dispatch namespace the script belongs to.""" - - -class ScriptUpdateResponse(BaseModel): - id: Optional[str] = None - """The id of the script in the Workers system. Usually the script name.""" - - created_on: Optional[datetime] = None - """When the script was created.""" - - etag: Optional[str] = None - """Hashed script content, can be used in a If-None-Match header when updating.""" - - logpush: Optional[bool] = None - """Whether Logpush is turned on for the Worker.""" - - modified_on: Optional[datetime] = None - """When the script was last modified.""" - - pipeline_hash: Optional[str] = None - """Deprecated. Deployment metadata for internal usage.""" - - placement_mode: Optional[str] = None - """Specifies the placement mode for the Worker (e.g. 'smart').""" - - tail_consumers: Optional[List[TailConsumer]] = None - """List of Workers that will consume logs from the attached Worker.""" - - usage_model: Optional[str] = None - """Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').""" diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/__init__.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/__init__.py index 6b95e8f5d..443f6216e 100644 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/__init__.py +++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/__init__.py @@ -7,4 +7,3 @@ from .binding_get_response import BindingGetResponse as BindingGetResponse from .script_update_params import ScriptUpdateParams as ScriptUpdateParams from .setting_get_response import SettingGetResponse as SettingGetResponse from .setting_edit_response import SettingEditResponse as SettingEditResponse -from .script_update_response import ScriptUpdateResponse as ScriptUpdateResponse diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/script_update_response.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/script_update_response.py deleted file mode 100644 index b1d3cc305..000000000 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/script_update_response.py +++ /dev/null @@ -1,48 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ......._models import BaseModel - -__all__ = ["ScriptUpdateResponse", "TailConsumer"] - - -class TailConsumer(BaseModel): - service: str - """Name of Worker that is to be the consumer.""" - - environment: Optional[str] = None - """Optional environment if the Worker utilizes one.""" - - namespace: Optional[str] = None - """Optional dispatch namespace the script belongs to.""" - - -class ScriptUpdateResponse(BaseModel): - id: Optional[str] = None - """The id of the script in the Workers system. Usually the script name.""" - - created_on: Optional[datetime] = None - """When the script was created.""" - - etag: Optional[str] = None - """Hashed script content, can be used in a If-None-Match header when updating.""" - - logpush: Optional[bool] = None - """Whether Logpush is turned on for the Worker.""" - - modified_on: Optional[datetime] = None - """When the script was last modified.""" - - pipeline_hash: Optional[str] = None - """Deprecated. Deployment metadata for internal usage.""" - - placement_mode: Optional[str] = None - """Specifies the placement mode for the Worker (e.g. 'smart').""" - - tail_consumers: Optional[List[TailConsumer]] = None - """List of Workers that will consume logs from the attached Worker.""" - - usage_model: Optional[str] = None - """Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').""" 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_namespace_script.py new file mode 100644 index 000000000..8c90ffdb3 --- /dev/null +++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/workers_namespace_script.py @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional +from datetime import datetime + +from ....workers import WorkersScript +from ....._models import BaseModel + +__all__ = ["WorkersNamespaceScript"] + + +class WorkersNamespaceScript(BaseModel): + created_on: Optional[datetime] = None + """When the script was created.""" + + dispatch_namespace: Optional[str] = None + """Name of the Workers for Platforms dispatch namespace.""" + + modified_on: Optional[datetime] = None + """When the script was last modified.""" + + script: Optional[WorkersScript] = None diff --git a/src/cloudflare/types/queue_get_response.py b/src/cloudflare/types/workers_queue.py similarity index 87% rename from src/cloudflare/types/queue_get_response.py rename to src/cloudflare/types/workers_queue.py index d04b020d5..b0736db95 100644 --- a/src/cloudflare/types/queue_get_response.py +++ b/src/cloudflare/types/workers_queue.py @@ -4,10 +4,10 @@ from typing import Optional from .._models import BaseModel -__all__ = ["QueueGetResponse"] +__all__ = ["WorkersQueue"] -class QueueGetResponse(BaseModel): +class WorkersQueue(BaseModel): consumers: Optional[object] = None consumers_total_count: Optional[object] = None diff --git a/src/cloudflare/types/queue_create_response.py b/src/cloudflare/types/workers_queue_created.py similarity index 79% rename from src/cloudflare/types/queue_create_response.py rename to src/cloudflare/types/workers_queue_created.py index de56a1425..7911dabf7 100644 --- a/src/cloudflare/types/queue_create_response.py +++ b/src/cloudflare/types/workers_queue_created.py @@ -4,10 +4,10 @@ from typing import Optional from .._models import BaseModel -__all__ = ["QueueCreateResponse"] +__all__ = ["WorkersQueueCreated"] -class QueueCreateResponse(BaseModel): +class WorkersQueueCreated(BaseModel): created_on: Optional[object] = None modified_on: Optional[object] = None diff --git a/src/cloudflare/types/queue_update_response.py b/src/cloudflare/types/workers_queue_updated.py similarity index 79% rename from src/cloudflare/types/queue_update_response.py rename to src/cloudflare/types/workers_queue_updated.py index a113abeca..e20893029 100644 --- a/src/cloudflare/types/queue_update_response.py +++ b/src/cloudflare/types/workers_queue_updated.py @@ -4,10 +4,10 @@ from typing import Optional from .._models import BaseModel -__all__ = ["QueueUpdateResponse"] +__all__ = ["WorkersQueueUpdated"] -class QueueUpdateResponse(BaseModel): +class WorkersQueueUpdated(BaseModel): created_on: Optional[object] = None modified_on: Optional[object] = None diff --git a/src/cloudflare/types/zero_trust/__init__.py b/src/cloudflare/types/zero_trust/__init__.py index d095c1af5..9d5f3f963 100644 --- a/src/cloudflare/types/zero_trust/__init__.py +++ b/src/cloudflare/types/zero_trust/__init__.py @@ -2,35 +2,31 @@ from __future__ import annotations +from .access_seats import AccessSeats as AccessSeats from .seat_edit_params import SeatEditParams as SeatEditParams 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 .device_get_response import DeviceGetResponse as DeviceGetResponse -from .tunnel_get_response import TunnelGetResponse as TunnelGetResponse +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 .tunnel_create_response import TunnelCreateResponse as TunnelCreateResponse -from .tunnel_delete_response import TunnelDeleteResponse as TunnelDeleteResponse +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 .organization_create_params import OrganizationCreateParams as OrganizationCreateParams -from .organization_list_response import OrganizationListResponse as OrganizationListResponse from .organization_update_params import OrganizationUpdateParams as OrganizationUpdateParams -from .organization_create_response import OrganizationCreateResponse as OrganizationCreateResponse -from .organization_update_response import OrganizationUpdateResponse as OrganizationUpdateResponse -from .identity_provider_get_response import IdentityProviderGetResponse as IdentityProviderGetResponse 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 from .connectivity_setting_edit_params import ConnectivitySettingEditParams as ConnectivitySettingEditParams from .organization_revoke_users_params import OrganizationRevokeUsersParams as OrganizationRevokeUsersParams from .connectivity_setting_get_response import ConnectivitySettingGetResponse as ConnectivitySettingGetResponse -from .identity_provider_create_response import IdentityProviderCreateResponse as IdentityProviderCreateResponse from .identity_provider_delete_response import IdentityProviderDeleteResponse as IdentityProviderDeleteResponse -from .identity_provider_update_response import IdentityProviderUpdateResponse as IdentityProviderUpdateResponse from .connectivity_setting_edit_response import ConnectivitySettingEditResponse as ConnectivitySettingEditResponse from .organization_revoke_users_response import OrganizationRevokeUsersResponse as OrganizationRevokeUsersResponse diff --git a/src/cloudflare/types/zero_trust/access/__init__.py b/src/cloudflare/types/zero_trust/access/__init__.py index 3a2a4666a..ad1010c1f 100644 --- a/src/cloudflare/types/zero_trust/access/__init__.py +++ b/src/cloudflare/types/zero_trust/access/__init__.py @@ -2,33 +2,29 @@ from __future__ import annotations -from .tag_get_response import TagGetResponse as TagGetResponse +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 .key_list_response import KeyListResponse as KeyListResponse 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 .group_get_response import GroupGetResponse as GroupGetResponse +from .access_custom_page import AccessCustomPage as AccessCustomPage 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_create_response import TagCreateResponse as TagCreateResponse from .tag_delete_response import TagDeleteResponse as TagDeleteResponse -from .tag_update_response import TagUpdateResponse as TagUpdateResponse -from .bookmark_get_response import BookmarkGetResponse as BookmarkGetResponse -from .group_create_response import GroupCreateResponse as GroupCreateResponse +from .access_service_tokens import AccessServiceTokens as AccessServiceTokens from .group_delete_response import GroupDeleteResponse as GroupDeleteResponse -from .group_update_response import GroupUpdateResponse as GroupUpdateResponse from .bookmark_list_response import BookmarkListResponse as BookmarkListResponse -from .application_get_response import ApplicationGetResponse as ApplicationGetResponse -from .bookmark_create_response import BookmarkCreateResponse as BookmarkCreateResponse from .bookmark_delete_response import BookmarkDeleteResponse as BookmarkDeleteResponse -from .bookmark_update_response import BookmarkUpdateResponse as BookmarkUpdateResponse -from .certificate_get_response import CertificateGetResponse as CertificateGetResponse -from .custom_page_get_response import CustomPageGetResponse as CustomPageGetResponse from .application_create_params import ApplicationCreateParams as ApplicationCreateParams from .application_list_response import ApplicationListResponse as ApplicationListResponse from .application_update_params import ApplicationUpdateParams as ApplicationUpdateParams @@ -38,20 +34,12 @@ from .certificate_update_params import CertificateUpdateParams as CertificateUpd 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 .application_create_response import ApplicationCreateResponse as ApplicationCreateResponse from .application_delete_response import ApplicationDeleteResponse as ApplicationDeleteResponse -from .application_update_response import ApplicationUpdateResponse as ApplicationUpdateResponse -from .certificate_create_response import CertificateCreateResponse as CertificateCreateResponse from .certificate_delete_response import CertificateDeleteResponse as CertificateDeleteResponse -from .certificate_update_response import CertificateUpdateResponse as CertificateUpdateResponse -from .custom_page_create_response import CustomPageCreateResponse as CustomPageCreateResponse from .custom_page_delete_response import CustomPageDeleteResponse as CustomPageDeleteResponse -from .custom_page_update_response import CustomPageUpdateResponse as CustomPageUpdateResponse 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_delete_response import ServiceTokenDeleteResponse as ServiceTokenDeleteResponse from .service_token_rotate_response import ServiceTokenRotateResponse as ServiceTokenRotateResponse -from .service_token_update_response import ServiceTokenUpdateResponse as ServiceTokenUpdateResponse -from .service_token_refresh_response import ServiceTokenRefreshResponse as ServiceTokenRefreshResponse +from .access_custom_page_without_html import AccessCustomPageWithoutHTML as AccessCustomPageWithoutHTML diff --git a/src/cloudflare/types/zero_trust/access/application_get_response.py b/src/cloudflare/types/zero_trust/access/access_apps.py similarity index 99% rename from src/cloudflare/types/zero_trust/access/application_get_response.py rename to src/cloudflare/types/zero_trust/access/access_apps.py index ec66b54c5..f8bbd617c 100644 --- a/src/cloudflare/types/zero_trust/access/application_get_response.py +++ b/src/cloudflare/types/zero_trust/access/access_apps.py @@ -7,7 +7,7 @@ from typing_extensions import Literal from ...._models import BaseModel __all__ = [ - "ApplicationGetResponse", + "AccessApps", "SelfHostedApplication", "SelfHostedApplicationCorsHeaders", "SaaSApplication", @@ -818,7 +818,7 @@ class BookmarkApplication(BaseModel): updated_at: Optional[datetime] = None -ApplicationGetResponse = Union[ +AccessApps = Union[ SelfHostedApplication, SaaSApplication, BrowserSSHApplication, diff --git a/src/cloudflare/types/zero_trust/access/bookmark_get_response.py b/src/cloudflare/types/zero_trust/access/access_bookmarks.py similarity index 90% rename from src/cloudflare/types/zero_trust/access/bookmark_get_response.py rename to src/cloudflare/types/zero_trust/access/access_bookmarks.py index a77953829..501c869bc 100644 --- a/src/cloudflare/types/zero_trust/access/bookmark_get_response.py +++ b/src/cloudflare/types/zero_trust/access/access_bookmarks.py @@ -5,10 +5,10 @@ from datetime import datetime from ...._models import BaseModel -__all__ = ["BookmarkGetResponse"] +__all__ = ["AccessBookmarks"] -class BookmarkGetResponse(BaseModel): +class AccessBookmarks(BaseModel): id: Optional[object] = None """The unique identifier for the Bookmark application.""" diff --git a/src/cloudflare/types/zero_trust/access/certificate_get_response.py b/src/cloudflare/types/zero_trust/access/access_certificates.py similarity index 89% rename from src/cloudflare/types/zero_trust/access/certificate_get_response.py rename to src/cloudflare/types/zero_trust/access/access_certificates.py index f3307a513..1ecbc5111 100644 --- a/src/cloudflare/types/zero_trust/access/certificate_get_response.py +++ b/src/cloudflare/types/zero_trust/access/access_certificates.py @@ -5,10 +5,10 @@ from datetime import datetime from ...._models import BaseModel -__all__ = ["CertificateGetResponse"] +__all__ = ["AccessCertificates"] -class CertificateGetResponse(BaseModel): +class AccessCertificates(BaseModel): id: Optional[object] = None """The ID of the application that will use this certificate.""" diff --git a/src/cloudflare/types/zero_trust/access/custom_page_get_response.py b/src/cloudflare/types/zero_trust/access/access_custom_page.py similarity index 88% rename from src/cloudflare/types/zero_trust/access/custom_page_get_response.py rename to src/cloudflare/types/zero_trust/access/access_custom_page.py index c88bd5d48..a817c2138 100644 --- a/src/cloudflare/types/zero_trust/access/custom_page_get_response.py +++ b/src/cloudflare/types/zero_trust/access/access_custom_page.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["CustomPageGetResponse"] +__all__ = ["AccessCustomPage"] -class CustomPageGetResponse(BaseModel): +class AccessCustomPage(BaseModel): custom_html: str """Custom page HTML.""" diff --git a/src/cloudflare/types/zero_trust/access/custom_page_create_response.py b/src/cloudflare/types/zero_trust/access/access_custom_page_without_html.py similarity index 85% rename from src/cloudflare/types/zero_trust/access/custom_page_create_response.py rename to src/cloudflare/types/zero_trust/access/access_custom_page_without_html.py index f4172e36f..b89690be7 100644 --- a/src/cloudflare/types/zero_trust/access/custom_page_create_response.py +++ b/src/cloudflare/types/zero_trust/access/access_custom_page_without_html.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["CustomPageCreateResponse"] +__all__ = ["AccessCustomPageWithoutHTML"] -class CustomPageCreateResponse(BaseModel): +class AccessCustomPageWithoutHTML(BaseModel): name: str """Custom page name.""" diff --git a/src/cloudflare/types/zero_trust/access/group_get_response.py b/src/cloudflare/types/zero_trust/access/access_groups.py similarity index 99% rename from src/cloudflare/types/zero_trust/access/group_get_response.py rename to src/cloudflare/types/zero_trust/access/access_groups.py index 1fbafbeae..8375fba68 100644 --- a/src/cloudflare/types/zero_trust/access/group_get_response.py +++ b/src/cloudflare/types/zero_trust/access/access_groups.py @@ -8,7 +8,7 @@ from pydantic import Field as FieldInfo from ...._models import BaseModel __all__ = [ - "GroupGetResponse", + "AccessGroups", "Exclude", "ExcludeAccessEmailRule", "ExcludeAccessEmailRuleEmail", @@ -974,7 +974,7 @@ Require = Union[ ] -class GroupGetResponse(BaseModel): +class AccessGroups(BaseModel): id: Optional[str] = None """UUID""" diff --git a/src/cloudflare/types/zero_trust/access/service_token_delete_response.py b/src/cloudflare/types/zero_trust/access/access_service_tokens.py similarity index 90% rename from src/cloudflare/types/zero_trust/access/service_token_delete_response.py rename to src/cloudflare/types/zero_trust/access/access_service_tokens.py index 10214b4cb..9590a57cc 100644 --- a/src/cloudflare/types/zero_trust/access/service_token_delete_response.py +++ b/src/cloudflare/types/zero_trust/access/access_service_tokens.py @@ -5,10 +5,10 @@ from datetime import datetime from ...._models import BaseModel -__all__ = ["ServiceTokenDeleteResponse"] +__all__ = ["AccessServiceTokens"] -class ServiceTokenDeleteResponse(BaseModel): +class AccessServiceTokens(BaseModel): id: Optional[object] = None """The ID of the service token.""" diff --git a/src/cloudflare/types/zero_trust/access/tag_get_response.py b/src/cloudflare/types/zero_trust/access/access_tag.py similarity index 85% rename from src/cloudflare/types/zero_trust/access/tag_get_response.py rename to src/cloudflare/types/zero_trust/access/access_tag.py index 4ad2b9883..66e2c5423 100644 --- a/src/cloudflare/types/zero_trust/access/tag_get_response.py +++ b/src/cloudflare/types/zero_trust/access/access_tag.py @@ -5,10 +5,10 @@ from datetime import datetime from ...._models import BaseModel -__all__ = ["TagGetResponse"] +__all__ = ["AccessTag"] -class TagGetResponse(BaseModel): +class AccessTag(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/access_users.py new file mode 100644 index 000000000..fb630ec35 --- /dev/null +++ b/src/cloudflare/types/zero_trust/access/access_users.py @@ -0,0 +1,41 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional +from datetime import datetime + +from ...._models import BaseModel + +__all__ = ["AccessUsers"] + + +class AccessUsers(BaseModel): + id: Optional[str] = None + """UUID""" + + access_seat: Optional[bool] = None + """True if the user has authenticated with Cloudflare Access.""" + + active_device_count: Optional[float] = None + """The number of active devices registered to the user.""" + + created_at: Optional[datetime] = None + + email: Optional[str] = None + """The email of the user.""" + + gateway_seat: Optional[bool] = None + """True if the user has logged into the WARP client.""" + + last_successful_login: Optional[datetime] = None + """The time at which the user last successfully logged in.""" + + name: Optional[str] = None + """The name of the user.""" + + seat_uid: Optional[object] = None + """The unique API identifier for the Zero Trust seat.""" + + uid: Optional[object] = None + """The unique API identifier for the user.""" + + updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/access/application_create_response.py b/src/cloudflare/types/zero_trust/access/application_create_response.py deleted file mode 100644 index ef524f2b8..000000000 --- a/src/cloudflare/types/zero_trust/access/application_create_response.py +++ /dev/null @@ -1,830 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = [ - "ApplicationCreateResponse", - "SelfHostedApplication", - "SelfHostedApplicationCorsHeaders", - "SaaSApplication", - "SaaSApplicationSaasApp", - "SaaSApplicationSaasAppAccessSamlSaasApp", - "SaaSApplicationSaasAppAccessSamlSaasAppCustomAttributes", - "SaaSApplicationSaasAppAccessSamlSaasAppCustomAttributesSource", - "SaaSApplicationSaasAppAccessOidcSaasApp", - "BrowserSSHApplication", - "BrowserSSHApplicationCorsHeaders", - "BrowserVncApplication", - "BrowserVncApplicationCorsHeaders", - "AppLauncherApplication", - "DeviceEnrollmentPermissionsApplication", - "BrowserIsolationPermissionsApplication", - "BookmarkApplication", -] - - -class SelfHostedApplicationCorsHeaders(BaseModel): - allow_all_headers: Optional[bool] = None - """Allows all HTTP request headers.""" - - allow_all_methods: Optional[bool] = None - """Allows all HTTP request methods.""" - - allow_all_origins: Optional[bool] = None - """Allows all origins.""" - - allow_credentials: Optional[bool] = None - """ - When set to `true`, includes credentials (cookies, authorization headers, or TLS - client certificates) with requests. - """ - - allowed_headers: Optional[List[object]] = None - """Allowed HTTP request headers.""" - - allowed_methods: Optional[ - List[Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] - ] = None - """Allowed HTTP request methods.""" - - allowed_origins: Optional[List[object]] = None - """Allowed origins.""" - - max_age: Optional[float] = None - """The maximum number of seconds the results of a preflight request can be cached.""" - - -class SelfHostedApplication(BaseModel): - domain: str - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - type: str - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allow_authenticate_via_warp: Optional[bool] = None - """ - When set to true, users can authenticate to this application using their WARP - session. When set to false this application will always require direct IdP - authentication. This setting always overrides the organization setting for WARP - authentication. - """ - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - app_launcher_visible: Optional[bool] = None - """Displays the application in the App Launcher.""" - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - cors_headers: Optional[SelfHostedApplicationCorsHeaders] = None - - created_at: Optional[datetime] = None - - custom_deny_message: Optional[str] = None - """ - The custom error message shown to a user when they are denied access to the - application. - """ - - custom_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing identity-based rules. - """ - - custom_non_identity_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing non-identity rules. - """ - - custom_pages: Optional[List[str]] = None - """The custom pages that will be displayed when applicable for this application""" - - enable_binding_cookie: Optional[bool] = None - """ - Enables the binding cookie, which increases security against compromised - authorization tokens and CSRF attacks. - """ - - http_only_cookie_attribute: Optional[bool] = None - """ - Enables the HttpOnly cookie attribute, which increases security against XSS - attacks. - """ - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the application.""" - - path_cookie_attribute: Optional[bool] = None - """Enables cookie paths to scope an application's JWT to the application path. - - If disabled, the JWT will scope to the hostname by default - """ - - same_site_cookie_attribute: Optional[str] = None - """ - Sets the SameSite cookie setting, which provides increased security against CSRF - attacks. - """ - - self_hosted_domains: Optional[List[str]] = None - """List of domains that Access will secure.""" - - service_auth_401_redirect: Optional[bool] = None - """Returns a 401 status code when the request is blocked by a Service Auth policy.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - skip_interstitial: Optional[bool] = None - """Enables automatic authentication through cloudflared.""" - - tags: Optional[List[str]] = None - """The tags you want assigned to an application. - - Tags are used to filter applications in the App Launcher dashboard. - """ - - updated_at: Optional[datetime] = None - - -class SaaSApplicationSaasAppAccessSamlSaasAppCustomAttributesSource(BaseModel): - name: Optional[str] = None - """The name of the IdP attribute.""" - - -class SaaSApplicationSaasAppAccessSamlSaasAppCustomAttributes(BaseModel): - name: Optional[str] = None - """The name of the attribute.""" - - name_format: Optional[ - Literal[ - "urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified", - "urn:oasis:names:tc:SAML:2.0:attrname-format:basic", - "urn:oasis:names:tc:SAML:2.0:attrname-format:uri", - ] - ] = None - """A globally unique name for an identity or service provider.""" - - source: Optional[SaaSApplicationSaasAppAccessSamlSaasAppCustomAttributesSource] = None - - -class SaaSApplicationSaasAppAccessSamlSaasApp(BaseModel): - auth_type: Optional[Literal["saml", "oidc"]] = None - """Optional identifier indicating the authentication protocol used for the saas - app. - - Required for OIDC. Default if unset is "saml" - """ - - consumer_service_url: Optional[str] = None - """ - The service provider's endpoint that is responsible for receiving and parsing a - SAML assertion. - """ - - created_at: Optional[datetime] = None - - custom_attributes: Optional[SaaSApplicationSaasAppAccessSamlSaasAppCustomAttributes] = None - - default_relay_state: Optional[str] = None - """ - The URL that the user will be redirected to after a successful login for IDP - initiated logins. - """ - - idp_entity_id: Optional[str] = None - """The unique identifier for your SaaS application.""" - - name_id_format: Optional[Literal["id", "email"]] = None - """The format of the name identifier sent to the SaaS application.""" - - name_id_transform_jsonata: Optional[str] = None - """ - A [JSONata](https://jsonata.org/) expression that transforms an application's - user identities into a NameID value for its SAML assertion. This expression - should evaluate to a singular string. The output of this expression can override - the `name_id_format` setting. - """ - - public_key: Optional[str] = None - """The Access public certificate that will be used to verify your identity.""" - - sp_entity_id: Optional[str] = None - """A globally unique name for an identity or service provider.""" - - sso_endpoint: Optional[str] = None - """The endpoint where your SaaS application will send login requests.""" - - updated_at: Optional[datetime] = None - - -class SaaSApplicationSaasAppAccessOidcSaasApp(BaseModel): - app_launcher_url: Optional[str] = None - """The URL where this applications tile redirects users""" - - auth_type: Optional[Literal["saml", "oidc"]] = None - """Identifier of the authentication protocol used for the saas app. - - Required for OIDC. - """ - - client_id: Optional[str] = None - """The application client id""" - - client_secret: Optional[str] = None - """The application client secret, only returned on POST request.""" - - created_at: Optional[datetime] = None - - grant_types: Optional[List[Literal["authorization_code", "authorization_code_with_pkce"]]] = None - """The OIDC flows supported by this application""" - - group_filter_regex: Optional[str] = None - """A regex to filter Cloudflare groups returned in ID token and userinfo endpoint""" - - public_key: Optional[str] = None - """The Access public certificate that will be used to verify your identity.""" - - redirect_uris: Optional[List[str]] = None - """ - The permitted URL's for Cloudflare to return Authorization codes and Access/ID - tokens - """ - - scopes: Optional[List[Literal["openid", "groups", "email", "profile"]]] = None - """Define the user information shared with access""" - - updated_at: Optional[datetime] = None - - -SaaSApplicationSaasApp = Union[SaaSApplicationSaasAppAccessSamlSaasApp, SaaSApplicationSaasAppAccessOidcSaasApp] - - -class SaaSApplication(BaseModel): - id: Optional[str] = None - """UUID""" - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - app_launcher_visible: Optional[bool] = None - """Displays the application in the App Launcher.""" - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - created_at: Optional[datetime] = None - - custom_pages: Optional[List[str]] = None - """The custom pages that will be displayed when applicable for this application""" - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the application.""" - - saas_app: Optional[SaaSApplicationSaasApp] = None - - tags: Optional[List[str]] = None - """The tags you want assigned to an application. - - Tags are used to filter applications in the App Launcher dashboard. - """ - - type: Optional[str] = None - """The application type.""" - - updated_at: Optional[datetime] = None - - -class BrowserSSHApplicationCorsHeaders(BaseModel): - allow_all_headers: Optional[bool] = None - """Allows all HTTP request headers.""" - - allow_all_methods: Optional[bool] = None - """Allows all HTTP request methods.""" - - allow_all_origins: Optional[bool] = None - """Allows all origins.""" - - allow_credentials: Optional[bool] = None - """ - When set to `true`, includes credentials (cookies, authorization headers, or TLS - client certificates) with requests. - """ - - allowed_headers: Optional[List[object]] = None - """Allowed HTTP request headers.""" - - allowed_methods: Optional[ - List[Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] - ] = None - """Allowed HTTP request methods.""" - - allowed_origins: Optional[List[object]] = None - """Allowed origins.""" - - max_age: Optional[float] = None - """The maximum number of seconds the results of a preflight request can be cached.""" - - -class BrowserSSHApplication(BaseModel): - domain: str - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - type: str - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allow_authenticate_via_warp: Optional[bool] = None - """ - When set to true, users can authenticate to this application using their WARP - session. When set to false this application will always require direct IdP - authentication. This setting always overrides the organization setting for WARP - authentication. - """ - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - app_launcher_visible: Optional[bool] = None - """Displays the application in the App Launcher.""" - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - cors_headers: Optional[BrowserSSHApplicationCorsHeaders] = None - - created_at: Optional[datetime] = None - - custom_deny_message: Optional[str] = None - """ - The custom error message shown to a user when they are denied access to the - application. - """ - - custom_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing identity-based rules. - """ - - custom_non_identity_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing non-identity rules. - """ - - custom_pages: Optional[List[str]] = None - """The custom pages that will be displayed when applicable for this application""" - - enable_binding_cookie: Optional[bool] = None - """ - Enables the binding cookie, which increases security against compromised - authorization tokens and CSRF attacks. - """ - - http_only_cookie_attribute: Optional[bool] = None - """ - Enables the HttpOnly cookie attribute, which increases security against XSS - attacks. - """ - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the application.""" - - path_cookie_attribute: Optional[bool] = None - """Enables cookie paths to scope an application's JWT to the application path. - - If disabled, the JWT will scope to the hostname by default - """ - - same_site_cookie_attribute: Optional[str] = None - """ - Sets the SameSite cookie setting, which provides increased security against CSRF - attacks. - """ - - self_hosted_domains: Optional[List[str]] = None - """List of domains that Access will secure.""" - - service_auth_401_redirect: Optional[bool] = None - """Returns a 401 status code when the request is blocked by a Service Auth policy.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - skip_interstitial: Optional[bool] = None - """Enables automatic authentication through cloudflared.""" - - tags: Optional[List[str]] = None - """The tags you want assigned to an application. - - Tags are used to filter applications in the App Launcher dashboard. - """ - - updated_at: Optional[datetime] = None - - -class BrowserVncApplicationCorsHeaders(BaseModel): - allow_all_headers: Optional[bool] = None - """Allows all HTTP request headers.""" - - allow_all_methods: Optional[bool] = None - """Allows all HTTP request methods.""" - - allow_all_origins: Optional[bool] = None - """Allows all origins.""" - - allow_credentials: Optional[bool] = None - """ - When set to `true`, includes credentials (cookies, authorization headers, or TLS - client certificates) with requests. - """ - - allowed_headers: Optional[List[object]] = None - """Allowed HTTP request headers.""" - - allowed_methods: Optional[ - List[Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] - ] = None - """Allowed HTTP request methods.""" - - allowed_origins: Optional[List[object]] = None - """Allowed origins.""" - - max_age: Optional[float] = None - """The maximum number of seconds the results of a preflight request can be cached.""" - - -class BrowserVncApplication(BaseModel): - domain: str - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - type: str - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allow_authenticate_via_warp: Optional[bool] = None - """ - When set to true, users can authenticate to this application using their WARP - session. When set to false this application will always require direct IdP - authentication. This setting always overrides the organization setting for WARP - authentication. - """ - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - app_launcher_visible: Optional[bool] = None - """Displays the application in the App Launcher.""" - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - cors_headers: Optional[BrowserVncApplicationCorsHeaders] = None - - created_at: Optional[datetime] = None - - custom_deny_message: Optional[str] = None - """ - The custom error message shown to a user when they are denied access to the - application. - """ - - custom_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing identity-based rules. - """ - - custom_non_identity_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing non-identity rules. - """ - - custom_pages: Optional[List[str]] = None - """The custom pages that will be displayed when applicable for this application""" - - enable_binding_cookie: Optional[bool] = None - """ - Enables the binding cookie, which increases security against compromised - authorization tokens and CSRF attacks. - """ - - http_only_cookie_attribute: Optional[bool] = None - """ - Enables the HttpOnly cookie attribute, which increases security against XSS - attacks. - """ - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the application.""" - - path_cookie_attribute: Optional[bool] = None - """Enables cookie paths to scope an application's JWT to the application path. - - If disabled, the JWT will scope to the hostname by default - """ - - same_site_cookie_attribute: Optional[str] = None - """ - Sets the SameSite cookie setting, which provides increased security against CSRF - attacks. - """ - - self_hosted_domains: Optional[List[str]] = None - """List of domains that Access will secure.""" - - service_auth_401_redirect: Optional[bool] = None - """Returns a 401 status code when the request is blocked by a Service Auth policy.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - skip_interstitial: Optional[bool] = None - """Enables automatic authentication through cloudflared.""" - - tags: Optional[List[str]] = None - """The tags you want assigned to an application. - - Tags are used to filter applications in the App Launcher dashboard. - """ - - updated_at: Optional[datetime] = None - - -class AppLauncherApplication(BaseModel): - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - created_at: Optional[datetime] = None - - domain: Optional[str] = None - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - name: Optional[str] = None - """The name of the application.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - updated_at: Optional[datetime] = None - - -class DeviceEnrollmentPermissionsApplication(BaseModel): - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - created_at: Optional[datetime] = None - - domain: Optional[str] = None - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - name: Optional[str] = None - """The name of the application.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - updated_at: Optional[datetime] = None - - -class BrowserIsolationPermissionsApplication(BaseModel): - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - created_at: Optional[datetime] = None - - domain: Optional[str] = None - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - name: Optional[str] = None - """The name of the application.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - updated_at: Optional[datetime] = None - - -class BookmarkApplication(BaseModel): - id: Optional[str] = None - """UUID""" - - app_launcher_visible: Optional[object] = None - - aud: Optional[str] = None - """Audience tag.""" - - created_at: Optional[datetime] = None - - domain: Optional[object] = None - """The URL or domain of the bookmark.""" - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the application.""" - - tags: Optional[List[str]] = None - """The tags you want assigned to an application. - - Tags are used to filter applications in the App Launcher dashboard. - """ - - type: Optional[str] = None - """The application type.""" - - updated_at: Optional[datetime] = None - - -ApplicationCreateResponse = Union[ - SelfHostedApplication, - SaaSApplication, - BrowserSSHApplication, - BrowserVncApplication, - AppLauncherApplication, - DeviceEnrollmentPermissionsApplication, - BrowserIsolationPermissionsApplication, - BookmarkApplication, -] 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 ff0d059a5..35edb9841 100644 --- a/src/cloudflare/types/zero_trust/access/application_list_response.py +++ b/src/cloudflare/types/zero_trust/access/application_list_response.py @@ -1,838 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ...._models import BaseModel +from .access_apps import AccessApps -__all__ = [ - "ApplicationListResponse", - "ApplicationListResponseItem", - "ApplicationListResponseItemSelfHostedApplication", - "ApplicationListResponseItemSelfHostedApplicationCorsHeaders", - "ApplicationListResponseItemSaaSApplication", - "ApplicationListResponseItemSaaSApplicationSaasApp", - "ApplicationListResponseItemSaaSApplicationSaasAppAccessSamlSaasApp", - "ApplicationListResponseItemSaaSApplicationSaasAppAccessSamlSaasAppCustomAttributes", - "ApplicationListResponseItemSaaSApplicationSaasAppAccessSamlSaasAppCustomAttributesSource", - "ApplicationListResponseItemSaaSApplicationSaasAppAccessOidcSaasApp", - "ApplicationListResponseItemBrowserSSHApplication", - "ApplicationListResponseItemBrowserSSHApplicationCorsHeaders", - "ApplicationListResponseItemBrowserVncApplication", - "ApplicationListResponseItemBrowserVncApplicationCorsHeaders", - "ApplicationListResponseItemAppLauncherApplication", - "ApplicationListResponseItemDeviceEnrollmentPermissionsApplication", - "ApplicationListResponseItemBrowserIsolationPermissionsApplication", - "ApplicationListResponseItemBookmarkApplication", -] +__all__ = ["ApplicationListResponse"] - -class ApplicationListResponseItemSelfHostedApplicationCorsHeaders(BaseModel): - allow_all_headers: Optional[bool] = None - """Allows all HTTP request headers.""" - - allow_all_methods: Optional[bool] = None - """Allows all HTTP request methods.""" - - allow_all_origins: Optional[bool] = None - """Allows all origins.""" - - allow_credentials: Optional[bool] = None - """ - When set to `true`, includes credentials (cookies, authorization headers, or TLS - client certificates) with requests. - """ - - allowed_headers: Optional[List[object]] = None - """Allowed HTTP request headers.""" - - allowed_methods: Optional[ - List[Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] - ] = None - """Allowed HTTP request methods.""" - - allowed_origins: Optional[List[object]] = None - """Allowed origins.""" - - max_age: Optional[float] = None - """The maximum number of seconds the results of a preflight request can be cached.""" - - -class ApplicationListResponseItemSelfHostedApplication(BaseModel): - domain: str - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - type: str - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allow_authenticate_via_warp: Optional[bool] = None - """ - When set to true, users can authenticate to this application using their WARP - session. When set to false this application will always require direct IdP - authentication. This setting always overrides the organization setting for WARP - authentication. - """ - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - app_launcher_visible: Optional[bool] = None - """Displays the application in the App Launcher.""" - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - cors_headers: Optional[ApplicationListResponseItemSelfHostedApplicationCorsHeaders] = None - - created_at: Optional[datetime] = None - - custom_deny_message: Optional[str] = None - """ - The custom error message shown to a user when they are denied access to the - application. - """ - - custom_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing identity-based rules. - """ - - custom_non_identity_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing non-identity rules. - """ - - custom_pages: Optional[List[str]] = None - """The custom pages that will be displayed when applicable for this application""" - - enable_binding_cookie: Optional[bool] = None - """ - Enables the binding cookie, which increases security against compromised - authorization tokens and CSRF attacks. - """ - - http_only_cookie_attribute: Optional[bool] = None - """ - Enables the HttpOnly cookie attribute, which increases security against XSS - attacks. - """ - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the application.""" - - path_cookie_attribute: Optional[bool] = None - """Enables cookie paths to scope an application's JWT to the application path. - - If disabled, the JWT will scope to the hostname by default - """ - - same_site_cookie_attribute: Optional[str] = None - """ - Sets the SameSite cookie setting, which provides increased security against CSRF - attacks. - """ - - self_hosted_domains: Optional[List[str]] = None - """List of domains that Access will secure.""" - - service_auth_401_redirect: Optional[bool] = None - """Returns a 401 status code when the request is blocked by a Service Auth policy.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - skip_interstitial: Optional[bool] = None - """Enables automatic authentication through cloudflared.""" - - tags: Optional[List[str]] = None - """The tags you want assigned to an application. - - Tags are used to filter applications in the App Launcher dashboard. - """ - - updated_at: Optional[datetime] = None - - -class ApplicationListResponseItemSaaSApplicationSaasAppAccessSamlSaasAppCustomAttributesSource(BaseModel): - name: Optional[str] = None - """The name of the IdP attribute.""" - - -class ApplicationListResponseItemSaaSApplicationSaasAppAccessSamlSaasAppCustomAttributes(BaseModel): - name: Optional[str] = None - """The name of the attribute.""" - - name_format: Optional[ - Literal[ - "urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified", - "urn:oasis:names:tc:SAML:2.0:attrname-format:basic", - "urn:oasis:names:tc:SAML:2.0:attrname-format:uri", - ] - ] = None - """A globally unique name for an identity or service provider.""" - - source: Optional[ApplicationListResponseItemSaaSApplicationSaasAppAccessSamlSaasAppCustomAttributesSource] = None - - -class ApplicationListResponseItemSaaSApplicationSaasAppAccessSamlSaasApp(BaseModel): - auth_type: Optional[Literal["saml", "oidc"]] = None - """Optional identifier indicating the authentication protocol used for the saas - app. - - Required for OIDC. Default if unset is "saml" - """ - - consumer_service_url: Optional[str] = None - """ - The service provider's endpoint that is responsible for receiving and parsing a - SAML assertion. - """ - - created_at: Optional[datetime] = None - - custom_attributes: Optional[ - ApplicationListResponseItemSaaSApplicationSaasAppAccessSamlSaasAppCustomAttributes - ] = None - - default_relay_state: Optional[str] = None - """ - The URL that the user will be redirected to after a successful login for IDP - initiated logins. - """ - - idp_entity_id: Optional[str] = None - """The unique identifier for your SaaS application.""" - - name_id_format: Optional[Literal["id", "email"]] = None - """The format of the name identifier sent to the SaaS application.""" - - name_id_transform_jsonata: Optional[str] = None - """ - A [JSONata](https://jsonata.org/) expression that transforms an application's - user identities into a NameID value for its SAML assertion. This expression - should evaluate to a singular string. The output of this expression can override - the `name_id_format` setting. - """ - - public_key: Optional[str] = None - """The Access public certificate that will be used to verify your identity.""" - - sp_entity_id: Optional[str] = None - """A globally unique name for an identity or service provider.""" - - sso_endpoint: Optional[str] = None - """The endpoint where your SaaS application will send login requests.""" - - updated_at: Optional[datetime] = None - - -class ApplicationListResponseItemSaaSApplicationSaasAppAccessOidcSaasApp(BaseModel): - app_launcher_url: Optional[str] = None - """The URL where this applications tile redirects users""" - - auth_type: Optional[Literal["saml", "oidc"]] = None - """Identifier of the authentication protocol used for the saas app. - - Required for OIDC. - """ - - client_id: Optional[str] = None - """The application client id""" - - client_secret: Optional[str] = None - """The application client secret, only returned on POST request.""" - - created_at: Optional[datetime] = None - - grant_types: Optional[List[Literal["authorization_code", "authorization_code_with_pkce"]]] = None - """The OIDC flows supported by this application""" - - group_filter_regex: Optional[str] = None - """A regex to filter Cloudflare groups returned in ID token and userinfo endpoint""" - - public_key: Optional[str] = None - """The Access public certificate that will be used to verify your identity.""" - - redirect_uris: Optional[List[str]] = None - """ - The permitted URL's for Cloudflare to return Authorization codes and Access/ID - tokens - """ - - scopes: Optional[List[Literal["openid", "groups", "email", "profile"]]] = None - """Define the user information shared with access""" - - updated_at: Optional[datetime] = None - - -ApplicationListResponseItemSaaSApplicationSaasApp = Union[ - ApplicationListResponseItemSaaSApplicationSaasAppAccessSamlSaasApp, - ApplicationListResponseItemSaaSApplicationSaasAppAccessOidcSaasApp, -] - - -class ApplicationListResponseItemSaaSApplication(BaseModel): - id: Optional[str] = None - """UUID""" - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - app_launcher_visible: Optional[bool] = None - """Displays the application in the App Launcher.""" - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - created_at: Optional[datetime] = None - - custom_pages: Optional[List[str]] = None - """The custom pages that will be displayed when applicable for this application""" - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the application.""" - - saas_app: Optional[ApplicationListResponseItemSaaSApplicationSaasApp] = None - - tags: Optional[List[str]] = None - """The tags you want assigned to an application. - - Tags are used to filter applications in the App Launcher dashboard. - """ - - type: Optional[str] = None - """The application type.""" - - updated_at: Optional[datetime] = None - - -class ApplicationListResponseItemBrowserSSHApplicationCorsHeaders(BaseModel): - allow_all_headers: Optional[bool] = None - """Allows all HTTP request headers.""" - - allow_all_methods: Optional[bool] = None - """Allows all HTTP request methods.""" - - allow_all_origins: Optional[bool] = None - """Allows all origins.""" - - allow_credentials: Optional[bool] = None - """ - When set to `true`, includes credentials (cookies, authorization headers, or TLS - client certificates) with requests. - """ - - allowed_headers: Optional[List[object]] = None - """Allowed HTTP request headers.""" - - allowed_methods: Optional[ - List[Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] - ] = None - """Allowed HTTP request methods.""" - - allowed_origins: Optional[List[object]] = None - """Allowed origins.""" - - max_age: Optional[float] = None - """The maximum number of seconds the results of a preflight request can be cached.""" - - -class ApplicationListResponseItemBrowserSSHApplication(BaseModel): - domain: str - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - type: str - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allow_authenticate_via_warp: Optional[bool] = None - """ - When set to true, users can authenticate to this application using their WARP - session. When set to false this application will always require direct IdP - authentication. This setting always overrides the organization setting for WARP - authentication. - """ - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - app_launcher_visible: Optional[bool] = None - """Displays the application in the App Launcher.""" - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - cors_headers: Optional[ApplicationListResponseItemBrowserSSHApplicationCorsHeaders] = None - - created_at: Optional[datetime] = None - - custom_deny_message: Optional[str] = None - """ - The custom error message shown to a user when they are denied access to the - application. - """ - - custom_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing identity-based rules. - """ - - custom_non_identity_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing non-identity rules. - """ - - custom_pages: Optional[List[str]] = None - """The custom pages that will be displayed when applicable for this application""" - - enable_binding_cookie: Optional[bool] = None - """ - Enables the binding cookie, which increases security against compromised - authorization tokens and CSRF attacks. - """ - - http_only_cookie_attribute: Optional[bool] = None - """ - Enables the HttpOnly cookie attribute, which increases security against XSS - attacks. - """ - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the application.""" - - path_cookie_attribute: Optional[bool] = None - """Enables cookie paths to scope an application's JWT to the application path. - - If disabled, the JWT will scope to the hostname by default - """ - - same_site_cookie_attribute: Optional[str] = None - """ - Sets the SameSite cookie setting, which provides increased security against CSRF - attacks. - """ - - self_hosted_domains: Optional[List[str]] = None - """List of domains that Access will secure.""" - - service_auth_401_redirect: Optional[bool] = None - """Returns a 401 status code when the request is blocked by a Service Auth policy.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - skip_interstitial: Optional[bool] = None - """Enables automatic authentication through cloudflared.""" - - tags: Optional[List[str]] = None - """The tags you want assigned to an application. - - Tags are used to filter applications in the App Launcher dashboard. - """ - - updated_at: Optional[datetime] = None - - -class ApplicationListResponseItemBrowserVncApplicationCorsHeaders(BaseModel): - allow_all_headers: Optional[bool] = None - """Allows all HTTP request headers.""" - - allow_all_methods: Optional[bool] = None - """Allows all HTTP request methods.""" - - allow_all_origins: Optional[bool] = None - """Allows all origins.""" - - allow_credentials: Optional[bool] = None - """ - When set to `true`, includes credentials (cookies, authorization headers, or TLS - client certificates) with requests. - """ - - allowed_headers: Optional[List[object]] = None - """Allowed HTTP request headers.""" - - allowed_methods: Optional[ - List[Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] - ] = None - """Allowed HTTP request methods.""" - - allowed_origins: Optional[List[object]] = None - """Allowed origins.""" - - max_age: Optional[float] = None - """The maximum number of seconds the results of a preflight request can be cached.""" - - -class ApplicationListResponseItemBrowserVncApplication(BaseModel): - domain: str - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - type: str - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allow_authenticate_via_warp: Optional[bool] = None - """ - When set to true, users can authenticate to this application using their WARP - session. When set to false this application will always require direct IdP - authentication. This setting always overrides the organization setting for WARP - authentication. - """ - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - app_launcher_visible: Optional[bool] = None - """Displays the application in the App Launcher.""" - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - cors_headers: Optional[ApplicationListResponseItemBrowserVncApplicationCorsHeaders] = None - - created_at: Optional[datetime] = None - - custom_deny_message: Optional[str] = None - """ - The custom error message shown to a user when they are denied access to the - application. - """ - - custom_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing identity-based rules. - """ - - custom_non_identity_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing non-identity rules. - """ - - custom_pages: Optional[List[str]] = None - """The custom pages that will be displayed when applicable for this application""" - - enable_binding_cookie: Optional[bool] = None - """ - Enables the binding cookie, which increases security against compromised - authorization tokens and CSRF attacks. - """ - - http_only_cookie_attribute: Optional[bool] = None - """ - Enables the HttpOnly cookie attribute, which increases security against XSS - attacks. - """ - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the application.""" - - path_cookie_attribute: Optional[bool] = None - """Enables cookie paths to scope an application's JWT to the application path. - - If disabled, the JWT will scope to the hostname by default - """ - - same_site_cookie_attribute: Optional[str] = None - """ - Sets the SameSite cookie setting, which provides increased security against CSRF - attacks. - """ - - self_hosted_domains: Optional[List[str]] = None - """List of domains that Access will secure.""" - - service_auth_401_redirect: Optional[bool] = None - """Returns a 401 status code when the request is blocked by a Service Auth policy.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - skip_interstitial: Optional[bool] = None - """Enables automatic authentication through cloudflared.""" - - tags: Optional[List[str]] = None - """The tags you want assigned to an application. - - Tags are used to filter applications in the App Launcher dashboard. - """ - - updated_at: Optional[datetime] = None - - -class ApplicationListResponseItemAppLauncherApplication(BaseModel): - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - created_at: Optional[datetime] = None - - domain: Optional[str] = None - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - name: Optional[str] = None - """The name of the application.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - updated_at: Optional[datetime] = None - - -class ApplicationListResponseItemDeviceEnrollmentPermissionsApplication(BaseModel): - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - created_at: Optional[datetime] = None - - domain: Optional[str] = None - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - name: Optional[str] = None - """The name of the application.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - updated_at: Optional[datetime] = None - - -class ApplicationListResponseItemBrowserIsolationPermissionsApplication(BaseModel): - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - created_at: Optional[datetime] = None - - domain: Optional[str] = None - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - name: Optional[str] = None - """The name of the application.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - updated_at: Optional[datetime] = None - - -class ApplicationListResponseItemBookmarkApplication(BaseModel): - id: Optional[str] = None - """UUID""" - - app_launcher_visible: Optional[object] = None - - aud: Optional[str] = None - """Audience tag.""" - - created_at: Optional[datetime] = None - - domain: Optional[object] = None - """The URL or domain of the bookmark.""" - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the application.""" - - tags: Optional[List[str]] = None - """The tags you want assigned to an application. - - Tags are used to filter applications in the App Launcher dashboard. - """ - - type: Optional[str] = None - """The application type.""" - - updated_at: Optional[datetime] = None - - -ApplicationListResponseItem = Union[ - ApplicationListResponseItemSelfHostedApplication, - ApplicationListResponseItemSaaSApplication, - ApplicationListResponseItemBrowserSSHApplication, - ApplicationListResponseItemBrowserVncApplication, - ApplicationListResponseItemAppLauncherApplication, - ApplicationListResponseItemDeviceEnrollmentPermissionsApplication, - ApplicationListResponseItemBrowserIsolationPermissionsApplication, - ApplicationListResponseItemBookmarkApplication, -] - -ApplicationListResponse = List[ApplicationListResponseItem] +ApplicationListResponse = List[AccessApps] diff --git a/src/cloudflare/types/zero_trust/access/application_update_response.py b/src/cloudflare/types/zero_trust/access/application_update_response.py deleted file mode 100644 index e67e9216a..000000000 --- a/src/cloudflare/types/zero_trust/access/application_update_response.py +++ /dev/null @@ -1,830 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = [ - "ApplicationUpdateResponse", - "SelfHostedApplication", - "SelfHostedApplicationCorsHeaders", - "SaaSApplication", - "SaaSApplicationSaasApp", - "SaaSApplicationSaasAppAccessSamlSaasApp", - "SaaSApplicationSaasAppAccessSamlSaasAppCustomAttributes", - "SaaSApplicationSaasAppAccessSamlSaasAppCustomAttributesSource", - "SaaSApplicationSaasAppAccessOidcSaasApp", - "BrowserSSHApplication", - "BrowserSSHApplicationCorsHeaders", - "BrowserVncApplication", - "BrowserVncApplicationCorsHeaders", - "AppLauncherApplication", - "DeviceEnrollmentPermissionsApplication", - "BrowserIsolationPermissionsApplication", - "BookmarkApplication", -] - - -class SelfHostedApplicationCorsHeaders(BaseModel): - allow_all_headers: Optional[bool] = None - """Allows all HTTP request headers.""" - - allow_all_methods: Optional[bool] = None - """Allows all HTTP request methods.""" - - allow_all_origins: Optional[bool] = None - """Allows all origins.""" - - allow_credentials: Optional[bool] = None - """ - When set to `true`, includes credentials (cookies, authorization headers, or TLS - client certificates) with requests. - """ - - allowed_headers: Optional[List[object]] = None - """Allowed HTTP request headers.""" - - allowed_methods: Optional[ - List[Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] - ] = None - """Allowed HTTP request methods.""" - - allowed_origins: Optional[List[object]] = None - """Allowed origins.""" - - max_age: Optional[float] = None - """The maximum number of seconds the results of a preflight request can be cached.""" - - -class SelfHostedApplication(BaseModel): - domain: str - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - type: str - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allow_authenticate_via_warp: Optional[bool] = None - """ - When set to true, users can authenticate to this application using their WARP - session. When set to false this application will always require direct IdP - authentication. This setting always overrides the organization setting for WARP - authentication. - """ - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - app_launcher_visible: Optional[bool] = None - """Displays the application in the App Launcher.""" - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - cors_headers: Optional[SelfHostedApplicationCorsHeaders] = None - - created_at: Optional[datetime] = None - - custom_deny_message: Optional[str] = None - """ - The custom error message shown to a user when they are denied access to the - application. - """ - - custom_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing identity-based rules. - """ - - custom_non_identity_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing non-identity rules. - """ - - custom_pages: Optional[List[str]] = None - """The custom pages that will be displayed when applicable for this application""" - - enable_binding_cookie: Optional[bool] = None - """ - Enables the binding cookie, which increases security against compromised - authorization tokens and CSRF attacks. - """ - - http_only_cookie_attribute: Optional[bool] = None - """ - Enables the HttpOnly cookie attribute, which increases security against XSS - attacks. - """ - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the application.""" - - path_cookie_attribute: Optional[bool] = None - """Enables cookie paths to scope an application's JWT to the application path. - - If disabled, the JWT will scope to the hostname by default - """ - - same_site_cookie_attribute: Optional[str] = None - """ - Sets the SameSite cookie setting, which provides increased security against CSRF - attacks. - """ - - self_hosted_domains: Optional[List[str]] = None - """List of domains that Access will secure.""" - - service_auth_401_redirect: Optional[bool] = None - """Returns a 401 status code when the request is blocked by a Service Auth policy.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - skip_interstitial: Optional[bool] = None - """Enables automatic authentication through cloudflared.""" - - tags: Optional[List[str]] = None - """The tags you want assigned to an application. - - Tags are used to filter applications in the App Launcher dashboard. - """ - - updated_at: Optional[datetime] = None - - -class SaaSApplicationSaasAppAccessSamlSaasAppCustomAttributesSource(BaseModel): - name: Optional[str] = None - """The name of the IdP attribute.""" - - -class SaaSApplicationSaasAppAccessSamlSaasAppCustomAttributes(BaseModel): - name: Optional[str] = None - """The name of the attribute.""" - - name_format: Optional[ - Literal[ - "urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified", - "urn:oasis:names:tc:SAML:2.0:attrname-format:basic", - "urn:oasis:names:tc:SAML:2.0:attrname-format:uri", - ] - ] = None - """A globally unique name for an identity or service provider.""" - - source: Optional[SaaSApplicationSaasAppAccessSamlSaasAppCustomAttributesSource] = None - - -class SaaSApplicationSaasAppAccessSamlSaasApp(BaseModel): - auth_type: Optional[Literal["saml", "oidc"]] = None - """Optional identifier indicating the authentication protocol used for the saas - app. - - Required for OIDC. Default if unset is "saml" - """ - - consumer_service_url: Optional[str] = None - """ - The service provider's endpoint that is responsible for receiving and parsing a - SAML assertion. - """ - - created_at: Optional[datetime] = None - - custom_attributes: Optional[SaaSApplicationSaasAppAccessSamlSaasAppCustomAttributes] = None - - default_relay_state: Optional[str] = None - """ - The URL that the user will be redirected to after a successful login for IDP - initiated logins. - """ - - idp_entity_id: Optional[str] = None - """The unique identifier for your SaaS application.""" - - name_id_format: Optional[Literal["id", "email"]] = None - """The format of the name identifier sent to the SaaS application.""" - - name_id_transform_jsonata: Optional[str] = None - """ - A [JSONata](https://jsonata.org/) expression that transforms an application's - user identities into a NameID value for its SAML assertion. This expression - should evaluate to a singular string. The output of this expression can override - the `name_id_format` setting. - """ - - public_key: Optional[str] = None - """The Access public certificate that will be used to verify your identity.""" - - sp_entity_id: Optional[str] = None - """A globally unique name for an identity or service provider.""" - - sso_endpoint: Optional[str] = None - """The endpoint where your SaaS application will send login requests.""" - - updated_at: Optional[datetime] = None - - -class SaaSApplicationSaasAppAccessOidcSaasApp(BaseModel): - app_launcher_url: Optional[str] = None - """The URL where this applications tile redirects users""" - - auth_type: Optional[Literal["saml", "oidc"]] = None - """Identifier of the authentication protocol used for the saas app. - - Required for OIDC. - """ - - client_id: Optional[str] = None - """The application client id""" - - client_secret: Optional[str] = None - """The application client secret, only returned on POST request.""" - - created_at: Optional[datetime] = None - - grant_types: Optional[List[Literal["authorization_code", "authorization_code_with_pkce"]]] = None - """The OIDC flows supported by this application""" - - group_filter_regex: Optional[str] = None - """A regex to filter Cloudflare groups returned in ID token and userinfo endpoint""" - - public_key: Optional[str] = None - """The Access public certificate that will be used to verify your identity.""" - - redirect_uris: Optional[List[str]] = None - """ - The permitted URL's for Cloudflare to return Authorization codes and Access/ID - tokens - """ - - scopes: Optional[List[Literal["openid", "groups", "email", "profile"]]] = None - """Define the user information shared with access""" - - updated_at: Optional[datetime] = None - - -SaaSApplicationSaasApp = Union[SaaSApplicationSaasAppAccessSamlSaasApp, SaaSApplicationSaasAppAccessOidcSaasApp] - - -class SaaSApplication(BaseModel): - id: Optional[str] = None - """UUID""" - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - app_launcher_visible: Optional[bool] = None - """Displays the application in the App Launcher.""" - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - created_at: Optional[datetime] = None - - custom_pages: Optional[List[str]] = None - """The custom pages that will be displayed when applicable for this application""" - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the application.""" - - saas_app: Optional[SaaSApplicationSaasApp] = None - - tags: Optional[List[str]] = None - """The tags you want assigned to an application. - - Tags are used to filter applications in the App Launcher dashboard. - """ - - type: Optional[str] = None - """The application type.""" - - updated_at: Optional[datetime] = None - - -class BrowserSSHApplicationCorsHeaders(BaseModel): - allow_all_headers: Optional[bool] = None - """Allows all HTTP request headers.""" - - allow_all_methods: Optional[bool] = None - """Allows all HTTP request methods.""" - - allow_all_origins: Optional[bool] = None - """Allows all origins.""" - - allow_credentials: Optional[bool] = None - """ - When set to `true`, includes credentials (cookies, authorization headers, or TLS - client certificates) with requests. - """ - - allowed_headers: Optional[List[object]] = None - """Allowed HTTP request headers.""" - - allowed_methods: Optional[ - List[Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] - ] = None - """Allowed HTTP request methods.""" - - allowed_origins: Optional[List[object]] = None - """Allowed origins.""" - - max_age: Optional[float] = None - """The maximum number of seconds the results of a preflight request can be cached.""" - - -class BrowserSSHApplication(BaseModel): - domain: str - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - type: str - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allow_authenticate_via_warp: Optional[bool] = None - """ - When set to true, users can authenticate to this application using their WARP - session. When set to false this application will always require direct IdP - authentication. This setting always overrides the organization setting for WARP - authentication. - """ - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - app_launcher_visible: Optional[bool] = None - """Displays the application in the App Launcher.""" - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - cors_headers: Optional[BrowserSSHApplicationCorsHeaders] = None - - created_at: Optional[datetime] = None - - custom_deny_message: Optional[str] = None - """ - The custom error message shown to a user when they are denied access to the - application. - """ - - custom_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing identity-based rules. - """ - - custom_non_identity_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing non-identity rules. - """ - - custom_pages: Optional[List[str]] = None - """The custom pages that will be displayed when applicable for this application""" - - enable_binding_cookie: Optional[bool] = None - """ - Enables the binding cookie, which increases security against compromised - authorization tokens and CSRF attacks. - """ - - http_only_cookie_attribute: Optional[bool] = None - """ - Enables the HttpOnly cookie attribute, which increases security against XSS - attacks. - """ - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the application.""" - - path_cookie_attribute: Optional[bool] = None - """Enables cookie paths to scope an application's JWT to the application path. - - If disabled, the JWT will scope to the hostname by default - """ - - same_site_cookie_attribute: Optional[str] = None - """ - Sets the SameSite cookie setting, which provides increased security against CSRF - attacks. - """ - - self_hosted_domains: Optional[List[str]] = None - """List of domains that Access will secure.""" - - service_auth_401_redirect: Optional[bool] = None - """Returns a 401 status code when the request is blocked by a Service Auth policy.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - skip_interstitial: Optional[bool] = None - """Enables automatic authentication through cloudflared.""" - - tags: Optional[List[str]] = None - """The tags you want assigned to an application. - - Tags are used to filter applications in the App Launcher dashboard. - """ - - updated_at: Optional[datetime] = None - - -class BrowserVncApplicationCorsHeaders(BaseModel): - allow_all_headers: Optional[bool] = None - """Allows all HTTP request headers.""" - - allow_all_methods: Optional[bool] = None - """Allows all HTTP request methods.""" - - allow_all_origins: Optional[bool] = None - """Allows all origins.""" - - allow_credentials: Optional[bool] = None - """ - When set to `true`, includes credentials (cookies, authorization headers, or TLS - client certificates) with requests. - """ - - allowed_headers: Optional[List[object]] = None - """Allowed HTTP request headers.""" - - allowed_methods: Optional[ - List[Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] - ] = None - """Allowed HTTP request methods.""" - - allowed_origins: Optional[List[object]] = None - """Allowed origins.""" - - max_age: Optional[float] = None - """The maximum number of seconds the results of a preflight request can be cached.""" - - -class BrowserVncApplication(BaseModel): - domain: str - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - type: str - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allow_authenticate_via_warp: Optional[bool] = None - """ - When set to true, users can authenticate to this application using their WARP - session. When set to false this application will always require direct IdP - authentication. This setting always overrides the organization setting for WARP - authentication. - """ - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - app_launcher_visible: Optional[bool] = None - """Displays the application in the App Launcher.""" - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - cors_headers: Optional[BrowserVncApplicationCorsHeaders] = None - - created_at: Optional[datetime] = None - - custom_deny_message: Optional[str] = None - """ - The custom error message shown to a user when they are denied access to the - application. - """ - - custom_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing identity-based rules. - """ - - custom_non_identity_deny_url: Optional[str] = None - """ - The custom URL a user is redirected to when they are denied access to the - application when failing non-identity rules. - """ - - custom_pages: Optional[List[str]] = None - """The custom pages that will be displayed when applicable for this application""" - - enable_binding_cookie: Optional[bool] = None - """ - Enables the binding cookie, which increases security against compromised - authorization tokens and CSRF attacks. - """ - - http_only_cookie_attribute: Optional[bool] = None - """ - Enables the HttpOnly cookie attribute, which increases security against XSS - attacks. - """ - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the application.""" - - path_cookie_attribute: Optional[bool] = None - """Enables cookie paths to scope an application's JWT to the application path. - - If disabled, the JWT will scope to the hostname by default - """ - - same_site_cookie_attribute: Optional[str] = None - """ - Sets the SameSite cookie setting, which provides increased security against CSRF - attacks. - """ - - self_hosted_domains: Optional[List[str]] = None - """List of domains that Access will secure.""" - - service_auth_401_redirect: Optional[bool] = None - """Returns a 401 status code when the request is blocked by a Service Auth policy.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - skip_interstitial: Optional[bool] = None - """Enables automatic authentication through cloudflared.""" - - tags: Optional[List[str]] = None - """The tags you want assigned to an application. - - Tags are used to filter applications in the App Launcher dashboard. - """ - - updated_at: Optional[datetime] = None - - -class AppLauncherApplication(BaseModel): - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - created_at: Optional[datetime] = None - - domain: Optional[str] = None - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - name: Optional[str] = None - """The name of the application.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - updated_at: Optional[datetime] = None - - -class DeviceEnrollmentPermissionsApplication(BaseModel): - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - created_at: Optional[datetime] = None - - domain: Optional[str] = None - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - name: Optional[str] = None - """The name of the application.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - updated_at: Optional[datetime] = None - - -class BrowserIsolationPermissionsApplication(BaseModel): - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] - """The application type.""" - - id: Optional[str] = None - """UUID""" - - allowed_idps: Optional[List[str]] = None - """The identity providers your users can select when connecting to this - application. - - Defaults to all IdPs configured in your account. - """ - - aud: Optional[str] = None - """Audience tag.""" - - auto_redirect_to_identity: Optional[bool] = None - """When set to `true`, users skip the identity provider selection step during - login. - - You must specify only one identity provider in allowed_idps. - """ - - created_at: Optional[datetime] = None - - domain: Optional[str] = None - """The primary hostname and path that Access will secure. - - If the app is visible in the App Launcher dashboard, this is the domain that - will be displayed. - """ - - name: Optional[str] = None - """The name of the application.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for this application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - updated_at: Optional[datetime] = None - - -class BookmarkApplication(BaseModel): - id: Optional[str] = None - """UUID""" - - app_launcher_visible: Optional[object] = None - - aud: Optional[str] = None - """Audience tag.""" - - created_at: Optional[datetime] = None - - domain: Optional[object] = None - """The URL or domain of the bookmark.""" - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the application.""" - - tags: Optional[List[str]] = None - """The tags you want assigned to an application. - - Tags are used to filter applications in the App Launcher dashboard. - """ - - type: Optional[str] = None - """The application type.""" - - updated_at: Optional[datetime] = None - - -ApplicationUpdateResponse = Union[ - SelfHostedApplication, - SaaSApplication, - BrowserSSHApplication, - BrowserVncApplication, - AppLauncherApplication, - DeviceEnrollmentPermissionsApplication, - BrowserIsolationPermissionsApplication, - BookmarkApplication, -] diff --git a/src/cloudflare/types/zero_trust/access/applications/__init__.py b/src/cloudflare/types/zero_trust/access/applications/__init__.py index 150d36267..27b14f6e9 100644 --- a/src/cloudflare/types/zero_trust/access/applications/__init__.py +++ b/src/cloudflare/types/zero_trust/access/applications/__init__.py @@ -2,15 +2,14 @@ from __future__ import annotations +from .access_ca import AccessCA as AccessCA +from .access_policies import AccessPolicies as AccessPolicies 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 .policy_get_response import PolicyGetResponse as PolicyGetResponse from .policy_create_params import PolicyCreateParams as PolicyCreateParams from .policy_list_response import PolicyListResponse as PolicyListResponse from .policy_update_params import PolicyUpdateParams as PolicyUpdateParams -from .policy_create_response import PolicyCreateResponse as PolicyCreateResponse from .policy_delete_response import PolicyDeleteResponse as PolicyDeleteResponse -from .policy_update_response import PolicyUpdateResponse as PolicyUpdateResponse from .user_policy_check_list_response import UserPolicyCheckListResponse as UserPolicyCheckListResponse diff --git a/src/cloudflare/types/zero_trust/access/applications/access_ca.py b/src/cloudflare/types/zero_trust/access/applications/access_ca.py new file mode 100644 index 000000000..9a666521d --- /dev/null +++ b/src/cloudflare/types/zero_trust/access/applications/access_ca.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional + +from ....._models import BaseModel + +__all__ = ["AccessCA"] + + +class AccessCA(BaseModel): + id: Optional[str] = None + """The ID of the CA.""" + + aud: Optional[str] = None + """The Application Audience (AUD) tag. + + Identifies the application associated with the CA. + """ + + public_key: Optional[str] = None + """The public key to add to your SSH server configuration.""" diff --git a/src/cloudflare/types/zero_trust/access/applications/policy_get_response.py b/src/cloudflare/types/zero_trust/access/applications/access_policies.py similarity index 99% rename from src/cloudflare/types/zero_trust/access/applications/policy_get_response.py rename to src/cloudflare/types/zero_trust/access/applications/access_policies.py index 263d2fa26..b333ed7c4 100644 --- a/src/cloudflare/types/zero_trust/access/applications/policy_get_response.py +++ b/src/cloudflare/types/zero_trust/access/applications/access_policies.py @@ -9,7 +9,7 @@ from pydantic import Field as FieldInfo from ....._models import BaseModel __all__ = [ - "PolicyGetResponse", + "AccessPolicies", "ApprovalGroup", "Exclude", "ExcludeAccessEmailRule", @@ -745,7 +745,7 @@ Require = Union[ ] -class PolicyGetResponse(BaseModel): +class AccessPolicies(BaseModel): id: Optional[str] = None """UUID""" 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 747f106d9..ff1b91758 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 @@ -1,24 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ....._models import BaseModel +from .access_ca import AccessCA -__all__ = ["CAListResponse", "CAListResponseItem"] +__all__ = ["CAListResponse"] - -class CAListResponseItem(BaseModel): - id: Optional[str] = None - """The ID of the CA.""" - - aud: Optional[str] = None - """The Application Audience (AUD) tag. - - Identifies the application associated with the CA. - """ - - public_key: Optional[str] = None - """The public key to add to your SSH server configuration.""" - - -CAListResponse = List[CAListResponseItem] +CAListResponse = List[AccessCA] diff --git a/src/cloudflare/types/zero_trust/access/applications/policy_create_response.py b/src/cloudflare/types/zero_trust/access/applications/policy_create_response.py deleted file mode 100644 index cd6ab60f8..000000000 --- a/src/cloudflare/types/zero_trust/access/applications/policy_create_response.py +++ /dev/null @@ -1,810 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ....._models import BaseModel - -__all__ = [ - "PolicyCreateResponse", - "ApprovalGroup", - "Exclude", - "ExcludeAccessEmailRule", - "ExcludeAccessEmailRuleEmail", - "ExcludeAccessEmailListRule", - "ExcludeAccessEmailListRuleEmailList", - "ExcludeAccessDomainRule", - "ExcludeAccessDomainRuleEmailDomain", - "ExcludeAccessEveryoneRule", - "ExcludeAccessIPRule", - "ExcludeAccessIPRuleIP", - "ExcludeAccessIPListRule", - "ExcludeAccessIPListRuleIPList", - "ExcludeAccessCertificateRule", - "ExcludeAccessAccessGroupRule", - "ExcludeAccessAccessGroupRuleGroup", - "ExcludeAccessAzureGroupRule", - "ExcludeAccessAzureGroupRuleAzureAd", - "ExcludeAccessGitHubOrganizationRule", - "ExcludeAccessGitHubOrganizationRuleGitHubOrganization", - "ExcludeAccessGsuiteGroupRule", - "ExcludeAccessGsuiteGroupRuleGsuite", - "ExcludeAccessOktaGroupRule", - "ExcludeAccessOktaGroupRuleOkta", - "ExcludeAccessSamlGroupRule", - "ExcludeAccessSamlGroupRuleSaml", - "ExcludeAccessServiceTokenRule", - "ExcludeAccessServiceTokenRuleServiceToken", - "ExcludeAccessAnyValidServiceTokenRule", - "ExcludeAccessExternalEvaluationRule", - "ExcludeAccessExternalEvaluationRuleExternalEvaluation", - "ExcludeAccessCountryRule", - "ExcludeAccessCountryRuleGeo", - "ExcludeAccessAuthenticationMethodRule", - "ExcludeAccessAuthenticationMethodRuleAuthMethod", - "ExcludeAccessDevicePostureRule", - "ExcludeAccessDevicePostureRuleDevicePosture", - "Include", - "IncludeAccessEmailRule", - "IncludeAccessEmailRuleEmail", - "IncludeAccessEmailListRule", - "IncludeAccessEmailListRuleEmailList", - "IncludeAccessDomainRule", - "IncludeAccessDomainRuleEmailDomain", - "IncludeAccessEveryoneRule", - "IncludeAccessIPRule", - "IncludeAccessIPRuleIP", - "IncludeAccessIPListRule", - "IncludeAccessIPListRuleIPList", - "IncludeAccessCertificateRule", - "IncludeAccessAccessGroupRule", - "IncludeAccessAccessGroupRuleGroup", - "IncludeAccessAzureGroupRule", - "IncludeAccessAzureGroupRuleAzureAd", - "IncludeAccessGitHubOrganizationRule", - "IncludeAccessGitHubOrganizationRuleGitHubOrganization", - "IncludeAccessGsuiteGroupRule", - "IncludeAccessGsuiteGroupRuleGsuite", - "IncludeAccessOktaGroupRule", - "IncludeAccessOktaGroupRuleOkta", - "IncludeAccessSamlGroupRule", - "IncludeAccessSamlGroupRuleSaml", - "IncludeAccessServiceTokenRule", - "IncludeAccessServiceTokenRuleServiceToken", - "IncludeAccessAnyValidServiceTokenRule", - "IncludeAccessExternalEvaluationRule", - "IncludeAccessExternalEvaluationRuleExternalEvaluation", - "IncludeAccessCountryRule", - "IncludeAccessCountryRuleGeo", - "IncludeAccessAuthenticationMethodRule", - "IncludeAccessAuthenticationMethodRuleAuthMethod", - "IncludeAccessDevicePostureRule", - "IncludeAccessDevicePostureRuleDevicePosture", - "Require", - "RequireAccessEmailRule", - "RequireAccessEmailRuleEmail", - "RequireAccessEmailListRule", - "RequireAccessEmailListRuleEmailList", - "RequireAccessDomainRule", - "RequireAccessDomainRuleEmailDomain", - "RequireAccessEveryoneRule", - "RequireAccessIPRule", - "RequireAccessIPRuleIP", - "RequireAccessIPListRule", - "RequireAccessIPListRuleIPList", - "RequireAccessCertificateRule", - "RequireAccessAccessGroupRule", - "RequireAccessAccessGroupRuleGroup", - "RequireAccessAzureGroupRule", - "RequireAccessAzureGroupRuleAzureAd", - "RequireAccessGitHubOrganizationRule", - "RequireAccessGitHubOrganizationRuleGitHubOrganization", - "RequireAccessGsuiteGroupRule", - "RequireAccessGsuiteGroupRuleGsuite", - "RequireAccessOktaGroupRule", - "RequireAccessOktaGroupRuleOkta", - "RequireAccessSamlGroupRule", - "RequireAccessSamlGroupRuleSaml", - "RequireAccessServiceTokenRule", - "RequireAccessServiceTokenRuleServiceToken", - "RequireAccessAnyValidServiceTokenRule", - "RequireAccessExternalEvaluationRule", - "RequireAccessExternalEvaluationRuleExternalEvaluation", - "RequireAccessCountryRule", - "RequireAccessCountryRuleGeo", - "RequireAccessAuthenticationMethodRule", - "RequireAccessAuthenticationMethodRuleAuthMethod", - "RequireAccessDevicePostureRule", - "RequireAccessDevicePostureRuleDevicePosture", -] - - -class ApprovalGroup(BaseModel): - approvals_needed: float - """The number of approvals needed to obtain access.""" - - email_addresses: Optional[List[object]] = None - """A list of emails that can approve the access request.""" - - email_list_uuid: Optional[str] = None - """The UUID of an re-usable email list.""" - - -class ExcludeAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class ExcludeAccessEmailRule(BaseModel): - email: ExcludeAccessEmailRuleEmail - - -class ExcludeAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class ExcludeAccessEmailListRule(BaseModel): - email_list: ExcludeAccessEmailListRuleEmailList - - -class ExcludeAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class ExcludeAccessDomainRule(BaseModel): - email_domain: ExcludeAccessDomainRuleEmailDomain - - -class ExcludeAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class ExcludeAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class ExcludeAccessIPRule(BaseModel): - ip: ExcludeAccessIPRuleIP - - -class ExcludeAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class ExcludeAccessIPListRule(BaseModel): - ip_list: ExcludeAccessIPListRuleIPList - - -class ExcludeAccessCertificateRule(BaseModel): - certificate: object - - -class ExcludeAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class ExcludeAccessAccessGroupRule(BaseModel): - group: ExcludeAccessAccessGroupRuleGroup - - -class ExcludeAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class ExcludeAccessAzureGroupRule(BaseModel): - azure_ad: ExcludeAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class ExcludeAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class ExcludeAccessGitHubOrganizationRule(BaseModel): - github_organization: ExcludeAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo(alias="github-organization") - - -class ExcludeAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class ExcludeAccessGsuiteGroupRule(BaseModel): - gsuite: ExcludeAccessGsuiteGroupRuleGsuite - - -class ExcludeAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class ExcludeAccessOktaGroupRule(BaseModel): - okta: ExcludeAccessOktaGroupRuleOkta - - -class ExcludeAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class ExcludeAccessSamlGroupRule(BaseModel): - saml: ExcludeAccessSamlGroupRuleSaml - - -class ExcludeAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class ExcludeAccessServiceTokenRule(BaseModel): - service_token: ExcludeAccessServiceTokenRuleServiceToken - - -class ExcludeAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class ExcludeAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class ExcludeAccessExternalEvaluationRule(BaseModel): - external_evaluation: ExcludeAccessExternalEvaluationRuleExternalEvaluation - - -class ExcludeAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class ExcludeAccessCountryRule(BaseModel): - geo: ExcludeAccessCountryRuleGeo - - -class ExcludeAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class ExcludeAccessAuthenticationMethodRule(BaseModel): - auth_method: ExcludeAccessAuthenticationMethodRuleAuthMethod - - -class ExcludeAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class ExcludeAccessDevicePostureRule(BaseModel): - device_posture: ExcludeAccessDevicePostureRuleDevicePosture - - -Exclude = Union[ - ExcludeAccessEmailRule, - ExcludeAccessEmailListRule, - ExcludeAccessDomainRule, - ExcludeAccessEveryoneRule, - ExcludeAccessIPRule, - ExcludeAccessIPListRule, - ExcludeAccessCertificateRule, - ExcludeAccessAccessGroupRule, - ExcludeAccessAzureGroupRule, - ExcludeAccessGitHubOrganizationRule, - ExcludeAccessGsuiteGroupRule, - ExcludeAccessOktaGroupRule, - ExcludeAccessSamlGroupRule, - ExcludeAccessServiceTokenRule, - ExcludeAccessAnyValidServiceTokenRule, - ExcludeAccessExternalEvaluationRule, - ExcludeAccessCountryRule, - ExcludeAccessAuthenticationMethodRule, - ExcludeAccessDevicePostureRule, -] - - -class IncludeAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class IncludeAccessEmailRule(BaseModel): - email: IncludeAccessEmailRuleEmail - - -class IncludeAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class IncludeAccessEmailListRule(BaseModel): - email_list: IncludeAccessEmailListRuleEmailList - - -class IncludeAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class IncludeAccessDomainRule(BaseModel): - email_domain: IncludeAccessDomainRuleEmailDomain - - -class IncludeAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class IncludeAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class IncludeAccessIPRule(BaseModel): - ip: IncludeAccessIPRuleIP - - -class IncludeAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class IncludeAccessIPListRule(BaseModel): - ip_list: IncludeAccessIPListRuleIPList - - -class IncludeAccessCertificateRule(BaseModel): - certificate: object - - -class IncludeAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class IncludeAccessAccessGroupRule(BaseModel): - group: IncludeAccessAccessGroupRuleGroup - - -class IncludeAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class IncludeAccessAzureGroupRule(BaseModel): - azure_ad: IncludeAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class IncludeAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class IncludeAccessGitHubOrganizationRule(BaseModel): - github_organization: IncludeAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo(alias="github-organization") - - -class IncludeAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class IncludeAccessGsuiteGroupRule(BaseModel): - gsuite: IncludeAccessGsuiteGroupRuleGsuite - - -class IncludeAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class IncludeAccessOktaGroupRule(BaseModel): - okta: IncludeAccessOktaGroupRuleOkta - - -class IncludeAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class IncludeAccessSamlGroupRule(BaseModel): - saml: IncludeAccessSamlGroupRuleSaml - - -class IncludeAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class IncludeAccessServiceTokenRule(BaseModel): - service_token: IncludeAccessServiceTokenRuleServiceToken - - -class IncludeAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class IncludeAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class IncludeAccessExternalEvaluationRule(BaseModel): - external_evaluation: IncludeAccessExternalEvaluationRuleExternalEvaluation - - -class IncludeAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class IncludeAccessCountryRule(BaseModel): - geo: IncludeAccessCountryRuleGeo - - -class IncludeAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class IncludeAccessAuthenticationMethodRule(BaseModel): - auth_method: IncludeAccessAuthenticationMethodRuleAuthMethod - - -class IncludeAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class IncludeAccessDevicePostureRule(BaseModel): - device_posture: IncludeAccessDevicePostureRuleDevicePosture - - -Include = Union[ - IncludeAccessEmailRule, - IncludeAccessEmailListRule, - IncludeAccessDomainRule, - IncludeAccessEveryoneRule, - IncludeAccessIPRule, - IncludeAccessIPListRule, - IncludeAccessCertificateRule, - IncludeAccessAccessGroupRule, - IncludeAccessAzureGroupRule, - IncludeAccessGitHubOrganizationRule, - IncludeAccessGsuiteGroupRule, - IncludeAccessOktaGroupRule, - IncludeAccessSamlGroupRule, - IncludeAccessServiceTokenRule, - IncludeAccessAnyValidServiceTokenRule, - IncludeAccessExternalEvaluationRule, - IncludeAccessCountryRule, - IncludeAccessAuthenticationMethodRule, - IncludeAccessDevicePostureRule, -] - - -class RequireAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class RequireAccessEmailRule(BaseModel): - email: RequireAccessEmailRuleEmail - - -class RequireAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class RequireAccessEmailListRule(BaseModel): - email_list: RequireAccessEmailListRuleEmailList - - -class RequireAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class RequireAccessDomainRule(BaseModel): - email_domain: RequireAccessDomainRuleEmailDomain - - -class RequireAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class RequireAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class RequireAccessIPRule(BaseModel): - ip: RequireAccessIPRuleIP - - -class RequireAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class RequireAccessIPListRule(BaseModel): - ip_list: RequireAccessIPListRuleIPList - - -class RequireAccessCertificateRule(BaseModel): - certificate: object - - -class RequireAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class RequireAccessAccessGroupRule(BaseModel): - group: RequireAccessAccessGroupRuleGroup - - -class RequireAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class RequireAccessAzureGroupRule(BaseModel): - azure_ad: RequireAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class RequireAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class RequireAccessGitHubOrganizationRule(BaseModel): - github_organization: RequireAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo(alias="github-organization") - - -class RequireAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class RequireAccessGsuiteGroupRule(BaseModel): - gsuite: RequireAccessGsuiteGroupRuleGsuite - - -class RequireAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class RequireAccessOktaGroupRule(BaseModel): - okta: RequireAccessOktaGroupRuleOkta - - -class RequireAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class RequireAccessSamlGroupRule(BaseModel): - saml: RequireAccessSamlGroupRuleSaml - - -class RequireAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class RequireAccessServiceTokenRule(BaseModel): - service_token: RequireAccessServiceTokenRuleServiceToken - - -class RequireAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class RequireAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class RequireAccessExternalEvaluationRule(BaseModel): - external_evaluation: RequireAccessExternalEvaluationRuleExternalEvaluation - - -class RequireAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class RequireAccessCountryRule(BaseModel): - geo: RequireAccessCountryRuleGeo - - -class RequireAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class RequireAccessAuthenticationMethodRule(BaseModel): - auth_method: RequireAccessAuthenticationMethodRuleAuthMethod - - -class RequireAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class RequireAccessDevicePostureRule(BaseModel): - device_posture: RequireAccessDevicePostureRuleDevicePosture - - -Require = Union[ - RequireAccessEmailRule, - RequireAccessEmailListRule, - RequireAccessDomainRule, - RequireAccessEveryoneRule, - RequireAccessIPRule, - RequireAccessIPListRule, - RequireAccessCertificateRule, - RequireAccessAccessGroupRule, - RequireAccessAzureGroupRule, - RequireAccessGitHubOrganizationRule, - RequireAccessGsuiteGroupRule, - RequireAccessOktaGroupRule, - RequireAccessSamlGroupRule, - RequireAccessServiceTokenRule, - RequireAccessAnyValidServiceTokenRule, - RequireAccessExternalEvaluationRule, - RequireAccessCountryRule, - RequireAccessAuthenticationMethodRule, - RequireAccessDevicePostureRule, -] - - -class PolicyCreateResponse(BaseModel): - id: Optional[str] = None - """UUID""" - - approval_groups: Optional[List[ApprovalGroup]] = None - """Administrators who can approve a temporary authentication request.""" - - approval_required: Optional[bool] = None - """ - Requires the user to request access from an administrator at the start of each - session. - """ - - created_at: Optional[datetime] = None - - decision: Optional[Literal["allow", "deny", "non_identity", "bypass"]] = None - """The action Access will take if a user matches this policy.""" - - exclude: Optional[List[Exclude]] = None - """Rules evaluated with a NOT logical operator. - - To match the policy, a user cannot meet any of the Exclude rules. - """ - - include: Optional[List[Include]] = None - """Rules evaluated with an OR logical operator. - - A user needs to meet only one of the Include rules. - """ - - isolation_required: Optional[bool] = None - """ - Require this application to be served in an isolated browser for users matching - this policy. 'Client Web Isolation' must be on for the account in order to use - this feature. - """ - - name: Optional[str] = None - """The name of the Access policy.""" - - precedence: Optional[int] = None - """The order of execution for this policy. Must be unique for each policy.""" - - purpose_justification_prompt: Optional[str] = None - """A custom message that will appear on the purpose justification screen.""" - - purpose_justification_required: Optional[bool] = None - """Require users to enter a justification when they log in to the application.""" - - require: Optional[List[Require]] = None - """Rules evaluated with an AND logical operator. - - To match the policy, a user must meet all of the Require rules. - """ - - session_duration: Optional[str] = None - """The amount of time that tokens issued for the application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - updated_at: Optional[datetime] = None 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 f35eeb1dd..c5ab05f28 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 @@ -1,820 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from pydantic import Field as FieldInfo +from .access_policies import AccessPolicies -from ....._models import BaseModel +__all__ = ["PolicyListResponse"] -__all__ = [ - "PolicyListResponse", - "PolicyListResponseItem", - "PolicyListResponseItemApprovalGroup", - "PolicyListResponseItemExclude", - "PolicyListResponseItemExcludeAccessEmailRule", - "PolicyListResponseItemExcludeAccessEmailRuleEmail", - "PolicyListResponseItemExcludeAccessEmailListRule", - "PolicyListResponseItemExcludeAccessEmailListRuleEmailList", - "PolicyListResponseItemExcludeAccessDomainRule", - "PolicyListResponseItemExcludeAccessDomainRuleEmailDomain", - "PolicyListResponseItemExcludeAccessEveryoneRule", - "PolicyListResponseItemExcludeAccessIPRule", - "PolicyListResponseItemExcludeAccessIPRuleIP", - "PolicyListResponseItemExcludeAccessIPListRule", - "PolicyListResponseItemExcludeAccessIPListRuleIPList", - "PolicyListResponseItemExcludeAccessCertificateRule", - "PolicyListResponseItemExcludeAccessAccessGroupRule", - "PolicyListResponseItemExcludeAccessAccessGroupRuleGroup", - "PolicyListResponseItemExcludeAccessAzureGroupRule", - "PolicyListResponseItemExcludeAccessAzureGroupRuleAzureAd", - "PolicyListResponseItemExcludeAccessGitHubOrganizationRule", - "PolicyListResponseItemExcludeAccessGitHubOrganizationRuleGitHubOrganization", - "PolicyListResponseItemExcludeAccessGsuiteGroupRule", - "PolicyListResponseItemExcludeAccessGsuiteGroupRuleGsuite", - "PolicyListResponseItemExcludeAccessOktaGroupRule", - "PolicyListResponseItemExcludeAccessOktaGroupRuleOkta", - "PolicyListResponseItemExcludeAccessSamlGroupRule", - "PolicyListResponseItemExcludeAccessSamlGroupRuleSaml", - "PolicyListResponseItemExcludeAccessServiceTokenRule", - "PolicyListResponseItemExcludeAccessServiceTokenRuleServiceToken", - "PolicyListResponseItemExcludeAccessAnyValidServiceTokenRule", - "PolicyListResponseItemExcludeAccessExternalEvaluationRule", - "PolicyListResponseItemExcludeAccessExternalEvaluationRuleExternalEvaluation", - "PolicyListResponseItemExcludeAccessCountryRule", - "PolicyListResponseItemExcludeAccessCountryRuleGeo", - "PolicyListResponseItemExcludeAccessAuthenticationMethodRule", - "PolicyListResponseItemExcludeAccessAuthenticationMethodRuleAuthMethod", - "PolicyListResponseItemExcludeAccessDevicePostureRule", - "PolicyListResponseItemExcludeAccessDevicePostureRuleDevicePosture", - "PolicyListResponseItemInclude", - "PolicyListResponseItemIncludeAccessEmailRule", - "PolicyListResponseItemIncludeAccessEmailRuleEmail", - "PolicyListResponseItemIncludeAccessEmailListRule", - "PolicyListResponseItemIncludeAccessEmailListRuleEmailList", - "PolicyListResponseItemIncludeAccessDomainRule", - "PolicyListResponseItemIncludeAccessDomainRuleEmailDomain", - "PolicyListResponseItemIncludeAccessEveryoneRule", - "PolicyListResponseItemIncludeAccessIPRule", - "PolicyListResponseItemIncludeAccessIPRuleIP", - "PolicyListResponseItemIncludeAccessIPListRule", - "PolicyListResponseItemIncludeAccessIPListRuleIPList", - "PolicyListResponseItemIncludeAccessCertificateRule", - "PolicyListResponseItemIncludeAccessAccessGroupRule", - "PolicyListResponseItemIncludeAccessAccessGroupRuleGroup", - "PolicyListResponseItemIncludeAccessAzureGroupRule", - "PolicyListResponseItemIncludeAccessAzureGroupRuleAzureAd", - "PolicyListResponseItemIncludeAccessGitHubOrganizationRule", - "PolicyListResponseItemIncludeAccessGitHubOrganizationRuleGitHubOrganization", - "PolicyListResponseItemIncludeAccessGsuiteGroupRule", - "PolicyListResponseItemIncludeAccessGsuiteGroupRuleGsuite", - "PolicyListResponseItemIncludeAccessOktaGroupRule", - "PolicyListResponseItemIncludeAccessOktaGroupRuleOkta", - "PolicyListResponseItemIncludeAccessSamlGroupRule", - "PolicyListResponseItemIncludeAccessSamlGroupRuleSaml", - "PolicyListResponseItemIncludeAccessServiceTokenRule", - "PolicyListResponseItemIncludeAccessServiceTokenRuleServiceToken", - "PolicyListResponseItemIncludeAccessAnyValidServiceTokenRule", - "PolicyListResponseItemIncludeAccessExternalEvaluationRule", - "PolicyListResponseItemIncludeAccessExternalEvaluationRuleExternalEvaluation", - "PolicyListResponseItemIncludeAccessCountryRule", - "PolicyListResponseItemIncludeAccessCountryRuleGeo", - "PolicyListResponseItemIncludeAccessAuthenticationMethodRule", - "PolicyListResponseItemIncludeAccessAuthenticationMethodRuleAuthMethod", - "PolicyListResponseItemIncludeAccessDevicePostureRule", - "PolicyListResponseItemIncludeAccessDevicePostureRuleDevicePosture", - "PolicyListResponseItemRequire", - "PolicyListResponseItemRequireAccessEmailRule", - "PolicyListResponseItemRequireAccessEmailRuleEmail", - "PolicyListResponseItemRequireAccessEmailListRule", - "PolicyListResponseItemRequireAccessEmailListRuleEmailList", - "PolicyListResponseItemRequireAccessDomainRule", - "PolicyListResponseItemRequireAccessDomainRuleEmailDomain", - "PolicyListResponseItemRequireAccessEveryoneRule", - "PolicyListResponseItemRequireAccessIPRule", - "PolicyListResponseItemRequireAccessIPRuleIP", - "PolicyListResponseItemRequireAccessIPListRule", - "PolicyListResponseItemRequireAccessIPListRuleIPList", - "PolicyListResponseItemRequireAccessCertificateRule", - "PolicyListResponseItemRequireAccessAccessGroupRule", - "PolicyListResponseItemRequireAccessAccessGroupRuleGroup", - "PolicyListResponseItemRequireAccessAzureGroupRule", - "PolicyListResponseItemRequireAccessAzureGroupRuleAzureAd", - "PolicyListResponseItemRequireAccessGitHubOrganizationRule", - "PolicyListResponseItemRequireAccessGitHubOrganizationRuleGitHubOrganization", - "PolicyListResponseItemRequireAccessGsuiteGroupRule", - "PolicyListResponseItemRequireAccessGsuiteGroupRuleGsuite", - "PolicyListResponseItemRequireAccessOktaGroupRule", - "PolicyListResponseItemRequireAccessOktaGroupRuleOkta", - "PolicyListResponseItemRequireAccessSamlGroupRule", - "PolicyListResponseItemRequireAccessSamlGroupRuleSaml", - "PolicyListResponseItemRequireAccessServiceTokenRule", - "PolicyListResponseItemRequireAccessServiceTokenRuleServiceToken", - "PolicyListResponseItemRequireAccessAnyValidServiceTokenRule", - "PolicyListResponseItemRequireAccessExternalEvaluationRule", - "PolicyListResponseItemRequireAccessExternalEvaluationRuleExternalEvaluation", - "PolicyListResponseItemRequireAccessCountryRule", - "PolicyListResponseItemRequireAccessCountryRuleGeo", - "PolicyListResponseItemRequireAccessAuthenticationMethodRule", - "PolicyListResponseItemRequireAccessAuthenticationMethodRuleAuthMethod", - "PolicyListResponseItemRequireAccessDevicePostureRule", - "PolicyListResponseItemRequireAccessDevicePostureRuleDevicePosture", -] - - -class PolicyListResponseItemApprovalGroup(BaseModel): - approvals_needed: float - """The number of approvals needed to obtain access.""" - - email_addresses: Optional[List[object]] = None - """A list of emails that can approve the access request.""" - - email_list_uuid: Optional[str] = None - """The UUID of an re-usable email list.""" - - -class PolicyListResponseItemExcludeAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class PolicyListResponseItemExcludeAccessEmailRule(BaseModel): - email: PolicyListResponseItemExcludeAccessEmailRuleEmail - - -class PolicyListResponseItemExcludeAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class PolicyListResponseItemExcludeAccessEmailListRule(BaseModel): - email_list: PolicyListResponseItemExcludeAccessEmailListRuleEmailList - - -class PolicyListResponseItemExcludeAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class PolicyListResponseItemExcludeAccessDomainRule(BaseModel): - email_domain: PolicyListResponseItemExcludeAccessDomainRuleEmailDomain - - -class PolicyListResponseItemExcludeAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class PolicyListResponseItemExcludeAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class PolicyListResponseItemExcludeAccessIPRule(BaseModel): - ip: PolicyListResponseItemExcludeAccessIPRuleIP - - -class PolicyListResponseItemExcludeAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class PolicyListResponseItemExcludeAccessIPListRule(BaseModel): - ip_list: PolicyListResponseItemExcludeAccessIPListRuleIPList - - -class PolicyListResponseItemExcludeAccessCertificateRule(BaseModel): - certificate: object - - -class PolicyListResponseItemExcludeAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class PolicyListResponseItemExcludeAccessAccessGroupRule(BaseModel): - group: PolicyListResponseItemExcludeAccessAccessGroupRuleGroup - - -class PolicyListResponseItemExcludeAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class PolicyListResponseItemExcludeAccessAzureGroupRule(BaseModel): - azure_ad: PolicyListResponseItemExcludeAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class PolicyListResponseItemExcludeAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class PolicyListResponseItemExcludeAccessGitHubOrganizationRule(BaseModel): - github_organization: PolicyListResponseItemExcludeAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo( - alias="github-organization" - ) - - -class PolicyListResponseItemExcludeAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class PolicyListResponseItemExcludeAccessGsuiteGroupRule(BaseModel): - gsuite: PolicyListResponseItemExcludeAccessGsuiteGroupRuleGsuite - - -class PolicyListResponseItemExcludeAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class PolicyListResponseItemExcludeAccessOktaGroupRule(BaseModel): - okta: PolicyListResponseItemExcludeAccessOktaGroupRuleOkta - - -class PolicyListResponseItemExcludeAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class PolicyListResponseItemExcludeAccessSamlGroupRule(BaseModel): - saml: PolicyListResponseItemExcludeAccessSamlGroupRuleSaml - - -class PolicyListResponseItemExcludeAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class PolicyListResponseItemExcludeAccessServiceTokenRule(BaseModel): - service_token: PolicyListResponseItemExcludeAccessServiceTokenRuleServiceToken - - -class PolicyListResponseItemExcludeAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class PolicyListResponseItemExcludeAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class PolicyListResponseItemExcludeAccessExternalEvaluationRule(BaseModel): - external_evaluation: PolicyListResponseItemExcludeAccessExternalEvaluationRuleExternalEvaluation - - -class PolicyListResponseItemExcludeAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class PolicyListResponseItemExcludeAccessCountryRule(BaseModel): - geo: PolicyListResponseItemExcludeAccessCountryRuleGeo - - -class PolicyListResponseItemExcludeAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class PolicyListResponseItemExcludeAccessAuthenticationMethodRule(BaseModel): - auth_method: PolicyListResponseItemExcludeAccessAuthenticationMethodRuleAuthMethod - - -class PolicyListResponseItemExcludeAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class PolicyListResponseItemExcludeAccessDevicePostureRule(BaseModel): - device_posture: PolicyListResponseItemExcludeAccessDevicePostureRuleDevicePosture - - -PolicyListResponseItemExclude = Union[ - PolicyListResponseItemExcludeAccessEmailRule, - PolicyListResponseItemExcludeAccessEmailListRule, - PolicyListResponseItemExcludeAccessDomainRule, - PolicyListResponseItemExcludeAccessEveryoneRule, - PolicyListResponseItemExcludeAccessIPRule, - PolicyListResponseItemExcludeAccessIPListRule, - PolicyListResponseItemExcludeAccessCertificateRule, - PolicyListResponseItemExcludeAccessAccessGroupRule, - PolicyListResponseItemExcludeAccessAzureGroupRule, - PolicyListResponseItemExcludeAccessGitHubOrganizationRule, - PolicyListResponseItemExcludeAccessGsuiteGroupRule, - PolicyListResponseItemExcludeAccessOktaGroupRule, - PolicyListResponseItemExcludeAccessSamlGroupRule, - PolicyListResponseItemExcludeAccessServiceTokenRule, - PolicyListResponseItemExcludeAccessAnyValidServiceTokenRule, - PolicyListResponseItemExcludeAccessExternalEvaluationRule, - PolicyListResponseItemExcludeAccessCountryRule, - PolicyListResponseItemExcludeAccessAuthenticationMethodRule, - PolicyListResponseItemExcludeAccessDevicePostureRule, -] - - -class PolicyListResponseItemIncludeAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class PolicyListResponseItemIncludeAccessEmailRule(BaseModel): - email: PolicyListResponseItemIncludeAccessEmailRuleEmail - - -class PolicyListResponseItemIncludeAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class PolicyListResponseItemIncludeAccessEmailListRule(BaseModel): - email_list: PolicyListResponseItemIncludeAccessEmailListRuleEmailList - - -class PolicyListResponseItemIncludeAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class PolicyListResponseItemIncludeAccessDomainRule(BaseModel): - email_domain: PolicyListResponseItemIncludeAccessDomainRuleEmailDomain - - -class PolicyListResponseItemIncludeAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class PolicyListResponseItemIncludeAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class PolicyListResponseItemIncludeAccessIPRule(BaseModel): - ip: PolicyListResponseItemIncludeAccessIPRuleIP - - -class PolicyListResponseItemIncludeAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class PolicyListResponseItemIncludeAccessIPListRule(BaseModel): - ip_list: PolicyListResponseItemIncludeAccessIPListRuleIPList - - -class PolicyListResponseItemIncludeAccessCertificateRule(BaseModel): - certificate: object - - -class PolicyListResponseItemIncludeAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class PolicyListResponseItemIncludeAccessAccessGroupRule(BaseModel): - group: PolicyListResponseItemIncludeAccessAccessGroupRuleGroup - - -class PolicyListResponseItemIncludeAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class PolicyListResponseItemIncludeAccessAzureGroupRule(BaseModel): - azure_ad: PolicyListResponseItemIncludeAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class PolicyListResponseItemIncludeAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class PolicyListResponseItemIncludeAccessGitHubOrganizationRule(BaseModel): - github_organization: PolicyListResponseItemIncludeAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo( - alias="github-organization" - ) - - -class PolicyListResponseItemIncludeAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class PolicyListResponseItemIncludeAccessGsuiteGroupRule(BaseModel): - gsuite: PolicyListResponseItemIncludeAccessGsuiteGroupRuleGsuite - - -class PolicyListResponseItemIncludeAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class PolicyListResponseItemIncludeAccessOktaGroupRule(BaseModel): - okta: PolicyListResponseItemIncludeAccessOktaGroupRuleOkta - - -class PolicyListResponseItemIncludeAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class PolicyListResponseItemIncludeAccessSamlGroupRule(BaseModel): - saml: PolicyListResponseItemIncludeAccessSamlGroupRuleSaml - - -class PolicyListResponseItemIncludeAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class PolicyListResponseItemIncludeAccessServiceTokenRule(BaseModel): - service_token: PolicyListResponseItemIncludeAccessServiceTokenRuleServiceToken - - -class PolicyListResponseItemIncludeAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class PolicyListResponseItemIncludeAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class PolicyListResponseItemIncludeAccessExternalEvaluationRule(BaseModel): - external_evaluation: PolicyListResponseItemIncludeAccessExternalEvaluationRuleExternalEvaluation - - -class PolicyListResponseItemIncludeAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class PolicyListResponseItemIncludeAccessCountryRule(BaseModel): - geo: PolicyListResponseItemIncludeAccessCountryRuleGeo - - -class PolicyListResponseItemIncludeAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class PolicyListResponseItemIncludeAccessAuthenticationMethodRule(BaseModel): - auth_method: PolicyListResponseItemIncludeAccessAuthenticationMethodRuleAuthMethod - - -class PolicyListResponseItemIncludeAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class PolicyListResponseItemIncludeAccessDevicePostureRule(BaseModel): - device_posture: PolicyListResponseItemIncludeAccessDevicePostureRuleDevicePosture - - -PolicyListResponseItemInclude = Union[ - PolicyListResponseItemIncludeAccessEmailRule, - PolicyListResponseItemIncludeAccessEmailListRule, - PolicyListResponseItemIncludeAccessDomainRule, - PolicyListResponseItemIncludeAccessEveryoneRule, - PolicyListResponseItemIncludeAccessIPRule, - PolicyListResponseItemIncludeAccessIPListRule, - PolicyListResponseItemIncludeAccessCertificateRule, - PolicyListResponseItemIncludeAccessAccessGroupRule, - PolicyListResponseItemIncludeAccessAzureGroupRule, - PolicyListResponseItemIncludeAccessGitHubOrganizationRule, - PolicyListResponseItemIncludeAccessGsuiteGroupRule, - PolicyListResponseItemIncludeAccessOktaGroupRule, - PolicyListResponseItemIncludeAccessSamlGroupRule, - PolicyListResponseItemIncludeAccessServiceTokenRule, - PolicyListResponseItemIncludeAccessAnyValidServiceTokenRule, - PolicyListResponseItemIncludeAccessExternalEvaluationRule, - PolicyListResponseItemIncludeAccessCountryRule, - PolicyListResponseItemIncludeAccessAuthenticationMethodRule, - PolicyListResponseItemIncludeAccessDevicePostureRule, -] - - -class PolicyListResponseItemRequireAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class PolicyListResponseItemRequireAccessEmailRule(BaseModel): - email: PolicyListResponseItemRequireAccessEmailRuleEmail - - -class PolicyListResponseItemRequireAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class PolicyListResponseItemRequireAccessEmailListRule(BaseModel): - email_list: PolicyListResponseItemRequireAccessEmailListRuleEmailList - - -class PolicyListResponseItemRequireAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class PolicyListResponseItemRequireAccessDomainRule(BaseModel): - email_domain: PolicyListResponseItemRequireAccessDomainRuleEmailDomain - - -class PolicyListResponseItemRequireAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class PolicyListResponseItemRequireAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class PolicyListResponseItemRequireAccessIPRule(BaseModel): - ip: PolicyListResponseItemRequireAccessIPRuleIP - - -class PolicyListResponseItemRequireAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class PolicyListResponseItemRequireAccessIPListRule(BaseModel): - ip_list: PolicyListResponseItemRequireAccessIPListRuleIPList - - -class PolicyListResponseItemRequireAccessCertificateRule(BaseModel): - certificate: object - - -class PolicyListResponseItemRequireAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class PolicyListResponseItemRequireAccessAccessGroupRule(BaseModel): - group: PolicyListResponseItemRequireAccessAccessGroupRuleGroup - - -class PolicyListResponseItemRequireAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class PolicyListResponseItemRequireAccessAzureGroupRule(BaseModel): - azure_ad: PolicyListResponseItemRequireAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class PolicyListResponseItemRequireAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class PolicyListResponseItemRequireAccessGitHubOrganizationRule(BaseModel): - github_organization: PolicyListResponseItemRequireAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo( - alias="github-organization" - ) - - -class PolicyListResponseItemRequireAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class PolicyListResponseItemRequireAccessGsuiteGroupRule(BaseModel): - gsuite: PolicyListResponseItemRequireAccessGsuiteGroupRuleGsuite - - -class PolicyListResponseItemRequireAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class PolicyListResponseItemRequireAccessOktaGroupRule(BaseModel): - okta: PolicyListResponseItemRequireAccessOktaGroupRuleOkta - - -class PolicyListResponseItemRequireAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class PolicyListResponseItemRequireAccessSamlGroupRule(BaseModel): - saml: PolicyListResponseItemRequireAccessSamlGroupRuleSaml - - -class PolicyListResponseItemRequireAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class PolicyListResponseItemRequireAccessServiceTokenRule(BaseModel): - service_token: PolicyListResponseItemRequireAccessServiceTokenRuleServiceToken - - -class PolicyListResponseItemRequireAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class PolicyListResponseItemRequireAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class PolicyListResponseItemRequireAccessExternalEvaluationRule(BaseModel): - external_evaluation: PolicyListResponseItemRequireAccessExternalEvaluationRuleExternalEvaluation - - -class PolicyListResponseItemRequireAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class PolicyListResponseItemRequireAccessCountryRule(BaseModel): - geo: PolicyListResponseItemRequireAccessCountryRuleGeo - - -class PolicyListResponseItemRequireAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class PolicyListResponseItemRequireAccessAuthenticationMethodRule(BaseModel): - auth_method: PolicyListResponseItemRequireAccessAuthenticationMethodRuleAuthMethod - - -class PolicyListResponseItemRequireAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class PolicyListResponseItemRequireAccessDevicePostureRule(BaseModel): - device_posture: PolicyListResponseItemRequireAccessDevicePostureRuleDevicePosture - - -PolicyListResponseItemRequire = Union[ - PolicyListResponseItemRequireAccessEmailRule, - PolicyListResponseItemRequireAccessEmailListRule, - PolicyListResponseItemRequireAccessDomainRule, - PolicyListResponseItemRequireAccessEveryoneRule, - PolicyListResponseItemRequireAccessIPRule, - PolicyListResponseItemRequireAccessIPListRule, - PolicyListResponseItemRequireAccessCertificateRule, - PolicyListResponseItemRequireAccessAccessGroupRule, - PolicyListResponseItemRequireAccessAzureGroupRule, - PolicyListResponseItemRequireAccessGitHubOrganizationRule, - PolicyListResponseItemRequireAccessGsuiteGroupRule, - PolicyListResponseItemRequireAccessOktaGroupRule, - PolicyListResponseItemRequireAccessSamlGroupRule, - PolicyListResponseItemRequireAccessServiceTokenRule, - PolicyListResponseItemRequireAccessAnyValidServiceTokenRule, - PolicyListResponseItemRequireAccessExternalEvaluationRule, - PolicyListResponseItemRequireAccessCountryRule, - PolicyListResponseItemRequireAccessAuthenticationMethodRule, - PolicyListResponseItemRequireAccessDevicePostureRule, -] - - -class PolicyListResponseItem(BaseModel): - id: Optional[str] = None - """UUID""" - - approval_groups: Optional[List[PolicyListResponseItemApprovalGroup]] = None - """Administrators who can approve a temporary authentication request.""" - - approval_required: Optional[bool] = None - """ - Requires the user to request access from an administrator at the start of each - session. - """ - - created_at: Optional[datetime] = None - - decision: Optional[Literal["allow", "deny", "non_identity", "bypass"]] = None - """The action Access will take if a user matches this policy.""" - - exclude: Optional[List[PolicyListResponseItemExclude]] = None - """Rules evaluated with a NOT logical operator. - - To match the policy, a user cannot meet any of the Exclude rules. - """ - - include: Optional[List[PolicyListResponseItemInclude]] = None - """Rules evaluated with an OR logical operator. - - A user needs to meet only one of the Include rules. - """ - - isolation_required: Optional[bool] = None - """ - Require this application to be served in an isolated browser for users matching - this policy. 'Client Web Isolation' must be on for the account in order to use - this feature. - """ - - name: Optional[str] = None - """The name of the Access policy.""" - - precedence: Optional[int] = None - """The order of execution for this policy. Must be unique for each policy.""" - - purpose_justification_prompt: Optional[str] = None - """A custom message that will appear on the purpose justification screen.""" - - purpose_justification_required: Optional[bool] = None - """Require users to enter a justification when they log in to the application.""" - - require: Optional[List[PolicyListResponseItemRequire]] = None - """Rules evaluated with an AND logical operator. - - To match the policy, a user must meet all of the Require rules. - """ - - session_duration: Optional[str] = None - """The amount of time that tokens issued for the application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - updated_at: Optional[datetime] = None - - -PolicyListResponse = List[PolicyListResponseItem] +PolicyListResponse = List[AccessPolicies] diff --git a/src/cloudflare/types/zero_trust/access/applications/policy_update_response.py b/src/cloudflare/types/zero_trust/access/applications/policy_update_response.py deleted file mode 100644 index 7b5347e1e..000000000 --- a/src/cloudflare/types/zero_trust/access/applications/policy_update_response.py +++ /dev/null @@ -1,810 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ....._models import BaseModel - -__all__ = [ - "PolicyUpdateResponse", - "ApprovalGroup", - "Exclude", - "ExcludeAccessEmailRule", - "ExcludeAccessEmailRuleEmail", - "ExcludeAccessEmailListRule", - "ExcludeAccessEmailListRuleEmailList", - "ExcludeAccessDomainRule", - "ExcludeAccessDomainRuleEmailDomain", - "ExcludeAccessEveryoneRule", - "ExcludeAccessIPRule", - "ExcludeAccessIPRuleIP", - "ExcludeAccessIPListRule", - "ExcludeAccessIPListRuleIPList", - "ExcludeAccessCertificateRule", - "ExcludeAccessAccessGroupRule", - "ExcludeAccessAccessGroupRuleGroup", - "ExcludeAccessAzureGroupRule", - "ExcludeAccessAzureGroupRuleAzureAd", - "ExcludeAccessGitHubOrganizationRule", - "ExcludeAccessGitHubOrganizationRuleGitHubOrganization", - "ExcludeAccessGsuiteGroupRule", - "ExcludeAccessGsuiteGroupRuleGsuite", - "ExcludeAccessOktaGroupRule", - "ExcludeAccessOktaGroupRuleOkta", - "ExcludeAccessSamlGroupRule", - "ExcludeAccessSamlGroupRuleSaml", - "ExcludeAccessServiceTokenRule", - "ExcludeAccessServiceTokenRuleServiceToken", - "ExcludeAccessAnyValidServiceTokenRule", - "ExcludeAccessExternalEvaluationRule", - "ExcludeAccessExternalEvaluationRuleExternalEvaluation", - "ExcludeAccessCountryRule", - "ExcludeAccessCountryRuleGeo", - "ExcludeAccessAuthenticationMethodRule", - "ExcludeAccessAuthenticationMethodRuleAuthMethod", - "ExcludeAccessDevicePostureRule", - "ExcludeAccessDevicePostureRuleDevicePosture", - "Include", - "IncludeAccessEmailRule", - "IncludeAccessEmailRuleEmail", - "IncludeAccessEmailListRule", - "IncludeAccessEmailListRuleEmailList", - "IncludeAccessDomainRule", - "IncludeAccessDomainRuleEmailDomain", - "IncludeAccessEveryoneRule", - "IncludeAccessIPRule", - "IncludeAccessIPRuleIP", - "IncludeAccessIPListRule", - "IncludeAccessIPListRuleIPList", - "IncludeAccessCertificateRule", - "IncludeAccessAccessGroupRule", - "IncludeAccessAccessGroupRuleGroup", - "IncludeAccessAzureGroupRule", - "IncludeAccessAzureGroupRuleAzureAd", - "IncludeAccessGitHubOrganizationRule", - "IncludeAccessGitHubOrganizationRuleGitHubOrganization", - "IncludeAccessGsuiteGroupRule", - "IncludeAccessGsuiteGroupRuleGsuite", - "IncludeAccessOktaGroupRule", - "IncludeAccessOktaGroupRuleOkta", - "IncludeAccessSamlGroupRule", - "IncludeAccessSamlGroupRuleSaml", - "IncludeAccessServiceTokenRule", - "IncludeAccessServiceTokenRuleServiceToken", - "IncludeAccessAnyValidServiceTokenRule", - "IncludeAccessExternalEvaluationRule", - "IncludeAccessExternalEvaluationRuleExternalEvaluation", - "IncludeAccessCountryRule", - "IncludeAccessCountryRuleGeo", - "IncludeAccessAuthenticationMethodRule", - "IncludeAccessAuthenticationMethodRuleAuthMethod", - "IncludeAccessDevicePostureRule", - "IncludeAccessDevicePostureRuleDevicePosture", - "Require", - "RequireAccessEmailRule", - "RequireAccessEmailRuleEmail", - "RequireAccessEmailListRule", - "RequireAccessEmailListRuleEmailList", - "RequireAccessDomainRule", - "RequireAccessDomainRuleEmailDomain", - "RequireAccessEveryoneRule", - "RequireAccessIPRule", - "RequireAccessIPRuleIP", - "RequireAccessIPListRule", - "RequireAccessIPListRuleIPList", - "RequireAccessCertificateRule", - "RequireAccessAccessGroupRule", - "RequireAccessAccessGroupRuleGroup", - "RequireAccessAzureGroupRule", - "RequireAccessAzureGroupRuleAzureAd", - "RequireAccessGitHubOrganizationRule", - "RequireAccessGitHubOrganizationRuleGitHubOrganization", - "RequireAccessGsuiteGroupRule", - "RequireAccessGsuiteGroupRuleGsuite", - "RequireAccessOktaGroupRule", - "RequireAccessOktaGroupRuleOkta", - "RequireAccessSamlGroupRule", - "RequireAccessSamlGroupRuleSaml", - "RequireAccessServiceTokenRule", - "RequireAccessServiceTokenRuleServiceToken", - "RequireAccessAnyValidServiceTokenRule", - "RequireAccessExternalEvaluationRule", - "RequireAccessExternalEvaluationRuleExternalEvaluation", - "RequireAccessCountryRule", - "RequireAccessCountryRuleGeo", - "RequireAccessAuthenticationMethodRule", - "RequireAccessAuthenticationMethodRuleAuthMethod", - "RequireAccessDevicePostureRule", - "RequireAccessDevicePostureRuleDevicePosture", -] - - -class ApprovalGroup(BaseModel): - approvals_needed: float - """The number of approvals needed to obtain access.""" - - email_addresses: Optional[List[object]] = None - """A list of emails that can approve the access request.""" - - email_list_uuid: Optional[str] = None - """The UUID of an re-usable email list.""" - - -class ExcludeAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class ExcludeAccessEmailRule(BaseModel): - email: ExcludeAccessEmailRuleEmail - - -class ExcludeAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class ExcludeAccessEmailListRule(BaseModel): - email_list: ExcludeAccessEmailListRuleEmailList - - -class ExcludeAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class ExcludeAccessDomainRule(BaseModel): - email_domain: ExcludeAccessDomainRuleEmailDomain - - -class ExcludeAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class ExcludeAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class ExcludeAccessIPRule(BaseModel): - ip: ExcludeAccessIPRuleIP - - -class ExcludeAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class ExcludeAccessIPListRule(BaseModel): - ip_list: ExcludeAccessIPListRuleIPList - - -class ExcludeAccessCertificateRule(BaseModel): - certificate: object - - -class ExcludeAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class ExcludeAccessAccessGroupRule(BaseModel): - group: ExcludeAccessAccessGroupRuleGroup - - -class ExcludeAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class ExcludeAccessAzureGroupRule(BaseModel): - azure_ad: ExcludeAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class ExcludeAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class ExcludeAccessGitHubOrganizationRule(BaseModel): - github_organization: ExcludeAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo(alias="github-organization") - - -class ExcludeAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class ExcludeAccessGsuiteGroupRule(BaseModel): - gsuite: ExcludeAccessGsuiteGroupRuleGsuite - - -class ExcludeAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class ExcludeAccessOktaGroupRule(BaseModel): - okta: ExcludeAccessOktaGroupRuleOkta - - -class ExcludeAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class ExcludeAccessSamlGroupRule(BaseModel): - saml: ExcludeAccessSamlGroupRuleSaml - - -class ExcludeAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class ExcludeAccessServiceTokenRule(BaseModel): - service_token: ExcludeAccessServiceTokenRuleServiceToken - - -class ExcludeAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class ExcludeAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class ExcludeAccessExternalEvaluationRule(BaseModel): - external_evaluation: ExcludeAccessExternalEvaluationRuleExternalEvaluation - - -class ExcludeAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class ExcludeAccessCountryRule(BaseModel): - geo: ExcludeAccessCountryRuleGeo - - -class ExcludeAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class ExcludeAccessAuthenticationMethodRule(BaseModel): - auth_method: ExcludeAccessAuthenticationMethodRuleAuthMethod - - -class ExcludeAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class ExcludeAccessDevicePostureRule(BaseModel): - device_posture: ExcludeAccessDevicePostureRuleDevicePosture - - -Exclude = Union[ - ExcludeAccessEmailRule, - ExcludeAccessEmailListRule, - ExcludeAccessDomainRule, - ExcludeAccessEveryoneRule, - ExcludeAccessIPRule, - ExcludeAccessIPListRule, - ExcludeAccessCertificateRule, - ExcludeAccessAccessGroupRule, - ExcludeAccessAzureGroupRule, - ExcludeAccessGitHubOrganizationRule, - ExcludeAccessGsuiteGroupRule, - ExcludeAccessOktaGroupRule, - ExcludeAccessSamlGroupRule, - ExcludeAccessServiceTokenRule, - ExcludeAccessAnyValidServiceTokenRule, - ExcludeAccessExternalEvaluationRule, - ExcludeAccessCountryRule, - ExcludeAccessAuthenticationMethodRule, - ExcludeAccessDevicePostureRule, -] - - -class IncludeAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class IncludeAccessEmailRule(BaseModel): - email: IncludeAccessEmailRuleEmail - - -class IncludeAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class IncludeAccessEmailListRule(BaseModel): - email_list: IncludeAccessEmailListRuleEmailList - - -class IncludeAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class IncludeAccessDomainRule(BaseModel): - email_domain: IncludeAccessDomainRuleEmailDomain - - -class IncludeAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class IncludeAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class IncludeAccessIPRule(BaseModel): - ip: IncludeAccessIPRuleIP - - -class IncludeAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class IncludeAccessIPListRule(BaseModel): - ip_list: IncludeAccessIPListRuleIPList - - -class IncludeAccessCertificateRule(BaseModel): - certificate: object - - -class IncludeAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class IncludeAccessAccessGroupRule(BaseModel): - group: IncludeAccessAccessGroupRuleGroup - - -class IncludeAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class IncludeAccessAzureGroupRule(BaseModel): - azure_ad: IncludeAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class IncludeAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class IncludeAccessGitHubOrganizationRule(BaseModel): - github_organization: IncludeAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo(alias="github-organization") - - -class IncludeAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class IncludeAccessGsuiteGroupRule(BaseModel): - gsuite: IncludeAccessGsuiteGroupRuleGsuite - - -class IncludeAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class IncludeAccessOktaGroupRule(BaseModel): - okta: IncludeAccessOktaGroupRuleOkta - - -class IncludeAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class IncludeAccessSamlGroupRule(BaseModel): - saml: IncludeAccessSamlGroupRuleSaml - - -class IncludeAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class IncludeAccessServiceTokenRule(BaseModel): - service_token: IncludeAccessServiceTokenRuleServiceToken - - -class IncludeAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class IncludeAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class IncludeAccessExternalEvaluationRule(BaseModel): - external_evaluation: IncludeAccessExternalEvaluationRuleExternalEvaluation - - -class IncludeAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class IncludeAccessCountryRule(BaseModel): - geo: IncludeAccessCountryRuleGeo - - -class IncludeAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class IncludeAccessAuthenticationMethodRule(BaseModel): - auth_method: IncludeAccessAuthenticationMethodRuleAuthMethod - - -class IncludeAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class IncludeAccessDevicePostureRule(BaseModel): - device_posture: IncludeAccessDevicePostureRuleDevicePosture - - -Include = Union[ - IncludeAccessEmailRule, - IncludeAccessEmailListRule, - IncludeAccessDomainRule, - IncludeAccessEveryoneRule, - IncludeAccessIPRule, - IncludeAccessIPListRule, - IncludeAccessCertificateRule, - IncludeAccessAccessGroupRule, - IncludeAccessAzureGroupRule, - IncludeAccessGitHubOrganizationRule, - IncludeAccessGsuiteGroupRule, - IncludeAccessOktaGroupRule, - IncludeAccessSamlGroupRule, - IncludeAccessServiceTokenRule, - IncludeAccessAnyValidServiceTokenRule, - IncludeAccessExternalEvaluationRule, - IncludeAccessCountryRule, - IncludeAccessAuthenticationMethodRule, - IncludeAccessDevicePostureRule, -] - - -class RequireAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class RequireAccessEmailRule(BaseModel): - email: RequireAccessEmailRuleEmail - - -class RequireAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class RequireAccessEmailListRule(BaseModel): - email_list: RequireAccessEmailListRuleEmailList - - -class RequireAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class RequireAccessDomainRule(BaseModel): - email_domain: RequireAccessDomainRuleEmailDomain - - -class RequireAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class RequireAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class RequireAccessIPRule(BaseModel): - ip: RequireAccessIPRuleIP - - -class RequireAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class RequireAccessIPListRule(BaseModel): - ip_list: RequireAccessIPListRuleIPList - - -class RequireAccessCertificateRule(BaseModel): - certificate: object - - -class RequireAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class RequireAccessAccessGroupRule(BaseModel): - group: RequireAccessAccessGroupRuleGroup - - -class RequireAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class RequireAccessAzureGroupRule(BaseModel): - azure_ad: RequireAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class RequireAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class RequireAccessGitHubOrganizationRule(BaseModel): - github_organization: RequireAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo(alias="github-organization") - - -class RequireAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class RequireAccessGsuiteGroupRule(BaseModel): - gsuite: RequireAccessGsuiteGroupRuleGsuite - - -class RequireAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class RequireAccessOktaGroupRule(BaseModel): - okta: RequireAccessOktaGroupRuleOkta - - -class RequireAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class RequireAccessSamlGroupRule(BaseModel): - saml: RequireAccessSamlGroupRuleSaml - - -class RequireAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class RequireAccessServiceTokenRule(BaseModel): - service_token: RequireAccessServiceTokenRuleServiceToken - - -class RequireAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class RequireAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class RequireAccessExternalEvaluationRule(BaseModel): - external_evaluation: RequireAccessExternalEvaluationRuleExternalEvaluation - - -class RequireAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class RequireAccessCountryRule(BaseModel): - geo: RequireAccessCountryRuleGeo - - -class RequireAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class RequireAccessAuthenticationMethodRule(BaseModel): - auth_method: RequireAccessAuthenticationMethodRuleAuthMethod - - -class RequireAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class RequireAccessDevicePostureRule(BaseModel): - device_posture: RequireAccessDevicePostureRuleDevicePosture - - -Require = Union[ - RequireAccessEmailRule, - RequireAccessEmailListRule, - RequireAccessDomainRule, - RequireAccessEveryoneRule, - RequireAccessIPRule, - RequireAccessIPListRule, - RequireAccessCertificateRule, - RequireAccessAccessGroupRule, - RequireAccessAzureGroupRule, - RequireAccessGitHubOrganizationRule, - RequireAccessGsuiteGroupRule, - RequireAccessOktaGroupRule, - RequireAccessSamlGroupRule, - RequireAccessServiceTokenRule, - RequireAccessAnyValidServiceTokenRule, - RequireAccessExternalEvaluationRule, - RequireAccessCountryRule, - RequireAccessAuthenticationMethodRule, - RequireAccessDevicePostureRule, -] - - -class PolicyUpdateResponse(BaseModel): - id: Optional[str] = None - """UUID""" - - approval_groups: Optional[List[ApprovalGroup]] = None - """Administrators who can approve a temporary authentication request.""" - - approval_required: Optional[bool] = None - """ - Requires the user to request access from an administrator at the start of each - session. - """ - - created_at: Optional[datetime] = None - - decision: Optional[Literal["allow", "deny", "non_identity", "bypass"]] = None - """The action Access will take if a user matches this policy.""" - - exclude: Optional[List[Exclude]] = None - """Rules evaluated with a NOT logical operator. - - To match the policy, a user cannot meet any of the Exclude rules. - """ - - include: Optional[List[Include]] = None - """Rules evaluated with an OR logical operator. - - A user needs to meet only one of the Include rules. - """ - - isolation_required: Optional[bool] = None - """ - Require this application to be served in an isolated browser for users matching - this policy. 'Client Web Isolation' must be on for the account in order to use - this feature. - """ - - name: Optional[str] = None - """The name of the Access policy.""" - - precedence: Optional[int] = None - """The order of execution for this policy. Must be unique for each policy.""" - - purpose_justification_prompt: Optional[str] = None - """A custom message that will appear on the purpose justification screen.""" - - purpose_justification_required: Optional[bool] = None - """Require users to enter a justification when they log in to the application.""" - - require: Optional[List[Require]] = None - """Rules evaluated with an AND logical operator. - - To match the policy, a user must meet all of the Require rules. - """ - - session_duration: Optional[str] = None - """The amount of time that tokens issued for the application will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/access/bookmark_create_response.py b/src/cloudflare/types/zero_trust/access/bookmark_create_response.py deleted file mode 100644 index a5cad5c39..000000000 --- a/src/cloudflare/types/zero_trust/access/bookmark_create_response.py +++ /dev/null @@ -1,29 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["BookmarkCreateResponse"] - - -class BookmarkCreateResponse(BaseModel): - id: Optional[object] = None - """The unique identifier for the Bookmark application.""" - - app_launcher_visible: Optional[bool] = None - """Displays the application in the App Launcher.""" - - created_at: Optional[datetime] = None - - domain: Optional[str] = None - """The domain of the Bookmark application.""" - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the Bookmark application.""" - - updated_at: Optional[datetime] = None 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 e534998e4..bbf8eca3e 100644 --- a/src/cloudflare/types/zero_trust/access/bookmark_list_response.py +++ b/src/cloudflare/types/zero_trust/access/bookmark_list_response.py @@ -1,32 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ...._models import BaseModel +from .access_bookmarks import AccessBookmarks -__all__ = ["BookmarkListResponse", "BookmarkListResponseItem"] +__all__ = ["BookmarkListResponse"] - -class BookmarkListResponseItem(BaseModel): - id: Optional[object] = None - """The unique identifier for the Bookmark application.""" - - app_launcher_visible: Optional[bool] = None - """Displays the application in the App Launcher.""" - - created_at: Optional[datetime] = None - - domain: Optional[str] = None - """The domain of the Bookmark application.""" - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the Bookmark application.""" - - updated_at: Optional[datetime] = None - - -BookmarkListResponse = List[BookmarkListResponseItem] +BookmarkListResponse = List[AccessBookmarks] diff --git a/src/cloudflare/types/zero_trust/access/bookmark_update_response.py b/src/cloudflare/types/zero_trust/access/bookmark_update_response.py deleted file mode 100644 index 4f6044b75..000000000 --- a/src/cloudflare/types/zero_trust/access/bookmark_update_response.py +++ /dev/null @@ -1,29 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["BookmarkUpdateResponse"] - - -class BookmarkUpdateResponse(BaseModel): - id: Optional[object] = None - """The unique identifier for the Bookmark application.""" - - app_launcher_visible: Optional[bool] = None - """Displays the application in the App Launcher.""" - - created_at: Optional[datetime] = None - - domain: Optional[str] = None - """The domain of the Bookmark application.""" - - logo_url: Optional[str] = None - """The image URL for the logo shown in the App Launcher dashboard.""" - - name: Optional[str] = None - """The name of the Bookmark application.""" - - updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/access/certificate_create_response.py b/src/cloudflare/types/zero_trust/access/certificate_create_response.py deleted file mode 100644 index b430eeb89..000000000 --- a/src/cloudflare/types/zero_trust/access/certificate_create_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["CertificateCreateResponse"] - - -class CertificateCreateResponse(BaseModel): - id: Optional[object] = None - """The ID of the application that will use this certificate.""" - - associated_hostnames: Optional[List[str]] = None - """The hostnames of the applications that will use this certificate.""" - - created_at: Optional[datetime] = None - - expires_on: Optional[datetime] = None - - fingerprint: Optional[str] = None - """The MD5 fingerprint of the certificate.""" - - name: Optional[str] = None - """The name of the certificate.""" - - updated_at: Optional[datetime] = None 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 b7b5b6334..c42ec6c59 100644 --- a/src/cloudflare/types/zero_trust/access/certificate_list_response.py +++ b/src/cloudflare/types/zero_trust/access/certificate_list_response.py @@ -1,31 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ...._models import BaseModel +from .access_certificates import AccessCertificates -__all__ = ["CertificateListResponse", "CertificateListResponseItem"] +__all__ = ["CertificateListResponse"] - -class CertificateListResponseItem(BaseModel): - id: Optional[object] = None - """The ID of the application that will use this certificate.""" - - associated_hostnames: Optional[List[str]] = None - """The hostnames of the applications that will use this certificate.""" - - created_at: Optional[datetime] = None - - expires_on: Optional[datetime] = None - - fingerprint: Optional[str] = None - """The MD5 fingerprint of the certificate.""" - - name: Optional[str] = None - """The name of the certificate.""" - - updated_at: Optional[datetime] = None - - -CertificateListResponse = List[CertificateListResponseItem] +CertificateListResponse = List[AccessCertificates] diff --git a/src/cloudflare/types/zero_trust/access/certificate_update_response.py b/src/cloudflare/types/zero_trust/access/certificate_update_response.py deleted file mode 100644 index 10848e6fb..000000000 --- a/src/cloudflare/types/zero_trust/access/certificate_update_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["CertificateUpdateResponse"] - - -class CertificateUpdateResponse(BaseModel): - id: Optional[object] = None - """The ID of the application that will use this certificate.""" - - associated_hostnames: Optional[List[str]] = None - """The hostnames of the applications that will use this certificate.""" - - created_at: Optional[datetime] = None - - expires_on: Optional[datetime] = None - - fingerprint: Optional[str] = None - """The MD5 fingerprint of the certificate.""" - - name: Optional[str] = None - """The name of the certificate.""" - - updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/access/certificates/__init__.py b/src/cloudflare/types/zero_trust/access/certificates/__init__.py index 873890961..6adea2432 100644 --- a/src/cloudflare/types/zero_trust/access/certificates/__init__.py +++ b/src/cloudflare/types/zero_trust/access/certificates/__init__.py @@ -2,6 +2,8 @@ from __future__ import annotations +from .access_settings import AccessSettings as AccessSettings +from .access_settings_param import AccessSettingsParam as AccessSettingsParam from .setting_list_response import SettingListResponse as SettingListResponse from .setting_update_params import SettingUpdateParams as SettingUpdateParams from .setting_update_response import SettingUpdateResponse as SettingUpdateResponse diff --git a/src/cloudflare/types/zero_trust/access/certificates/access_settings.py b/src/cloudflare/types/zero_trust/access/certificates/access_settings.py new file mode 100644 index 000000000..0c4e9bfeb --- /dev/null +++ b/src/cloudflare/types/zero_trust/access/certificates/access_settings.py @@ -0,0 +1,23 @@ +# File generated from our OpenAPI spec by Stainless. + +from ....._models import BaseModel + +__all__ = ["AccessSettings"] + + +class AccessSettings(BaseModel): + china_network: bool + """Request client certificates for this hostname in China. + + Can only be set to true if this zone is china network enabled. + """ + + client_certificate_forwarding: bool + """ + Client Certificate Forwarding is a feature that takes the client cert provided + by the eyeball to the edge, and forwards it to the origin as a HTTP header to + allow logging on the origin. + """ + + hostname: str + """The hostname that these settings apply to.""" diff --git a/src/cloudflare/types/zero_trust/access/certificates/access_settings_param.py b/src/cloudflare/types/zero_trust/access/certificates/access_settings_param.py new file mode 100644 index 000000000..620cb8f36 --- /dev/null +++ b/src/cloudflare/types/zero_trust/access/certificates/access_settings_param.py @@ -0,0 +1,25 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["AccessSettingsParam"] + + +class AccessSettingsParam(TypedDict, total=False): + china_network: Required[bool] + """Request client certificates for this hostname in China. + + Can only be set to true if this zone is china network enabled. + """ + + client_certificate_forwarding: Required[bool] + """ + Client Certificate Forwarding is a feature that takes the client cert provided + by the eyeball to the edge, and forwards it to the origin as a HTTP header to + allow logging on the origin. + """ + + hostname: Required[str] + """The hostname that these settings apply to.""" diff --git a/src/cloudflare/types/zero_trust/access/certificates/setting_list_response.py b/src/cloudflare/types/zero_trust/access/certificates/setting_list_response.py index 309884cbf..06fe5723a 100644 --- a/src/cloudflare/types/zero_trust/access/certificates/setting_list_response.py +++ b/src/cloudflare/types/zero_trust/access/certificates/setting_list_response.py @@ -2,27 +2,8 @@ from typing import List -from ....._models import BaseModel +from .access_settings import AccessSettings -__all__ = ["SettingListResponse", "SettingListResponseItem"] +__all__ = ["SettingListResponse"] - -class SettingListResponseItem(BaseModel): - china_network: bool - """Request client certificates for this hostname in China. - - Can only be set to true if this zone is china network enabled. - """ - - client_certificate_forwarding: bool - """ - Client Certificate Forwarding is a feature that takes the client cert provided - by the eyeball to the edge, and forwards it to the origin as a HTTP header to - allow logging on the origin. - """ - - hostname: str - """The hostname that these settings apply to.""" - - -SettingListResponse = List[SettingListResponseItem] +SettingListResponse = List[AccessSettings] 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 847fc4e0f..5e87efb9c 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,32 +5,16 @@ from __future__ import annotations from typing import Iterable from typing_extensions import Required, TypedDict -__all__ = ["SettingUpdateParams", "Setting"] +from .access_settings_param import AccessSettingsParam + +__all__ = ["SettingUpdateParams"] class SettingUpdateParams(TypedDict, total=False): - settings: Required[Iterable[Setting]] + settings: Required[Iterable[AccessSettingsParam]] account_id: str """The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.""" zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" - - -class Setting(TypedDict, total=False): - china_network: Required[bool] - """Request client certificates for this hostname in China. - - Can only be set to true if this zone is china network enabled. - """ - - client_certificate_forwarding: Required[bool] - """ - Client Certificate Forwarding is a feature that takes the client cert provided - by the eyeball to the edge, and forwards it to the origin as a HTTP header to - allow logging on the origin. - """ - - hostname: Required[str] - """The hostname that these settings apply to.""" 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 aea893b99..67fd6b373 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,27 +2,8 @@ from typing import List -from ....._models import BaseModel +from .access_settings import AccessSettings -__all__ = ["SettingUpdateResponse", "SettingUpdateResponseItem"] +__all__ = ["SettingUpdateResponse"] - -class SettingUpdateResponseItem(BaseModel): - china_network: bool - """Request client certificates for this hostname in China. - - Can only be set to true if this zone is china network enabled. - """ - - client_certificate_forwarding: bool - """ - Client Certificate Forwarding is a feature that takes the client cert provided - by the eyeball to the edge, and forwards it to the origin as a HTTP header to - allow logging on the origin. - """ - - hostname: str - """The hostname that these settings apply to.""" - - -SettingUpdateResponse = List[SettingUpdateResponseItem] +SettingUpdateResponse = List[AccessSettings] 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 672b3c9ad..3daf817f8 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 @@ -1,30 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ...._models import BaseModel +from .access_custom_page_without_html import AccessCustomPageWithoutHTML -__all__ = ["CustomPageListResponse", "CustomPageListResponseItem"] +__all__ = ["CustomPageListResponse"] - -class CustomPageListResponseItem(BaseModel): - name: str - """Custom page name.""" - - type: Literal["identity_denied", "forbidden"] - """Custom page type.""" - - app_count: Optional[int] = None - """Number of apps the custom page is assigned to.""" - - created_at: Optional[datetime] = None - - uid: Optional[str] = None - """UUID""" - - updated_at: Optional[datetime] = None - - -CustomPageListResponse = List[CustomPageListResponseItem] +CustomPageListResponse = List[AccessCustomPageWithoutHTML] diff --git a/src/cloudflare/types/zero_trust/access/custom_page_update_response.py b/src/cloudflare/types/zero_trust/access/custom_page_update_response.py deleted file mode 100644 index d200afca0..000000000 --- a/src/cloudflare/types/zero_trust/access/custom_page_update_response.py +++ /dev/null @@ -1,27 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["CustomPageUpdateResponse"] - - -class CustomPageUpdateResponse(BaseModel): - name: str - """Custom page name.""" - - type: Literal["identity_denied", "forbidden"] - """Custom page type.""" - - app_count: Optional[int] = None - """Number of apps the custom page is assigned to.""" - - created_at: Optional[datetime] = None - - uid: Optional[str] = None - """UUID""" - - updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/access/group_create_response.py b/src/cloudflare/types/zero_trust/access/group_create_response.py deleted file mode 100644 index eea501205..000000000 --- a/src/cloudflare/types/zero_trust/access/group_create_response.py +++ /dev/null @@ -1,1010 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from datetime import datetime - -from pydantic import Field as FieldInfo - -from ...._models import BaseModel - -__all__ = [ - "GroupCreateResponse", - "Exclude", - "ExcludeAccessEmailRule", - "ExcludeAccessEmailRuleEmail", - "ExcludeAccessEmailListRule", - "ExcludeAccessEmailListRuleEmailList", - "ExcludeAccessDomainRule", - "ExcludeAccessDomainRuleEmailDomain", - "ExcludeAccessEveryoneRule", - "ExcludeAccessIPRule", - "ExcludeAccessIPRuleIP", - "ExcludeAccessIPListRule", - "ExcludeAccessIPListRuleIPList", - "ExcludeAccessCertificateRule", - "ExcludeAccessAccessGroupRule", - "ExcludeAccessAccessGroupRuleGroup", - "ExcludeAccessAzureGroupRule", - "ExcludeAccessAzureGroupRuleAzureAd", - "ExcludeAccessGitHubOrganizationRule", - "ExcludeAccessGitHubOrganizationRuleGitHubOrganization", - "ExcludeAccessGsuiteGroupRule", - "ExcludeAccessGsuiteGroupRuleGsuite", - "ExcludeAccessOktaGroupRule", - "ExcludeAccessOktaGroupRuleOkta", - "ExcludeAccessSamlGroupRule", - "ExcludeAccessSamlGroupRuleSaml", - "ExcludeAccessServiceTokenRule", - "ExcludeAccessServiceTokenRuleServiceToken", - "ExcludeAccessAnyValidServiceTokenRule", - "ExcludeAccessExternalEvaluationRule", - "ExcludeAccessExternalEvaluationRuleExternalEvaluation", - "ExcludeAccessCountryRule", - "ExcludeAccessCountryRuleGeo", - "ExcludeAccessAuthenticationMethodRule", - "ExcludeAccessAuthenticationMethodRuleAuthMethod", - "ExcludeAccessDevicePostureRule", - "ExcludeAccessDevicePostureRuleDevicePosture", - "Include", - "IncludeAccessEmailRule", - "IncludeAccessEmailRuleEmail", - "IncludeAccessEmailListRule", - "IncludeAccessEmailListRuleEmailList", - "IncludeAccessDomainRule", - "IncludeAccessDomainRuleEmailDomain", - "IncludeAccessEveryoneRule", - "IncludeAccessIPRule", - "IncludeAccessIPRuleIP", - "IncludeAccessIPListRule", - "IncludeAccessIPListRuleIPList", - "IncludeAccessCertificateRule", - "IncludeAccessAccessGroupRule", - "IncludeAccessAccessGroupRuleGroup", - "IncludeAccessAzureGroupRule", - "IncludeAccessAzureGroupRuleAzureAd", - "IncludeAccessGitHubOrganizationRule", - "IncludeAccessGitHubOrganizationRuleGitHubOrganization", - "IncludeAccessGsuiteGroupRule", - "IncludeAccessGsuiteGroupRuleGsuite", - "IncludeAccessOktaGroupRule", - "IncludeAccessOktaGroupRuleOkta", - "IncludeAccessSamlGroupRule", - "IncludeAccessSamlGroupRuleSaml", - "IncludeAccessServiceTokenRule", - "IncludeAccessServiceTokenRuleServiceToken", - "IncludeAccessAnyValidServiceTokenRule", - "IncludeAccessExternalEvaluationRule", - "IncludeAccessExternalEvaluationRuleExternalEvaluation", - "IncludeAccessCountryRule", - "IncludeAccessCountryRuleGeo", - "IncludeAccessAuthenticationMethodRule", - "IncludeAccessAuthenticationMethodRuleAuthMethod", - "IncludeAccessDevicePostureRule", - "IncludeAccessDevicePostureRuleDevicePosture", - "IsDefault", - "IsDefaultAccessEmailRule", - "IsDefaultAccessEmailRuleEmail", - "IsDefaultAccessEmailListRule", - "IsDefaultAccessEmailListRuleEmailList", - "IsDefaultAccessDomainRule", - "IsDefaultAccessDomainRuleEmailDomain", - "IsDefaultAccessEveryoneRule", - "IsDefaultAccessIPRule", - "IsDefaultAccessIPRuleIP", - "IsDefaultAccessIPListRule", - "IsDefaultAccessIPListRuleIPList", - "IsDefaultAccessCertificateRule", - "IsDefaultAccessAccessGroupRule", - "IsDefaultAccessAccessGroupRuleGroup", - "IsDefaultAccessAzureGroupRule", - "IsDefaultAccessAzureGroupRuleAzureAd", - "IsDefaultAccessGitHubOrganizationRule", - "IsDefaultAccessGitHubOrganizationRuleGitHubOrganization", - "IsDefaultAccessGsuiteGroupRule", - "IsDefaultAccessGsuiteGroupRuleGsuite", - "IsDefaultAccessOktaGroupRule", - "IsDefaultAccessOktaGroupRuleOkta", - "IsDefaultAccessSamlGroupRule", - "IsDefaultAccessSamlGroupRuleSaml", - "IsDefaultAccessServiceTokenRule", - "IsDefaultAccessServiceTokenRuleServiceToken", - "IsDefaultAccessAnyValidServiceTokenRule", - "IsDefaultAccessExternalEvaluationRule", - "IsDefaultAccessExternalEvaluationRuleExternalEvaluation", - "IsDefaultAccessCountryRule", - "IsDefaultAccessCountryRuleGeo", - "IsDefaultAccessAuthenticationMethodRule", - "IsDefaultAccessAuthenticationMethodRuleAuthMethod", - "IsDefaultAccessDevicePostureRule", - "IsDefaultAccessDevicePostureRuleDevicePosture", - "Require", - "RequireAccessEmailRule", - "RequireAccessEmailRuleEmail", - "RequireAccessEmailListRule", - "RequireAccessEmailListRuleEmailList", - "RequireAccessDomainRule", - "RequireAccessDomainRuleEmailDomain", - "RequireAccessEveryoneRule", - "RequireAccessIPRule", - "RequireAccessIPRuleIP", - "RequireAccessIPListRule", - "RequireAccessIPListRuleIPList", - "RequireAccessCertificateRule", - "RequireAccessAccessGroupRule", - "RequireAccessAccessGroupRuleGroup", - "RequireAccessAzureGroupRule", - "RequireAccessAzureGroupRuleAzureAd", - "RequireAccessGitHubOrganizationRule", - "RequireAccessGitHubOrganizationRuleGitHubOrganization", - "RequireAccessGsuiteGroupRule", - "RequireAccessGsuiteGroupRuleGsuite", - "RequireAccessOktaGroupRule", - "RequireAccessOktaGroupRuleOkta", - "RequireAccessSamlGroupRule", - "RequireAccessSamlGroupRuleSaml", - "RequireAccessServiceTokenRule", - "RequireAccessServiceTokenRuleServiceToken", - "RequireAccessAnyValidServiceTokenRule", - "RequireAccessExternalEvaluationRule", - "RequireAccessExternalEvaluationRuleExternalEvaluation", - "RequireAccessCountryRule", - "RequireAccessCountryRuleGeo", - "RequireAccessAuthenticationMethodRule", - "RequireAccessAuthenticationMethodRuleAuthMethod", - "RequireAccessDevicePostureRule", - "RequireAccessDevicePostureRuleDevicePosture", -] - - -class ExcludeAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class ExcludeAccessEmailRule(BaseModel): - email: ExcludeAccessEmailRuleEmail - - -class ExcludeAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class ExcludeAccessEmailListRule(BaseModel): - email_list: ExcludeAccessEmailListRuleEmailList - - -class ExcludeAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class ExcludeAccessDomainRule(BaseModel): - email_domain: ExcludeAccessDomainRuleEmailDomain - - -class ExcludeAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class ExcludeAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class ExcludeAccessIPRule(BaseModel): - ip: ExcludeAccessIPRuleIP - - -class ExcludeAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class ExcludeAccessIPListRule(BaseModel): - ip_list: ExcludeAccessIPListRuleIPList - - -class ExcludeAccessCertificateRule(BaseModel): - certificate: object - - -class ExcludeAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class ExcludeAccessAccessGroupRule(BaseModel): - group: ExcludeAccessAccessGroupRuleGroup - - -class ExcludeAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class ExcludeAccessAzureGroupRule(BaseModel): - azure_ad: ExcludeAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class ExcludeAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class ExcludeAccessGitHubOrganizationRule(BaseModel): - github_organization: ExcludeAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo(alias="github-organization") - - -class ExcludeAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class ExcludeAccessGsuiteGroupRule(BaseModel): - gsuite: ExcludeAccessGsuiteGroupRuleGsuite - - -class ExcludeAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class ExcludeAccessOktaGroupRule(BaseModel): - okta: ExcludeAccessOktaGroupRuleOkta - - -class ExcludeAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class ExcludeAccessSamlGroupRule(BaseModel): - saml: ExcludeAccessSamlGroupRuleSaml - - -class ExcludeAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class ExcludeAccessServiceTokenRule(BaseModel): - service_token: ExcludeAccessServiceTokenRuleServiceToken - - -class ExcludeAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class ExcludeAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class ExcludeAccessExternalEvaluationRule(BaseModel): - external_evaluation: ExcludeAccessExternalEvaluationRuleExternalEvaluation - - -class ExcludeAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class ExcludeAccessCountryRule(BaseModel): - geo: ExcludeAccessCountryRuleGeo - - -class ExcludeAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class ExcludeAccessAuthenticationMethodRule(BaseModel): - auth_method: ExcludeAccessAuthenticationMethodRuleAuthMethod - - -class ExcludeAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class ExcludeAccessDevicePostureRule(BaseModel): - device_posture: ExcludeAccessDevicePostureRuleDevicePosture - - -Exclude = Union[ - ExcludeAccessEmailRule, - ExcludeAccessEmailListRule, - ExcludeAccessDomainRule, - ExcludeAccessEveryoneRule, - ExcludeAccessIPRule, - ExcludeAccessIPListRule, - ExcludeAccessCertificateRule, - ExcludeAccessAccessGroupRule, - ExcludeAccessAzureGroupRule, - ExcludeAccessGitHubOrganizationRule, - ExcludeAccessGsuiteGroupRule, - ExcludeAccessOktaGroupRule, - ExcludeAccessSamlGroupRule, - ExcludeAccessServiceTokenRule, - ExcludeAccessAnyValidServiceTokenRule, - ExcludeAccessExternalEvaluationRule, - ExcludeAccessCountryRule, - ExcludeAccessAuthenticationMethodRule, - ExcludeAccessDevicePostureRule, -] - - -class IncludeAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class IncludeAccessEmailRule(BaseModel): - email: IncludeAccessEmailRuleEmail - - -class IncludeAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class IncludeAccessEmailListRule(BaseModel): - email_list: IncludeAccessEmailListRuleEmailList - - -class IncludeAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class IncludeAccessDomainRule(BaseModel): - email_domain: IncludeAccessDomainRuleEmailDomain - - -class IncludeAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class IncludeAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class IncludeAccessIPRule(BaseModel): - ip: IncludeAccessIPRuleIP - - -class IncludeAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class IncludeAccessIPListRule(BaseModel): - ip_list: IncludeAccessIPListRuleIPList - - -class IncludeAccessCertificateRule(BaseModel): - certificate: object - - -class IncludeAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class IncludeAccessAccessGroupRule(BaseModel): - group: IncludeAccessAccessGroupRuleGroup - - -class IncludeAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class IncludeAccessAzureGroupRule(BaseModel): - azure_ad: IncludeAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class IncludeAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class IncludeAccessGitHubOrganizationRule(BaseModel): - github_organization: IncludeAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo(alias="github-organization") - - -class IncludeAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class IncludeAccessGsuiteGroupRule(BaseModel): - gsuite: IncludeAccessGsuiteGroupRuleGsuite - - -class IncludeAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class IncludeAccessOktaGroupRule(BaseModel): - okta: IncludeAccessOktaGroupRuleOkta - - -class IncludeAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class IncludeAccessSamlGroupRule(BaseModel): - saml: IncludeAccessSamlGroupRuleSaml - - -class IncludeAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class IncludeAccessServiceTokenRule(BaseModel): - service_token: IncludeAccessServiceTokenRuleServiceToken - - -class IncludeAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class IncludeAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class IncludeAccessExternalEvaluationRule(BaseModel): - external_evaluation: IncludeAccessExternalEvaluationRuleExternalEvaluation - - -class IncludeAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class IncludeAccessCountryRule(BaseModel): - geo: IncludeAccessCountryRuleGeo - - -class IncludeAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class IncludeAccessAuthenticationMethodRule(BaseModel): - auth_method: IncludeAccessAuthenticationMethodRuleAuthMethod - - -class IncludeAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class IncludeAccessDevicePostureRule(BaseModel): - device_posture: IncludeAccessDevicePostureRuleDevicePosture - - -Include = Union[ - IncludeAccessEmailRule, - IncludeAccessEmailListRule, - IncludeAccessDomainRule, - IncludeAccessEveryoneRule, - IncludeAccessIPRule, - IncludeAccessIPListRule, - IncludeAccessCertificateRule, - IncludeAccessAccessGroupRule, - IncludeAccessAzureGroupRule, - IncludeAccessGitHubOrganizationRule, - IncludeAccessGsuiteGroupRule, - IncludeAccessOktaGroupRule, - IncludeAccessSamlGroupRule, - IncludeAccessServiceTokenRule, - IncludeAccessAnyValidServiceTokenRule, - IncludeAccessExternalEvaluationRule, - IncludeAccessCountryRule, - IncludeAccessAuthenticationMethodRule, - IncludeAccessDevicePostureRule, -] - - -class IsDefaultAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class IsDefaultAccessEmailRule(BaseModel): - email: IsDefaultAccessEmailRuleEmail - - -class IsDefaultAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class IsDefaultAccessEmailListRule(BaseModel): - email_list: IsDefaultAccessEmailListRuleEmailList - - -class IsDefaultAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class IsDefaultAccessDomainRule(BaseModel): - email_domain: IsDefaultAccessDomainRuleEmailDomain - - -class IsDefaultAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class IsDefaultAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class IsDefaultAccessIPRule(BaseModel): - ip: IsDefaultAccessIPRuleIP - - -class IsDefaultAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class IsDefaultAccessIPListRule(BaseModel): - ip_list: IsDefaultAccessIPListRuleIPList - - -class IsDefaultAccessCertificateRule(BaseModel): - certificate: object - - -class IsDefaultAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class IsDefaultAccessAccessGroupRule(BaseModel): - group: IsDefaultAccessAccessGroupRuleGroup - - -class IsDefaultAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class IsDefaultAccessAzureGroupRule(BaseModel): - azure_ad: IsDefaultAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class IsDefaultAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class IsDefaultAccessGitHubOrganizationRule(BaseModel): - github_organization: IsDefaultAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo( - alias="github-organization" - ) - - -class IsDefaultAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class IsDefaultAccessGsuiteGroupRule(BaseModel): - gsuite: IsDefaultAccessGsuiteGroupRuleGsuite - - -class IsDefaultAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class IsDefaultAccessOktaGroupRule(BaseModel): - okta: IsDefaultAccessOktaGroupRuleOkta - - -class IsDefaultAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class IsDefaultAccessSamlGroupRule(BaseModel): - saml: IsDefaultAccessSamlGroupRuleSaml - - -class IsDefaultAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class IsDefaultAccessServiceTokenRule(BaseModel): - service_token: IsDefaultAccessServiceTokenRuleServiceToken - - -class IsDefaultAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class IsDefaultAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class IsDefaultAccessExternalEvaluationRule(BaseModel): - external_evaluation: IsDefaultAccessExternalEvaluationRuleExternalEvaluation - - -class IsDefaultAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class IsDefaultAccessCountryRule(BaseModel): - geo: IsDefaultAccessCountryRuleGeo - - -class IsDefaultAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class IsDefaultAccessAuthenticationMethodRule(BaseModel): - auth_method: IsDefaultAccessAuthenticationMethodRuleAuthMethod - - -class IsDefaultAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class IsDefaultAccessDevicePostureRule(BaseModel): - device_posture: IsDefaultAccessDevicePostureRuleDevicePosture - - -IsDefault = Union[ - IsDefaultAccessEmailRule, - IsDefaultAccessEmailListRule, - IsDefaultAccessDomainRule, - IsDefaultAccessEveryoneRule, - IsDefaultAccessIPRule, - IsDefaultAccessIPListRule, - IsDefaultAccessCertificateRule, - IsDefaultAccessAccessGroupRule, - IsDefaultAccessAzureGroupRule, - IsDefaultAccessGitHubOrganizationRule, - IsDefaultAccessGsuiteGroupRule, - IsDefaultAccessOktaGroupRule, - IsDefaultAccessSamlGroupRule, - IsDefaultAccessServiceTokenRule, - IsDefaultAccessAnyValidServiceTokenRule, - IsDefaultAccessExternalEvaluationRule, - IsDefaultAccessCountryRule, - IsDefaultAccessAuthenticationMethodRule, - IsDefaultAccessDevicePostureRule, -] - - -class RequireAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class RequireAccessEmailRule(BaseModel): - email: RequireAccessEmailRuleEmail - - -class RequireAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class RequireAccessEmailListRule(BaseModel): - email_list: RequireAccessEmailListRuleEmailList - - -class RequireAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class RequireAccessDomainRule(BaseModel): - email_domain: RequireAccessDomainRuleEmailDomain - - -class RequireAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class RequireAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class RequireAccessIPRule(BaseModel): - ip: RequireAccessIPRuleIP - - -class RequireAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class RequireAccessIPListRule(BaseModel): - ip_list: RequireAccessIPListRuleIPList - - -class RequireAccessCertificateRule(BaseModel): - certificate: object - - -class RequireAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class RequireAccessAccessGroupRule(BaseModel): - group: RequireAccessAccessGroupRuleGroup - - -class RequireAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class RequireAccessAzureGroupRule(BaseModel): - azure_ad: RequireAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class RequireAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class RequireAccessGitHubOrganizationRule(BaseModel): - github_organization: RequireAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo(alias="github-organization") - - -class RequireAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class RequireAccessGsuiteGroupRule(BaseModel): - gsuite: RequireAccessGsuiteGroupRuleGsuite - - -class RequireAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class RequireAccessOktaGroupRule(BaseModel): - okta: RequireAccessOktaGroupRuleOkta - - -class RequireAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class RequireAccessSamlGroupRule(BaseModel): - saml: RequireAccessSamlGroupRuleSaml - - -class RequireAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class RequireAccessServiceTokenRule(BaseModel): - service_token: RequireAccessServiceTokenRuleServiceToken - - -class RequireAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class RequireAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class RequireAccessExternalEvaluationRule(BaseModel): - external_evaluation: RequireAccessExternalEvaluationRuleExternalEvaluation - - -class RequireAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class RequireAccessCountryRule(BaseModel): - geo: RequireAccessCountryRuleGeo - - -class RequireAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class RequireAccessAuthenticationMethodRule(BaseModel): - auth_method: RequireAccessAuthenticationMethodRuleAuthMethod - - -class RequireAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class RequireAccessDevicePostureRule(BaseModel): - device_posture: RequireAccessDevicePostureRuleDevicePosture - - -Require = Union[ - RequireAccessEmailRule, - RequireAccessEmailListRule, - RequireAccessDomainRule, - RequireAccessEveryoneRule, - RequireAccessIPRule, - RequireAccessIPListRule, - RequireAccessCertificateRule, - RequireAccessAccessGroupRule, - RequireAccessAzureGroupRule, - RequireAccessGitHubOrganizationRule, - RequireAccessGsuiteGroupRule, - RequireAccessOktaGroupRule, - RequireAccessSamlGroupRule, - RequireAccessServiceTokenRule, - RequireAccessAnyValidServiceTokenRule, - RequireAccessExternalEvaluationRule, - RequireAccessCountryRule, - RequireAccessAuthenticationMethodRule, - RequireAccessDevicePostureRule, -] - - -class GroupCreateResponse(BaseModel): - id: Optional[str] = None - """UUID""" - - created_at: Optional[datetime] = None - - exclude: Optional[List[Exclude]] = None - """Rules evaluated with a NOT logical operator. - - To match a policy, a user cannot meet any of the Exclude rules. - """ - - include: Optional[List[Include]] = None - """Rules evaluated with an OR logical operator. - - A user needs to meet only one of the Include rules. - """ - - is_default: Optional[List[IsDefault]] = None - """Rules evaluated with an AND logical operator. - - To match a policy, a user must meet all of the Require rules. - """ - - name: Optional[str] = None - """The name of the Access group.""" - - require: Optional[List[Require]] = None - """Rules evaluated with an AND logical operator. - - To match a policy, a user must meet all of the Require rules. - """ - - updated_at: Optional[datetime] = None 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 f8ca26c74..a9504fb7d 100644 --- a/src/cloudflare/types/zero_trust/access/group_list_response.py +++ b/src/cloudflare/types/zero_trust/access/group_list_response.py @@ -1,1020 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Union, Optional -from datetime import datetime +from typing import List -from pydantic import Field as FieldInfo +from .access_groups import AccessGroups -from ...._models import BaseModel +__all__ = ["GroupListResponse"] -__all__ = [ - "GroupListResponse", - "GroupListResponseItem", - "GroupListResponseItemExclude", - "GroupListResponseItemExcludeAccessEmailRule", - "GroupListResponseItemExcludeAccessEmailRuleEmail", - "GroupListResponseItemExcludeAccessEmailListRule", - "GroupListResponseItemExcludeAccessEmailListRuleEmailList", - "GroupListResponseItemExcludeAccessDomainRule", - "GroupListResponseItemExcludeAccessDomainRuleEmailDomain", - "GroupListResponseItemExcludeAccessEveryoneRule", - "GroupListResponseItemExcludeAccessIPRule", - "GroupListResponseItemExcludeAccessIPRuleIP", - "GroupListResponseItemExcludeAccessIPListRule", - "GroupListResponseItemExcludeAccessIPListRuleIPList", - "GroupListResponseItemExcludeAccessCertificateRule", - "GroupListResponseItemExcludeAccessAccessGroupRule", - "GroupListResponseItemExcludeAccessAccessGroupRuleGroup", - "GroupListResponseItemExcludeAccessAzureGroupRule", - "GroupListResponseItemExcludeAccessAzureGroupRuleAzureAd", - "GroupListResponseItemExcludeAccessGitHubOrganizationRule", - "GroupListResponseItemExcludeAccessGitHubOrganizationRuleGitHubOrganization", - "GroupListResponseItemExcludeAccessGsuiteGroupRule", - "GroupListResponseItemExcludeAccessGsuiteGroupRuleGsuite", - "GroupListResponseItemExcludeAccessOktaGroupRule", - "GroupListResponseItemExcludeAccessOktaGroupRuleOkta", - "GroupListResponseItemExcludeAccessSamlGroupRule", - "GroupListResponseItemExcludeAccessSamlGroupRuleSaml", - "GroupListResponseItemExcludeAccessServiceTokenRule", - "GroupListResponseItemExcludeAccessServiceTokenRuleServiceToken", - "GroupListResponseItemExcludeAccessAnyValidServiceTokenRule", - "GroupListResponseItemExcludeAccessExternalEvaluationRule", - "GroupListResponseItemExcludeAccessExternalEvaluationRuleExternalEvaluation", - "GroupListResponseItemExcludeAccessCountryRule", - "GroupListResponseItemExcludeAccessCountryRuleGeo", - "GroupListResponseItemExcludeAccessAuthenticationMethodRule", - "GroupListResponseItemExcludeAccessAuthenticationMethodRuleAuthMethod", - "GroupListResponseItemExcludeAccessDevicePostureRule", - "GroupListResponseItemExcludeAccessDevicePostureRuleDevicePosture", - "GroupListResponseItemInclude", - "GroupListResponseItemIncludeAccessEmailRule", - "GroupListResponseItemIncludeAccessEmailRuleEmail", - "GroupListResponseItemIncludeAccessEmailListRule", - "GroupListResponseItemIncludeAccessEmailListRuleEmailList", - "GroupListResponseItemIncludeAccessDomainRule", - "GroupListResponseItemIncludeAccessDomainRuleEmailDomain", - "GroupListResponseItemIncludeAccessEveryoneRule", - "GroupListResponseItemIncludeAccessIPRule", - "GroupListResponseItemIncludeAccessIPRuleIP", - "GroupListResponseItemIncludeAccessIPListRule", - "GroupListResponseItemIncludeAccessIPListRuleIPList", - "GroupListResponseItemIncludeAccessCertificateRule", - "GroupListResponseItemIncludeAccessAccessGroupRule", - "GroupListResponseItemIncludeAccessAccessGroupRuleGroup", - "GroupListResponseItemIncludeAccessAzureGroupRule", - "GroupListResponseItemIncludeAccessAzureGroupRuleAzureAd", - "GroupListResponseItemIncludeAccessGitHubOrganizationRule", - "GroupListResponseItemIncludeAccessGitHubOrganizationRuleGitHubOrganization", - "GroupListResponseItemIncludeAccessGsuiteGroupRule", - "GroupListResponseItemIncludeAccessGsuiteGroupRuleGsuite", - "GroupListResponseItemIncludeAccessOktaGroupRule", - "GroupListResponseItemIncludeAccessOktaGroupRuleOkta", - "GroupListResponseItemIncludeAccessSamlGroupRule", - "GroupListResponseItemIncludeAccessSamlGroupRuleSaml", - "GroupListResponseItemIncludeAccessServiceTokenRule", - "GroupListResponseItemIncludeAccessServiceTokenRuleServiceToken", - "GroupListResponseItemIncludeAccessAnyValidServiceTokenRule", - "GroupListResponseItemIncludeAccessExternalEvaluationRule", - "GroupListResponseItemIncludeAccessExternalEvaluationRuleExternalEvaluation", - "GroupListResponseItemIncludeAccessCountryRule", - "GroupListResponseItemIncludeAccessCountryRuleGeo", - "GroupListResponseItemIncludeAccessAuthenticationMethodRule", - "GroupListResponseItemIncludeAccessAuthenticationMethodRuleAuthMethod", - "GroupListResponseItemIncludeAccessDevicePostureRule", - "GroupListResponseItemIncludeAccessDevicePostureRuleDevicePosture", - "GroupListResponseItemIsDefault", - "GroupListResponseItemIsDefaultAccessEmailRule", - "GroupListResponseItemIsDefaultAccessEmailRuleEmail", - "GroupListResponseItemIsDefaultAccessEmailListRule", - "GroupListResponseItemIsDefaultAccessEmailListRuleEmailList", - "GroupListResponseItemIsDefaultAccessDomainRule", - "GroupListResponseItemIsDefaultAccessDomainRuleEmailDomain", - "GroupListResponseItemIsDefaultAccessEveryoneRule", - "GroupListResponseItemIsDefaultAccessIPRule", - "GroupListResponseItemIsDefaultAccessIPRuleIP", - "GroupListResponseItemIsDefaultAccessIPListRule", - "GroupListResponseItemIsDefaultAccessIPListRuleIPList", - "GroupListResponseItemIsDefaultAccessCertificateRule", - "GroupListResponseItemIsDefaultAccessAccessGroupRule", - "GroupListResponseItemIsDefaultAccessAccessGroupRuleGroup", - "GroupListResponseItemIsDefaultAccessAzureGroupRule", - "GroupListResponseItemIsDefaultAccessAzureGroupRuleAzureAd", - "GroupListResponseItemIsDefaultAccessGitHubOrganizationRule", - "GroupListResponseItemIsDefaultAccessGitHubOrganizationRuleGitHubOrganization", - "GroupListResponseItemIsDefaultAccessGsuiteGroupRule", - "GroupListResponseItemIsDefaultAccessGsuiteGroupRuleGsuite", - "GroupListResponseItemIsDefaultAccessOktaGroupRule", - "GroupListResponseItemIsDefaultAccessOktaGroupRuleOkta", - "GroupListResponseItemIsDefaultAccessSamlGroupRule", - "GroupListResponseItemIsDefaultAccessSamlGroupRuleSaml", - "GroupListResponseItemIsDefaultAccessServiceTokenRule", - "GroupListResponseItemIsDefaultAccessServiceTokenRuleServiceToken", - "GroupListResponseItemIsDefaultAccessAnyValidServiceTokenRule", - "GroupListResponseItemIsDefaultAccessExternalEvaluationRule", - "GroupListResponseItemIsDefaultAccessExternalEvaluationRuleExternalEvaluation", - "GroupListResponseItemIsDefaultAccessCountryRule", - "GroupListResponseItemIsDefaultAccessCountryRuleGeo", - "GroupListResponseItemIsDefaultAccessAuthenticationMethodRule", - "GroupListResponseItemIsDefaultAccessAuthenticationMethodRuleAuthMethod", - "GroupListResponseItemIsDefaultAccessDevicePostureRule", - "GroupListResponseItemIsDefaultAccessDevicePostureRuleDevicePosture", - "GroupListResponseItemRequire", - "GroupListResponseItemRequireAccessEmailRule", - "GroupListResponseItemRequireAccessEmailRuleEmail", - "GroupListResponseItemRequireAccessEmailListRule", - "GroupListResponseItemRequireAccessEmailListRuleEmailList", - "GroupListResponseItemRequireAccessDomainRule", - "GroupListResponseItemRequireAccessDomainRuleEmailDomain", - "GroupListResponseItemRequireAccessEveryoneRule", - "GroupListResponseItemRequireAccessIPRule", - "GroupListResponseItemRequireAccessIPRuleIP", - "GroupListResponseItemRequireAccessIPListRule", - "GroupListResponseItemRequireAccessIPListRuleIPList", - "GroupListResponseItemRequireAccessCertificateRule", - "GroupListResponseItemRequireAccessAccessGroupRule", - "GroupListResponseItemRequireAccessAccessGroupRuleGroup", - "GroupListResponseItemRequireAccessAzureGroupRule", - "GroupListResponseItemRequireAccessAzureGroupRuleAzureAd", - "GroupListResponseItemRequireAccessGitHubOrganizationRule", - "GroupListResponseItemRequireAccessGitHubOrganizationRuleGitHubOrganization", - "GroupListResponseItemRequireAccessGsuiteGroupRule", - "GroupListResponseItemRequireAccessGsuiteGroupRuleGsuite", - "GroupListResponseItemRequireAccessOktaGroupRule", - "GroupListResponseItemRequireAccessOktaGroupRuleOkta", - "GroupListResponseItemRequireAccessSamlGroupRule", - "GroupListResponseItemRequireAccessSamlGroupRuleSaml", - "GroupListResponseItemRequireAccessServiceTokenRule", - "GroupListResponseItemRequireAccessServiceTokenRuleServiceToken", - "GroupListResponseItemRequireAccessAnyValidServiceTokenRule", - "GroupListResponseItemRequireAccessExternalEvaluationRule", - "GroupListResponseItemRequireAccessExternalEvaluationRuleExternalEvaluation", - "GroupListResponseItemRequireAccessCountryRule", - "GroupListResponseItemRequireAccessCountryRuleGeo", - "GroupListResponseItemRequireAccessAuthenticationMethodRule", - "GroupListResponseItemRequireAccessAuthenticationMethodRuleAuthMethod", - "GroupListResponseItemRequireAccessDevicePostureRule", - "GroupListResponseItemRequireAccessDevicePostureRuleDevicePosture", -] - - -class GroupListResponseItemExcludeAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class GroupListResponseItemExcludeAccessEmailRule(BaseModel): - email: GroupListResponseItemExcludeAccessEmailRuleEmail - - -class GroupListResponseItemExcludeAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class GroupListResponseItemExcludeAccessEmailListRule(BaseModel): - email_list: GroupListResponseItemExcludeAccessEmailListRuleEmailList - - -class GroupListResponseItemExcludeAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class GroupListResponseItemExcludeAccessDomainRule(BaseModel): - email_domain: GroupListResponseItemExcludeAccessDomainRuleEmailDomain - - -class GroupListResponseItemExcludeAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class GroupListResponseItemExcludeAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class GroupListResponseItemExcludeAccessIPRule(BaseModel): - ip: GroupListResponseItemExcludeAccessIPRuleIP - - -class GroupListResponseItemExcludeAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class GroupListResponseItemExcludeAccessIPListRule(BaseModel): - ip_list: GroupListResponseItemExcludeAccessIPListRuleIPList - - -class GroupListResponseItemExcludeAccessCertificateRule(BaseModel): - certificate: object - - -class GroupListResponseItemExcludeAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class GroupListResponseItemExcludeAccessAccessGroupRule(BaseModel): - group: GroupListResponseItemExcludeAccessAccessGroupRuleGroup - - -class GroupListResponseItemExcludeAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class GroupListResponseItemExcludeAccessAzureGroupRule(BaseModel): - azure_ad: GroupListResponseItemExcludeAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class GroupListResponseItemExcludeAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class GroupListResponseItemExcludeAccessGitHubOrganizationRule(BaseModel): - github_organization: GroupListResponseItemExcludeAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo( - alias="github-organization" - ) - - -class GroupListResponseItemExcludeAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class GroupListResponseItemExcludeAccessGsuiteGroupRule(BaseModel): - gsuite: GroupListResponseItemExcludeAccessGsuiteGroupRuleGsuite - - -class GroupListResponseItemExcludeAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class GroupListResponseItemExcludeAccessOktaGroupRule(BaseModel): - okta: GroupListResponseItemExcludeAccessOktaGroupRuleOkta - - -class GroupListResponseItemExcludeAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class GroupListResponseItemExcludeAccessSamlGroupRule(BaseModel): - saml: GroupListResponseItemExcludeAccessSamlGroupRuleSaml - - -class GroupListResponseItemExcludeAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class GroupListResponseItemExcludeAccessServiceTokenRule(BaseModel): - service_token: GroupListResponseItemExcludeAccessServiceTokenRuleServiceToken - - -class GroupListResponseItemExcludeAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class GroupListResponseItemExcludeAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class GroupListResponseItemExcludeAccessExternalEvaluationRule(BaseModel): - external_evaluation: GroupListResponseItemExcludeAccessExternalEvaluationRuleExternalEvaluation - - -class GroupListResponseItemExcludeAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class GroupListResponseItemExcludeAccessCountryRule(BaseModel): - geo: GroupListResponseItemExcludeAccessCountryRuleGeo - - -class GroupListResponseItemExcludeAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class GroupListResponseItemExcludeAccessAuthenticationMethodRule(BaseModel): - auth_method: GroupListResponseItemExcludeAccessAuthenticationMethodRuleAuthMethod - - -class GroupListResponseItemExcludeAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class GroupListResponseItemExcludeAccessDevicePostureRule(BaseModel): - device_posture: GroupListResponseItemExcludeAccessDevicePostureRuleDevicePosture - - -GroupListResponseItemExclude = Union[ - GroupListResponseItemExcludeAccessEmailRule, - GroupListResponseItemExcludeAccessEmailListRule, - GroupListResponseItemExcludeAccessDomainRule, - GroupListResponseItemExcludeAccessEveryoneRule, - GroupListResponseItemExcludeAccessIPRule, - GroupListResponseItemExcludeAccessIPListRule, - GroupListResponseItemExcludeAccessCertificateRule, - GroupListResponseItemExcludeAccessAccessGroupRule, - GroupListResponseItemExcludeAccessAzureGroupRule, - GroupListResponseItemExcludeAccessGitHubOrganizationRule, - GroupListResponseItemExcludeAccessGsuiteGroupRule, - GroupListResponseItemExcludeAccessOktaGroupRule, - GroupListResponseItemExcludeAccessSamlGroupRule, - GroupListResponseItemExcludeAccessServiceTokenRule, - GroupListResponseItemExcludeAccessAnyValidServiceTokenRule, - GroupListResponseItemExcludeAccessExternalEvaluationRule, - GroupListResponseItemExcludeAccessCountryRule, - GroupListResponseItemExcludeAccessAuthenticationMethodRule, - GroupListResponseItemExcludeAccessDevicePostureRule, -] - - -class GroupListResponseItemIncludeAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class GroupListResponseItemIncludeAccessEmailRule(BaseModel): - email: GroupListResponseItemIncludeAccessEmailRuleEmail - - -class GroupListResponseItemIncludeAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class GroupListResponseItemIncludeAccessEmailListRule(BaseModel): - email_list: GroupListResponseItemIncludeAccessEmailListRuleEmailList - - -class GroupListResponseItemIncludeAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class GroupListResponseItemIncludeAccessDomainRule(BaseModel): - email_domain: GroupListResponseItemIncludeAccessDomainRuleEmailDomain - - -class GroupListResponseItemIncludeAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class GroupListResponseItemIncludeAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class GroupListResponseItemIncludeAccessIPRule(BaseModel): - ip: GroupListResponseItemIncludeAccessIPRuleIP - - -class GroupListResponseItemIncludeAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class GroupListResponseItemIncludeAccessIPListRule(BaseModel): - ip_list: GroupListResponseItemIncludeAccessIPListRuleIPList - - -class GroupListResponseItemIncludeAccessCertificateRule(BaseModel): - certificate: object - - -class GroupListResponseItemIncludeAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class GroupListResponseItemIncludeAccessAccessGroupRule(BaseModel): - group: GroupListResponseItemIncludeAccessAccessGroupRuleGroup - - -class GroupListResponseItemIncludeAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class GroupListResponseItemIncludeAccessAzureGroupRule(BaseModel): - azure_ad: GroupListResponseItemIncludeAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class GroupListResponseItemIncludeAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class GroupListResponseItemIncludeAccessGitHubOrganizationRule(BaseModel): - github_organization: GroupListResponseItemIncludeAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo( - alias="github-organization" - ) - - -class GroupListResponseItemIncludeAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class GroupListResponseItemIncludeAccessGsuiteGroupRule(BaseModel): - gsuite: GroupListResponseItemIncludeAccessGsuiteGroupRuleGsuite - - -class GroupListResponseItemIncludeAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class GroupListResponseItemIncludeAccessOktaGroupRule(BaseModel): - okta: GroupListResponseItemIncludeAccessOktaGroupRuleOkta - - -class GroupListResponseItemIncludeAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class GroupListResponseItemIncludeAccessSamlGroupRule(BaseModel): - saml: GroupListResponseItemIncludeAccessSamlGroupRuleSaml - - -class GroupListResponseItemIncludeAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class GroupListResponseItemIncludeAccessServiceTokenRule(BaseModel): - service_token: GroupListResponseItemIncludeAccessServiceTokenRuleServiceToken - - -class GroupListResponseItemIncludeAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class GroupListResponseItemIncludeAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class GroupListResponseItemIncludeAccessExternalEvaluationRule(BaseModel): - external_evaluation: GroupListResponseItemIncludeAccessExternalEvaluationRuleExternalEvaluation - - -class GroupListResponseItemIncludeAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class GroupListResponseItemIncludeAccessCountryRule(BaseModel): - geo: GroupListResponseItemIncludeAccessCountryRuleGeo - - -class GroupListResponseItemIncludeAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class GroupListResponseItemIncludeAccessAuthenticationMethodRule(BaseModel): - auth_method: GroupListResponseItemIncludeAccessAuthenticationMethodRuleAuthMethod - - -class GroupListResponseItemIncludeAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class GroupListResponseItemIncludeAccessDevicePostureRule(BaseModel): - device_posture: GroupListResponseItemIncludeAccessDevicePostureRuleDevicePosture - - -GroupListResponseItemInclude = Union[ - GroupListResponseItemIncludeAccessEmailRule, - GroupListResponseItemIncludeAccessEmailListRule, - GroupListResponseItemIncludeAccessDomainRule, - GroupListResponseItemIncludeAccessEveryoneRule, - GroupListResponseItemIncludeAccessIPRule, - GroupListResponseItemIncludeAccessIPListRule, - GroupListResponseItemIncludeAccessCertificateRule, - GroupListResponseItemIncludeAccessAccessGroupRule, - GroupListResponseItemIncludeAccessAzureGroupRule, - GroupListResponseItemIncludeAccessGitHubOrganizationRule, - GroupListResponseItemIncludeAccessGsuiteGroupRule, - GroupListResponseItemIncludeAccessOktaGroupRule, - GroupListResponseItemIncludeAccessSamlGroupRule, - GroupListResponseItemIncludeAccessServiceTokenRule, - GroupListResponseItemIncludeAccessAnyValidServiceTokenRule, - GroupListResponseItemIncludeAccessExternalEvaluationRule, - GroupListResponseItemIncludeAccessCountryRule, - GroupListResponseItemIncludeAccessAuthenticationMethodRule, - GroupListResponseItemIncludeAccessDevicePostureRule, -] - - -class GroupListResponseItemIsDefaultAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class GroupListResponseItemIsDefaultAccessEmailRule(BaseModel): - email: GroupListResponseItemIsDefaultAccessEmailRuleEmail - - -class GroupListResponseItemIsDefaultAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class GroupListResponseItemIsDefaultAccessEmailListRule(BaseModel): - email_list: GroupListResponseItemIsDefaultAccessEmailListRuleEmailList - - -class GroupListResponseItemIsDefaultAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class GroupListResponseItemIsDefaultAccessDomainRule(BaseModel): - email_domain: GroupListResponseItemIsDefaultAccessDomainRuleEmailDomain - - -class GroupListResponseItemIsDefaultAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class GroupListResponseItemIsDefaultAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class GroupListResponseItemIsDefaultAccessIPRule(BaseModel): - ip: GroupListResponseItemIsDefaultAccessIPRuleIP - - -class GroupListResponseItemIsDefaultAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class GroupListResponseItemIsDefaultAccessIPListRule(BaseModel): - ip_list: GroupListResponseItemIsDefaultAccessIPListRuleIPList - - -class GroupListResponseItemIsDefaultAccessCertificateRule(BaseModel): - certificate: object - - -class GroupListResponseItemIsDefaultAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class GroupListResponseItemIsDefaultAccessAccessGroupRule(BaseModel): - group: GroupListResponseItemIsDefaultAccessAccessGroupRuleGroup - - -class GroupListResponseItemIsDefaultAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class GroupListResponseItemIsDefaultAccessAzureGroupRule(BaseModel): - azure_ad: GroupListResponseItemIsDefaultAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class GroupListResponseItemIsDefaultAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class GroupListResponseItemIsDefaultAccessGitHubOrganizationRule(BaseModel): - github_organization: GroupListResponseItemIsDefaultAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo( - alias="github-organization" - ) - - -class GroupListResponseItemIsDefaultAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class GroupListResponseItemIsDefaultAccessGsuiteGroupRule(BaseModel): - gsuite: GroupListResponseItemIsDefaultAccessGsuiteGroupRuleGsuite - - -class GroupListResponseItemIsDefaultAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class GroupListResponseItemIsDefaultAccessOktaGroupRule(BaseModel): - okta: GroupListResponseItemIsDefaultAccessOktaGroupRuleOkta - - -class GroupListResponseItemIsDefaultAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class GroupListResponseItemIsDefaultAccessSamlGroupRule(BaseModel): - saml: GroupListResponseItemIsDefaultAccessSamlGroupRuleSaml - - -class GroupListResponseItemIsDefaultAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class GroupListResponseItemIsDefaultAccessServiceTokenRule(BaseModel): - service_token: GroupListResponseItemIsDefaultAccessServiceTokenRuleServiceToken - - -class GroupListResponseItemIsDefaultAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class GroupListResponseItemIsDefaultAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class GroupListResponseItemIsDefaultAccessExternalEvaluationRule(BaseModel): - external_evaluation: GroupListResponseItemIsDefaultAccessExternalEvaluationRuleExternalEvaluation - - -class GroupListResponseItemIsDefaultAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class GroupListResponseItemIsDefaultAccessCountryRule(BaseModel): - geo: GroupListResponseItemIsDefaultAccessCountryRuleGeo - - -class GroupListResponseItemIsDefaultAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class GroupListResponseItemIsDefaultAccessAuthenticationMethodRule(BaseModel): - auth_method: GroupListResponseItemIsDefaultAccessAuthenticationMethodRuleAuthMethod - - -class GroupListResponseItemIsDefaultAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class GroupListResponseItemIsDefaultAccessDevicePostureRule(BaseModel): - device_posture: GroupListResponseItemIsDefaultAccessDevicePostureRuleDevicePosture - - -GroupListResponseItemIsDefault = Union[ - GroupListResponseItemIsDefaultAccessEmailRule, - GroupListResponseItemIsDefaultAccessEmailListRule, - GroupListResponseItemIsDefaultAccessDomainRule, - GroupListResponseItemIsDefaultAccessEveryoneRule, - GroupListResponseItemIsDefaultAccessIPRule, - GroupListResponseItemIsDefaultAccessIPListRule, - GroupListResponseItemIsDefaultAccessCertificateRule, - GroupListResponseItemIsDefaultAccessAccessGroupRule, - GroupListResponseItemIsDefaultAccessAzureGroupRule, - GroupListResponseItemIsDefaultAccessGitHubOrganizationRule, - GroupListResponseItemIsDefaultAccessGsuiteGroupRule, - GroupListResponseItemIsDefaultAccessOktaGroupRule, - GroupListResponseItemIsDefaultAccessSamlGroupRule, - GroupListResponseItemIsDefaultAccessServiceTokenRule, - GroupListResponseItemIsDefaultAccessAnyValidServiceTokenRule, - GroupListResponseItemIsDefaultAccessExternalEvaluationRule, - GroupListResponseItemIsDefaultAccessCountryRule, - GroupListResponseItemIsDefaultAccessAuthenticationMethodRule, - GroupListResponseItemIsDefaultAccessDevicePostureRule, -] - - -class GroupListResponseItemRequireAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class GroupListResponseItemRequireAccessEmailRule(BaseModel): - email: GroupListResponseItemRequireAccessEmailRuleEmail - - -class GroupListResponseItemRequireAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class GroupListResponseItemRequireAccessEmailListRule(BaseModel): - email_list: GroupListResponseItemRequireAccessEmailListRuleEmailList - - -class GroupListResponseItemRequireAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class GroupListResponseItemRequireAccessDomainRule(BaseModel): - email_domain: GroupListResponseItemRequireAccessDomainRuleEmailDomain - - -class GroupListResponseItemRequireAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class GroupListResponseItemRequireAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class GroupListResponseItemRequireAccessIPRule(BaseModel): - ip: GroupListResponseItemRequireAccessIPRuleIP - - -class GroupListResponseItemRequireAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class GroupListResponseItemRequireAccessIPListRule(BaseModel): - ip_list: GroupListResponseItemRequireAccessIPListRuleIPList - - -class GroupListResponseItemRequireAccessCertificateRule(BaseModel): - certificate: object - - -class GroupListResponseItemRequireAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class GroupListResponseItemRequireAccessAccessGroupRule(BaseModel): - group: GroupListResponseItemRequireAccessAccessGroupRuleGroup - - -class GroupListResponseItemRequireAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class GroupListResponseItemRequireAccessAzureGroupRule(BaseModel): - azure_ad: GroupListResponseItemRequireAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class GroupListResponseItemRequireAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class GroupListResponseItemRequireAccessGitHubOrganizationRule(BaseModel): - github_organization: GroupListResponseItemRequireAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo( - alias="github-organization" - ) - - -class GroupListResponseItemRequireAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class GroupListResponseItemRequireAccessGsuiteGroupRule(BaseModel): - gsuite: GroupListResponseItemRequireAccessGsuiteGroupRuleGsuite - - -class GroupListResponseItemRequireAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class GroupListResponseItemRequireAccessOktaGroupRule(BaseModel): - okta: GroupListResponseItemRequireAccessOktaGroupRuleOkta - - -class GroupListResponseItemRequireAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class GroupListResponseItemRequireAccessSamlGroupRule(BaseModel): - saml: GroupListResponseItemRequireAccessSamlGroupRuleSaml - - -class GroupListResponseItemRequireAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class GroupListResponseItemRequireAccessServiceTokenRule(BaseModel): - service_token: GroupListResponseItemRequireAccessServiceTokenRuleServiceToken - - -class GroupListResponseItemRequireAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class GroupListResponseItemRequireAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class GroupListResponseItemRequireAccessExternalEvaluationRule(BaseModel): - external_evaluation: GroupListResponseItemRequireAccessExternalEvaluationRuleExternalEvaluation - - -class GroupListResponseItemRequireAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class GroupListResponseItemRequireAccessCountryRule(BaseModel): - geo: GroupListResponseItemRequireAccessCountryRuleGeo - - -class GroupListResponseItemRequireAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class GroupListResponseItemRequireAccessAuthenticationMethodRule(BaseModel): - auth_method: GroupListResponseItemRequireAccessAuthenticationMethodRuleAuthMethod - - -class GroupListResponseItemRequireAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class GroupListResponseItemRequireAccessDevicePostureRule(BaseModel): - device_posture: GroupListResponseItemRequireAccessDevicePostureRuleDevicePosture - - -GroupListResponseItemRequire = Union[ - GroupListResponseItemRequireAccessEmailRule, - GroupListResponseItemRequireAccessEmailListRule, - GroupListResponseItemRequireAccessDomainRule, - GroupListResponseItemRequireAccessEveryoneRule, - GroupListResponseItemRequireAccessIPRule, - GroupListResponseItemRequireAccessIPListRule, - GroupListResponseItemRequireAccessCertificateRule, - GroupListResponseItemRequireAccessAccessGroupRule, - GroupListResponseItemRequireAccessAzureGroupRule, - GroupListResponseItemRequireAccessGitHubOrganizationRule, - GroupListResponseItemRequireAccessGsuiteGroupRule, - GroupListResponseItemRequireAccessOktaGroupRule, - GroupListResponseItemRequireAccessSamlGroupRule, - GroupListResponseItemRequireAccessServiceTokenRule, - GroupListResponseItemRequireAccessAnyValidServiceTokenRule, - GroupListResponseItemRequireAccessExternalEvaluationRule, - GroupListResponseItemRequireAccessCountryRule, - GroupListResponseItemRequireAccessAuthenticationMethodRule, - GroupListResponseItemRequireAccessDevicePostureRule, -] - - -class GroupListResponseItem(BaseModel): - id: Optional[str] = None - """UUID""" - - created_at: Optional[datetime] = None - - exclude: Optional[List[GroupListResponseItemExclude]] = None - """Rules evaluated with a NOT logical operator. - - To match a policy, a user cannot meet any of the Exclude rules. - """ - - include: Optional[List[GroupListResponseItemInclude]] = None - """Rules evaluated with an OR logical operator. - - A user needs to meet only one of the Include rules. - """ - - is_default: Optional[List[GroupListResponseItemIsDefault]] = None - """Rules evaluated with an AND logical operator. - - To match a policy, a user must meet all of the Require rules. - """ - - name: Optional[str] = None - """The name of the Access group.""" - - require: Optional[List[GroupListResponseItemRequire]] = None - """Rules evaluated with an AND logical operator. - - To match a policy, a user must meet all of the Require rules. - """ - - updated_at: Optional[datetime] = None - - -GroupListResponse = List[GroupListResponseItem] +GroupListResponse = List[AccessGroups] diff --git a/src/cloudflare/types/zero_trust/access/group_update_response.py b/src/cloudflare/types/zero_trust/access/group_update_response.py deleted file mode 100644 index 495ac2106..000000000 --- a/src/cloudflare/types/zero_trust/access/group_update_response.py +++ /dev/null @@ -1,1010 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from datetime import datetime - -from pydantic import Field as FieldInfo - -from ...._models import BaseModel - -__all__ = [ - "GroupUpdateResponse", - "Exclude", - "ExcludeAccessEmailRule", - "ExcludeAccessEmailRuleEmail", - "ExcludeAccessEmailListRule", - "ExcludeAccessEmailListRuleEmailList", - "ExcludeAccessDomainRule", - "ExcludeAccessDomainRuleEmailDomain", - "ExcludeAccessEveryoneRule", - "ExcludeAccessIPRule", - "ExcludeAccessIPRuleIP", - "ExcludeAccessIPListRule", - "ExcludeAccessIPListRuleIPList", - "ExcludeAccessCertificateRule", - "ExcludeAccessAccessGroupRule", - "ExcludeAccessAccessGroupRuleGroup", - "ExcludeAccessAzureGroupRule", - "ExcludeAccessAzureGroupRuleAzureAd", - "ExcludeAccessGitHubOrganizationRule", - "ExcludeAccessGitHubOrganizationRuleGitHubOrganization", - "ExcludeAccessGsuiteGroupRule", - "ExcludeAccessGsuiteGroupRuleGsuite", - "ExcludeAccessOktaGroupRule", - "ExcludeAccessOktaGroupRuleOkta", - "ExcludeAccessSamlGroupRule", - "ExcludeAccessSamlGroupRuleSaml", - "ExcludeAccessServiceTokenRule", - "ExcludeAccessServiceTokenRuleServiceToken", - "ExcludeAccessAnyValidServiceTokenRule", - "ExcludeAccessExternalEvaluationRule", - "ExcludeAccessExternalEvaluationRuleExternalEvaluation", - "ExcludeAccessCountryRule", - "ExcludeAccessCountryRuleGeo", - "ExcludeAccessAuthenticationMethodRule", - "ExcludeAccessAuthenticationMethodRuleAuthMethod", - "ExcludeAccessDevicePostureRule", - "ExcludeAccessDevicePostureRuleDevicePosture", - "Include", - "IncludeAccessEmailRule", - "IncludeAccessEmailRuleEmail", - "IncludeAccessEmailListRule", - "IncludeAccessEmailListRuleEmailList", - "IncludeAccessDomainRule", - "IncludeAccessDomainRuleEmailDomain", - "IncludeAccessEveryoneRule", - "IncludeAccessIPRule", - "IncludeAccessIPRuleIP", - "IncludeAccessIPListRule", - "IncludeAccessIPListRuleIPList", - "IncludeAccessCertificateRule", - "IncludeAccessAccessGroupRule", - "IncludeAccessAccessGroupRuleGroup", - "IncludeAccessAzureGroupRule", - "IncludeAccessAzureGroupRuleAzureAd", - "IncludeAccessGitHubOrganizationRule", - "IncludeAccessGitHubOrganizationRuleGitHubOrganization", - "IncludeAccessGsuiteGroupRule", - "IncludeAccessGsuiteGroupRuleGsuite", - "IncludeAccessOktaGroupRule", - "IncludeAccessOktaGroupRuleOkta", - "IncludeAccessSamlGroupRule", - "IncludeAccessSamlGroupRuleSaml", - "IncludeAccessServiceTokenRule", - "IncludeAccessServiceTokenRuleServiceToken", - "IncludeAccessAnyValidServiceTokenRule", - "IncludeAccessExternalEvaluationRule", - "IncludeAccessExternalEvaluationRuleExternalEvaluation", - "IncludeAccessCountryRule", - "IncludeAccessCountryRuleGeo", - "IncludeAccessAuthenticationMethodRule", - "IncludeAccessAuthenticationMethodRuleAuthMethod", - "IncludeAccessDevicePostureRule", - "IncludeAccessDevicePostureRuleDevicePosture", - "IsDefault", - "IsDefaultAccessEmailRule", - "IsDefaultAccessEmailRuleEmail", - "IsDefaultAccessEmailListRule", - "IsDefaultAccessEmailListRuleEmailList", - "IsDefaultAccessDomainRule", - "IsDefaultAccessDomainRuleEmailDomain", - "IsDefaultAccessEveryoneRule", - "IsDefaultAccessIPRule", - "IsDefaultAccessIPRuleIP", - "IsDefaultAccessIPListRule", - "IsDefaultAccessIPListRuleIPList", - "IsDefaultAccessCertificateRule", - "IsDefaultAccessAccessGroupRule", - "IsDefaultAccessAccessGroupRuleGroup", - "IsDefaultAccessAzureGroupRule", - "IsDefaultAccessAzureGroupRuleAzureAd", - "IsDefaultAccessGitHubOrganizationRule", - "IsDefaultAccessGitHubOrganizationRuleGitHubOrganization", - "IsDefaultAccessGsuiteGroupRule", - "IsDefaultAccessGsuiteGroupRuleGsuite", - "IsDefaultAccessOktaGroupRule", - "IsDefaultAccessOktaGroupRuleOkta", - "IsDefaultAccessSamlGroupRule", - "IsDefaultAccessSamlGroupRuleSaml", - "IsDefaultAccessServiceTokenRule", - "IsDefaultAccessServiceTokenRuleServiceToken", - "IsDefaultAccessAnyValidServiceTokenRule", - "IsDefaultAccessExternalEvaluationRule", - "IsDefaultAccessExternalEvaluationRuleExternalEvaluation", - "IsDefaultAccessCountryRule", - "IsDefaultAccessCountryRuleGeo", - "IsDefaultAccessAuthenticationMethodRule", - "IsDefaultAccessAuthenticationMethodRuleAuthMethod", - "IsDefaultAccessDevicePostureRule", - "IsDefaultAccessDevicePostureRuleDevicePosture", - "Require", - "RequireAccessEmailRule", - "RequireAccessEmailRuleEmail", - "RequireAccessEmailListRule", - "RequireAccessEmailListRuleEmailList", - "RequireAccessDomainRule", - "RequireAccessDomainRuleEmailDomain", - "RequireAccessEveryoneRule", - "RequireAccessIPRule", - "RequireAccessIPRuleIP", - "RequireAccessIPListRule", - "RequireAccessIPListRuleIPList", - "RequireAccessCertificateRule", - "RequireAccessAccessGroupRule", - "RequireAccessAccessGroupRuleGroup", - "RequireAccessAzureGroupRule", - "RequireAccessAzureGroupRuleAzureAd", - "RequireAccessGitHubOrganizationRule", - "RequireAccessGitHubOrganizationRuleGitHubOrganization", - "RequireAccessGsuiteGroupRule", - "RequireAccessGsuiteGroupRuleGsuite", - "RequireAccessOktaGroupRule", - "RequireAccessOktaGroupRuleOkta", - "RequireAccessSamlGroupRule", - "RequireAccessSamlGroupRuleSaml", - "RequireAccessServiceTokenRule", - "RequireAccessServiceTokenRuleServiceToken", - "RequireAccessAnyValidServiceTokenRule", - "RequireAccessExternalEvaluationRule", - "RequireAccessExternalEvaluationRuleExternalEvaluation", - "RequireAccessCountryRule", - "RequireAccessCountryRuleGeo", - "RequireAccessAuthenticationMethodRule", - "RequireAccessAuthenticationMethodRuleAuthMethod", - "RequireAccessDevicePostureRule", - "RequireAccessDevicePostureRuleDevicePosture", -] - - -class ExcludeAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class ExcludeAccessEmailRule(BaseModel): - email: ExcludeAccessEmailRuleEmail - - -class ExcludeAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class ExcludeAccessEmailListRule(BaseModel): - email_list: ExcludeAccessEmailListRuleEmailList - - -class ExcludeAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class ExcludeAccessDomainRule(BaseModel): - email_domain: ExcludeAccessDomainRuleEmailDomain - - -class ExcludeAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class ExcludeAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class ExcludeAccessIPRule(BaseModel): - ip: ExcludeAccessIPRuleIP - - -class ExcludeAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class ExcludeAccessIPListRule(BaseModel): - ip_list: ExcludeAccessIPListRuleIPList - - -class ExcludeAccessCertificateRule(BaseModel): - certificate: object - - -class ExcludeAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class ExcludeAccessAccessGroupRule(BaseModel): - group: ExcludeAccessAccessGroupRuleGroup - - -class ExcludeAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class ExcludeAccessAzureGroupRule(BaseModel): - azure_ad: ExcludeAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class ExcludeAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class ExcludeAccessGitHubOrganizationRule(BaseModel): - github_organization: ExcludeAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo(alias="github-organization") - - -class ExcludeAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class ExcludeAccessGsuiteGroupRule(BaseModel): - gsuite: ExcludeAccessGsuiteGroupRuleGsuite - - -class ExcludeAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class ExcludeAccessOktaGroupRule(BaseModel): - okta: ExcludeAccessOktaGroupRuleOkta - - -class ExcludeAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class ExcludeAccessSamlGroupRule(BaseModel): - saml: ExcludeAccessSamlGroupRuleSaml - - -class ExcludeAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class ExcludeAccessServiceTokenRule(BaseModel): - service_token: ExcludeAccessServiceTokenRuleServiceToken - - -class ExcludeAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class ExcludeAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class ExcludeAccessExternalEvaluationRule(BaseModel): - external_evaluation: ExcludeAccessExternalEvaluationRuleExternalEvaluation - - -class ExcludeAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class ExcludeAccessCountryRule(BaseModel): - geo: ExcludeAccessCountryRuleGeo - - -class ExcludeAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class ExcludeAccessAuthenticationMethodRule(BaseModel): - auth_method: ExcludeAccessAuthenticationMethodRuleAuthMethod - - -class ExcludeAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class ExcludeAccessDevicePostureRule(BaseModel): - device_posture: ExcludeAccessDevicePostureRuleDevicePosture - - -Exclude = Union[ - ExcludeAccessEmailRule, - ExcludeAccessEmailListRule, - ExcludeAccessDomainRule, - ExcludeAccessEveryoneRule, - ExcludeAccessIPRule, - ExcludeAccessIPListRule, - ExcludeAccessCertificateRule, - ExcludeAccessAccessGroupRule, - ExcludeAccessAzureGroupRule, - ExcludeAccessGitHubOrganizationRule, - ExcludeAccessGsuiteGroupRule, - ExcludeAccessOktaGroupRule, - ExcludeAccessSamlGroupRule, - ExcludeAccessServiceTokenRule, - ExcludeAccessAnyValidServiceTokenRule, - ExcludeAccessExternalEvaluationRule, - ExcludeAccessCountryRule, - ExcludeAccessAuthenticationMethodRule, - ExcludeAccessDevicePostureRule, -] - - -class IncludeAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class IncludeAccessEmailRule(BaseModel): - email: IncludeAccessEmailRuleEmail - - -class IncludeAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class IncludeAccessEmailListRule(BaseModel): - email_list: IncludeAccessEmailListRuleEmailList - - -class IncludeAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class IncludeAccessDomainRule(BaseModel): - email_domain: IncludeAccessDomainRuleEmailDomain - - -class IncludeAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class IncludeAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class IncludeAccessIPRule(BaseModel): - ip: IncludeAccessIPRuleIP - - -class IncludeAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class IncludeAccessIPListRule(BaseModel): - ip_list: IncludeAccessIPListRuleIPList - - -class IncludeAccessCertificateRule(BaseModel): - certificate: object - - -class IncludeAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class IncludeAccessAccessGroupRule(BaseModel): - group: IncludeAccessAccessGroupRuleGroup - - -class IncludeAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class IncludeAccessAzureGroupRule(BaseModel): - azure_ad: IncludeAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class IncludeAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class IncludeAccessGitHubOrganizationRule(BaseModel): - github_organization: IncludeAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo(alias="github-organization") - - -class IncludeAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class IncludeAccessGsuiteGroupRule(BaseModel): - gsuite: IncludeAccessGsuiteGroupRuleGsuite - - -class IncludeAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class IncludeAccessOktaGroupRule(BaseModel): - okta: IncludeAccessOktaGroupRuleOkta - - -class IncludeAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class IncludeAccessSamlGroupRule(BaseModel): - saml: IncludeAccessSamlGroupRuleSaml - - -class IncludeAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class IncludeAccessServiceTokenRule(BaseModel): - service_token: IncludeAccessServiceTokenRuleServiceToken - - -class IncludeAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class IncludeAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class IncludeAccessExternalEvaluationRule(BaseModel): - external_evaluation: IncludeAccessExternalEvaluationRuleExternalEvaluation - - -class IncludeAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class IncludeAccessCountryRule(BaseModel): - geo: IncludeAccessCountryRuleGeo - - -class IncludeAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class IncludeAccessAuthenticationMethodRule(BaseModel): - auth_method: IncludeAccessAuthenticationMethodRuleAuthMethod - - -class IncludeAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class IncludeAccessDevicePostureRule(BaseModel): - device_posture: IncludeAccessDevicePostureRuleDevicePosture - - -Include = Union[ - IncludeAccessEmailRule, - IncludeAccessEmailListRule, - IncludeAccessDomainRule, - IncludeAccessEveryoneRule, - IncludeAccessIPRule, - IncludeAccessIPListRule, - IncludeAccessCertificateRule, - IncludeAccessAccessGroupRule, - IncludeAccessAzureGroupRule, - IncludeAccessGitHubOrganizationRule, - IncludeAccessGsuiteGroupRule, - IncludeAccessOktaGroupRule, - IncludeAccessSamlGroupRule, - IncludeAccessServiceTokenRule, - IncludeAccessAnyValidServiceTokenRule, - IncludeAccessExternalEvaluationRule, - IncludeAccessCountryRule, - IncludeAccessAuthenticationMethodRule, - IncludeAccessDevicePostureRule, -] - - -class IsDefaultAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class IsDefaultAccessEmailRule(BaseModel): - email: IsDefaultAccessEmailRuleEmail - - -class IsDefaultAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class IsDefaultAccessEmailListRule(BaseModel): - email_list: IsDefaultAccessEmailListRuleEmailList - - -class IsDefaultAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class IsDefaultAccessDomainRule(BaseModel): - email_domain: IsDefaultAccessDomainRuleEmailDomain - - -class IsDefaultAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class IsDefaultAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class IsDefaultAccessIPRule(BaseModel): - ip: IsDefaultAccessIPRuleIP - - -class IsDefaultAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class IsDefaultAccessIPListRule(BaseModel): - ip_list: IsDefaultAccessIPListRuleIPList - - -class IsDefaultAccessCertificateRule(BaseModel): - certificate: object - - -class IsDefaultAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class IsDefaultAccessAccessGroupRule(BaseModel): - group: IsDefaultAccessAccessGroupRuleGroup - - -class IsDefaultAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class IsDefaultAccessAzureGroupRule(BaseModel): - azure_ad: IsDefaultAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class IsDefaultAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class IsDefaultAccessGitHubOrganizationRule(BaseModel): - github_organization: IsDefaultAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo( - alias="github-organization" - ) - - -class IsDefaultAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class IsDefaultAccessGsuiteGroupRule(BaseModel): - gsuite: IsDefaultAccessGsuiteGroupRuleGsuite - - -class IsDefaultAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class IsDefaultAccessOktaGroupRule(BaseModel): - okta: IsDefaultAccessOktaGroupRuleOkta - - -class IsDefaultAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class IsDefaultAccessSamlGroupRule(BaseModel): - saml: IsDefaultAccessSamlGroupRuleSaml - - -class IsDefaultAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class IsDefaultAccessServiceTokenRule(BaseModel): - service_token: IsDefaultAccessServiceTokenRuleServiceToken - - -class IsDefaultAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class IsDefaultAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class IsDefaultAccessExternalEvaluationRule(BaseModel): - external_evaluation: IsDefaultAccessExternalEvaluationRuleExternalEvaluation - - -class IsDefaultAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class IsDefaultAccessCountryRule(BaseModel): - geo: IsDefaultAccessCountryRuleGeo - - -class IsDefaultAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class IsDefaultAccessAuthenticationMethodRule(BaseModel): - auth_method: IsDefaultAccessAuthenticationMethodRuleAuthMethod - - -class IsDefaultAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class IsDefaultAccessDevicePostureRule(BaseModel): - device_posture: IsDefaultAccessDevicePostureRuleDevicePosture - - -IsDefault = Union[ - IsDefaultAccessEmailRule, - IsDefaultAccessEmailListRule, - IsDefaultAccessDomainRule, - IsDefaultAccessEveryoneRule, - IsDefaultAccessIPRule, - IsDefaultAccessIPListRule, - IsDefaultAccessCertificateRule, - IsDefaultAccessAccessGroupRule, - IsDefaultAccessAzureGroupRule, - IsDefaultAccessGitHubOrganizationRule, - IsDefaultAccessGsuiteGroupRule, - IsDefaultAccessOktaGroupRule, - IsDefaultAccessSamlGroupRule, - IsDefaultAccessServiceTokenRule, - IsDefaultAccessAnyValidServiceTokenRule, - IsDefaultAccessExternalEvaluationRule, - IsDefaultAccessCountryRule, - IsDefaultAccessAuthenticationMethodRule, - IsDefaultAccessDevicePostureRule, -] - - -class RequireAccessEmailRuleEmail(BaseModel): - email: str - """The email of the user.""" - - -class RequireAccessEmailRule(BaseModel): - email: RequireAccessEmailRuleEmail - - -class RequireAccessEmailListRuleEmailList(BaseModel): - id: str - """The ID of a previously created email list.""" - - -class RequireAccessEmailListRule(BaseModel): - email_list: RequireAccessEmailListRuleEmailList - - -class RequireAccessDomainRuleEmailDomain(BaseModel): - domain: str - """The email domain to match.""" - - -class RequireAccessDomainRule(BaseModel): - email_domain: RequireAccessDomainRuleEmailDomain - - -class RequireAccessEveryoneRule(BaseModel): - everyone: object - """An empty object which matches on all users.""" - - -class RequireAccessIPRuleIP(BaseModel): - ip: str - """An IPv4 or IPv6 CIDR block.""" - - -class RequireAccessIPRule(BaseModel): - ip: RequireAccessIPRuleIP - - -class RequireAccessIPListRuleIPList(BaseModel): - id: str - """The ID of a previously created IP list.""" - - -class RequireAccessIPListRule(BaseModel): - ip_list: RequireAccessIPListRuleIPList - - -class RequireAccessCertificateRule(BaseModel): - certificate: object - - -class RequireAccessAccessGroupRuleGroup(BaseModel): - id: str - """The ID of a previously created Access group.""" - - -class RequireAccessAccessGroupRule(BaseModel): - group: RequireAccessAccessGroupRuleGroup - - -class RequireAccessAzureGroupRuleAzureAd(BaseModel): - id: str - """The ID of an Azure group.""" - - connection_id: str - """The ID of your Azure identity provider.""" - - -class RequireAccessAzureGroupRule(BaseModel): - azure_ad: RequireAccessAzureGroupRuleAzureAd = FieldInfo(alias="azureAD") - - -class RequireAccessGitHubOrganizationRuleGitHubOrganization(BaseModel): - connection_id: str - """The ID of your Github identity provider.""" - - name: str - """The name of the organization.""" - - -class RequireAccessGitHubOrganizationRule(BaseModel): - github_organization: RequireAccessGitHubOrganizationRuleGitHubOrganization = FieldInfo(alias="github-organization") - - -class RequireAccessGsuiteGroupRuleGsuite(BaseModel): - connection_id: str - """The ID of your Google Workspace identity provider.""" - - email: str - """The email of the Google Workspace group.""" - - -class RequireAccessGsuiteGroupRule(BaseModel): - gsuite: RequireAccessGsuiteGroupRuleGsuite - - -class RequireAccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class RequireAccessOktaGroupRule(BaseModel): - okta: RequireAccessOktaGroupRuleOkta - - -class RequireAccessSamlGroupRuleSaml(BaseModel): - attribute_name: str - """The name of the SAML attribute.""" - - attribute_value: str - """The SAML attribute value to look for.""" - - -class RequireAccessSamlGroupRule(BaseModel): - saml: RequireAccessSamlGroupRuleSaml - - -class RequireAccessServiceTokenRuleServiceToken(BaseModel): - token_id: str - """The ID of a Service Token.""" - - -class RequireAccessServiceTokenRule(BaseModel): - service_token: RequireAccessServiceTokenRuleServiceToken - - -class RequireAccessAnyValidServiceTokenRule(BaseModel): - any_valid_service_token: object - """An empty object which matches on all service tokens.""" - - -class RequireAccessExternalEvaluationRuleExternalEvaluation(BaseModel): - evaluate_url: str - """The API endpoint containing your business logic.""" - - keys_url: str - """ - The API endpoint containing the key that Access uses to verify that the response - came from your API. - """ - - -class RequireAccessExternalEvaluationRule(BaseModel): - external_evaluation: RequireAccessExternalEvaluationRuleExternalEvaluation - - -class RequireAccessCountryRuleGeo(BaseModel): - country_code: str - """The country code that should be matched.""" - - -class RequireAccessCountryRule(BaseModel): - geo: RequireAccessCountryRuleGeo - - -class RequireAccessAuthenticationMethodRuleAuthMethod(BaseModel): - auth_method: str - """ - The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. - """ - - -class RequireAccessAuthenticationMethodRule(BaseModel): - auth_method: RequireAccessAuthenticationMethodRuleAuthMethod - - -class RequireAccessDevicePostureRuleDevicePosture(BaseModel): - integration_uid: str - """The ID of a device posture integration.""" - - -class RequireAccessDevicePostureRule(BaseModel): - device_posture: RequireAccessDevicePostureRuleDevicePosture - - -Require = Union[ - RequireAccessEmailRule, - RequireAccessEmailListRule, - RequireAccessDomainRule, - RequireAccessEveryoneRule, - RequireAccessIPRule, - RequireAccessIPListRule, - RequireAccessCertificateRule, - RequireAccessAccessGroupRule, - RequireAccessAzureGroupRule, - RequireAccessGitHubOrganizationRule, - RequireAccessGsuiteGroupRule, - RequireAccessOktaGroupRule, - RequireAccessSamlGroupRule, - RequireAccessServiceTokenRule, - RequireAccessAnyValidServiceTokenRule, - RequireAccessExternalEvaluationRule, - RequireAccessCountryRule, - RequireAccessAuthenticationMethodRule, - RequireAccessDevicePostureRule, -] - - -class GroupUpdateResponse(BaseModel): - id: Optional[str] = None - """UUID""" - - created_at: Optional[datetime] = None - - exclude: Optional[List[Exclude]] = None - """Rules evaluated with a NOT logical operator. - - To match a policy, a user cannot meet any of the Exclude rules. - """ - - include: Optional[List[Include]] = None - """Rules evaluated with an OR logical operator. - - A user needs to meet only one of the Include rules. - """ - - is_default: Optional[List[IsDefault]] = None - """Rules evaluated with an AND logical operator. - - To match a policy, a user must meet all of the Require rules. - """ - - name: Optional[str] = None - """The name of the Access group.""" - - require: Optional[List[Require]] = None - """Rules evaluated with an AND logical operator. - - To match a policy, a user must meet all of the Require rules. - """ - - updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/access/logs/__init__.py b/src/cloudflare/types/zero_trust/access/logs/__init__.py index 5db1f0a3f..7080427c9 100644 --- a/src/cloudflare/types/zero_trust/access/logs/__init__.py +++ b/src/cloudflare/types/zero_trust/access/logs/__init__.py @@ -2,4 +2,5 @@ from __future__ import annotations +from .access_access_requests import AccessAccessRequests as AccessAccessRequests from .access_request_list_response import AccessRequestListResponse as AccessRequestListResponse diff --git a/src/cloudflare/types/zero_trust/access/logs/access_access_requests.py b/src/cloudflare/types/zero_trust/access/logs/access_access_requests.py new file mode 100644 index 000000000..59a6dcb72 --- /dev/null +++ b/src/cloudflare/types/zero_trust/access/logs/access_access_requests.py @@ -0,0 +1,36 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional +from datetime import datetime + +from ....._models import BaseModel + +__all__ = ["AccessAccessRequests"] + + +class AccessAccessRequests(BaseModel): + action: Optional[str] = None + """The event that occurred, such as a login attempt.""" + + allowed: Optional[bool] = None + """The result of the authentication event.""" + + app_domain: Optional[str] = None + """The URL of the Access application.""" + + app_uid: Optional[object] = None + """The unique identifier for the Access application.""" + + connection: Optional[str] = None + """The IdP used to authenticate.""" + + created_at: Optional[datetime] = None + + ip_address: Optional[str] = None + """The IP address of the authenticating user.""" + + ray_id: Optional[str] = None + """The unique identifier for the request to Cloudflare.""" + + user_email: Optional[str] = None + """The email address of the authenticating user.""" 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 9fcabca55..022b2ac37 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 @@ -1,39 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ....._models import BaseModel +from .access_access_requests import AccessAccessRequests -__all__ = ["AccessRequestListResponse", "AccessRequestListResponseItem"] +__all__ = ["AccessRequestListResponse"] - -class AccessRequestListResponseItem(BaseModel): - action: Optional[str] = None - """The event that occurred, such as a login attempt.""" - - allowed: Optional[bool] = None - """The result of the authentication event.""" - - app_domain: Optional[str] = None - """The URL of the Access application.""" - - app_uid: Optional[object] = None - """The unique identifier for the Access application.""" - - connection: Optional[str] = None - """The IdP used to authenticate.""" - - created_at: Optional[datetime] = None - - ip_address: Optional[str] = None - """The IP address of the authenticating user.""" - - ray_id: Optional[str] = None - """The unique identifier for the request to Cloudflare.""" - - user_email: Optional[str] = None - """The email address of the authenticating user.""" - - -AccessRequestListResponse = List[AccessRequestListResponseItem] +AccessRequestListResponse = List[AccessAccessRequests] 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 de70fba60..319b1a5b6 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 @@ -1,36 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ...._models import BaseModel +from .access_service_tokens import AccessServiceTokens -__all__ = ["ServiceTokenListResponse", "ServiceTokenListResponseItem"] +__all__ = ["ServiceTokenListResponse"] - -class ServiceTokenListResponseItem(BaseModel): - id: Optional[object] = None - """The ID of the service token.""" - - client_id: Optional[str] = None - """The Client ID for the service token. - - Access will check for this value in the `CF-Access-Client-ID` request header. - """ - - created_at: Optional[datetime] = None - - duration: Optional[str] = None - """The duration for how long the service token will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. The default is 1 year in hours (8760h). - """ - - name: Optional[str] = None - """The name of the service token.""" - - updated_at: Optional[datetime] = None - - -ServiceTokenListResponse = List[ServiceTokenListResponseItem] +ServiceTokenListResponse = List[AccessServiceTokens] diff --git a/src/cloudflare/types/zero_trust/access/service_token_refresh_response.py b/src/cloudflare/types/zero_trust/access/service_token_refresh_response.py deleted file mode 100644 index 34b9a6244..000000000 --- a/src/cloudflare/types/zero_trust/access/service_token_refresh_response.py +++ /dev/null @@ -1,33 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["ServiceTokenRefreshResponse"] - - -class ServiceTokenRefreshResponse(BaseModel): - id: Optional[object] = None - """The ID of the service token.""" - - client_id: Optional[str] = None - """The Client ID for the service token. - - Access will check for this value in the `CF-Access-Client-ID` request header. - """ - - created_at: Optional[datetime] = None - - duration: Optional[str] = None - """The duration for how long the service token will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. The default is 1 year in hours (8760h). - """ - - name: Optional[str] = None - """The name of the service token.""" - - updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/access/service_token_update_response.py b/src/cloudflare/types/zero_trust/access/service_token_update_response.py deleted file mode 100644 index c0c6c0076..000000000 --- a/src/cloudflare/types/zero_trust/access/service_token_update_response.py +++ /dev/null @@ -1,33 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["ServiceTokenUpdateResponse"] - - -class ServiceTokenUpdateResponse(BaseModel): - id: Optional[object] = None - """The ID of the service token.""" - - client_id: Optional[str] = None - """The Client ID for the service token. - - Access will check for this value in the `CF-Access-Client-ID` request header. - """ - - created_at: Optional[datetime] = None - - duration: Optional[str] = None - """The duration for how long the service token will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. The default is 1 year in hours (8760h). - """ - - name: Optional[str] = None - """The name of the service token.""" - - updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/access/tag_create_response.py b/src/cloudflare/types/zero_trust/access/tag_create_response.py deleted file mode 100644 index f97acea2e..000000000 --- a/src/cloudflare/types/zero_trust/access/tag_create_response.py +++ /dev/null @@ -1,20 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["TagCreateResponse"] - - -class TagCreateResponse(BaseModel): - name: str - """The name of the tag""" - - app_count: Optional[int] = None - """The number of applications that have this tag""" - - created_at: Optional[datetime] = None - - updated_at: Optional[datetime] = None 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 350861277..bcd5b5676 100644 --- a/src/cloudflare/types/zero_trust/access/tag_list_response.py +++ b/src/cloudflare/types/zero_trust/access/tag_list_response.py @@ -1,23 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ...._models import BaseModel +from .access_tag import AccessTag -__all__ = ["TagListResponse", "TagListResponseItem"] +__all__ = ["TagListResponse"] - -class TagListResponseItem(BaseModel): - name: str - """The name of the tag""" - - app_count: Optional[int] = None - """The number of applications that have this tag""" - - created_at: Optional[datetime] = None - - updated_at: Optional[datetime] = None - - -TagListResponse = List[TagListResponseItem] +TagListResponse = List[AccessTag] diff --git a/src/cloudflare/types/zero_trust/access/tag_update_response.py b/src/cloudflare/types/zero_trust/access/tag_update_response.py deleted file mode 100644 index 1f64ed408..000000000 --- a/src/cloudflare/types/zero_trust/access/tag_update_response.py +++ /dev/null @@ -1,20 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["TagUpdateResponse"] - - -class TagUpdateResponse(BaseModel): - name: str - """The name of the tag""" - - app_count: Optional[int] = None - """The number of applications that have this tag""" - - created_at: Optional[datetime] = None - - updated_at: Optional[datetime] = None 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 36964a86e..b2aca60df 100644 --- a/src/cloudflare/types/zero_trust/access/user_list_response.py +++ b/src/cloudflare/types/zero_trust/access/user_list_response.py @@ -1,44 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ...._models import BaseModel +from .access_users import AccessUsers -__all__ = ["UserListResponse", "UserListResponseItem"] +__all__ = ["UserListResponse"] - -class UserListResponseItem(BaseModel): - id: Optional[str] = None - """UUID""" - - access_seat: Optional[bool] = None - """True if the user has authenticated with Cloudflare Access.""" - - active_device_count: Optional[float] = None - """The number of active devices registered to the user.""" - - created_at: Optional[datetime] = None - - email: Optional[str] = None - """The email of the user.""" - - gateway_seat: Optional[bool] = None - """True if the user has logged into the WARP client.""" - - last_successful_login: Optional[datetime] = None - """The time at which the user last successfully logged in.""" - - name: Optional[str] = None - """The name of the user.""" - - seat_uid: Optional[object] = None - """The unique API identifier for the Zero Trust seat.""" - - uid: Optional[object] = None - """The unique API identifier for the user.""" - - updated_at: Optional[datetime] = None - - -UserListResponse = List[UserListResponseItem] +UserListResponse = List[AccessUsers] diff --git a/src/cloudflare/types/zero_trust/access/users/__init__.py b/src/cloudflare/types/zero_trust/access/users/__init__.py index 819887430..1f4633923 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 .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 -from .last_seen_identity_get_response import LastSeenIdentityGetResponse as LastSeenIdentityGetResponse diff --git a/src/cloudflare/types/zero_trust/access/users/last_seen_identity_get_response.py b/src/cloudflare/types/zero_trust/access/users/access_identity.py similarity index 90% rename from src/cloudflare/types/zero_trust/access/users/last_seen_identity_get_response.py rename to src/cloudflare/types/zero_trust/access/users/access_identity.py index 2af2e5e4b..3c2c35aa6 100644 --- a/src/cloudflare/types/zero_trust/access/users/last_seen_identity_get_response.py +++ b/src/cloudflare/types/zero_trust/access/users/access_identity.py @@ -6,15 +6,7 @@ from pydantic import Field as FieldInfo from ....._models import BaseModel -__all__ = [ - "LastSeenIdentityGetResponse", - "DeviceSessions", - "DevicePosture", - "DevicePostureCheck", - "Geo", - "Idp", - "MTLSAuth", -] +__all__ = ["AccessIdentity", "DeviceSessions", "DevicePosture", "DevicePostureCheck", "Geo", "Idp", "MTLSAuth"] class DeviceSessions(BaseModel): @@ -69,7 +61,7 @@ class MTLSAuth(BaseModel): cert_serial: Optional[str] = None -class LastSeenIdentityGetResponse(BaseModel): +class AccessIdentity(BaseModel): account_id: Optional[str] = None auth_status: Optional[str] = None diff --git a/src/cloudflare/types/zero_trust/identity_provider_get_response.py b/src/cloudflare/types/zero_trust/access_identity_providers.py similarity index 99% rename from src/cloudflare/types/zero_trust/identity_provider_get_response.py rename to src/cloudflare/types/zero_trust/access_identity_providers.py index c34714363..352d5b1d3 100644 --- a/src/cloudflare/types/zero_trust/identity_provider_get_response.py +++ b/src/cloudflare/types/zero_trust/access_identity_providers.py @@ -6,7 +6,7 @@ from typing_extensions import Literal from ..._models import BaseModel __all__ = [ - "IdentityProviderGetResponse", + "AccessIdentityProviders", "AccessAzureAd", "AccessAzureAdConfig", "AccessAzureAdScimConfig", @@ -1328,7 +1328,7 @@ class AccessOnetimepin(BaseModel): """ -IdentityProviderGetResponse = Union[ +AccessIdentityProviders = Union[ AccessAzureAd, AccessCentrify, AccessFacebook, diff --git a/src/cloudflare/types/zero_trust/organization_list_response.py b/src/cloudflare/types/zero_trust/access_organizations.py similarity index 96% rename from src/cloudflare/types/zero_trust/organization_list_response.py rename to src/cloudflare/types/zero_trust/access_organizations.py index aea3af2d2..1b134110b 100644 --- a/src/cloudflare/types/zero_trust/organization_list_response.py +++ b/src/cloudflare/types/zero_trust/access_organizations.py @@ -5,7 +5,7 @@ from datetime import datetime from ..._models import BaseModel -__all__ = ["OrganizationListResponse", "CustomPages", "LoginDesign"] +__all__ = ["AccessOrganizations", "CustomPages", "LoginDesign"] class CustomPages(BaseModel): @@ -36,7 +36,7 @@ class LoginDesign(BaseModel): """The text color on your login page.""" -class OrganizationListResponse(BaseModel): +class AccessOrganizations(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/access_seats.py new file mode 100644 index 000000000..56e7d267c --- /dev/null +++ b/src/cloudflare/types/zero_trust/access_seats.py @@ -0,0 +1,23 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional +from datetime import datetime + +from ..._models import BaseModel + +__all__ = ["AccessSeats"] + + +class AccessSeats(BaseModel): + access_seat: Optional[bool] = None + """True if the seat is part of Access.""" + + created_at: Optional[datetime] = None + + gateway_seat: Optional[bool] = None + """True if the seat is part of Gateway.""" + + seat_uid: Optional[str] = None + """Identifier""" + + updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/device_list_response.py b/src/cloudflare/types/zero_trust/device_list_response.py index 1fe40609e..fab35b01a 100644 --- a/src/cloudflare/types/zero_trust/device_list_response.py +++ b/src/cloudflare/types/zero_trust/device_list_response.py @@ -1,83 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ..._models import BaseModel +from .teams_devices_devices import TeamsDevicesDevices -__all__ = ["DeviceListResponse", "DeviceListResponseItem", "DeviceListResponseItemUser"] +__all__ = ["DeviceListResponse"] - -class DeviceListResponseItemUser(BaseModel): - id: Optional[str] = None - """UUID""" - - email: Optional[str] = None - """The contact email address of the user.""" - - name: Optional[str] = None - """The enrolled device user's name.""" - - -class DeviceListResponseItem(BaseModel): - id: Optional[str] = None - """Device ID.""" - - created: Optional[datetime] = None - """When the device was created.""" - - deleted: Optional[bool] = None - """True if the device was deleted.""" - - device_type: Optional[Literal["windows", "mac", "linux", "android", "ios"]] = None - - ip: Optional[str] = None - """IPv4 or IPv6 address.""" - - key: Optional[str] = None - """The device's public key.""" - - last_seen: Optional[datetime] = None - """When the device last connected to Cloudflare services.""" - - mac_address: Optional[str] = None - """The device mac address.""" - - manufacturer: Optional[str] = None - """The device manufacturer name.""" - - model: Optional[str] = None - """The device model name.""" - - name: Optional[str] = None - """The device name.""" - - os_distro_name: Optional[str] = None - """The Linux distro name.""" - - os_distro_revision: Optional[str] = None - """The Linux distro revision.""" - - os_version: Optional[str] = None - """The operating system version.""" - - os_version_extra: Optional[str] = None - """The operating system version extra parameter.""" - - revoked_at: Optional[datetime] = None - """When the device was revoked.""" - - serial_number: Optional[str] = None - """The device serial number.""" - - updated: Optional[datetime] = None - """When the device was updated.""" - - user: Optional[DeviceListResponseItemUser] = None - - version: Optional[str] = None - """The WARP client version.""" - - -DeviceListResponse = List[DeviceListResponseItem] +DeviceListResponse = List[TeamsDevicesDevices] diff --git a/src/cloudflare/types/zero_trust/devices/__init__.py b/src/cloudflare/types/zero_trust/devices/__init__.py index 9f6a6bb94..7dc07b4a7 100644 --- a/src/cloudflare/types/zero_trust/devices/__init__.py +++ b/src/cloudflare/types/zero_trust/devices/__init__.py @@ -3,38 +3,35 @@ from __future__ import annotations from .policy_edit_params import PolicyEditParams as PolicyEditParams -from .policy_get_response import PolicyGetResponse as PolicyGetResponse -from .network_get_response import NetworkGetResponse as NetworkGetResponse from .policy_create_params import PolicyCreateParams as PolicyCreateParams -from .policy_edit_response import PolicyEditResponse as PolicyEditResponse from .policy_list_response import PolicyListResponse as PolicyListResponse -from .posture_get_response import PostureGetResponse as PostureGetResponse from .revoke_create_params import RevokeCreateParams as RevokeCreateParams -from .dex_test_get_response import DEXTestGetResponse as DEXTestGetResponse 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_list_response import SettingListResponse as SettingListResponse 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_create_response import PolicyCreateResponse as PolicyCreateResponse 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 .network_create_response import NetworkCreateResponse as NetworkCreateResponse from .network_delete_response import NetworkDeleteResponse as NetworkDeleteResponse -from .network_update_response import NetworkUpdateResponse as NetworkUpdateResponse -from .posture_create_response import PostureCreateResponse as PostureCreateResponse from .posture_delete_response import PostureDeleteResponse as PostureDeleteResponse -from .posture_update_response import PostureUpdateResponse as PostureUpdateResponse -from .setting_update_response import SettingUpdateResponse as SettingUpdateResponse -from .dex_test_create_response import DEXTestCreateResponse as DEXTestCreateResponse from .dex_test_delete_response import DEXTestDeleteResponse as DEXTestDeleteResponse -from .dex_test_update_response import DEXTestUpdateResponse as DEXTestUpdateResponse 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, +) diff --git a/src/cloudflare/types/zero_trust/devices/dex_test_create_response.py b/src/cloudflare/types/zero_trust/devices/dex_test_create_response.py deleted file mode 100644 index 2210b6bc5..000000000 --- a/src/cloudflare/types/zero_trust/devices/dex_test_create_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional - -from ...._models import BaseModel - -__all__ = ["DEXTestCreateResponse", "Data"] - - -class Data(BaseModel): - host: Optional[str] = None - """The desired endpoint to test.""" - - kind: Optional[str] = None - """The type of test.""" - - method: Optional[str] = None - """The HTTP request method type.""" - - -class DEXTestCreateResponse(BaseModel): - data: Data - """ - The configuration object which contains the details for the WARP client to - conduct the test. - """ - - enabled: bool - """Determines whether or not the test is active.""" - - interval: str - """How often the test will run.""" - - name: str - """The name of the DEX test. Must be unique.""" - - description: Optional[str] = None - """Additional details about the test.""" 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 87958a4dd..250ca98f5 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 @@ -1,41 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ...._models import BaseModel +from .teams_devices_device_dex_test_schemas_http import TeamsDevicesDeviceDEXTestSchemasHTTP -__all__ = ["DEXTestDeleteResponse", "DEXTestDeleteResponseItem", "DEXTestDeleteResponseItemData"] +__all__ = ["DEXTestDeleteResponse"] - -class DEXTestDeleteResponseItemData(BaseModel): - host: Optional[str] = None - """The desired endpoint to test.""" - - kind: Optional[str] = None - """The type of test.""" - - method: Optional[str] = None - """The HTTP request method type.""" - - -class DEXTestDeleteResponseItem(BaseModel): - data: DEXTestDeleteResponseItemData - """ - The configuration object which contains the details for the WARP client to - conduct the test. - """ - - enabled: bool - """Determines whether or not the test is active.""" - - interval: str - """How often the test will run.""" - - name: str - """The name of the DEX test. Must be unique.""" - - description: Optional[str] = None - """Additional details about the test.""" - - -DEXTestDeleteResponse = List[DEXTestDeleteResponseItem] +DEXTestDeleteResponse = List[TeamsDevicesDeviceDEXTestSchemasHTTP] 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 9f55acf69..75f824fd0 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 @@ -1,41 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ...._models import BaseModel +from .teams_devices_device_dex_test_schemas_http import TeamsDevicesDeviceDEXTestSchemasHTTP -__all__ = ["DEXTestListResponse", "DEXTestListResponseItem", "DEXTestListResponseItemData"] +__all__ = ["DEXTestListResponse"] - -class DEXTestListResponseItemData(BaseModel): - host: Optional[str] = None - """The desired endpoint to test.""" - - kind: Optional[str] = None - """The type of test.""" - - method: Optional[str] = None - """The HTTP request method type.""" - - -class DEXTestListResponseItem(BaseModel): - data: DEXTestListResponseItemData - """ - The configuration object which contains the details for the WARP client to - conduct the test. - """ - - enabled: bool - """Determines whether or not the test is active.""" - - interval: str - """How often the test will run.""" - - name: str - """The name of the DEX test. Must be unique.""" - - description: Optional[str] = None - """Additional details about the test.""" - - -DEXTestListResponse = List[DEXTestListResponseItem] +DEXTestListResponse = List[TeamsDevicesDeviceDEXTestSchemasHTTP] diff --git a/src/cloudflare/types/zero_trust/devices/dex_test_update_response.py b/src/cloudflare/types/zero_trust/devices/dex_test_update_response.py deleted file mode 100644 index ed98df0d0..000000000 --- a/src/cloudflare/types/zero_trust/devices/dex_test_update_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional - -from ...._models import BaseModel - -__all__ = ["DEXTestUpdateResponse", "Data"] - - -class Data(BaseModel): - host: Optional[str] = None - """The desired endpoint to test.""" - - kind: Optional[str] = None - """The type of test.""" - - method: Optional[str] = None - """The HTTP request method type.""" - - -class DEXTestUpdateResponse(BaseModel): - data: Data - """ - The configuration object which contains the details for the WARP client to - conduct the test. - """ - - enabled: bool - """Determines whether or not the test is active.""" - - interval: str - """How often the test will run.""" - - name: str - """The name of the DEX test. Must be unique.""" - - description: Optional[str] = None - """Additional details about the test.""" 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 da6e60d2a..fd31880cf 100644 --- a/src/cloudflare/types/zero_trust/devices/network_delete_response.py +++ b/src/cloudflare/types/zero_trust/devices/network_delete_response.py @@ -1,43 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from typing_extensions import Literal +from typing import List -from ...._models import BaseModel +from .teams_devices_device_managed_networks import TeamsDevicesDeviceManagedNetworks -__all__ = ["NetworkDeleteResponse", "NetworkDeleteResponseItem", "NetworkDeleteResponseItemConfig"] +__all__ = ["NetworkDeleteResponse"] - -class NetworkDeleteResponseItemConfig(BaseModel): - tls_sockaddr: str - """ - A network address of the form "host:port" that the WARP client will use to - detect the presence of a TLS host. - """ - - sha256: Optional[str] = None - """ - The SHA-256 hash of the TLS certificate presented by the host found at - tls_sockaddr. If absent, regular certificate verification (trusted roots, valid - timestamp, etc) will be used to validate the certificate. - """ - - -class NetworkDeleteResponseItem(BaseModel): - config: Optional[NetworkDeleteResponseItemConfig] = None - """ - The configuration object containing information for the WARP client to detect - the managed network. - """ - - name: Optional[str] = None - """The name of the device managed network. This name must be unique.""" - - network_id: Optional[str] = None - """API UUID.""" - - type: Optional[Literal["tls"]] = None - """The type of device managed network.""" - - -NetworkDeleteResponse = List[NetworkDeleteResponseItem] +NetworkDeleteResponse = List[TeamsDevicesDeviceManagedNetworks] diff --git a/src/cloudflare/types/zero_trust/devices/network_get_response.py b/src/cloudflare/types/zero_trust/devices/network_get_response.py deleted file mode 100644 index 2e4372769..000000000 --- a/src/cloudflare/types/zero_trust/devices/network_get_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["NetworkGetResponse", "Config"] - - -class Config(BaseModel): - tls_sockaddr: str - """ - A network address of the form "host:port" that the WARP client will use to - detect the presence of a TLS host. - """ - - sha256: Optional[str] = None - """ - The SHA-256 hash of the TLS certificate presented by the host found at - tls_sockaddr. If absent, regular certificate verification (trusted roots, valid - timestamp, etc) will be used to validate the certificate. - """ - - -class NetworkGetResponse(BaseModel): - config: Optional[Config] = None - """ - The configuration object containing information for the WARP client to detect - the managed network. - """ - - name: Optional[str] = None - """The name of the device managed network. This name must be unique.""" - - network_id: Optional[str] = None - """API UUID.""" - - type: Optional[Literal["tls"]] = None - """The type of device managed network.""" 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 e2eba9f70..41734f39e 100644 --- a/src/cloudflare/types/zero_trust/devices/network_list_response.py +++ b/src/cloudflare/types/zero_trust/devices/network_list_response.py @@ -1,43 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from typing_extensions import Literal +from typing import List -from ...._models import BaseModel +from .teams_devices_device_managed_networks import TeamsDevicesDeviceManagedNetworks -__all__ = ["NetworkListResponse", "NetworkListResponseItem", "NetworkListResponseItemConfig"] +__all__ = ["NetworkListResponse"] - -class NetworkListResponseItemConfig(BaseModel): - tls_sockaddr: str - """ - A network address of the form "host:port" that the WARP client will use to - detect the presence of a TLS host. - """ - - sha256: Optional[str] = None - """ - The SHA-256 hash of the TLS certificate presented by the host found at - tls_sockaddr. If absent, regular certificate verification (trusted roots, valid - timestamp, etc) will be used to validate the certificate. - """ - - -class NetworkListResponseItem(BaseModel): - config: Optional[NetworkListResponseItemConfig] = None - """ - The configuration object containing information for the WARP client to detect - the managed network. - """ - - name: Optional[str] = None - """The name of the device managed network. This name must be unique.""" - - network_id: Optional[str] = None - """API UUID.""" - - type: Optional[Literal["tls"]] = None - """The type of device managed network.""" - - -NetworkListResponse = List[NetworkListResponseItem] +NetworkListResponse = List[TeamsDevicesDeviceManagedNetworks] diff --git a/src/cloudflare/types/zero_trust/devices/network_update_response.py b/src/cloudflare/types/zero_trust/devices/network_update_response.py deleted file mode 100644 index b54a9ed33..000000000 --- a/src/cloudflare/types/zero_trust/devices/network_update_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["NetworkUpdateResponse", "Config"] - - -class Config(BaseModel): - tls_sockaddr: str - """ - A network address of the form "host:port" that the WARP client will use to - detect the presence of a TLS host. - """ - - sha256: Optional[str] = None - """ - The SHA-256 hash of the TLS certificate presented by the host found at - tls_sockaddr. If absent, regular certificate verification (trusted roots, valid - timestamp, etc) will be used to validate the certificate. - """ - - -class NetworkUpdateResponse(BaseModel): - config: Optional[Config] = None - """ - The configuration object containing information for the WARP client to detect - the managed network. - """ - - name: Optional[str] = None - """The name of the device managed network. This name must be unique.""" - - network_id: Optional[str] = None - """API UUID.""" - - type: Optional[Literal["tls"]] = None - """The type of device managed network.""" diff --git a/src/cloudflare/types/zero_trust/devices/policies/__init__.py b/src/cloudflare/types/zero_trust/devices/policies/__init__.py index a99294b46..8e9c65eb4 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/__init__.py +++ b/src/cloudflare/types/zero_trust/devices/policies/__init__.py @@ -10,8 +10,16 @@ from .include_list_response import IncludeListResponse as IncludeListResponse from .include_update_params import IncludeUpdateParams as IncludeUpdateParams 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 .default_policy_get_response import DefaultPolicyGetResponse as DefaultPolicyGetResponse from .fallback_domain_get_response import FallbackDomainGetResponse as FallbackDomainGetResponse 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, +) 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 b1f6567f2..af483d748 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 @@ -1,27 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ....._models import BaseModel +from .teams_devices_split_tunnel import TeamsDevicesSplitTunnel -__all__ = ["ExcludeGetResponse", "ExcludeGetResponseItem"] +__all__ = ["ExcludeGetResponse"] - -class ExcludeGetResponseItem(BaseModel): - address: str - """The address in CIDR format to exclude from the tunnel. - - If `address` is present, `host` must not be present. - """ - - description: str - """A description of the Split Tunnel item, displayed in the client UI.""" - - host: Optional[str] = None - """The domain name to exclude from the tunnel. - - If `host` is present, `address` must not be present. - """ - - -ExcludeGetResponse = List[ExcludeGetResponseItem] +ExcludeGetResponse = List[TeamsDevicesSplitTunnel] 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 e1e5fa292..f0a2f614b 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 @@ -1,27 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ....._models import BaseModel +from .teams_devices_split_tunnel import TeamsDevicesSplitTunnel -__all__ = ["ExcludeListResponse", "ExcludeListResponseItem"] +__all__ = ["ExcludeListResponse"] - -class ExcludeListResponseItem(BaseModel): - address: str - """The address in CIDR format to exclude from the tunnel. - - If `address` is present, `host` must not be present. - """ - - description: str - """A description of the Split Tunnel item, displayed in the client UI.""" - - host: Optional[str] = None - """The domain name to exclude from the tunnel. - - If `host` is present, `address` must not be present. - """ - - -ExcludeListResponse = List[ExcludeListResponseItem] +ExcludeListResponse = List[TeamsDevicesSplitTunnel] 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 6721d1200..7b3601b1e 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,27 +5,12 @@ from __future__ import annotations from typing import Iterable from typing_extensions import Required, TypedDict -__all__ = ["ExcludeUpdateParams", "Body"] +from .teams_devices_split_tunnel_param import TeamsDevicesSplitTunnelParam + +__all__ = ["ExcludeUpdateParams"] class ExcludeUpdateParams(TypedDict, total=False): account_id: Required[object] - body: Required[Iterable[Body]] - - -class Body(TypedDict, total=False): - address: Required[str] - """The address in CIDR format to exclude from the tunnel. - - If `address` is present, `host` must not be present. - """ - - description: Required[str] - """A description of the Split Tunnel item, displayed in the client UI.""" - - host: str - """The domain name to exclude from the tunnel. - - If `host` is present, `address` must not be present. - """ + body: Required[Iterable[TeamsDevicesSplitTunnelParam]] 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 68568624b..ab9d2a1ed 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 @@ -1,27 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ....._models import BaseModel +from .teams_devices_split_tunnel import TeamsDevicesSplitTunnel -__all__ = ["ExcludeUpdateResponse", "ExcludeUpdateResponseItem"] +__all__ = ["ExcludeUpdateResponse"] - -class ExcludeUpdateResponseItem(BaseModel): - address: str - """The address in CIDR format to exclude from the tunnel. - - If `address` is present, `host` must not be present. - """ - - description: str - """A description of the Split Tunnel item, displayed in the client UI.""" - - host: Optional[str] = None - """The domain name to exclude from the tunnel. - - If `host` is present, `address` must not be present. - """ - - -ExcludeUpdateResponse = List[ExcludeUpdateResponseItem] +ExcludeUpdateResponse = List[TeamsDevicesSplitTunnel] 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 8a12e2576..752611aa4 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 @@ -1,21 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ....._models import BaseModel +from .teams_devices_fallback_domain import TeamsDevicesFallbackDomain -__all__ = ["FallbackDomainGetResponse", "FallbackDomainGetResponseItem"] +__all__ = ["FallbackDomainGetResponse"] - -class FallbackDomainGetResponseItem(BaseModel): - suffix: str - """The domain suffix to match when resolving locally.""" - - description: Optional[str] = None - """A description of the fallback domain, displayed in the client UI.""" - - dns_server: Optional[List[object]] = None - """A list of IP addresses to handle domain resolution.""" - - -FallbackDomainGetResponse = List[FallbackDomainGetResponseItem] +FallbackDomainGetResponse = List[TeamsDevicesFallbackDomain] 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 78d5bd90e..7bad64df1 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 @@ -1,21 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ....._models import BaseModel +from .teams_devices_fallback_domain import TeamsDevicesFallbackDomain -__all__ = ["FallbackDomainListResponse", "FallbackDomainListResponseItem"] +__all__ = ["FallbackDomainListResponse"] - -class FallbackDomainListResponseItem(BaseModel): - suffix: str - """The domain suffix to match when resolving locally.""" - - description: Optional[str] = None - """A description of the fallback domain, displayed in the client UI.""" - - dns_server: Optional[List[object]] = None - """A list of IP addresses to handle domain resolution.""" - - -FallbackDomainListResponse = List[FallbackDomainListResponseItem] +FallbackDomainListResponse = List[TeamsDevicesFallbackDomain] 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 b10313804..87b615ce0 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,21 +5,12 @@ from __future__ import annotations from typing import Iterable from typing_extensions import Required, TypedDict -__all__ = ["FallbackDomainUpdateParams", "Body"] +from .teams_devices_fallback_domain_param import TeamsDevicesFallbackDomainParam + +__all__ = ["FallbackDomainUpdateParams"] class FallbackDomainUpdateParams(TypedDict, total=False): account_id: Required[object] - body: Required[Iterable[Body]] - - -class Body(TypedDict, total=False): - suffix: Required[str] - """The domain suffix to match when resolving locally.""" - - description: str - """A description of the fallback domain, displayed in the client UI.""" - - dns_server: Iterable[object] - """A list of IP addresses to handle domain resolution.""" + body: Required[Iterable[TeamsDevicesFallbackDomainParam]] 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 869af0e89..9b78e5a0f 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 @@ -1,21 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ....._models import BaseModel +from .teams_devices_fallback_domain import TeamsDevicesFallbackDomain -__all__ = ["FallbackDomainUpdateResponse", "FallbackDomainUpdateResponseItem"] +__all__ = ["FallbackDomainUpdateResponse"] - -class FallbackDomainUpdateResponseItem(BaseModel): - suffix: str - """The domain suffix to match when resolving locally.""" - - description: Optional[str] = None - """A description of the fallback domain, displayed in the client UI.""" - - dns_server: Optional[List[object]] = None - """A list of IP addresses to handle domain resolution.""" - - -FallbackDomainUpdateResponse = List[FallbackDomainUpdateResponseItem] +FallbackDomainUpdateResponse = List[TeamsDevicesFallbackDomain] 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 5a645e0d7..68ed73cae 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 @@ -1,27 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ....._models import BaseModel +from .teams_devices_split_tunnel_include import TeamsDevicesSplitTunnelInclude -__all__ = ["IncludeGetResponse", "IncludeGetResponseItem"] +__all__ = ["IncludeGetResponse"] - -class IncludeGetResponseItem(BaseModel): - address: str - """The address in CIDR format to include in the tunnel. - - If address is present, host must not be present. - """ - - description: str - """A description of the split tunnel item, displayed in the client UI.""" - - host: Optional[str] = None - """The domain name to include in the tunnel. - - If host is present, address must not be present. - """ - - -IncludeGetResponse = List[IncludeGetResponseItem] +IncludeGetResponse = List[TeamsDevicesSplitTunnelInclude] 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 8531e824e..b58f75935 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 @@ -1,27 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ....._models import BaseModel +from .teams_devices_split_tunnel_include import TeamsDevicesSplitTunnelInclude -__all__ = ["IncludeListResponse", "IncludeListResponseItem"] +__all__ = ["IncludeListResponse"] - -class IncludeListResponseItem(BaseModel): - address: str - """The address in CIDR format to include in the tunnel. - - If address is present, host must not be present. - """ - - description: str - """A description of the split tunnel item, displayed in the client UI.""" - - host: Optional[str] = None - """The domain name to include in the tunnel. - - If host is present, address must not be present. - """ - - -IncludeListResponse = List[IncludeListResponseItem] +IncludeListResponse = List[TeamsDevicesSplitTunnelInclude] 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 ef136e69d..071fbd08f 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,27 +5,12 @@ from __future__ import annotations from typing import Iterable from typing_extensions import Required, TypedDict -__all__ = ["IncludeUpdateParams", "Body"] +from .teams_devices_split_tunnel_include_param import TeamsDevicesSplitTunnelIncludeParam + +__all__ = ["IncludeUpdateParams"] class IncludeUpdateParams(TypedDict, total=False): account_id: Required[object] - body: Required[Iterable[Body]] - - -class Body(TypedDict, total=False): - address: Required[str] - """The address in CIDR format to include in the tunnel. - - If address is present, host must not be present. - """ - - description: Required[str] - """A description of the split tunnel item, displayed in the client UI.""" - - host: str - """The domain name to include in the tunnel. - - If host is present, address must not be present. - """ + body: Required[Iterable[TeamsDevicesSplitTunnelIncludeParam]] 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 078d68e1c..91269910b 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 @@ -1,27 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ....._models import BaseModel +from .teams_devices_split_tunnel_include import TeamsDevicesSplitTunnelInclude -__all__ = ["IncludeUpdateResponse", "IncludeUpdateResponseItem"] +__all__ = ["IncludeUpdateResponse"] - -class IncludeUpdateResponseItem(BaseModel): - address: str - """The address in CIDR format to include in the tunnel. - - If address is present, host must not be present. - """ - - description: str - """A description of the split tunnel item, displayed in the client UI.""" - - host: Optional[str] = None - """The domain name to include in the tunnel. - - If host is present, address must not be present. - """ - - -IncludeUpdateResponse = List[IncludeUpdateResponseItem] +IncludeUpdateResponse = List[TeamsDevicesSplitTunnelInclude] diff --git a/src/cloudflare/types/zero_trust/devices/policies/teams_devices_fallback_domain.py b/src/cloudflare/types/zero_trust/devices/policies/teams_devices_fallback_domain.py new file mode 100644 index 000000000..b3c8b42da --- /dev/null +++ b/src/cloudflare/types/zero_trust/devices/policies/teams_devices_fallback_domain.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import List, Optional + +from ....._models import BaseModel + +__all__ = ["TeamsDevicesFallbackDomain"] + + +class TeamsDevicesFallbackDomain(BaseModel): + suffix: str + """The domain suffix to match when resolving locally.""" + + description: Optional[str] = None + """A description of the fallback domain, displayed in the client UI.""" + + dns_server: Optional[List[object]] = None + """A list of IP addresses to handle domain resolution.""" diff --git a/src/cloudflare/types/zero_trust/devices/policies/teams_devices_fallback_domain_param.py b/src/cloudflare/types/zero_trust/devices/policies/teams_devices_fallback_domain_param.py new file mode 100644 index 000000000..8a58ea696 --- /dev/null +++ b/src/cloudflare/types/zero_trust/devices/policies/teams_devices_fallback_domain_param.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing import Iterable +from typing_extensions import Required, TypedDict + +__all__ = ["TeamsDevicesFallbackDomainParam"] + + +class TeamsDevicesFallbackDomainParam(TypedDict, total=False): + suffix: Required[str] + """The domain suffix to match when resolving locally.""" + + description: str + """A description of the fallback domain, displayed in the client UI.""" + + dns_server: Iterable[object] + """A list of IP addresses to handle domain resolution.""" diff --git a/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel.py b/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel.py new file mode 100644 index 000000000..9e7b68b7e --- /dev/null +++ b/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel.py @@ -0,0 +1,24 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional + +from ....._models import BaseModel + +__all__ = ["TeamsDevicesSplitTunnel"] + + +class TeamsDevicesSplitTunnel(BaseModel): + address: str + """The address in CIDR format to exclude from the tunnel. + + If `address` is present, `host` must not be present. + """ + + description: str + """A description of the Split Tunnel item, displayed in the client UI.""" + + host: Optional[str] = None + """The domain name to exclude from the tunnel. + + If `host` is present, `address` must not be present. + """ diff --git a/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_include.py b/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_include.py new file mode 100644 index 000000000..7ca57d6ff --- /dev/null +++ b/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_include.py @@ -0,0 +1,24 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional + +from ....._models import BaseModel + +__all__ = ["TeamsDevicesSplitTunnelInclude"] + + +class TeamsDevicesSplitTunnelInclude(BaseModel): + address: str + """The address in CIDR format to include in the tunnel. + + If address is present, host must not be present. + """ + + description: str + """A description of the split tunnel item, displayed in the client UI.""" + + host: Optional[str] = None + """The domain name to include in the tunnel. + + If host is present, address must not be present. + """ 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/teams_devices_split_tunnel_include_param.py new file mode 100644 index 000000000..60f5a3774 --- /dev/null +++ b/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_include_param.py @@ -0,0 +1,24 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["TeamsDevicesSplitTunnelIncludeParam"] + + +class TeamsDevicesSplitTunnelIncludeParam(TypedDict, total=False): + address: Required[str] + """The address in CIDR format to include in the tunnel. + + If address is present, host must not be present. + """ + + description: Required[str] + """A description of the split tunnel item, displayed in the client UI.""" + + host: str + """The domain name to include in the tunnel. + + If host is present, address must not be present. + """ diff --git a/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_param.py b/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_param.py new file mode 100644 index 000000000..ccb9079ad --- /dev/null +++ b/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_param.py @@ -0,0 +1,24 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["TeamsDevicesSplitTunnelParam"] + + +class TeamsDevicesSplitTunnelParam(TypedDict, total=False): + address: Required[str] + """The address in CIDR format to exclude from the tunnel. + + If `address` is present, `host` must not be present. + """ + + description: Required[str] + """A description of the Split Tunnel item, displayed in the client UI.""" + + host: str + """The domain name to exclude from the tunnel. + + If `host` is present, `address` must not be present. + """ diff --git a/src/cloudflare/types/zero_trust/devices/policy_create_response.py b/src/cloudflare/types/zero_trust/devices/policy_create_response.py deleted file mode 100644 index 007859070..000000000 --- a/src/cloudflare/types/zero_trust/devices/policy_create_response.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List - -__all__ = ["PolicyCreateResponse"] - -PolicyCreateResponse = List[object] 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 23a1bcca6..727ccf85e 100644 --- a/src/cloudflare/types/zero_trust/devices/policy_delete_response.py +++ b/src/cloudflare/types/zero_trust/devices/policy_delete_response.py @@ -1,157 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ...._models import BaseModel +from .teams_devices_device_settings_policy import TeamsDevicesDeviceSettingsPolicy -__all__ = [ - "PolicyDeleteResponse", - "PolicyDeleteResponseItem", - "PolicyDeleteResponseItemExclude", - "PolicyDeleteResponseItemFallbackDomain", - "PolicyDeleteResponseItemInclude", - "PolicyDeleteResponseItemServiceModeV2", -] +__all__ = ["PolicyDeleteResponse"] - -class PolicyDeleteResponseItemExclude(BaseModel): - address: str - """The address in CIDR format to exclude from the tunnel. - - If `address` is present, `host` must not be present. - """ - - description: str - """A description of the Split Tunnel item, displayed in the client UI.""" - - host: Optional[str] = None - """The domain name to exclude from the tunnel. - - If `host` is present, `address` must not be present. - """ - - -class PolicyDeleteResponseItemFallbackDomain(BaseModel): - suffix: str - """The domain suffix to match when resolving locally.""" - - description: Optional[str] = None - """A description of the fallback domain, displayed in the client UI.""" - - dns_server: Optional[List[object]] = None - """A list of IP addresses to handle domain resolution.""" - - -class PolicyDeleteResponseItemInclude(BaseModel): - address: str - """The address in CIDR format to include in the tunnel. - - If address is present, host must not be present. - """ - - description: str - """A description of the split tunnel item, displayed in the client UI.""" - - host: Optional[str] = None - """The domain name to include in the tunnel. - - If host is present, address must not be present. - """ - - -class PolicyDeleteResponseItemServiceModeV2(BaseModel): - mode: Optional[str] = None - """The mode to run the WARP client under.""" - - port: Optional[float] = None - """The port number when used with proxy mode.""" - - -class PolicyDeleteResponseItem(BaseModel): - allow_mode_switch: Optional[bool] = None - """Whether to allow the user to switch WARP between modes.""" - - allow_updates: Optional[bool] = None - """ - Whether to receive update notifications when a new version of the client is - available. - """ - - allowed_to_leave: Optional[bool] = None - """Whether to allow devices to leave the organization.""" - - auto_connect: Optional[float] = None - """The amount of time in minutes to reconnect after having been disabled.""" - - captive_portal: Optional[float] = None - """Turn on the captive portal after the specified amount of time.""" - - default: Optional[bool] = None - """Whether the policy is the default policy for an account.""" - - description: Optional[str] = None - """A description of the policy.""" - - disable_auto_fallback: Optional[bool] = None - """ - If the `dns_server` field of a fallback domain is not present, the client will - fall back to a best guess of the default/system DNS resolvers unless this policy - option is set to `true`. - """ - - enabled: Optional[bool] = None - """Whether the policy will be applied to matching devices.""" - - exclude: Optional[List[PolicyDeleteResponseItemExclude]] = None - - exclude_office_ips: Optional[bool] = None - """Whether to add Microsoft IPs to Split Tunnel exclusions.""" - - fallback_domains: Optional[List[PolicyDeleteResponseItemFallbackDomain]] = None - - gateway_unique_id: Optional[str] = None - - include: Optional[List[PolicyDeleteResponseItemInclude]] = None - - lan_allow_minutes: Optional[float] = None - """The amount of time in minutes a user is allowed access to their LAN. - - A value of 0 will allow LAN access until the next WARP reconnection, such as a - reboot or a laptop waking from sleep. Note that this field is omitted from the - response if null or unset. - """ - - lan_allow_subnet_size: Optional[float] = None - """The size of the subnet for the local access network. - - Note that this field is omitted from the response if null or unset. - """ - - match: Optional[str] = None - """The wirefilter expression to match devices.""" - - name: Optional[str] = None - """The name of the device settings profile.""" - - policy_id: Optional[str] = None - """Device ID.""" - - precedence: Optional[float] = None - """The precedence of the policy. - - Lower values indicate higher precedence. Policies will be evaluated in ascending - order of this field. - """ - - service_mode_v2: Optional[PolicyDeleteResponseItemServiceModeV2] = None - - support_url: Optional[str] = None - """The URL to launch when the Send Feedback button is clicked.""" - - switch_locked: Optional[bool] = None - """ - Whether to allow the user to turn off the WARP switch and disconnect the client. - """ - - -PolicyDeleteResponse = List[PolicyDeleteResponseItem] +PolicyDeleteResponse = List[TeamsDevicesDeviceSettingsPolicy] diff --git a/src/cloudflare/types/zero_trust/devices/policy_edit_response.py b/src/cloudflare/types/zero_trust/devices/policy_edit_response.py deleted file mode 100644 index e6981f4d7..000000000 --- a/src/cloudflare/types/zero_trust/devices/policy_edit_response.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List - -__all__ = ["PolicyEditResponse"] - -PolicyEditResponse = List[object] diff --git a/src/cloudflare/types/zero_trust/devices/policy_get_response.py b/src/cloudflare/types/zero_trust/devices/policy_get_response.py deleted file mode 100644 index 22ded0001..000000000 --- a/src/cloudflare/types/zero_trust/devices/policy_get_response.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List - -__all__ = ["PolicyGetResponse"] - -PolicyGetResponse = List[object] 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 df66505e6..b5a22c61e 100644 --- a/src/cloudflare/types/zero_trust/devices/policy_list_response.py +++ b/src/cloudflare/types/zero_trust/devices/policy_list_response.py @@ -1,157 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ...._models import BaseModel +from .teams_devices_device_settings_policy import TeamsDevicesDeviceSettingsPolicy -__all__ = [ - "PolicyListResponse", - "PolicyListResponseItem", - "PolicyListResponseItemExclude", - "PolicyListResponseItemFallbackDomain", - "PolicyListResponseItemInclude", - "PolicyListResponseItemServiceModeV2", -] +__all__ = ["PolicyListResponse"] - -class PolicyListResponseItemExclude(BaseModel): - address: str - """The address in CIDR format to exclude from the tunnel. - - If `address` is present, `host` must not be present. - """ - - description: str - """A description of the Split Tunnel item, displayed in the client UI.""" - - host: Optional[str] = None - """The domain name to exclude from the tunnel. - - If `host` is present, `address` must not be present. - """ - - -class PolicyListResponseItemFallbackDomain(BaseModel): - suffix: str - """The domain suffix to match when resolving locally.""" - - description: Optional[str] = None - """A description of the fallback domain, displayed in the client UI.""" - - dns_server: Optional[List[object]] = None - """A list of IP addresses to handle domain resolution.""" - - -class PolicyListResponseItemInclude(BaseModel): - address: str - """The address in CIDR format to include in the tunnel. - - If address is present, host must not be present. - """ - - description: str - """A description of the split tunnel item, displayed in the client UI.""" - - host: Optional[str] = None - """The domain name to include in the tunnel. - - If host is present, address must not be present. - """ - - -class PolicyListResponseItemServiceModeV2(BaseModel): - mode: Optional[str] = None - """The mode to run the WARP client under.""" - - port: Optional[float] = None - """The port number when used with proxy mode.""" - - -class PolicyListResponseItem(BaseModel): - allow_mode_switch: Optional[bool] = None - """Whether to allow the user to switch WARP between modes.""" - - allow_updates: Optional[bool] = None - """ - Whether to receive update notifications when a new version of the client is - available. - """ - - allowed_to_leave: Optional[bool] = None - """Whether to allow devices to leave the organization.""" - - auto_connect: Optional[float] = None - """The amount of time in minutes to reconnect after having been disabled.""" - - captive_portal: Optional[float] = None - """Turn on the captive portal after the specified amount of time.""" - - default: Optional[bool] = None - """Whether the policy is the default policy for an account.""" - - description: Optional[str] = None - """A description of the policy.""" - - disable_auto_fallback: Optional[bool] = None - """ - If the `dns_server` field of a fallback domain is not present, the client will - fall back to a best guess of the default/system DNS resolvers unless this policy - option is set to `true`. - """ - - enabled: Optional[bool] = None - """Whether the policy will be applied to matching devices.""" - - exclude: Optional[List[PolicyListResponseItemExclude]] = None - - exclude_office_ips: Optional[bool] = None - """Whether to add Microsoft IPs to Split Tunnel exclusions.""" - - fallback_domains: Optional[List[PolicyListResponseItemFallbackDomain]] = None - - gateway_unique_id: Optional[str] = None - - include: Optional[List[PolicyListResponseItemInclude]] = None - - lan_allow_minutes: Optional[float] = None - """The amount of time in minutes a user is allowed access to their LAN. - - A value of 0 will allow LAN access until the next WARP reconnection, such as a - reboot or a laptop waking from sleep. Note that this field is omitted from the - response if null or unset. - """ - - lan_allow_subnet_size: Optional[float] = None - """The size of the subnet for the local access network. - - Note that this field is omitted from the response if null or unset. - """ - - match: Optional[str] = None - """The wirefilter expression to match devices.""" - - name: Optional[str] = None - """The name of the device settings profile.""" - - policy_id: Optional[str] = None - """Device ID.""" - - precedence: Optional[float] = None - """The precedence of the policy. - - Lower values indicate higher precedence. Policies will be evaluated in ascending - order of this field. - """ - - service_mode_v2: Optional[PolicyListResponseItemServiceModeV2] = None - - support_url: Optional[str] = None - """The URL to launch when the Send Feedback button is clicked.""" - - switch_locked: Optional[bool] = None - """ - Whether to allow the user to turn off the WARP switch and disconnect the client. - """ - - -PolicyListResponse = List[PolicyListResponseItem] +PolicyListResponse = List[TeamsDevicesDeviceSettingsPolicy] diff --git a/src/cloudflare/types/zero_trust/devices/posture_get_response.py b/src/cloudflare/types/zero_trust/devices/posture_get_response.py deleted file mode 100644 index 152e2ac7c..000000000 --- a/src/cloudflare/types/zero_trust/devices/posture_get_response.py +++ /dev/null @@ -1,328 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ...._models import BaseModel - -__all__ = [ - "PostureGetResponse", - "Input", - "InputTeamsDevicesFileInputRequest", - "InputTeamsDevicesUniqueClientIDInputRequest", - "InputTeamsDevicesDomainJoinedInputRequest", - "InputTeamsDevicesOSVersionInputRequest", - "InputTeamsDevicesFirewallInputRequest", - "InputTeamsDevicesSentineloneInputRequest", - "InputTeamsDevicesCarbonblackInputRequest", - "InputTeamsDevicesDiskEncryptionInputRequest", - "InputTeamsDevicesApplicationInputRequest", - "InputTeamsDevicesClientCertificateInputRequest", - "InputTeamsDevicesWorkspaceOneInputRequest", - "InputTeamsDevicesCrowdstrikeInputRequest", - "InputTeamsDevicesIntuneInputRequest", - "InputTeamsDevicesKolideInputRequest", - "InputTeamsDevicesTaniumInputRequest", - "InputTeamsDevicesSentineloneS2sInputRequest", - "Match", -] - - -class InputTeamsDevicesFileInputRequest(BaseModel): - operating_system: Literal["windows", "linux", "mac"] - """Operating system""" - - path: str - """File path.""" - - exists: Optional[bool] = None - """Whether or not file exists""" - - sha256: Optional[str] = None - """SHA-256.""" - - thumbprint: Optional[str] = None - """Signing certificate thumbprint.""" - - -class InputTeamsDevicesUniqueClientIDInputRequest(BaseModel): - id: str - """List ID.""" - - operating_system: Literal["android", "ios", "chromeos"] - """Operating System""" - - -class InputTeamsDevicesDomainJoinedInputRequest(BaseModel): - operating_system: Literal["windows"] - """Operating System""" - - domain: Optional[str] = None - """Domain""" - - -class InputTeamsDevicesOSVersionInputRequest(BaseModel): - operating_system: Literal["windows"] - """Operating System""" - - operator: Literal["<", "<=", ">", ">=", "=="] - """Operator""" - - version: str - """Version of OS""" - - os_distro_name: Optional[str] = None - """Operating System Distribution Name (linux only)""" - - os_distro_revision: Optional[str] = None - """Version of OS Distribution (linux only)""" - - os_version_extra: Optional[str] = None - """Additional version data. - - For Mac or iOS, the Product Verison Extra. For Linux, the kernel release - version. (Mac, iOS, and Linux only) - """ - - -class InputTeamsDevicesFirewallInputRequest(BaseModel): - enabled: bool - """Enabled""" - - operating_system: Literal["windows", "mac"] - """Operating System""" - - -class InputTeamsDevicesSentineloneInputRequest(BaseModel): - operating_system: Literal["windows", "linux", "mac"] - """Operating system""" - - path: str - """File path.""" - - sha256: Optional[str] = None - """SHA-256.""" - - thumbprint: Optional[str] = None - """Signing certificate thumbprint.""" - - -class InputTeamsDevicesCarbonblackInputRequest(BaseModel): - operating_system: Literal["windows", "linux", "mac"] - """Operating system""" - - path: str - """File path.""" - - sha256: Optional[str] = None - """SHA-256.""" - - thumbprint: Optional[str] = None - """Signing certificate thumbprint.""" - - -class InputTeamsDevicesDiskEncryptionInputRequest(BaseModel): - check_disks: Optional[List[str]] = FieldInfo(alias="checkDisks", default=None) - """List of volume names to be checked for encryption.""" - - require_all: Optional[bool] = FieldInfo(alias="requireAll", default=None) - """Whether to check all disks for encryption.""" - - -class InputTeamsDevicesApplicationInputRequest(BaseModel): - operating_system: Literal["windows", "linux", "mac"] - """Operating system""" - - path: str - """Path for the application.""" - - sha256: Optional[str] = None - """SHA-256.""" - - thumbprint: Optional[str] = None - """Signing certificate thumbprint.""" - - -class InputTeamsDevicesClientCertificateInputRequest(BaseModel): - certificate_id: str - """UUID of Cloudflare managed certificate.""" - - cn: str - """Common Name that is protected by the certificate""" - - -class InputTeamsDevicesWorkspaceOneInputRequest(BaseModel): - compliance_status: Literal["compliant", "noncompliant", "unknown"] - """Compliance Status""" - - connection_id: str - """Posture Integration ID.""" - - -class InputTeamsDevicesCrowdstrikeInputRequest(BaseModel): - connection_id: str - """Posture Integration ID.""" - - last_seen: Optional[str] = None - """For more details on last seen, please refer to the Crowdstrike documentation.""" - - operator: Optional[Literal["<", "<=", ">", ">=", "=="]] = None - """Operator""" - - os: Optional[str] = None - """Os Version""" - - overall: Optional[str] = None - """overall""" - - sensor_config: Optional[str] = None - """SensorConfig""" - - state: Optional[Literal["online", "offline", "unknown"]] = None - """For more details on state, please refer to the Crowdstrike documentation.""" - - version: Optional[str] = None - """Version""" - - version_operator: Optional[Literal["<", "<=", ">", ">=", "=="]] = FieldInfo(alias="versionOperator", default=None) - """Version Operator""" - - -class InputTeamsDevicesIntuneInputRequest(BaseModel): - compliance_status: Literal["compliant", "noncompliant", "unknown", "notapplicable", "ingraceperiod", "error"] - """Compliance Status""" - - connection_id: str - """Posture Integration ID.""" - - -class InputTeamsDevicesKolideInputRequest(BaseModel): - connection_id: str - """Posture Integration ID.""" - - count_operator: Literal["<", "<=", ">", ">=", "=="] = FieldInfo(alias="countOperator") - """Count Operator""" - - issue_count: str - """The Number of Issues.""" - - -class InputTeamsDevicesTaniumInputRequest(BaseModel): - connection_id: str - """Posture Integration ID.""" - - eid_last_seen: Optional[str] = None - """For more details on eid last seen, refer to the Tanium documentation.""" - - operator: Optional[Literal["<", "<=", ">", ">=", "=="]] = None - """Operator to evaluate risk_level or eid_last_seen.""" - - risk_level: Optional[Literal["low", "medium", "high", "critical"]] = None - """For more details on risk level, refer to the Tanium documentation.""" - - score_operator: Optional[Literal["<", "<=", ">", ">=", "=="]] = FieldInfo(alias="scoreOperator", default=None) - """Score Operator""" - - total_score: Optional[float] = None - """For more details on total score, refer to the Tanium documentation.""" - - -class InputTeamsDevicesSentineloneS2sInputRequest(BaseModel): - connection_id: str - """Posture Integration ID.""" - - active_threats: Optional[float] = None - """The Number of active threats.""" - - infected: Optional[bool] = None - """Whether device is infected.""" - - is_active: Optional[bool] = None - """Whether device is active.""" - - network_status: Optional[Literal["connected", "disconnected", "disconnecting", "connecting"]] = None - """Network status of device.""" - - operator: Optional[Literal["<", "<=", ">", ">=", "=="]] = None - """operator""" - - -Input = Union[ - InputTeamsDevicesFileInputRequest, - InputTeamsDevicesUniqueClientIDInputRequest, - InputTeamsDevicesDomainJoinedInputRequest, - InputTeamsDevicesOSVersionInputRequest, - InputTeamsDevicesFirewallInputRequest, - InputTeamsDevicesSentineloneInputRequest, - InputTeamsDevicesCarbonblackInputRequest, - InputTeamsDevicesDiskEncryptionInputRequest, - InputTeamsDevicesApplicationInputRequest, - InputTeamsDevicesClientCertificateInputRequest, - InputTeamsDevicesWorkspaceOneInputRequest, - InputTeamsDevicesCrowdstrikeInputRequest, - InputTeamsDevicesIntuneInputRequest, - InputTeamsDevicesKolideInputRequest, - InputTeamsDevicesTaniumInputRequest, - InputTeamsDevicesSentineloneS2sInputRequest, -] - - -class Match(BaseModel): - platform: Optional[Literal["windows", "mac", "linux", "android", "ios"]] = None - - -class PostureGetResponse(BaseModel): - id: Optional[str] = None - """API UUID.""" - - description: Optional[str] = None - """The description of the device posture rule.""" - - expiration: Optional[str] = None - """Sets the expiration time for a posture check result. - - If empty, the result remains valid until it is overwritten by new data from the - WARP client. - """ - - input: Optional[Input] = None - """The value to be checked against.""" - - match: Optional[List[Match]] = None - """The conditions that the client must match to run the rule.""" - - name: Optional[str] = None - """The name of the device posture rule.""" - - schedule: Optional[str] = None - """Polling frequency for the WARP client posture check. - - Default: `5m` (poll every five minutes). Minimum: `1m`. - """ - - type: Optional[ - Literal[ - "file", - "application", - "tanium", - "gateway", - "warp", - "disk_encryption", - "sentinelone", - "carbonblack", - "firewall", - "os_version", - "domain_joined", - "client_certificate", - "unique_client_id", - "kolide", - "tanium_s2s", - "crowdstrike_s2s", - "intune", - "workspace_one", - "sentinelone_s2s", - ] - ] = None - """The type of device posture rule.""" 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 eccfe90b0..51e044d8a 100644 --- a/src/cloudflare/types/zero_trust/devices/posture_list_response.py +++ b/src/cloudflare/types/zero_trust/devices/posture_list_response.py @@ -1,332 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Union, Optional -from typing_extensions import Literal +from typing import List -from pydantic import Field as FieldInfo +from .teams_devices_device_posture_rules import TeamsDevicesDevicePostureRules -from ...._models import BaseModel +__all__ = ["PostureListResponse"] -__all__ = [ - "PostureListResponse", - "PostureListResponseItem", - "PostureListResponseItemInput", - "PostureListResponseItemInputTeamsDevicesFileInputRequest", - "PostureListResponseItemInputTeamsDevicesUniqueClientIDInputRequest", - "PostureListResponseItemInputTeamsDevicesDomainJoinedInputRequest", - "PostureListResponseItemInputTeamsDevicesOSVersionInputRequest", - "PostureListResponseItemInputTeamsDevicesFirewallInputRequest", - "PostureListResponseItemInputTeamsDevicesSentineloneInputRequest", - "PostureListResponseItemInputTeamsDevicesCarbonblackInputRequest", - "PostureListResponseItemInputTeamsDevicesDiskEncryptionInputRequest", - "PostureListResponseItemInputTeamsDevicesApplicationInputRequest", - "PostureListResponseItemInputTeamsDevicesClientCertificateInputRequest", - "PostureListResponseItemInputTeamsDevicesWorkspaceOneInputRequest", - "PostureListResponseItemInputTeamsDevicesCrowdstrikeInputRequest", - "PostureListResponseItemInputTeamsDevicesIntuneInputRequest", - "PostureListResponseItemInputTeamsDevicesKolideInputRequest", - "PostureListResponseItemInputTeamsDevicesTaniumInputRequest", - "PostureListResponseItemInputTeamsDevicesSentineloneS2sInputRequest", - "PostureListResponseItemMatch", -] - - -class PostureListResponseItemInputTeamsDevicesFileInputRequest(BaseModel): - operating_system: Literal["windows", "linux", "mac"] - """Operating system""" - - path: str - """File path.""" - - exists: Optional[bool] = None - """Whether or not file exists""" - - sha256: Optional[str] = None - """SHA-256.""" - - thumbprint: Optional[str] = None - """Signing certificate thumbprint.""" - - -class PostureListResponseItemInputTeamsDevicesUniqueClientIDInputRequest(BaseModel): - id: str - """List ID.""" - - operating_system: Literal["android", "ios", "chromeos"] - """Operating System""" - - -class PostureListResponseItemInputTeamsDevicesDomainJoinedInputRequest(BaseModel): - operating_system: Literal["windows"] - """Operating System""" - - domain: Optional[str] = None - """Domain""" - - -class PostureListResponseItemInputTeamsDevicesOSVersionInputRequest(BaseModel): - operating_system: Literal["windows"] - """Operating System""" - - operator: Literal["<", "<=", ">", ">=", "=="] - """Operator""" - - version: str - """Version of OS""" - - os_distro_name: Optional[str] = None - """Operating System Distribution Name (linux only)""" - - os_distro_revision: Optional[str] = None - """Version of OS Distribution (linux only)""" - - os_version_extra: Optional[str] = None - """Additional version data. - - For Mac or iOS, the Product Verison Extra. For Linux, the kernel release - version. (Mac, iOS, and Linux only) - """ - - -class PostureListResponseItemInputTeamsDevicesFirewallInputRequest(BaseModel): - enabled: bool - """Enabled""" - - operating_system: Literal["windows", "mac"] - """Operating System""" - - -class PostureListResponseItemInputTeamsDevicesSentineloneInputRequest(BaseModel): - operating_system: Literal["windows", "linux", "mac"] - """Operating system""" - - path: str - """File path.""" - - sha256: Optional[str] = None - """SHA-256.""" - - thumbprint: Optional[str] = None - """Signing certificate thumbprint.""" - - -class PostureListResponseItemInputTeamsDevicesCarbonblackInputRequest(BaseModel): - operating_system: Literal["windows", "linux", "mac"] - """Operating system""" - - path: str - """File path.""" - - sha256: Optional[str] = None - """SHA-256.""" - - thumbprint: Optional[str] = None - """Signing certificate thumbprint.""" - - -class PostureListResponseItemInputTeamsDevicesDiskEncryptionInputRequest(BaseModel): - check_disks: Optional[List[str]] = FieldInfo(alias="checkDisks", default=None) - """List of volume names to be checked for encryption.""" - - require_all: Optional[bool] = FieldInfo(alias="requireAll", default=None) - """Whether to check all disks for encryption.""" - - -class PostureListResponseItemInputTeamsDevicesApplicationInputRequest(BaseModel): - operating_system: Literal["windows", "linux", "mac"] - """Operating system""" - - path: str - """Path for the application.""" - - sha256: Optional[str] = None - """SHA-256.""" - - thumbprint: Optional[str] = None - """Signing certificate thumbprint.""" - - -class PostureListResponseItemInputTeamsDevicesClientCertificateInputRequest(BaseModel): - certificate_id: str - """UUID of Cloudflare managed certificate.""" - - cn: str - """Common Name that is protected by the certificate""" - - -class PostureListResponseItemInputTeamsDevicesWorkspaceOneInputRequest(BaseModel): - compliance_status: Literal["compliant", "noncompliant", "unknown"] - """Compliance Status""" - - connection_id: str - """Posture Integration ID.""" - - -class PostureListResponseItemInputTeamsDevicesCrowdstrikeInputRequest(BaseModel): - connection_id: str - """Posture Integration ID.""" - - last_seen: Optional[str] = None - """For more details on last seen, please refer to the Crowdstrike documentation.""" - - operator: Optional[Literal["<", "<=", ">", ">=", "=="]] = None - """Operator""" - - os: Optional[str] = None - """Os Version""" - - overall: Optional[str] = None - """overall""" - - sensor_config: Optional[str] = None - """SensorConfig""" - - state: Optional[Literal["online", "offline", "unknown"]] = None - """For more details on state, please refer to the Crowdstrike documentation.""" - - version: Optional[str] = None - """Version""" - - version_operator: Optional[Literal["<", "<=", ">", ">=", "=="]] = FieldInfo(alias="versionOperator", default=None) - """Version Operator""" - - -class PostureListResponseItemInputTeamsDevicesIntuneInputRequest(BaseModel): - compliance_status: Literal["compliant", "noncompliant", "unknown", "notapplicable", "ingraceperiod", "error"] - """Compliance Status""" - - connection_id: str - """Posture Integration ID.""" - - -class PostureListResponseItemInputTeamsDevicesKolideInputRequest(BaseModel): - connection_id: str - """Posture Integration ID.""" - - count_operator: Literal["<", "<=", ">", ">=", "=="] = FieldInfo(alias="countOperator") - """Count Operator""" - - issue_count: str - """The Number of Issues.""" - - -class PostureListResponseItemInputTeamsDevicesTaniumInputRequest(BaseModel): - connection_id: str - """Posture Integration ID.""" - - eid_last_seen: Optional[str] = None - """For more details on eid last seen, refer to the Tanium documentation.""" - - operator: Optional[Literal["<", "<=", ">", ">=", "=="]] = None - """Operator to evaluate risk_level or eid_last_seen.""" - - risk_level: Optional[Literal["low", "medium", "high", "critical"]] = None - """For more details on risk level, refer to the Tanium documentation.""" - - score_operator: Optional[Literal["<", "<=", ">", ">=", "=="]] = FieldInfo(alias="scoreOperator", default=None) - """Score Operator""" - - total_score: Optional[float] = None - """For more details on total score, refer to the Tanium documentation.""" - - -class PostureListResponseItemInputTeamsDevicesSentineloneS2sInputRequest(BaseModel): - connection_id: str - """Posture Integration ID.""" - - active_threats: Optional[float] = None - """The Number of active threats.""" - - infected: Optional[bool] = None - """Whether device is infected.""" - - is_active: Optional[bool] = None - """Whether device is active.""" - - network_status: Optional[Literal["connected", "disconnected", "disconnecting", "connecting"]] = None - """Network status of device.""" - - operator: Optional[Literal["<", "<=", ">", ">=", "=="]] = None - """operator""" - - -PostureListResponseItemInput = Union[ - PostureListResponseItemInputTeamsDevicesFileInputRequest, - PostureListResponseItemInputTeamsDevicesUniqueClientIDInputRequest, - PostureListResponseItemInputTeamsDevicesDomainJoinedInputRequest, - PostureListResponseItemInputTeamsDevicesOSVersionInputRequest, - PostureListResponseItemInputTeamsDevicesFirewallInputRequest, - PostureListResponseItemInputTeamsDevicesSentineloneInputRequest, - PostureListResponseItemInputTeamsDevicesCarbonblackInputRequest, - PostureListResponseItemInputTeamsDevicesDiskEncryptionInputRequest, - PostureListResponseItemInputTeamsDevicesApplicationInputRequest, - PostureListResponseItemInputTeamsDevicesClientCertificateInputRequest, - PostureListResponseItemInputTeamsDevicesWorkspaceOneInputRequest, - PostureListResponseItemInputTeamsDevicesCrowdstrikeInputRequest, - PostureListResponseItemInputTeamsDevicesIntuneInputRequest, - PostureListResponseItemInputTeamsDevicesKolideInputRequest, - PostureListResponseItemInputTeamsDevicesTaniumInputRequest, - PostureListResponseItemInputTeamsDevicesSentineloneS2sInputRequest, -] - - -class PostureListResponseItemMatch(BaseModel): - platform: Optional[Literal["windows", "mac", "linux", "android", "ios"]] = None - - -class PostureListResponseItem(BaseModel): - id: Optional[str] = None - """API UUID.""" - - description: Optional[str] = None - """The description of the device posture rule.""" - - expiration: Optional[str] = None - """Sets the expiration time for a posture check result. - - If empty, the result remains valid until it is overwritten by new data from the - WARP client. - """ - - input: Optional[PostureListResponseItemInput] = None - """The value to be checked against.""" - - match: Optional[List[PostureListResponseItemMatch]] = None - """The conditions that the client must match to run the rule.""" - - name: Optional[str] = None - """The name of the device posture rule.""" - - schedule: Optional[str] = None - """Polling frequency for the WARP client posture check. - - Default: `5m` (poll every five minutes). Minimum: `1m`. - """ - - type: Optional[ - Literal[ - "file", - "application", - "tanium", - "gateway", - "warp", - "disk_encryption", - "sentinelone", - "carbonblack", - "firewall", - "os_version", - "domain_joined", - "client_certificate", - "unique_client_id", - "kolide", - "tanium_s2s", - "crowdstrike_s2s", - "intune", - "workspace_one", - "sentinelone_s2s", - ] - ] = None - """The type of device posture rule.""" - - -PostureListResponse = List[PostureListResponseItem] +PostureListResponse = List[TeamsDevicesDevicePostureRules] diff --git a/src/cloudflare/types/zero_trust/devices/posture_update_response.py b/src/cloudflare/types/zero_trust/devices/posture_update_response.py deleted file mode 100644 index 399ea699e..000000000 --- a/src/cloudflare/types/zero_trust/devices/posture_update_response.py +++ /dev/null @@ -1,328 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ...._models import BaseModel - -__all__ = [ - "PostureUpdateResponse", - "Input", - "InputTeamsDevicesFileInputRequest", - "InputTeamsDevicesUniqueClientIDInputRequest", - "InputTeamsDevicesDomainJoinedInputRequest", - "InputTeamsDevicesOSVersionInputRequest", - "InputTeamsDevicesFirewallInputRequest", - "InputTeamsDevicesSentineloneInputRequest", - "InputTeamsDevicesCarbonblackInputRequest", - "InputTeamsDevicesDiskEncryptionInputRequest", - "InputTeamsDevicesApplicationInputRequest", - "InputTeamsDevicesClientCertificateInputRequest", - "InputTeamsDevicesWorkspaceOneInputRequest", - "InputTeamsDevicesCrowdstrikeInputRequest", - "InputTeamsDevicesIntuneInputRequest", - "InputTeamsDevicesKolideInputRequest", - "InputTeamsDevicesTaniumInputRequest", - "InputTeamsDevicesSentineloneS2sInputRequest", - "Match", -] - - -class InputTeamsDevicesFileInputRequest(BaseModel): - operating_system: Literal["windows", "linux", "mac"] - """Operating system""" - - path: str - """File path.""" - - exists: Optional[bool] = None - """Whether or not file exists""" - - sha256: Optional[str] = None - """SHA-256.""" - - thumbprint: Optional[str] = None - """Signing certificate thumbprint.""" - - -class InputTeamsDevicesUniqueClientIDInputRequest(BaseModel): - id: str - """List ID.""" - - operating_system: Literal["android", "ios", "chromeos"] - """Operating System""" - - -class InputTeamsDevicesDomainJoinedInputRequest(BaseModel): - operating_system: Literal["windows"] - """Operating System""" - - domain: Optional[str] = None - """Domain""" - - -class InputTeamsDevicesOSVersionInputRequest(BaseModel): - operating_system: Literal["windows"] - """Operating System""" - - operator: Literal["<", "<=", ">", ">=", "=="] - """Operator""" - - version: str - """Version of OS""" - - os_distro_name: Optional[str] = None - """Operating System Distribution Name (linux only)""" - - os_distro_revision: Optional[str] = None - """Version of OS Distribution (linux only)""" - - os_version_extra: Optional[str] = None - """Additional version data. - - For Mac or iOS, the Product Verison Extra. For Linux, the kernel release - version. (Mac, iOS, and Linux only) - """ - - -class InputTeamsDevicesFirewallInputRequest(BaseModel): - enabled: bool - """Enabled""" - - operating_system: Literal["windows", "mac"] - """Operating System""" - - -class InputTeamsDevicesSentineloneInputRequest(BaseModel): - operating_system: Literal["windows", "linux", "mac"] - """Operating system""" - - path: str - """File path.""" - - sha256: Optional[str] = None - """SHA-256.""" - - thumbprint: Optional[str] = None - """Signing certificate thumbprint.""" - - -class InputTeamsDevicesCarbonblackInputRequest(BaseModel): - operating_system: Literal["windows", "linux", "mac"] - """Operating system""" - - path: str - """File path.""" - - sha256: Optional[str] = None - """SHA-256.""" - - thumbprint: Optional[str] = None - """Signing certificate thumbprint.""" - - -class InputTeamsDevicesDiskEncryptionInputRequest(BaseModel): - check_disks: Optional[List[str]] = FieldInfo(alias="checkDisks", default=None) - """List of volume names to be checked for encryption.""" - - require_all: Optional[bool] = FieldInfo(alias="requireAll", default=None) - """Whether to check all disks for encryption.""" - - -class InputTeamsDevicesApplicationInputRequest(BaseModel): - operating_system: Literal["windows", "linux", "mac"] - """Operating system""" - - path: str - """Path for the application.""" - - sha256: Optional[str] = None - """SHA-256.""" - - thumbprint: Optional[str] = None - """Signing certificate thumbprint.""" - - -class InputTeamsDevicesClientCertificateInputRequest(BaseModel): - certificate_id: str - """UUID of Cloudflare managed certificate.""" - - cn: str - """Common Name that is protected by the certificate""" - - -class InputTeamsDevicesWorkspaceOneInputRequest(BaseModel): - compliance_status: Literal["compliant", "noncompliant", "unknown"] - """Compliance Status""" - - connection_id: str - """Posture Integration ID.""" - - -class InputTeamsDevicesCrowdstrikeInputRequest(BaseModel): - connection_id: str - """Posture Integration ID.""" - - last_seen: Optional[str] = None - """For more details on last seen, please refer to the Crowdstrike documentation.""" - - operator: Optional[Literal["<", "<=", ">", ">=", "=="]] = None - """Operator""" - - os: Optional[str] = None - """Os Version""" - - overall: Optional[str] = None - """overall""" - - sensor_config: Optional[str] = None - """SensorConfig""" - - state: Optional[Literal["online", "offline", "unknown"]] = None - """For more details on state, please refer to the Crowdstrike documentation.""" - - version: Optional[str] = None - """Version""" - - version_operator: Optional[Literal["<", "<=", ">", ">=", "=="]] = FieldInfo(alias="versionOperator", default=None) - """Version Operator""" - - -class InputTeamsDevicesIntuneInputRequest(BaseModel): - compliance_status: Literal["compliant", "noncompliant", "unknown", "notapplicable", "ingraceperiod", "error"] - """Compliance Status""" - - connection_id: str - """Posture Integration ID.""" - - -class InputTeamsDevicesKolideInputRequest(BaseModel): - connection_id: str - """Posture Integration ID.""" - - count_operator: Literal["<", "<=", ">", ">=", "=="] = FieldInfo(alias="countOperator") - """Count Operator""" - - issue_count: str - """The Number of Issues.""" - - -class InputTeamsDevicesTaniumInputRequest(BaseModel): - connection_id: str - """Posture Integration ID.""" - - eid_last_seen: Optional[str] = None - """For more details on eid last seen, refer to the Tanium documentation.""" - - operator: Optional[Literal["<", "<=", ">", ">=", "=="]] = None - """Operator to evaluate risk_level or eid_last_seen.""" - - risk_level: Optional[Literal["low", "medium", "high", "critical"]] = None - """For more details on risk level, refer to the Tanium documentation.""" - - score_operator: Optional[Literal["<", "<=", ">", ">=", "=="]] = FieldInfo(alias="scoreOperator", default=None) - """Score Operator""" - - total_score: Optional[float] = None - """For more details on total score, refer to the Tanium documentation.""" - - -class InputTeamsDevicesSentineloneS2sInputRequest(BaseModel): - connection_id: str - """Posture Integration ID.""" - - active_threats: Optional[float] = None - """The Number of active threats.""" - - infected: Optional[bool] = None - """Whether device is infected.""" - - is_active: Optional[bool] = None - """Whether device is active.""" - - network_status: Optional[Literal["connected", "disconnected", "disconnecting", "connecting"]] = None - """Network status of device.""" - - operator: Optional[Literal["<", "<=", ">", ">=", "=="]] = None - """operator""" - - -Input = Union[ - InputTeamsDevicesFileInputRequest, - InputTeamsDevicesUniqueClientIDInputRequest, - InputTeamsDevicesDomainJoinedInputRequest, - InputTeamsDevicesOSVersionInputRequest, - InputTeamsDevicesFirewallInputRequest, - InputTeamsDevicesSentineloneInputRequest, - InputTeamsDevicesCarbonblackInputRequest, - InputTeamsDevicesDiskEncryptionInputRequest, - InputTeamsDevicesApplicationInputRequest, - InputTeamsDevicesClientCertificateInputRequest, - InputTeamsDevicesWorkspaceOneInputRequest, - InputTeamsDevicesCrowdstrikeInputRequest, - InputTeamsDevicesIntuneInputRequest, - InputTeamsDevicesKolideInputRequest, - InputTeamsDevicesTaniumInputRequest, - InputTeamsDevicesSentineloneS2sInputRequest, -] - - -class Match(BaseModel): - platform: Optional[Literal["windows", "mac", "linux", "android", "ios"]] = None - - -class PostureUpdateResponse(BaseModel): - id: Optional[str] = None - """API UUID.""" - - description: Optional[str] = None - """The description of the device posture rule.""" - - expiration: Optional[str] = None - """Sets the expiration time for a posture check result. - - If empty, the result remains valid until it is overwritten by new data from the - WARP client. - """ - - input: Optional[Input] = None - """The value to be checked against.""" - - match: Optional[List[Match]] = None - """The conditions that the client must match to run the rule.""" - - name: Optional[str] = None - """The name of the device posture rule.""" - - schedule: Optional[str] = None - """Polling frequency for the WARP client posture check. - - Default: `5m` (poll every five minutes). Minimum: `1m`. - """ - - type: Optional[ - Literal[ - "file", - "application", - "tanium", - "gateway", - "warp", - "disk_encryption", - "sentinelone", - "carbonblack", - "firewall", - "os_version", - "domain_joined", - "client_certificate", - "unique_client_id", - "kolide", - "tanium_s2s", - "crowdstrike_s2s", - "intune", - "workspace_one", - "sentinelone_s2s", - ] - ] = None - """The type of device posture rule.""" diff --git a/src/cloudflare/types/zero_trust/devices/postures/__init__.py b/src/cloudflare/types/zero_trust/devices/postures/__init__.py index 884b042a5..0f28bb0a0 100644 --- a/src/cloudflare/types/zero_trust/devices/postures/__init__.py +++ b/src/cloudflare/types/zero_trust/devices/postures/__init__.py @@ -3,9 +3,9 @@ from __future__ import annotations from .integration_edit_params import IntegrationEditParams as IntegrationEditParams -from .integration_get_response import IntegrationGetResponse as IntegrationGetResponse from .integration_create_params import IntegrationCreateParams as IntegrationCreateParams -from .integration_edit_response import IntegrationEditResponse as IntegrationEditResponse from .integration_list_response import IntegrationListResponse as IntegrationListResponse -from .integration_create_response import IntegrationCreateResponse as IntegrationCreateResponse 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/postures/integration_create_response.py b/src/cloudflare/types/zero_trust/devices/postures/integration_create_response.py deleted file mode 100644 index 641cf629f..000000000 --- a/src/cloudflare/types/zero_trust/devices/postures/integration_create_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from ....._models import BaseModel - -__all__ = ["IntegrationCreateResponse", "Config"] - - -class Config(BaseModel): - api_url: str - """The Workspace One API URL provided in the Workspace One Admin Dashboard.""" - - auth_url: str - """The Workspace One Authorization URL depending on your region.""" - - client_id: str - """The Workspace One client ID provided in the Workspace One Admin Dashboard.""" - - -class IntegrationCreateResponse(BaseModel): - id: Optional[str] = None - """API UUID.""" - - config: Optional[Config] = None - """The configuration object containing third-party integration information.""" - - interval: Optional[str] = None - """The interval between each posture check with the third-party API. - - Use `m` for minutes (e.g. `5m`) and `h` for hours (e.g. `12h`). - """ - - name: Optional[str] = None - """The name of the device posture integration.""" - - type: Optional[ - Literal["workspace_one", "crowdstrike_s2s", "uptycs", "intune", "kolide", "tanium", "sentinelone_s2s"] - ] = None - """The type of device posture integration.""" diff --git a/src/cloudflare/types/zero_trust/devices/postures/integration_get_response.py b/src/cloudflare/types/zero_trust/devices/postures/integration_get_response.py deleted file mode 100644 index 021d3bde8..000000000 --- a/src/cloudflare/types/zero_trust/devices/postures/integration_get_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from ....._models import BaseModel - -__all__ = ["IntegrationGetResponse", "Config"] - - -class Config(BaseModel): - api_url: str - """The Workspace One API URL provided in the Workspace One Admin Dashboard.""" - - auth_url: str - """The Workspace One Authorization URL depending on your region.""" - - client_id: str - """The Workspace One client ID provided in the Workspace One Admin Dashboard.""" - - -class IntegrationGetResponse(BaseModel): - id: Optional[str] = None - """API UUID.""" - - config: Optional[Config] = None - """The configuration object containing third-party integration information.""" - - interval: Optional[str] = None - """The interval between each posture check with the third-party API. - - Use `m` for minutes (e.g. `5m`) and `h` for hours (e.g. `12h`). - """ - - name: Optional[str] = None - """The name of the device posture integration.""" - - type: Optional[ - Literal["workspace_one", "crowdstrike_s2s", "uptycs", "intune", "kolide", "tanium", "sentinelone_s2s"] - ] = None - """The type of device posture integration.""" diff --git a/src/cloudflare/types/zero_trust/devices/postures/integration_list_response.py b/src/cloudflare/types/zero_trust/devices/postures/integration_list_response.py index b07416184..a0ecff82b 100644 --- a/src/cloudflare/types/zero_trust/devices/postures/integration_list_response.py +++ b/src/cloudflare/types/zero_trust/devices/postures/integration_list_response.py @@ -1,44 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from typing_extensions import Literal +from typing import List -from ....._models import BaseModel +from .teams_devices_device_posture_integrations import TeamsDevicesDevicePostureIntegrations -__all__ = ["IntegrationListResponse", "IntegrationListResponseItem", "IntegrationListResponseItemConfig"] +__all__ = ["IntegrationListResponse"] - -class IntegrationListResponseItemConfig(BaseModel): - api_url: str - """The Workspace One API URL provided in the Workspace One Admin Dashboard.""" - - auth_url: str - """The Workspace One Authorization URL depending on your region.""" - - client_id: str - """The Workspace One client ID provided in the Workspace One Admin Dashboard.""" - - -class IntegrationListResponseItem(BaseModel): - id: Optional[str] = None - """API UUID.""" - - config: Optional[IntegrationListResponseItemConfig] = None - """The configuration object containing third-party integration information.""" - - interval: Optional[str] = None - """The interval between each posture check with the third-party API. - - Use `m` for minutes (e.g. `5m`) and `h` for hours (e.g. `12h`). - """ - - name: Optional[str] = None - """The name of the device posture integration.""" - - type: Optional[ - Literal["workspace_one", "crowdstrike_s2s", "uptycs", "intune", "kolide", "tanium", "sentinelone_s2s"] - ] = None - """The type of device posture integration.""" - - -IntegrationListResponse = List[IntegrationListResponseItem] +IntegrationListResponse = List[TeamsDevicesDevicePostureIntegrations] diff --git a/src/cloudflare/types/zero_trust/devices/postures/integration_edit_response.py b/src/cloudflare/types/zero_trust/devices/postures/teams_devices_device_posture_integrations.py similarity index 90% rename from src/cloudflare/types/zero_trust/devices/postures/integration_edit_response.py rename to src/cloudflare/types/zero_trust/devices/postures/teams_devices_device_posture_integrations.py index 52a77c277..dbab9e194 100644 --- a/src/cloudflare/types/zero_trust/devices/postures/integration_edit_response.py +++ b/src/cloudflare/types/zero_trust/devices/postures/teams_devices_device_posture_integrations.py @@ -5,7 +5,7 @@ from typing_extensions import Literal from ....._models import BaseModel -__all__ = ["IntegrationEditResponse", "Config"] +__all__ = ["TeamsDevicesDevicePostureIntegrations", "Config"] class Config(BaseModel): @@ -19,7 +19,7 @@ class Config(BaseModel): """The Workspace One client ID provided in the Workspace One Admin Dashboard.""" -class IntegrationEditResponse(BaseModel): +class TeamsDevicesDevicePostureIntegrations(BaseModel): id: Optional[str] = None """API UUID.""" diff --git a/src/cloudflare/types/zero_trust/devices/setting_update_response.py b/src/cloudflare/types/zero_trust/devices/setting_update_response.py deleted file mode 100644 index 5bd387955..000000000 --- a/src/cloudflare/types/zero_trust/devices/setting_update_response.py +++ /dev/null @@ -1,21 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional - -from ...._models import BaseModel - -__all__ = ["SettingUpdateResponse"] - - -class SettingUpdateResponse(BaseModel): - gateway_proxy_enabled: Optional[bool] = None - """Enable gateway proxy filtering on TCP.""" - - gateway_udp_proxy_enabled: Optional[bool] = None - """Enable gateway proxy filtering on UDP.""" - - root_certificate_installation_enabled: Optional[bool] = None - """Enable installation of cloudflare managed root certificate.""" - - use_zt_virtual_ip: Optional[bool] = None - """Enable using CGNAT virtual IPv4.""" diff --git a/src/cloudflare/types/zero_trust/devices/dex_test_get_response.py b/src/cloudflare/types/zero_trust/devices/teams_devices_device_dex_test_schemas_http.py similarity index 87% rename from src/cloudflare/types/zero_trust/devices/dex_test_get_response.py rename to src/cloudflare/types/zero_trust/devices/teams_devices_device_dex_test_schemas_http.py index 8c79e6454..602863615 100644 --- a/src/cloudflare/types/zero_trust/devices/dex_test_get_response.py +++ b/src/cloudflare/types/zero_trust/devices/teams_devices_device_dex_test_schemas_http.py @@ -4,7 +4,7 @@ from typing import Optional from ...._models import BaseModel -__all__ = ["DEXTestGetResponse", "Data"] +__all__ = ["TeamsDevicesDeviceDEXTestSchemasHTTP", "Data"] class Data(BaseModel): @@ -18,7 +18,7 @@ class Data(BaseModel): """The HTTP request method type.""" -class DEXTestGetResponse(BaseModel): +class TeamsDevicesDeviceDEXTestSchemasHTTP(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_create_response.py b/src/cloudflare/types/zero_trust/devices/teams_devices_device_managed_networks.py similarity index 90% rename from src/cloudflare/types/zero_trust/devices/network_create_response.py rename to src/cloudflare/types/zero_trust/devices/teams_devices_device_managed_networks.py index dd803652b..b77094c02 100644 --- a/src/cloudflare/types/zero_trust/devices/network_create_response.py +++ b/src/cloudflare/types/zero_trust/devices/teams_devices_device_managed_networks.py @@ -5,7 +5,7 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["NetworkCreateResponse", "Config"] +__all__ = ["TeamsDevicesDeviceManagedNetworks", "Config"] class Config(BaseModel): @@ -23,7 +23,7 @@ class Config(BaseModel): """ -class NetworkCreateResponse(BaseModel): +class TeamsDevicesDeviceManagedNetworks(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/posture_create_response.py b/src/cloudflare/types/zero_trust/devices/teams_devices_device_posture_rules.py similarity index 99% rename from src/cloudflare/types/zero_trust/devices/posture_create_response.py rename to src/cloudflare/types/zero_trust/devices/teams_devices_device_posture_rules.py index d64a6fac1..47f49e6b9 100644 --- a/src/cloudflare/types/zero_trust/devices/posture_create_response.py +++ b/src/cloudflare/types/zero_trust/devices/teams_devices_device_posture_rules.py @@ -8,7 +8,7 @@ from pydantic import Field as FieldInfo from ...._models import BaseModel __all__ = [ - "PostureCreateResponse", + "TeamsDevicesDevicePostureRules", "Input", "InputTeamsDevicesFileInputRequest", "InputTeamsDevicesUniqueClientIDInputRequest", @@ -273,7 +273,7 @@ class Match(BaseModel): platform: Optional[Literal["windows", "mac", "linux", "android", "ios"]] = None -class PostureCreateResponse(BaseModel): +class TeamsDevicesDevicePostureRules(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/teams_devices_device_settings_policy.py new file mode 100644 index 000000000..65a63cc4b --- /dev/null +++ b/src/cloudflare/types/zero_trust/devices/teams_devices_device_settings_policy.py @@ -0,0 +1,103 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import List, Optional + +from .policies import TeamsDevicesSplitTunnel, TeamsDevicesFallbackDomain, TeamsDevicesSplitTunnelInclude +from ...._models import BaseModel + +__all__ = ["TeamsDevicesDeviceSettingsPolicy", "ServiceModeV2"] + + +class ServiceModeV2(BaseModel): + mode: Optional[str] = None + """The mode to run the WARP client under.""" + + port: Optional[float] = None + """The port number when used with proxy mode.""" + + +class TeamsDevicesDeviceSettingsPolicy(BaseModel): + allow_mode_switch: Optional[bool] = None + """Whether to allow the user to switch WARP between modes.""" + + allow_updates: Optional[bool] = None + """ + Whether to receive update notifications when a new version of the client is + available. + """ + + allowed_to_leave: Optional[bool] = None + """Whether to allow devices to leave the organization.""" + + auto_connect: Optional[float] = None + """The amount of time in minutes to reconnect after having been disabled.""" + + captive_portal: Optional[float] = None + """Turn on the captive portal after the specified amount of time.""" + + default: Optional[bool] = None + """Whether the policy is the default policy for an account.""" + + description: Optional[str] = None + """A description of the policy.""" + + disable_auto_fallback: Optional[bool] = None + """ + If the `dns_server` field of a fallback domain is not present, the client will + fall back to a best guess of the default/system DNS resolvers unless this policy + option is set to `true`. + """ + + enabled: Optional[bool] = None + """Whether the policy will be applied to matching devices.""" + + exclude: Optional[List[TeamsDevicesSplitTunnel]] = None + + exclude_office_ips: Optional[bool] = None + """Whether to add Microsoft IPs to Split Tunnel exclusions.""" + + fallback_domains: Optional[List[TeamsDevicesFallbackDomain]] = None + + gateway_unique_id: Optional[str] = None + + include: Optional[List[TeamsDevicesSplitTunnelInclude]] = None + + lan_allow_minutes: Optional[float] = None + """The amount of time in minutes a user is allowed access to their LAN. + + A value of 0 will allow LAN access until the next WARP reconnection, such as a + reboot or a laptop waking from sleep. Note that this field is omitted from the + response if null or unset. + """ + + lan_allow_subnet_size: Optional[float] = None + """The size of the subnet for the local access network. + + Note that this field is omitted from the response if null or unset. + """ + + match: Optional[str] = None + """The wirefilter expression to match devices.""" + + name: Optional[str] = None + """The name of the device settings profile.""" + + policy_id: Optional[str] = None + """Device ID.""" + + precedence: Optional[float] = None + """The precedence of the policy. + + Lower values indicate higher precedence. Policies will be evaluated in ascending + order of this field. + """ + + service_mode_v2: Optional[ServiceModeV2] = None + + support_url: Optional[str] = None + """The URL to launch when the Send Feedback button is clicked.""" + + switch_locked: Optional[bool] = None + """ + Whether to allow the user to turn off the WARP switch and disconnect the client. + """ diff --git a/src/cloudflare/types/zero_trust/devices/setting_list_response.py b/src/cloudflare/types/zero_trust/devices/teams_devices_zero_trust_account_device_settings.py similarity index 82% rename from src/cloudflare/types/zero_trust/devices/setting_list_response.py rename to src/cloudflare/types/zero_trust/devices/teams_devices_zero_trust_account_device_settings.py index 72ec1a20e..32c3da2d7 100644 --- a/src/cloudflare/types/zero_trust/devices/setting_list_response.py +++ b/src/cloudflare/types/zero_trust/devices/teams_devices_zero_trust_account_device_settings.py @@ -4,10 +4,10 @@ from typing import Optional from ...._models import BaseModel -__all__ = ["SettingListResponse"] +__all__ = ["TeamsDevicesZeroTrustAccountDeviceSettings"] -class SettingListResponse(BaseModel): +class TeamsDevicesZeroTrustAccountDeviceSettings(BaseModel): gateway_proxy_enabled: Optional[bool] = None """Enable gateway proxy filtering on TCP.""" diff --git a/src/cloudflare/types/zero_trust/dex/__init__.py b/src/cloudflare/types/zero_trust/dex/__init__.py index 81d3da82c..bd6722d84 100644 --- a/src/cloudflare/types/zero_trust/dex/__init__.py +++ b/src/cloudflare/types/zero_trust/dex/__init__.py @@ -7,12 +7,19 @@ 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 .http_test_get_response import HTTPTestGetResponse as HTTPTestGetResponse from .traceroute_test_get_params import TracerouteTestGetParams as TracerouteTestGetParams -from .traceroute_test_get_response import TracerouteTestGetResponse as TracerouteTestGetResponse from .traceroute_test_percentiles_params import TracerouteTestPercentilesParams as TracerouteTestPercentilesParams +from .digital_experience_monitoring_tests import DigitalExperienceMonitoringTests as DigitalExperienceMonitoringTests from .traceroute_test_network_path_params import TracerouteTestNetworkPathParams as TracerouteTestNetworkPathParams -from .traceroute_test_percentiles_response import TracerouteTestPercentilesResponse as TracerouteTestPercentilesResponse -from .traceroute_test_network_path_response import ( - TracerouteTestNetworkPathResponse as TracerouteTestNetworkPathResponse, +from .digital_experience_monitoring_http_details import ( + DigitalExperienceMonitoringHTTPDetails as DigitalExperienceMonitoringHTTPDetails, +) +from .digital_experience_monitoring_traceroute_details import ( + DigitalExperienceMonitoringTracerouteDetails as DigitalExperienceMonitoringTracerouteDetails, +) +from .digital_experience_monitoring_traceroute_test_network_path import ( + DigitalExperienceMonitoringTracerouteTestNetworkPath as DigitalExperienceMonitoringTracerouteTestNetworkPath, +) +from .digital_experience_monitoring_traceroute_details_percentiles import ( + DigitalExperienceMonitoringTracerouteDetailsPercentiles as DigitalExperienceMonitoringTracerouteDetailsPercentiles, ) diff --git a/src/cloudflare/types/zero_trust/dex/http_test_get_response.py b/src/cloudflare/types/zero_trust/dex/digital_experience_monitoring_http_details.py similarity index 98% rename from src/cloudflare/types/zero_trust/dex/http_test_get_response.py rename to src/cloudflare/types/zero_trust/dex/digital_experience_monitoring_http_details.py index 5879bb8bc..7bd82b150 100644 --- a/src/cloudflare/types/zero_trust/dex/http_test_get_response.py +++ b/src/cloudflare/types/zero_trust/dex/digital_experience_monitoring_http_details.py @@ -8,7 +8,7 @@ from pydantic import Field as FieldInfo from ...._models import BaseModel __all__ = [ - "HTTPTestGetResponse", + "DigitalExperienceMonitoringHTTPDetails", "HTTPStats", "HTTPStatsDNSResponseTimeMs", "HTTPStatsDNSResponseTimeMsSlot", @@ -194,7 +194,7 @@ class HTTPStatsByColo(BaseModel): """Count of unique devices that have run this test in the given time period""" -class HTTPTestGetResponse(BaseModel): +class DigitalExperienceMonitoringHTTPDetails(BaseModel): host: Optional[str] = None """The url of the HTTP synthetic application test""" diff --git a/src/cloudflare/types/zero_trust/dex/digital_experience_monitoring_tests.py b/src/cloudflare/types/zero_trust/dex/digital_experience_monitoring_tests.py new file mode 100644 index 000000000..b702e4f6d --- /dev/null +++ b/src/cloudflare/types/zero_trust/dex/digital_experience_monitoring_tests.py @@ -0,0 +1,311 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import List, Optional +from typing_extensions import Literal + +from pydantic import Field as FieldInfo + +from ...._models import BaseModel + +__all__ = [ + "DigitalExperienceMonitoringTests", + "OverviewMetrics", + "Test", + "TestHTTPResults", + "TestHTTPResultsResourceFetchTime", + "TestHTTPResultsResourceFetchTimeHistory", + "TestHTTPResultsResourceFetchTimeHistoryTimePeriod", + "TestHTTPResultsResourceFetchTimeOverTime", + "TestHTTPResultsResourceFetchTimeOverTimeTimePeriod", + "TestHTTPResultsResourceFetchTimeOverTimeValue", + "TestHTTPResultsByColo", + "TestHTTPResultsByColoResourceFetchTime", + "TestHTTPResultsByColoResourceFetchTimeHistory", + "TestHTTPResultsByColoResourceFetchTimeHistoryTimePeriod", + "TestHTTPResultsByColoResourceFetchTimeOverTime", + "TestHTTPResultsByColoResourceFetchTimeOverTimeTimePeriod", + "TestHTTPResultsByColoResourceFetchTimeOverTimeValue", + "TestTracerouteResults", + "TestTracerouteResultsRoundTripTime", + "TestTracerouteResultsRoundTripTimeHistory", + "TestTracerouteResultsRoundTripTimeHistoryTimePeriod", + "TestTracerouteResultsRoundTripTimeOverTime", + "TestTracerouteResultsRoundTripTimeOverTimeTimePeriod", + "TestTracerouteResultsRoundTripTimeOverTimeValue", + "TestTracerouteResultsByColo", + "TestTracerouteResultsByColoRoundTripTime", + "TestTracerouteResultsByColoRoundTripTimeHistory", + "TestTracerouteResultsByColoRoundTripTimeHistoryTimePeriod", + "TestTracerouteResultsByColoRoundTripTimeOverTime", + "TestTracerouteResultsByColoRoundTripTimeOverTimeTimePeriod", + "TestTracerouteResultsByColoRoundTripTimeOverTimeValue", +] + + +class OverviewMetrics(BaseModel): + tests_total: int = FieldInfo(alias="testsTotal") + """number of tests.""" + + avg_traceroute_availability_pct: Optional[float] = FieldInfo(alias="avgTracerouteAvailabilityPct", default=None) + """percentage availability for all traceroutes results in response""" + + +class TestHTTPResultsResourceFetchTimeHistoryTimePeriod(BaseModel): + __test__ = False + units: Literal["hours", "days", "testRuns"] + + value: int + + +class TestHTTPResultsResourceFetchTimeHistory(BaseModel): + __test__ = False + time_period: TestHTTPResultsResourceFetchTimeHistoryTimePeriod = FieldInfo(alias="timePeriod") + + avg_ms: Optional[int] = FieldInfo(alias="avgMs", default=None) + + delta_pct: Optional[float] = FieldInfo(alias="deltaPct", default=None) + + +class TestHTTPResultsResourceFetchTimeOverTimeTimePeriod(BaseModel): + __test__ = False + units: Literal["hours", "days", "testRuns"] + + value: int + + +class TestHTTPResultsResourceFetchTimeOverTimeValue(BaseModel): + __test__ = False + avg_ms: int = FieldInfo(alias="avgMs") + + timestamp: str + + +class TestHTTPResultsResourceFetchTimeOverTime(BaseModel): + __test__ = False + time_period: TestHTTPResultsResourceFetchTimeOverTimeTimePeriod = FieldInfo(alias="timePeriod") + + values: List[TestHTTPResultsResourceFetchTimeOverTimeValue] + + +class TestHTTPResultsResourceFetchTime(BaseModel): + __test__ = False + history: List[TestHTTPResultsResourceFetchTimeHistory] + + avg_ms: Optional[int] = FieldInfo(alias="avgMs", default=None) + + over_time: Optional[TestHTTPResultsResourceFetchTimeOverTime] = FieldInfo(alias="overTime", default=None) + + +class TestHTTPResults(BaseModel): + __test__ = False + resource_fetch_time: TestHTTPResultsResourceFetchTime = FieldInfo(alias="resourceFetchTime") + + +class TestHTTPResultsByColoResourceFetchTimeHistoryTimePeriod(BaseModel): + __test__ = False + units: Literal["hours", "days", "testRuns"] + + value: int + + +class TestHTTPResultsByColoResourceFetchTimeHistory(BaseModel): + __test__ = False + time_period: TestHTTPResultsByColoResourceFetchTimeHistoryTimePeriod = FieldInfo(alias="timePeriod") + + avg_ms: Optional[int] = FieldInfo(alias="avgMs", default=None) + + delta_pct: Optional[float] = FieldInfo(alias="deltaPct", default=None) + + +class TestHTTPResultsByColoResourceFetchTimeOverTimeTimePeriod(BaseModel): + __test__ = False + units: Literal["hours", "days", "testRuns"] + + value: int + + +class TestHTTPResultsByColoResourceFetchTimeOverTimeValue(BaseModel): + __test__ = False + avg_ms: int = FieldInfo(alias="avgMs") + + timestamp: str + + +class TestHTTPResultsByColoResourceFetchTimeOverTime(BaseModel): + __test__ = False + time_period: TestHTTPResultsByColoResourceFetchTimeOverTimeTimePeriod = FieldInfo(alias="timePeriod") + + values: List[TestHTTPResultsByColoResourceFetchTimeOverTimeValue] + + +class TestHTTPResultsByColoResourceFetchTime(BaseModel): + __test__ = False + history: List[TestHTTPResultsByColoResourceFetchTimeHistory] + + avg_ms: Optional[int] = FieldInfo(alias="avgMs", default=None) + + over_time: Optional[TestHTTPResultsByColoResourceFetchTimeOverTime] = FieldInfo(alias="overTime", default=None) + + +class TestHTTPResultsByColo(BaseModel): + __test__ = False + colo: str + """Cloudflare colo""" + + resource_fetch_time: TestHTTPResultsByColoResourceFetchTime = FieldInfo(alias="resourceFetchTime") + + +class TestTracerouteResultsRoundTripTimeHistoryTimePeriod(BaseModel): + __test__ = False + units: Literal["hours", "days", "testRuns"] + + value: int + + +class TestTracerouteResultsRoundTripTimeHistory(BaseModel): + __test__ = False + time_period: TestTracerouteResultsRoundTripTimeHistoryTimePeriod = FieldInfo(alias="timePeriod") + + avg_ms: Optional[int] = FieldInfo(alias="avgMs", default=None) + + delta_pct: Optional[float] = FieldInfo(alias="deltaPct", default=None) + + +class TestTracerouteResultsRoundTripTimeOverTimeTimePeriod(BaseModel): + __test__ = False + units: Literal["hours", "days", "testRuns"] + + value: int + + +class TestTracerouteResultsRoundTripTimeOverTimeValue(BaseModel): + __test__ = False + avg_ms: int = FieldInfo(alias="avgMs") + + timestamp: str + + +class TestTracerouteResultsRoundTripTimeOverTime(BaseModel): + __test__ = False + time_period: TestTracerouteResultsRoundTripTimeOverTimeTimePeriod = FieldInfo(alias="timePeriod") + + values: List[TestTracerouteResultsRoundTripTimeOverTimeValue] + + +class TestTracerouteResultsRoundTripTime(BaseModel): + __test__ = False + history: List[TestTracerouteResultsRoundTripTimeHistory] + + avg_ms: Optional[int] = FieldInfo(alias="avgMs", default=None) + + over_time: Optional[TestTracerouteResultsRoundTripTimeOverTime] = FieldInfo(alias="overTime", default=None) + + +class TestTracerouteResults(BaseModel): + __test__ = False + round_trip_time: TestTracerouteResultsRoundTripTime = FieldInfo(alias="roundTripTime") + + +class TestTracerouteResultsByColoRoundTripTimeHistoryTimePeriod(BaseModel): + __test__ = False + units: Literal["hours", "days", "testRuns"] + + value: int + + +class TestTracerouteResultsByColoRoundTripTimeHistory(BaseModel): + __test__ = False + time_period: TestTracerouteResultsByColoRoundTripTimeHistoryTimePeriod = FieldInfo(alias="timePeriod") + + avg_ms: Optional[int] = FieldInfo(alias="avgMs", default=None) + + delta_pct: Optional[float] = FieldInfo(alias="deltaPct", default=None) + + +class TestTracerouteResultsByColoRoundTripTimeOverTimeTimePeriod(BaseModel): + __test__ = False + units: Literal["hours", "days", "testRuns"] + + value: int + + +class TestTracerouteResultsByColoRoundTripTimeOverTimeValue(BaseModel): + __test__ = False + avg_ms: int = FieldInfo(alias="avgMs") + + timestamp: str + + +class TestTracerouteResultsByColoRoundTripTimeOverTime(BaseModel): + __test__ = False + time_period: TestTracerouteResultsByColoRoundTripTimeOverTimeTimePeriod = FieldInfo(alias="timePeriod") + + values: List[TestTracerouteResultsByColoRoundTripTimeOverTimeValue] + + +class TestTracerouteResultsByColoRoundTripTime(BaseModel): + __test__ = False + history: List[TestTracerouteResultsByColoRoundTripTimeHistory] + + avg_ms: Optional[int] = FieldInfo(alias="avgMs", default=None) + + over_time: Optional[TestTracerouteResultsByColoRoundTripTimeOverTime] = FieldInfo(alias="overTime", default=None) + + +class TestTracerouteResultsByColo(BaseModel): + __test__ = False + colo: str + """Cloudflare colo""" + + round_trip_time: TestTracerouteResultsByColoRoundTripTime = FieldInfo(alias="roundTripTime") + + +class Test(BaseModel): + __test__ = False + id: str + """API Resource UUID tag.""" + + created: str + """date the test was created.""" + + description: str + """the test description defined during configuration""" + + enabled: bool + """if true, then the test will run on targeted devices. + + Else, the test will not run. + """ + + host: str + + interval: str + """The interval at which the synthetic application test is set to run.""" + + kind: Literal["http", "traceroute"] + """test type, http or traceroute""" + + name: str + """name given to this test""" + + updated: str + + http_results: Optional[TestHTTPResults] = FieldInfo(alias="httpResults", default=None) + + http_results_by_colo: Optional[List[TestHTTPResultsByColo]] = FieldInfo(alias="httpResultsByColo", default=None) + + method: Optional[str] = None + """for HTTP, the method to use when running the test""" + + traceroute_results: Optional[TestTracerouteResults] = FieldInfo(alias="tracerouteResults", default=None) + + traceroute_results_by_colo: Optional[List[TestTracerouteResultsByColo]] = FieldInfo( + alias="tracerouteResultsByColo", default=None + ) + + +class DigitalExperienceMonitoringTests(BaseModel): + overview_metrics: OverviewMetrics = FieldInfo(alias="overviewMetrics") + + tests: List[Test] + """array of test results objects.""" diff --git a/src/cloudflare/types/zero_trust/dex/traceroute_test_get_response.py b/src/cloudflare/types/zero_trust/dex/digital_experience_monitoring_traceroute_details.py similarity index 98% rename from src/cloudflare/types/zero_trust/dex/traceroute_test_get_response.py rename to src/cloudflare/types/zero_trust/dex/digital_experience_monitoring_traceroute_details.py index 2921eabf7..e04e47d7a 100644 --- a/src/cloudflare/types/zero_trust/dex/traceroute_test_get_response.py +++ b/src/cloudflare/types/zero_trust/dex/digital_experience_monitoring_traceroute_details.py @@ -8,7 +8,7 @@ from pydantic import Field as FieldInfo from ...._models import BaseModel __all__ = [ - "TracerouteTestGetResponse", + "DigitalExperienceMonitoringTracerouteDetails", "TracerouteStats", "TracerouteStatsAvailabilityPct", "TracerouteStatsAvailabilityPctSlot", @@ -210,7 +210,7 @@ class TracerouteStatsByColo(BaseModel): """Count of unique devices that have run this test in the given time period""" -class TracerouteTestGetResponse(BaseModel): +class DigitalExperienceMonitoringTracerouteDetails(BaseModel): host: str """The host of the Traceroute synthetic application test""" diff --git a/src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_response.py b/src/cloudflare/types/zero_trust/dex/digital_experience_monitoring_traceroute_details_percentiles.py similarity index 88% rename from src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_response.py rename to src/cloudflare/types/zero_trust/dex/digital_experience_monitoring_traceroute_details_percentiles.py index 9de7bd1eb..4854b8729 100644 --- a/src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_response.py +++ b/src/cloudflare/types/zero_trust/dex/digital_experience_monitoring_traceroute_details_percentiles.py @@ -6,7 +6,7 @@ from pydantic import Field as FieldInfo from ...._models import BaseModel -__all__ = ["TracerouteTestPercentilesResponse", "HopsCount", "PacketLossPct", "RoundTripTimeMs"] +__all__ = ["DigitalExperienceMonitoringTracerouteDetailsPercentiles", "HopsCount", "PacketLossPct", "RoundTripTimeMs"] class HopsCount(BaseModel): @@ -51,7 +51,7 @@ class RoundTripTimeMs(BaseModel): """p99 observed in the time period""" -class TracerouteTestPercentilesResponse(BaseModel): +class DigitalExperienceMonitoringTracerouteDetailsPercentiles(BaseModel): hops_count: Optional[HopsCount] = FieldInfo(alias="hopsCount", default=None) packet_loss_pct: Optional[PacketLossPct] = FieldInfo(alias="packetLossPct", default=None) diff --git a/src/cloudflare/types/zero_trust/dex/traceroute_test_network_path_response.py b/src/cloudflare/types/zero_trust/dex/digital_experience_monitoring_traceroute_test_network_path.py similarity index 89% rename from src/cloudflare/types/zero_trust/dex/traceroute_test_network_path_response.py rename to src/cloudflare/types/zero_trust/dex/digital_experience_monitoring_traceroute_test_network_path.py index 0fe9b3ef4..4eea468e8 100644 --- a/src/cloudflare/types/zero_trust/dex/traceroute_test_network_path_response.py +++ b/src/cloudflare/types/zero_trust/dex/digital_experience_monitoring_traceroute_test_network_path.py @@ -7,7 +7,12 @@ from pydantic import Field as FieldInfo from ...._models import BaseModel -__all__ = ["TracerouteTestNetworkPathResponse", "NetworkPath", "NetworkPathSlot", "NetworkPathSampling"] +__all__ = [ + "DigitalExperienceMonitoringTracerouteTestNetworkPath", + "NetworkPath", + "NetworkPathSlot", + "NetworkPathSampling", +] class NetworkPathSlot(BaseModel): @@ -46,7 +51,7 @@ class NetworkPath(BaseModel): """ -class TracerouteTestNetworkPathResponse(BaseModel): +class DigitalExperienceMonitoringTracerouteTestNetworkPath(BaseModel): id: str """API Resource UUID tag.""" diff --git a/src/cloudflare/types/zero_trust/dex/fleet_status/__init__.py b/src/cloudflare/types/zero_trust/dex/fleet_status/__init__.py index 5c7e9119f..a6f5421b7 100644 --- a/src/cloudflare/types/zero_trust/dex/fleet_status/__init__.py +++ b/src/cloudflare/types/zero_trust/dex/fleet_status/__init__.py @@ -5,5 +5,5 @@ from __future__ import annotations from .live_list_params import LiveListParams as LiveListParams from .device_list_params import DeviceListParams as DeviceListParams from .live_list_response import LiveListResponse as LiveListResponse -from .device_list_response import DeviceListResponse as DeviceListResponse from .over_time_list_params import OverTimeListParams as OverTimeListParams +from .digital_experience_monitoring_device import DigitalExperienceMonitoringDevice as DigitalExperienceMonitoringDevice diff --git a/src/cloudflare/types/zero_trust/dex/fleet_status/device_list_response.py b/src/cloudflare/types/zero_trust/dex/fleet_status/digital_experience_monitoring_device.py similarity index 86% rename from src/cloudflare/types/zero_trust/dex/fleet_status/device_list_response.py rename to src/cloudflare/types/zero_trust/dex/fleet_status/digital_experience_monitoring_device.py index ba0fcdb96..6c385983a 100644 --- a/src/cloudflare/types/zero_trust/dex/fleet_status/device_list_response.py +++ b/src/cloudflare/types/zero_trust/dex/fleet_status/digital_experience_monitoring_device.py @@ -6,10 +6,10 @@ from pydantic import Field as FieldInfo from ....._models import BaseModel -__all__ = ["DeviceListResponse"] +__all__ = ["DigitalExperienceMonitoringDevice"] -class DeviceListResponse(BaseModel): +class DigitalExperienceMonitoringDevice(BaseModel): colo: str """Cloudflare colo""" diff --git a/src/cloudflare/types/zero_trust/dex/http_tests/__init__.py b/src/cloudflare/types/zero_trust/dex/http_tests/__init__.py index 76d49d615..6beeb0364 100644 --- a/src/cloudflare/types/zero_trust/dex/http_tests/__init__.py +++ b/src/cloudflare/types/zero_trust/dex/http_tests/__init__.py @@ -3,4 +3,6 @@ from __future__ import annotations from .percentile_list_params import PercentileListParams as PercentileListParams -from .percentile_list_response import PercentileListResponse as PercentileListResponse +from .digital_experience_monitoring_http_details_percentiles import ( + DigitalExperienceMonitoringHTTPDetailsPercentiles as DigitalExperienceMonitoringHTTPDetailsPercentiles, +) diff --git a/src/cloudflare/types/zero_trust/dex/http_tests/percentile_list_response.py b/src/cloudflare/types/zero_trust/dex/http_tests/digital_experience_monitoring_http_details_percentiles.py similarity index 87% rename from src/cloudflare/types/zero_trust/dex/http_tests/percentile_list_response.py rename to src/cloudflare/types/zero_trust/dex/http_tests/digital_experience_monitoring_http_details_percentiles.py index 6c23ed751..71a1ca654 100644 --- a/src/cloudflare/types/zero_trust/dex/http_tests/percentile_list_response.py +++ b/src/cloudflare/types/zero_trust/dex/http_tests/digital_experience_monitoring_http_details_percentiles.py @@ -6,7 +6,12 @@ from pydantic import Field as FieldInfo from ....._models import BaseModel -__all__ = ["PercentileListResponse", "DNSResponseTimeMs", "ResourceFetchTimeMs", "ServerResponseTimeMs"] +__all__ = [ + "DigitalExperienceMonitoringHTTPDetailsPercentiles", + "DNSResponseTimeMs", + "ResourceFetchTimeMs", + "ServerResponseTimeMs", +] class DNSResponseTimeMs(BaseModel): @@ -51,7 +56,7 @@ class ServerResponseTimeMs(BaseModel): """p99 observed in the time period""" -class PercentileListResponse(BaseModel): +class DigitalExperienceMonitoringHTTPDetailsPercentiles(BaseModel): dns_response_time_ms: Optional[DNSResponseTimeMs] = FieldInfo(alias="dnsResponseTimeMs", default=None) resource_fetch_time_ms: Optional[ResourceFetchTimeMs] = FieldInfo(alias="resourceFetchTimeMs", default=None) diff --git a/src/cloudflare/types/zero_trust/dex/test_list_response.py b/src/cloudflare/types/zero_trust/dex/test_list_response.py index 92db8c713..a84b4e839 100644 --- a/src/cloudflare/types/zero_trust/dex/test_list_response.py +++ b/src/cloudflare/types/zero_trust/dex/test_list_response.py @@ -3,47 +3,10 @@ from typing import List, Optional from typing_extensions import Literal -from pydantic import Field as FieldInfo - from ...._models import BaseModel +from .digital_experience_monitoring_tests import DigitalExperienceMonitoringTests -__all__ = [ - "TestListResponse", - "Error", - "Message", - "Result", - "ResultOverviewMetrics", - "ResultTest", - "ResultTestHTTPResults", - "ResultTestHTTPResultsResourceFetchTime", - "ResultTestHTTPResultsResourceFetchTimeHistory", - "ResultTestHTTPResultsResourceFetchTimeHistoryTimePeriod", - "ResultTestHTTPResultsResourceFetchTimeOverTime", - "ResultTestHTTPResultsResourceFetchTimeOverTimeTimePeriod", - "ResultTestHTTPResultsResourceFetchTimeOverTimeValue", - "ResultTestHTTPResultsByColo", - "ResultTestHTTPResultsByColoResourceFetchTime", - "ResultTestHTTPResultsByColoResourceFetchTimeHistory", - "ResultTestHTTPResultsByColoResourceFetchTimeHistoryTimePeriod", - "ResultTestHTTPResultsByColoResourceFetchTimeOverTime", - "ResultTestHTTPResultsByColoResourceFetchTimeOverTimeTimePeriod", - "ResultTestHTTPResultsByColoResourceFetchTimeOverTimeValue", - "ResultTestTracerouteResults", - "ResultTestTracerouteResultsRoundTripTime", - "ResultTestTracerouteResultsRoundTripTimeHistory", - "ResultTestTracerouteResultsRoundTripTimeHistoryTimePeriod", - "ResultTestTracerouteResultsRoundTripTimeOverTime", - "ResultTestTracerouteResultsRoundTripTimeOverTimeTimePeriod", - "ResultTestTracerouteResultsRoundTripTimeOverTimeValue", - "ResultTestTracerouteResultsByColo", - "ResultTestTracerouteResultsByColoRoundTripTime", - "ResultTestTracerouteResultsByColoRoundTripTimeHistory", - "ResultTestTracerouteResultsByColoRoundTripTimeHistoryTimePeriod", - "ResultTestTracerouteResultsByColoRoundTripTimeOverTime", - "ResultTestTracerouteResultsByColoRoundTripTimeOverTimeTimePeriod", - "ResultTestTracerouteResultsByColoRoundTripTimeOverTimeValue", - "ResultInfo", -] +__all__ = ["TestListResponse", "Error", "Message", "ResultInfo"] class Error(BaseModel): @@ -58,252 +21,6 @@ class Message(BaseModel): message: str -class ResultOverviewMetrics(BaseModel): - tests_total: int = FieldInfo(alias="testsTotal") - """number of tests.""" - - avg_traceroute_availability_pct: Optional[float] = FieldInfo(alias="avgTracerouteAvailabilityPct", default=None) - """percentage availability for all traceroutes results in response""" - - -class ResultTestHTTPResultsResourceFetchTimeHistoryTimePeriod(BaseModel): - units: Literal["hours", "days", "testRuns"] - - value: int - - -class ResultTestHTTPResultsResourceFetchTimeHistory(BaseModel): - time_period: ResultTestHTTPResultsResourceFetchTimeHistoryTimePeriod = FieldInfo(alias="timePeriod") - - avg_ms: Optional[int] = FieldInfo(alias="avgMs", default=None) - - delta_pct: Optional[float] = FieldInfo(alias="deltaPct", default=None) - - -class ResultTestHTTPResultsResourceFetchTimeOverTimeTimePeriod(BaseModel): - units: Literal["hours", "days", "testRuns"] - - value: int - - -class ResultTestHTTPResultsResourceFetchTimeOverTimeValue(BaseModel): - avg_ms: int = FieldInfo(alias="avgMs") - - timestamp: str - - -class ResultTestHTTPResultsResourceFetchTimeOverTime(BaseModel): - time_period: ResultTestHTTPResultsResourceFetchTimeOverTimeTimePeriod = FieldInfo(alias="timePeriod") - - values: List[ResultTestHTTPResultsResourceFetchTimeOverTimeValue] - - -class ResultTestHTTPResultsResourceFetchTime(BaseModel): - history: List[ResultTestHTTPResultsResourceFetchTimeHistory] - - avg_ms: Optional[int] = FieldInfo(alias="avgMs", default=None) - - over_time: Optional[ResultTestHTTPResultsResourceFetchTimeOverTime] = FieldInfo(alias="overTime", default=None) - - -class ResultTestHTTPResults(BaseModel): - resource_fetch_time: ResultTestHTTPResultsResourceFetchTime = FieldInfo(alias="resourceFetchTime") - - -class ResultTestHTTPResultsByColoResourceFetchTimeHistoryTimePeriod(BaseModel): - units: Literal["hours", "days", "testRuns"] - - value: int - - -class ResultTestHTTPResultsByColoResourceFetchTimeHistory(BaseModel): - time_period: ResultTestHTTPResultsByColoResourceFetchTimeHistoryTimePeriod = FieldInfo(alias="timePeriod") - - avg_ms: Optional[int] = FieldInfo(alias="avgMs", default=None) - - delta_pct: Optional[float] = FieldInfo(alias="deltaPct", default=None) - - -class ResultTestHTTPResultsByColoResourceFetchTimeOverTimeTimePeriod(BaseModel): - units: Literal["hours", "days", "testRuns"] - - value: int - - -class ResultTestHTTPResultsByColoResourceFetchTimeOverTimeValue(BaseModel): - avg_ms: int = FieldInfo(alias="avgMs") - - timestamp: str - - -class ResultTestHTTPResultsByColoResourceFetchTimeOverTime(BaseModel): - time_period: ResultTestHTTPResultsByColoResourceFetchTimeOverTimeTimePeriod = FieldInfo(alias="timePeriod") - - values: List[ResultTestHTTPResultsByColoResourceFetchTimeOverTimeValue] - - -class ResultTestHTTPResultsByColoResourceFetchTime(BaseModel): - history: List[ResultTestHTTPResultsByColoResourceFetchTimeHistory] - - avg_ms: Optional[int] = FieldInfo(alias="avgMs", default=None) - - over_time: Optional[ResultTestHTTPResultsByColoResourceFetchTimeOverTime] = FieldInfo( - alias="overTime", default=None - ) - - -class ResultTestHTTPResultsByColo(BaseModel): - colo: str - """Cloudflare colo""" - - resource_fetch_time: ResultTestHTTPResultsByColoResourceFetchTime = FieldInfo(alias="resourceFetchTime") - - -class ResultTestTracerouteResultsRoundTripTimeHistoryTimePeriod(BaseModel): - units: Literal["hours", "days", "testRuns"] - - value: int - - -class ResultTestTracerouteResultsRoundTripTimeHistory(BaseModel): - time_period: ResultTestTracerouteResultsRoundTripTimeHistoryTimePeriod = FieldInfo(alias="timePeriod") - - avg_ms: Optional[int] = FieldInfo(alias="avgMs", default=None) - - delta_pct: Optional[float] = FieldInfo(alias="deltaPct", default=None) - - -class ResultTestTracerouteResultsRoundTripTimeOverTimeTimePeriod(BaseModel): - units: Literal["hours", "days", "testRuns"] - - value: int - - -class ResultTestTracerouteResultsRoundTripTimeOverTimeValue(BaseModel): - avg_ms: int = FieldInfo(alias="avgMs") - - timestamp: str - - -class ResultTestTracerouteResultsRoundTripTimeOverTime(BaseModel): - time_period: ResultTestTracerouteResultsRoundTripTimeOverTimeTimePeriod = FieldInfo(alias="timePeriod") - - values: List[ResultTestTracerouteResultsRoundTripTimeOverTimeValue] - - -class ResultTestTracerouteResultsRoundTripTime(BaseModel): - history: List[ResultTestTracerouteResultsRoundTripTimeHistory] - - avg_ms: Optional[int] = FieldInfo(alias="avgMs", default=None) - - over_time: Optional[ResultTestTracerouteResultsRoundTripTimeOverTime] = FieldInfo(alias="overTime", default=None) - - -class ResultTestTracerouteResults(BaseModel): - round_trip_time: ResultTestTracerouteResultsRoundTripTime = FieldInfo(alias="roundTripTime") - - -class ResultTestTracerouteResultsByColoRoundTripTimeHistoryTimePeriod(BaseModel): - units: Literal["hours", "days", "testRuns"] - - value: int - - -class ResultTestTracerouteResultsByColoRoundTripTimeHistory(BaseModel): - time_period: ResultTestTracerouteResultsByColoRoundTripTimeHistoryTimePeriod = FieldInfo(alias="timePeriod") - - avg_ms: Optional[int] = FieldInfo(alias="avgMs", default=None) - - delta_pct: Optional[float] = FieldInfo(alias="deltaPct", default=None) - - -class ResultTestTracerouteResultsByColoRoundTripTimeOverTimeTimePeriod(BaseModel): - units: Literal["hours", "days", "testRuns"] - - value: int - - -class ResultTestTracerouteResultsByColoRoundTripTimeOverTimeValue(BaseModel): - avg_ms: int = FieldInfo(alias="avgMs") - - timestamp: str - - -class ResultTestTracerouteResultsByColoRoundTripTimeOverTime(BaseModel): - time_period: ResultTestTracerouteResultsByColoRoundTripTimeOverTimeTimePeriod = FieldInfo(alias="timePeriod") - - values: List[ResultTestTracerouteResultsByColoRoundTripTimeOverTimeValue] - - -class ResultTestTracerouteResultsByColoRoundTripTime(BaseModel): - history: List[ResultTestTracerouteResultsByColoRoundTripTimeHistory] - - avg_ms: Optional[int] = FieldInfo(alias="avgMs", default=None) - - over_time: Optional[ResultTestTracerouteResultsByColoRoundTripTimeOverTime] = FieldInfo( - alias="overTime", default=None - ) - - -class ResultTestTracerouteResultsByColo(BaseModel): - colo: str - """Cloudflare colo""" - - round_trip_time: ResultTestTracerouteResultsByColoRoundTripTime = FieldInfo(alias="roundTripTime") - - -class ResultTest(BaseModel): - id: str - """API Resource UUID tag.""" - - created: str - """date the test was created.""" - - description: str - """the test description defined during configuration""" - - enabled: bool - """if true, then the test will run on targeted devices. - - Else, the test will not run. - """ - - host: str - - interval: str - """The interval at which the synthetic application test is set to run.""" - - kind: Literal["http", "traceroute"] - """test type, http or traceroute""" - - name: str - """name given to this test""" - - updated: str - - http_results: Optional[ResultTestHTTPResults] = FieldInfo(alias="httpResults", default=None) - - http_results_by_colo: Optional[List[ResultTestHTTPResultsByColo]] = FieldInfo( - alias="httpResultsByColo", default=None - ) - - method: Optional[str] = None - """for HTTP, the method to use when running the test""" - - traceroute_results: Optional[ResultTestTracerouteResults] = FieldInfo(alias="tracerouteResults", default=None) - - traceroute_results_by_colo: Optional[List[ResultTestTracerouteResultsByColo]] = FieldInfo( - alias="tracerouteResultsByColo", default=None - ) - - -class Result(BaseModel): - overview_metrics: ResultOverviewMetrics = FieldInfo(alias="overviewMetrics") - - tests: List[ResultTest] - """array of test results objects.""" - - class ResultInfo(BaseModel): count: Optional[float] = None """Total number of results for the requested service""" @@ -324,7 +41,7 @@ class TestListResponse(BaseModel): messages: List[Message] - result: Result + result: DigitalExperienceMonitoringTests success: Literal[True] """Whether the API call was successful""" diff --git a/src/cloudflare/types/zero_trust/dex/tests/__init__.py b/src/cloudflare/types/zero_trust/dex/tests/__init__.py index 1d73213f0..b50cde9aa 100644 --- a/src/cloudflare/types/zero_trust/dex/tests/__init__.py +++ b/src/cloudflare/types/zero_trust/dex/tests/__init__.py @@ -3,4 +3,6 @@ from __future__ import annotations from .unique_device_list_params import UniqueDeviceListParams as UniqueDeviceListParams -from .unique_device_list_response import UniqueDeviceListResponse as UniqueDeviceListResponse +from .digital_experience_monitoring_unique_devices import ( + DigitalExperienceMonitoringUniqueDevices as DigitalExperienceMonitoringUniqueDevices, +) diff --git a/src/cloudflare/types/zero_trust/dex/tests/unique_device_list_response.py b/src/cloudflare/types/zero_trust/dex/tests/digital_experience_monitoring_unique_devices.py similarity index 68% rename from src/cloudflare/types/zero_trust/dex/tests/unique_device_list_response.py rename to src/cloudflare/types/zero_trust/dex/tests/digital_experience_monitoring_unique_devices.py index c644f06e4..6ae6eb888 100644 --- a/src/cloudflare/types/zero_trust/dex/tests/unique_device_list_response.py +++ b/src/cloudflare/types/zero_trust/dex/tests/digital_experience_monitoring_unique_devices.py @@ -4,9 +4,9 @@ from pydantic import Field as FieldInfo from ....._models import BaseModel -__all__ = ["UniqueDeviceListResponse"] +__all__ = ["DigitalExperienceMonitoringUniqueDevices"] -class UniqueDeviceListResponse(BaseModel): +class DigitalExperienceMonitoringUniqueDevices(BaseModel): unique_devices_total: int = FieldInfo(alias="uniqueDevicesTotal") """total number of unique devices""" diff --git a/src/cloudflare/types/zero_trust/dex/traceroute_test_results/__init__.py b/src/cloudflare/types/zero_trust/dex/traceroute_test_results/__init__.py index 9f238d48e..31b265593 100644 --- a/src/cloudflare/types/zero_trust/dex/traceroute_test_results/__init__.py +++ b/src/cloudflare/types/zero_trust/dex/traceroute_test_results/__init__.py @@ -2,4 +2,6 @@ from __future__ import annotations -from .network_path_list_response import NetworkPathListResponse as NetworkPathListResponse +from .digital_experience_monitoring_traceroute_test_result_network_path import ( + DigitalExperienceMonitoringTracerouteTestResultNetworkPath as DigitalExperienceMonitoringTracerouteTestResultNetworkPath, +) diff --git a/src/cloudflare/types/zero_trust/dex/traceroute_test_results/network_path_list_response.py b/src/cloudflare/types/zero_trust/dex/traceroute_test_results/digital_experience_monitoring_traceroute_test_result_network_path.py similarity index 89% rename from src/cloudflare/types/zero_trust/dex/traceroute_test_results/network_path_list_response.py rename to src/cloudflare/types/zero_trust/dex/traceroute_test_results/digital_experience_monitoring_traceroute_test_result_network_path.py index a1e294303..2a3c99843 100644 --- a/src/cloudflare/types/zero_trust/dex/traceroute_test_results/network_path_list_response.py +++ b/src/cloudflare/types/zero_trust/dex/traceroute_test_results/digital_experience_monitoring_traceroute_test_result_network_path.py @@ -7,7 +7,7 @@ from pydantic import Field as FieldInfo from ....._models import BaseModel -__all__ = ["NetworkPathListResponse", "Hop", "HopLocation"] +__all__ = ["DigitalExperienceMonitoringTracerouteTestResultNetworkPath", "Hop", "HopLocation"] class HopLocation(BaseModel): @@ -38,7 +38,7 @@ class Hop(BaseModel): rtt_ms: Optional[int] = FieldInfo(alias="rttMs", default=None) -class NetworkPathListResponse(BaseModel): +class DigitalExperienceMonitoringTracerouteTestResultNetworkPath(BaseModel): hops: List[Hop] """an array of the hops taken by the device to reach the end destination""" diff --git a/src/cloudflare/types/zero_trust/dlp/__init__.py b/src/cloudflare/types/zero_trust/dlp/__init__.py index e348fa01a..cda51f7e0 100644 --- a/src/cloudflare/types/zero_trust/dlp/__init__.py +++ b/src/cloudflare/types/zero_trust/dlp/__init__.py @@ -2,14 +2,14 @@ from __future__ import annotations -from .dataset_get_response import DatasetGetResponse as DatasetGetResponse +from .dlp_dataset import DLPDataset as DLPDataset +from .dlp_profiles import DLPProfiles as DLPProfiles +from .dlp_dataset_array import DLPDatasetArray as DLPDatasetArray +from .dlp_dataset_creation import DLPDatasetCreation as DLPDatasetCreation from .profile_get_response import ProfileGetResponse as ProfileGetResponse from .dataset_create_params import DatasetCreateParams as DatasetCreateParams -from .dataset_list_response import DatasetListResponse as DatasetListResponse from .dataset_update_params import DatasetUpdateParams as DatasetUpdateParams from .profile_list_response import ProfileListResponse as ProfileListResponse -from .dataset_create_response import DatasetCreateResponse as DatasetCreateResponse -from .dataset_update_response import DatasetUpdateResponse as DatasetUpdateResponse 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/dataset_create_response.py b/src/cloudflare/types/zero_trust/dlp/dataset_create_response.py deleted file mode 100644 index 28d4cb8bc..000000000 --- a/src/cloudflare/types/zero_trust/dlp/dataset_create_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["DatasetCreateResponse", "Dataset", "DatasetUpload"] - - -class DatasetUpload(BaseModel): - num_cells: int - - status: Literal["empty", "uploading", "failed", "complete"] - - version: int - - -class Dataset(BaseModel): - id: str - - created_at: datetime - - name: str - - num_cells: int - - secret: bool - - status: Literal["empty", "uploading", "failed", "complete"] - - updated_at: datetime - - uploads: List[DatasetUpload] - - description: Optional[str] = None - - -class DatasetCreateResponse(BaseModel): - dataset: Dataset - - max_cells: int - - version: int - """The version to use when uploading the dataset.""" - - secret: Optional[str] = None - """The secret to use for Exact Data Match datasets. - - This is not present in Custom Wordlists. - """ diff --git a/src/cloudflare/types/zero_trust/dlp/dataset_list_response.py b/src/cloudflare/types/zero_trust/dlp/dataset_list_response.py deleted file mode 100644 index 2adf05358..000000000 --- a/src/cloudflare/types/zero_trust/dlp/dataset_list_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["DatasetListResponse", "DatasetListResponseItem", "DatasetListResponseItemUpload"] - - -class DatasetListResponseItemUpload(BaseModel): - num_cells: int - - status: Literal["empty", "uploading", "failed", "complete"] - - version: int - - -class DatasetListResponseItem(BaseModel): - id: str - - created_at: datetime - - name: str - - num_cells: int - - secret: bool - - status: Literal["empty", "uploading", "failed", "complete"] - - updated_at: datetime - - uploads: List[DatasetListResponseItemUpload] - - description: Optional[str] = None - - -DatasetListResponse = List[DatasetListResponseItem] diff --git a/src/cloudflare/types/zero_trust/dlp/dataset_update_response.py b/src/cloudflare/types/zero_trust/dlp/dataset_update_response.py deleted file mode 100644 index 5bff3f94e..000000000 --- a/src/cloudflare/types/zero_trust/dlp/dataset_update_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["DatasetUpdateResponse", "Upload"] - - -class Upload(BaseModel): - num_cells: int - - status: Literal["empty", "uploading", "failed", "complete"] - - version: int - - -class DatasetUpdateResponse(BaseModel): - id: str - - created_at: datetime - - name: str - - num_cells: int - - secret: bool - - status: Literal["empty", "uploading", "failed", "complete"] - - updated_at: datetime - - uploads: List[Upload] - - description: Optional[str] = None diff --git a/src/cloudflare/types/zero_trust/dlp/datasets/__init__.py b/src/cloudflare/types/zero_trust/dlp/datasets/__init__.py index cb8cd233e..22387af26 100644 --- a/src/cloudflare/types/zero_trust/dlp/datasets/__init__.py +++ b/src/cloudflare/types/zero_trust/dlp/datasets/__init__.py @@ -2,5 +2,4 @@ from __future__ import annotations -from .upload_edit_response import UploadEditResponse as UploadEditResponse -from .upload_create_response import UploadCreateResponse as UploadCreateResponse +from .dlp_dataset_new_version import DLPDatasetNewVersion as DLPDatasetNewVersion diff --git a/src/cloudflare/types/zero_trust/dlp/datasets/upload_create_response.py b/src/cloudflare/types/zero_trust/dlp/datasets/dlp_dataset_new_version.py similarity index 72% rename from src/cloudflare/types/zero_trust/dlp/datasets/upload_create_response.py rename to src/cloudflare/types/zero_trust/dlp/datasets/dlp_dataset_new_version.py index e6d83eb7e..2f61b2c75 100644 --- a/src/cloudflare/types/zero_trust/dlp/datasets/upload_create_response.py +++ b/src/cloudflare/types/zero_trust/dlp/datasets/dlp_dataset_new_version.py @@ -4,10 +4,10 @@ from typing import Optional from ....._models import BaseModel -__all__ = ["UploadCreateResponse"] +__all__ = ["DLPDatasetNewVersion"] -class UploadCreateResponse(BaseModel): +class DLPDatasetNewVersion(BaseModel): max_cells: int version: int diff --git a/src/cloudflare/types/zero_trust/dlp/datasets/upload_edit_response.py b/src/cloudflare/types/zero_trust/dlp/datasets/upload_edit_response.py deleted file mode 100644 index d65edeb9a..000000000 --- a/src/cloudflare/types/zero_trust/dlp/datasets/upload_edit_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from ....._models import BaseModel - -__all__ = ["UploadEditResponse", "Upload"] - - -class Upload(BaseModel): - num_cells: int - - status: Literal["empty", "uploading", "failed", "complete"] - - version: int - - -class UploadEditResponse(BaseModel): - id: str - - created_at: datetime - - name: str - - num_cells: int - - secret: bool - - status: Literal["empty", "uploading", "failed", "complete"] - - updated_at: datetime - - uploads: List[Upload] - - description: Optional[str] = None diff --git a/src/cloudflare/types/zero_trust/dlp/dataset_get_response.py b/src/cloudflare/types/zero_trust/dlp/dlp_dataset.py similarity index 87% rename from src/cloudflare/types/zero_trust/dlp/dataset_get_response.py rename to src/cloudflare/types/zero_trust/dlp/dlp_dataset.py index f08d0620c..168a513d4 100644 --- a/src/cloudflare/types/zero_trust/dlp/dataset_get_response.py +++ b/src/cloudflare/types/zero_trust/dlp/dlp_dataset.py @@ -6,7 +6,7 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["DatasetGetResponse", "Upload"] +__all__ = ["DLPDataset", "Upload"] class Upload(BaseModel): @@ -17,7 +17,7 @@ class Upload(BaseModel): version: int -class DatasetGetResponse(BaseModel): +class DLPDataset(BaseModel): id: str created_at: datetime diff --git a/src/cloudflare/types/zero_trust/dlp/dlp_dataset_array.py b/src/cloudflare/types/zero_trust/dlp/dlp_dataset_array.py new file mode 100644 index 000000000..fc74fb8ee --- /dev/null +++ b/src/cloudflare/types/zero_trust/dlp/dlp_dataset_array.py @@ -0,0 +1,9 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import List + +from .dlp_dataset import DLPDataset + +__all__ = ["DLPDatasetArray"] + +DLPDatasetArray = List[DLPDataset] diff --git a/src/cloudflare/types/zero_trust/dlp/dlp_dataset_creation.py b/src/cloudflare/types/zero_trust/dlp/dlp_dataset_creation.py new file mode 100644 index 000000000..ade7beb53 --- /dev/null +++ b/src/cloudflare/types/zero_trust/dlp/dlp_dataset_creation.py @@ -0,0 +1,23 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional + +from ...._models import BaseModel +from .dlp_dataset import DLPDataset + +__all__ = ["DLPDatasetCreation"] + + +class DLPDatasetCreation(BaseModel): + dataset: DLPDataset + + max_cells: int + + version: int + """The version to use when uploading the dataset.""" + + secret: Optional[str] = None + """The secret to use for Exact Data Match datasets. + + This is not present in Custom Wordlists. + """ diff --git a/src/cloudflare/types/zero_trust/dlp/dlp_profiles.py b/src/cloudflare/types/zero_trust/dlp/dlp_profiles.py new file mode 100644 index 000000000..4332d8fdb --- /dev/null +++ b/src/cloudflare/types/zero_trust/dlp/dlp_profiles.py @@ -0,0 +1,52 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import List, Union, Optional +from datetime import datetime +from typing_extensions import Literal + +from .profiles import DLPCustomProfile, DLPPredefinedProfile +from ...._models import BaseModel + +__all__ = ["DLPProfiles", "DLPIntegrationProfile", "DLPIntegrationProfileEntry"] + + +class DLPIntegrationProfileEntry(BaseModel): + id: Optional[str] = None + """The ID for this entry""" + + created_at: Optional[datetime] = None + + enabled: Optional[bool] = None + """Whether the entry is enabled or not.""" + + name: Optional[str] = None + """The name of the entry.""" + + profile_id: Optional[object] = None + """ID of the parent profile""" + + updated_at: Optional[datetime] = None + + +class DLPIntegrationProfile(BaseModel): + id: Optional[str] = None + """The ID for this profile""" + + created_at: Optional[datetime] = None + + description: Optional[str] = None + """The description of the profile.""" + + entries: Optional[List[DLPIntegrationProfileEntry]] = None + """The entries for this profile.""" + + name: Optional[str] = None + """The name of the profile.""" + + type: Optional[Literal["integration"]] = None + """The type of the profile.""" + + updated_at: Optional[datetime] = None + + +DLPProfiles = Union[DLPPredefinedProfile, DLPCustomProfile, DLPIntegrationProfile] diff --git a/src/cloudflare/types/zero_trust/dlp/profile_get_response.py b/src/cloudflare/types/zero_trust/dlp/profile_get_response.py index fd8134ae4..7841f94d6 100644 --- a/src/cloudflare/types/zero_trust/dlp/profile_get_response.py +++ b/src/cloudflare/types/zero_trust/dlp/profile_get_response.py @@ -4,154 +4,10 @@ from typing import List, Union, Optional from datetime import datetime from typing_extensions import Literal +from .profiles import DLPCustomProfile, DLPPredefinedProfile from ...._models import BaseModel -__all__ = [ - "ProfileGetResponse", - "DLPPredefinedProfile", - "DLPPredefinedProfileContextAwareness", - "DLPPredefinedProfileContextAwarenessSkip", - "DLPPredefinedProfileEntry", - "DLPCustomProfile", - "DLPCustomProfileContextAwareness", - "DLPCustomProfileContextAwarenessSkip", - "DLPCustomProfileEntry", - "DLPCustomProfileEntryPattern", - "DLPIntegrationProfile", - "DLPIntegrationProfileEntry", -] - - -class DLPPredefinedProfileContextAwarenessSkip(BaseModel): - files: bool - """If the content type is a file, skip context analysis and return all matches.""" - - -class DLPPredefinedProfileContextAwareness(BaseModel): - enabled: bool - """ - If true, scan the context of predefined entries to only return matches - surrounded by keywords. - """ - - skip: DLPPredefinedProfileContextAwarenessSkip - """Content types to exclude from context analysis and return all matches.""" - - -class DLPPredefinedProfileEntry(BaseModel): - id: Optional[str] = None - """The ID for this entry""" - - enabled: Optional[bool] = None - """Whether the entry is enabled or not.""" - - name: Optional[str] = None - """The name of the entry.""" - - profile_id: Optional[object] = None - """ID of the parent profile""" - - -class DLPPredefinedProfile(BaseModel): - id: Optional[str] = None - """The ID for this profile""" - - allowed_match_count: Optional[float] = None - """Related DLP policies will trigger when the match count exceeds the number set.""" - - context_awareness: Optional[DLPPredefinedProfileContextAwareness] = None - """ - Scan the context of predefined entries to only return matches surrounded by - keywords. - """ - - entries: Optional[List[DLPPredefinedProfileEntry]] = None - """The entries for this profile.""" - - name: Optional[str] = None - """The name of the profile.""" - - type: Optional[Literal["predefined"]] = None - """The type of the profile.""" - - -class DLPCustomProfileContextAwarenessSkip(BaseModel): - files: bool - """If the content type is a file, skip context analysis and return all matches.""" - - -class DLPCustomProfileContextAwareness(BaseModel): - enabled: bool - """ - If true, scan the context of predefined entries to only return matches - surrounded by keywords. - """ - - skip: DLPCustomProfileContextAwarenessSkip - """Content types to exclude from context analysis and return all matches.""" - - -class DLPCustomProfileEntryPattern(BaseModel): - regex: str - """The regex pattern.""" - - validation: Optional[Literal["luhn"]] = None - """Validation algorithm for the pattern. - - This algorithm will get run on potential matches, and if it returns false, the - entry will not be matched. - """ - - -class DLPCustomProfileEntry(BaseModel): - id: Optional[str] = None - """The ID for this entry""" - - created_at: Optional[datetime] = None - - enabled: Optional[bool] = None - """Whether the entry is enabled or not.""" - - name: Optional[str] = None - """The name of the entry.""" - - pattern: Optional[DLPCustomProfileEntryPattern] = None - """A pattern that matches an entry""" - - profile_id: Optional[object] = None - """ID of the parent profile""" - - updated_at: Optional[datetime] = None - - -class DLPCustomProfile(BaseModel): - id: Optional[str] = None - """The ID for this profile""" - - allowed_match_count: Optional[float] = None - """Related DLP policies will trigger when the match count exceeds the number set.""" - - context_awareness: Optional[DLPCustomProfileContextAwareness] = None - """ - Scan the context of predefined entries to only return matches surrounded by - keywords. - """ - - created_at: Optional[datetime] = None - - description: Optional[str] = None - """The description of the profile.""" - - entries: Optional[List[DLPCustomProfileEntry]] = None - """The entries for this profile.""" - - name: Optional[str] = None - """The name of the profile.""" - - type: Optional[Literal["custom"]] = None - """The type of the profile.""" - - updated_at: Optional[datetime] = None +__all__ = ["ProfileGetResponse", "DLPIntegrationProfile", "DLPIntegrationProfileEntry"] class DLPIntegrationProfileEntry(BaseModel): diff --git a/src/cloudflare/types/zero_trust/dlp/profile_list_response.py b/src/cloudflare/types/zero_trust/dlp/profile_list_response.py index 341fd67e6..991ada028 100644 --- a/src/cloudflare/types/zero_trust/dlp/profile_list_response.py +++ b/src/cloudflare/types/zero_trust/dlp/profile_list_response.py @@ -1,203 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ...._models import BaseModel +from .dlp_profiles import DLPProfiles -__all__ = [ - "ProfileListResponse", - "ProfileListResponseItem", - "ProfileListResponseItemDLPPredefinedProfile", - "ProfileListResponseItemDLPPredefinedProfileContextAwareness", - "ProfileListResponseItemDLPPredefinedProfileContextAwarenessSkip", - "ProfileListResponseItemDLPPredefinedProfileEntry", - "ProfileListResponseItemDLPCustomProfile", - "ProfileListResponseItemDLPCustomProfileContextAwareness", - "ProfileListResponseItemDLPCustomProfileContextAwarenessSkip", - "ProfileListResponseItemDLPCustomProfileEntry", - "ProfileListResponseItemDLPCustomProfileEntryPattern", - "ProfileListResponseItemDLPIntegrationProfile", - "ProfileListResponseItemDLPIntegrationProfileEntry", -] +__all__ = ["ProfileListResponse"] - -class ProfileListResponseItemDLPPredefinedProfileContextAwarenessSkip(BaseModel): - files: bool - """If the content type is a file, skip context analysis and return all matches.""" - - -class ProfileListResponseItemDLPPredefinedProfileContextAwareness(BaseModel): - enabled: bool - """ - If true, scan the context of predefined entries to only return matches - surrounded by keywords. - """ - - skip: ProfileListResponseItemDLPPredefinedProfileContextAwarenessSkip - """Content types to exclude from context analysis and return all matches.""" - - -class ProfileListResponseItemDLPPredefinedProfileEntry(BaseModel): - id: Optional[str] = None - """The ID for this entry""" - - enabled: Optional[bool] = None - """Whether the entry is enabled or not.""" - - name: Optional[str] = None - """The name of the entry.""" - - profile_id: Optional[object] = None - """ID of the parent profile""" - - -class ProfileListResponseItemDLPPredefinedProfile(BaseModel): - id: Optional[str] = None - """The ID for this profile""" - - allowed_match_count: Optional[float] = None - """Related DLP policies will trigger when the match count exceeds the number set.""" - - context_awareness: Optional[ProfileListResponseItemDLPPredefinedProfileContextAwareness] = None - """ - Scan the context of predefined entries to only return matches surrounded by - keywords. - """ - - entries: Optional[List[ProfileListResponseItemDLPPredefinedProfileEntry]] = None - """The entries for this profile.""" - - name: Optional[str] = None - """The name of the profile.""" - - type: Optional[Literal["predefined"]] = None - """The type of the profile.""" - - -class ProfileListResponseItemDLPCustomProfileContextAwarenessSkip(BaseModel): - files: bool - """If the content type is a file, skip context analysis and return all matches.""" - - -class ProfileListResponseItemDLPCustomProfileContextAwareness(BaseModel): - enabled: bool - """ - If true, scan the context of predefined entries to only return matches - surrounded by keywords. - """ - - skip: ProfileListResponseItemDLPCustomProfileContextAwarenessSkip - """Content types to exclude from context analysis and return all matches.""" - - -class ProfileListResponseItemDLPCustomProfileEntryPattern(BaseModel): - regex: str - """The regex pattern.""" - - validation: Optional[Literal["luhn"]] = None - """Validation algorithm for the pattern. - - This algorithm will get run on potential matches, and if it returns false, the - entry will not be matched. - """ - - -class ProfileListResponseItemDLPCustomProfileEntry(BaseModel): - id: Optional[str] = None - """The ID for this entry""" - - created_at: Optional[datetime] = None - - enabled: Optional[bool] = None - """Whether the entry is enabled or not.""" - - name: Optional[str] = None - """The name of the entry.""" - - pattern: Optional[ProfileListResponseItemDLPCustomProfileEntryPattern] = None - """A pattern that matches an entry""" - - profile_id: Optional[object] = None - """ID of the parent profile""" - - updated_at: Optional[datetime] = None - - -class ProfileListResponseItemDLPCustomProfile(BaseModel): - id: Optional[str] = None - """The ID for this profile""" - - allowed_match_count: Optional[float] = None - """Related DLP policies will trigger when the match count exceeds the number set.""" - - context_awareness: Optional[ProfileListResponseItemDLPCustomProfileContextAwareness] = None - """ - Scan the context of predefined entries to only return matches surrounded by - keywords. - """ - - created_at: Optional[datetime] = None - - description: Optional[str] = None - """The description of the profile.""" - - entries: Optional[List[ProfileListResponseItemDLPCustomProfileEntry]] = None - """The entries for this profile.""" - - name: Optional[str] = None - """The name of the profile.""" - - type: Optional[Literal["custom"]] = None - """The type of the profile.""" - - updated_at: Optional[datetime] = None - - -class ProfileListResponseItemDLPIntegrationProfileEntry(BaseModel): - id: Optional[str] = None - """The ID for this entry""" - - created_at: Optional[datetime] = None - - enabled: Optional[bool] = None - """Whether the entry is enabled or not.""" - - name: Optional[str] = None - """The name of the entry.""" - - profile_id: Optional[object] = None - """ID of the parent profile""" - - updated_at: Optional[datetime] = None - - -class ProfileListResponseItemDLPIntegrationProfile(BaseModel): - id: Optional[str] = None - """The ID for this profile""" - - created_at: Optional[datetime] = None - - description: Optional[str] = None - """The description of the profile.""" - - entries: Optional[List[ProfileListResponseItemDLPIntegrationProfileEntry]] = None - """The entries for this profile.""" - - name: Optional[str] = None - """The name of the profile.""" - - type: Optional[Literal["integration"]] = None - """The type of the profile.""" - - updated_at: Optional[datetime] = None - - -ProfileListResponseItem = Union[ - ProfileListResponseItemDLPPredefinedProfile, - ProfileListResponseItemDLPCustomProfile, - ProfileListResponseItemDLPIntegrationProfile, -] - -ProfileListResponse = List[ProfileListResponseItem] +ProfileListResponse = List[DLPProfiles] diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/__init__.py b/src/cloudflare/types/zero_trust/dlp/profiles/__init__.py index f0afda8e7..aea573043 100644 --- a/src/cloudflare/types/zero_trust/dlp/profiles/__init__.py +++ b/src/cloudflare/types/zero_trust/dlp/profiles/__init__.py @@ -2,12 +2,10 @@ from __future__ import annotations -from .custom_get_response import CustomGetResponse as CustomGetResponse +from .dlp_custom_profile import DLPCustomProfile as DLPCustomProfile from .custom_create_params import CustomCreateParams as CustomCreateParams from .custom_update_params import CustomUpdateParams as CustomUpdateParams from .custom_create_response import CustomCreateResponse as CustomCreateResponse from .custom_delete_response import CustomDeleteResponse as CustomDeleteResponse -from .custom_update_response import CustomUpdateResponse as CustomUpdateResponse -from .predefined_get_response import PredefinedGetResponse as PredefinedGetResponse +from .dlp_predefined_profile import DLPPredefinedProfile as DLPPredefinedProfile from .predefined_update_params import PredefinedUpdateParams as PredefinedUpdateParams -from .predefined_update_response import PredefinedUpdateResponse as PredefinedUpdateResponse diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_response.py b/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_response.py index d48596574..a7b8ee282 100644 --- a/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_response.py +++ b/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_response.py @@ -1,98 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ....._models import BaseModel +from .dlp_custom_profile import DLPCustomProfile -__all__ = [ - "CustomCreateResponse", - "CustomCreateResponseItem", - "CustomCreateResponseItemContextAwareness", - "CustomCreateResponseItemContextAwarenessSkip", - "CustomCreateResponseItemEntry", - "CustomCreateResponseItemEntryPattern", -] +__all__ = ["CustomCreateResponse"] - -class CustomCreateResponseItemContextAwarenessSkip(BaseModel): - files: bool - """If the content type is a file, skip context analysis and return all matches.""" - - -class CustomCreateResponseItemContextAwareness(BaseModel): - enabled: bool - """ - If true, scan the context of predefined entries to only return matches - surrounded by keywords. - """ - - skip: CustomCreateResponseItemContextAwarenessSkip - """Content types to exclude from context analysis and return all matches.""" - - -class CustomCreateResponseItemEntryPattern(BaseModel): - regex: str - """The regex pattern.""" - - validation: Optional[Literal["luhn"]] = None - """Validation algorithm for the pattern. - - This algorithm will get run on potential matches, and if it returns false, the - entry will not be matched. - """ - - -class CustomCreateResponseItemEntry(BaseModel): - id: Optional[str] = None - """The ID for this entry""" - - created_at: Optional[datetime] = None - - enabled: Optional[bool] = None - """Whether the entry is enabled or not.""" - - name: Optional[str] = None - """The name of the entry.""" - - pattern: Optional[CustomCreateResponseItemEntryPattern] = None - """A pattern that matches an entry""" - - profile_id: Optional[object] = None - """ID of the parent profile""" - - updated_at: Optional[datetime] = None - - -class CustomCreateResponseItem(BaseModel): - id: Optional[str] = None - """The ID for this profile""" - - allowed_match_count: Optional[float] = None - """Related DLP policies will trigger when the match count exceeds the number set.""" - - context_awareness: Optional[CustomCreateResponseItemContextAwareness] = None - """ - Scan the context of predefined entries to only return matches surrounded by - keywords. - """ - - created_at: Optional[datetime] = None - - description: Optional[str] = None - """The description of the profile.""" - - entries: Optional[List[CustomCreateResponseItemEntry]] = None - """The entries for this profile.""" - - name: Optional[str] = None - """The name of the profile.""" - - type: Optional[Literal["custom"]] = None - """The type of the profile.""" - - updated_at: Optional[datetime] = None - - -CustomCreateResponse = List[CustomCreateResponseItem] +CustomCreateResponse = List[DLPCustomProfile] diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_response.py b/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_response.py deleted file mode 100644 index 3dcece86e..000000000 --- a/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_response.py +++ /dev/null @@ -1,88 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from ....._models import BaseModel - -__all__ = ["CustomUpdateResponse", "ContextAwareness", "ContextAwarenessSkip", "Entry", "EntryPattern"] - - -class ContextAwarenessSkip(BaseModel): - files: bool - """If the content type is a file, skip context analysis and return all matches.""" - - -class ContextAwareness(BaseModel): - enabled: bool - """ - If true, scan the context of predefined entries to only return matches - surrounded by keywords. - """ - - skip: ContextAwarenessSkip - """Content types to exclude from context analysis and return all matches.""" - - -class EntryPattern(BaseModel): - regex: str - """The regex pattern.""" - - validation: Optional[Literal["luhn"]] = None - """Validation algorithm for the pattern. - - This algorithm will get run on potential matches, and if it returns false, the - entry will not be matched. - """ - - -class Entry(BaseModel): - id: Optional[str] = None - """The ID for this entry""" - - created_at: Optional[datetime] = None - - enabled: Optional[bool] = None - """Whether the entry is enabled or not.""" - - name: Optional[str] = None - """The name of the entry.""" - - pattern: Optional[EntryPattern] = None - """A pattern that matches an entry""" - - profile_id: Optional[object] = None - """ID of the parent profile""" - - updated_at: Optional[datetime] = None - - -class CustomUpdateResponse(BaseModel): - id: Optional[str] = None - """The ID for this profile""" - - allowed_match_count: Optional[float] = None - """Related DLP policies will trigger when the match count exceeds the number set.""" - - context_awareness: Optional[ContextAwareness] = None - """ - Scan the context of predefined entries to only return matches surrounded by - keywords. - """ - - created_at: Optional[datetime] = None - - description: Optional[str] = None - """The description of the profile.""" - - entries: Optional[List[Entry]] = None - """The entries for this profile.""" - - name: Optional[str] = None - """The name of the profile.""" - - type: Optional[Literal["custom"]] = None - """The type of the profile.""" - - updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/custom_get_response.py b/src/cloudflare/types/zero_trust/dlp/profiles/dlp_custom_profile.py similarity index 94% rename from src/cloudflare/types/zero_trust/dlp/profiles/custom_get_response.py rename to src/cloudflare/types/zero_trust/dlp/profiles/dlp_custom_profile.py index e7d6a3348..0ef36821c 100644 --- a/src/cloudflare/types/zero_trust/dlp/profiles/custom_get_response.py +++ b/src/cloudflare/types/zero_trust/dlp/profiles/dlp_custom_profile.py @@ -6,7 +6,7 @@ from typing_extensions import Literal from ....._models import BaseModel -__all__ = ["CustomGetResponse", "ContextAwareness", "ContextAwarenessSkip", "Entry", "EntryPattern"] +__all__ = ["DLPCustomProfile", "ContextAwareness", "ContextAwarenessSkip", "Entry", "EntryPattern"] class ContextAwarenessSkip(BaseModel): @@ -58,7 +58,7 @@ class Entry(BaseModel): updated_at: Optional[datetime] = None -class CustomGetResponse(BaseModel): +class DLPCustomProfile(BaseModel): id: Optional[str] = None """The ID for this profile""" diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/predefined_get_response.py b/src/cloudflare/types/zero_trust/dlp/profiles/dlp_predefined_profile.py similarity index 92% rename from src/cloudflare/types/zero_trust/dlp/profiles/predefined_get_response.py rename to src/cloudflare/types/zero_trust/dlp/profiles/dlp_predefined_profile.py index 855c6dc83..22c5aa7dc 100644 --- a/src/cloudflare/types/zero_trust/dlp/profiles/predefined_get_response.py +++ b/src/cloudflare/types/zero_trust/dlp/profiles/dlp_predefined_profile.py @@ -5,7 +5,7 @@ from typing_extensions import Literal from ....._models import BaseModel -__all__ = ["PredefinedGetResponse", "ContextAwareness", "ContextAwarenessSkip", "Entry"] +__all__ = ["DLPPredefinedProfile", "ContextAwareness", "ContextAwarenessSkip", "Entry"] class ContextAwarenessSkip(BaseModel): @@ -38,7 +38,7 @@ class Entry(BaseModel): """ID of the parent profile""" -class PredefinedGetResponse(BaseModel): +class DLPPredefinedProfile(BaseModel): id: Optional[str] = None """The ID for this profile""" diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/predefined_update_response.py b/src/cloudflare/types/zero_trust/dlp/profiles/predefined_update_response.py deleted file mode 100644 index 7a3237571..000000000 --- a/src/cloudflare/types/zero_trust/dlp/profiles/predefined_update_response.py +++ /dev/null @@ -1,61 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from typing_extensions import Literal - -from ....._models import BaseModel - -__all__ = ["PredefinedUpdateResponse", "ContextAwareness", "ContextAwarenessSkip", "Entry"] - - -class ContextAwarenessSkip(BaseModel): - files: bool - """If the content type is a file, skip context analysis and return all matches.""" - - -class ContextAwareness(BaseModel): - enabled: bool - """ - If true, scan the context of predefined entries to only return matches - surrounded by keywords. - """ - - skip: ContextAwarenessSkip - """Content types to exclude from context analysis and return all matches.""" - - -class Entry(BaseModel): - id: Optional[str] = None - """The ID for this entry""" - - enabled: Optional[bool] = None - """Whether the entry is enabled or not.""" - - name: Optional[str] = None - """The name of the entry.""" - - profile_id: Optional[object] = None - """ID of the parent profile""" - - -class PredefinedUpdateResponse(BaseModel): - id: Optional[str] = None - """The ID for this profile""" - - allowed_match_count: Optional[float] = None - """Related DLP policies will trigger when the match count exceeds the number set.""" - - context_awareness: Optional[ContextAwareness] = None - """ - Scan the context of predefined entries to only return matches surrounded by - keywords. - """ - - entries: Optional[List[Entry]] = None - """The entries for this profile.""" - - name: Optional[str] = None - """The name of the profile.""" - - type: Optional[Literal["predefined"]] = None - """The type of the profile.""" diff --git a/src/cloudflare/types/zero_trust/gateway/__init__.py b/src/cloudflare/types/zero_trust/gateway/__init__.py index dd30fc3c2..f97d90420 100644 --- a/src/cloudflare/types/zero_trust/gateway/__init__.py +++ b/src/cloudflare/types/zero_trust/gateway/__init__.py @@ -3,10 +3,7 @@ from __future__ import annotations from .list_edit_params import ListEditParams as ListEditParams -from .list_get_response import ListGetResponse as ListGetResponse -from .rule_get_response import RuleGetResponse as RuleGetResponse from .list_create_params import ListCreateParams as ListCreateParams -from .list_edit_response import ListEditResponse as ListEditResponse from .list_list_response import ListListResponse as ListListResponse from .list_update_params import ListUpdateParams as ListUpdateParams from .rule_create_params import RuleCreateParams as RuleCreateParams @@ -14,34 +11,31 @@ 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 .list_update_response import ListUpdateResponse as ListUpdateResponse -from .logging_get_response import LoggingGetResponse as LoggingGetResponse -from .rule_create_response import RuleCreateResponse as RuleCreateResponse from .rule_delete_response import RuleDeleteResponse as RuleDeleteResponse -from .rule_update_response import RuleUpdateResponse as RuleUpdateResponse -from .location_get_response import LocationGetResponse as LocationGetResponse 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 .logging_update_response import LoggingUpdateResponse as LoggingUpdateResponse -from .location_create_response import LocationCreateResponse as LocationCreateResponse from .location_delete_response import LocationDeleteResponse as LocationDeleteResponse -from .location_update_response import LocationUpdateResponse as LocationUpdateResponse +from .zero_trust_gateway_lists import ZeroTrustGatewayLists as ZeroTrustGatewayLists +from .zero_trust_gateway_rules import ZeroTrustGatewayRules as ZeroTrustGatewayRules from .configuration_edit_params import ConfigurationEditParams as ConfigurationEditParams from .configuration_get_response import ConfigurationGetResponse as ConfigurationGetResponse from .proxy_endpoint_edit_params import ProxyEndpointEditParams as ProxyEndpointEditParams from .configuration_edit_response import ConfigurationEditResponse as ConfigurationEditResponse from .configuration_update_params import ConfigurationUpdateParams as ConfigurationUpdateParams -from .proxy_endpoint_get_response import ProxyEndpointGetResponse as ProxyEndpointGetResponse +from .zero_trust_gateway_settings import ZeroTrustGatewaySettings as ZeroTrustGatewaySettings from .proxy_endpoint_create_params import ProxyEndpointCreateParams as ProxyEndpointCreateParams -from .proxy_endpoint_edit_response import ProxyEndpointEditResponse as ProxyEndpointEditResponse 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 -from .audit_ssh_setting_get_response import AuditSSHSettingGetResponse as AuditSSHSettingGetResponse -from .proxy_endpoint_create_response import ProxyEndpointCreateResponse as ProxyEndpointCreateResponse +from .zero_trust_gateway_categories import ZeroTrustGatewayCategories as ZeroTrustGatewayCategories from .proxy_endpoint_delete_response import ProxyEndpointDeleteResponse as ProxyEndpointDeleteResponse from .audit_ssh_setting_update_params import AuditSSHSettingUpdateParams as AuditSSHSettingUpdateParams -from .audit_ssh_setting_update_response import AuditSSHSettingUpdateResponse as AuditSSHSettingUpdateResponse +from .zero_trust_gateway_proxy_endpoints import ZeroTrustGatewayProxyEndpoints as ZeroTrustGatewayProxyEndpoints +from .zero_trust_gateway_gateway_account_logging_settings import ( + ZeroTrustGatewayGatewayAccountLoggingSettings as ZeroTrustGatewayGatewayAccountLoggingSettings, +) 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 index 8ab9b498e..dcfb3fac6 100644 --- a/src/cloudflare/types/zero_trust/gateway/app_type_list_response.py +++ b/src/cloudflare/types/zero_trust/gateway/app_type_list_response.py @@ -1,54 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Union, Optional -from datetime import datetime +from typing import List -from ...._models import BaseModel +from .zero_trust_gateway_app_types import ZeroTrustGatewayAppTypes -__all__ = [ - "AppTypeListResponse", - "AppTypeListResponseItem", - "AppTypeListResponseItemZeroTrustGatewayApplication", - "AppTypeListResponseItemZeroTrustGatewayApplicationType", -] +__all__ = ["AppTypeListResponse"] - -class AppTypeListResponseItemZeroTrustGatewayApplication(BaseModel): - id: Optional[int] = None - """The identifier for this application. There is only one application per ID.""" - - application_type_id: Optional[int] = None - """The identifier for the type of this application. - - There can be many applications with the same type. This refers to the `id` of a - returned application type. - """ - - created_at: Optional[datetime] = None - - name: Optional[str] = None - """The name of the application or application type.""" - - -class AppTypeListResponseItemZeroTrustGatewayApplicationType(BaseModel): - id: Optional[int] = None - """The identifier for the type of this application. - - There can be many applications with the same type. This refers to the `id` of a - returned application type. - """ - - created_at: Optional[datetime] = None - - description: Optional[str] = None - """A short summary of applications with this type.""" - - name: Optional[str] = None - """The name of the application or application type.""" - - -AppTypeListResponseItem = Union[ - AppTypeListResponseItemZeroTrustGatewayApplication, AppTypeListResponseItemZeroTrustGatewayApplicationType -] - -AppTypeListResponse = List[AppTypeListResponseItem] +AppTypeListResponse = List[ZeroTrustGatewayAppTypes] diff --git a/src/cloudflare/types/zero_trust/gateway/audit_ssh_setting_update_response.py b/src/cloudflare/types/zero_trust/gateway/audit_ssh_setting_update_response.py deleted file mode 100644 index 239840091..000000000 --- a/src/cloudflare/types/zero_trust/gateway/audit_ssh_setting_update_response.py +++ /dev/null @@ -1,20 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["AuditSSHSettingUpdateResponse"] - - -class AuditSSHSettingUpdateResponse(BaseModel): - created_at: Optional[datetime] = None - - public_key: Optional[str] = None - """SSH encryption public key""" - - seed_id: Optional[str] = None - """Seed ID""" - - updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/gateway/category_list_response.py b/src/cloudflare/types/zero_trust/gateway/category_list_response.py index 42257e2a3..e5117d3ee 100644 --- a/src/cloudflare/types/zero_trust/gateway/category_list_response.py +++ b/src/cloudflare/types/zero_trust/gateway/category_list_response.py @@ -1,64 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from typing_extensions import Literal +from typing import List -from pydantic import Field as FieldInfo +from .zero_trust_gateway_categories import ZeroTrustGatewayCategories -from ...._models import BaseModel +__all__ = ["CategoryListResponse"] -__all__ = ["CategoryListResponse", "CategoryListResponseItem", "CategoryListResponseItemSubcategory"] - - -class CategoryListResponseItemSubcategory(BaseModel): - id: Optional[int] = None - """The identifier for this category. There is only one category per ID.""" - - beta: Optional[bool] = None - """True if the category is in beta and subject to change.""" - - class_: Optional[Literal["free", "premium", "blocked", "removalPending", "noBlock"]] = FieldInfo( - alias="class", default=None - ) - """Which account types are allowed to create policies based on this category. - - `blocked` categories are blocked unconditionally for all accounts. - `removalPending` categories can be removed from policies but not added. - `noBlock` categories cannot be blocked. - """ - - description: Optional[str] = None - """A short summary of domains in the category.""" - - name: Optional[str] = None - """The name of the category.""" - - -class CategoryListResponseItem(BaseModel): - id: Optional[int] = None - """The identifier for this category. There is only one category per ID.""" - - beta: Optional[bool] = None - """True if the category is in beta and subject to change.""" - - class_: Optional[Literal["free", "premium", "blocked", "removalPending", "noBlock"]] = FieldInfo( - alias="class", default=None - ) - """Which account types are allowed to create policies based on this category. - - `blocked` categories are blocked unconditionally for all accounts. - `removalPending` categories can be removed from policies but not added. - `noBlock` categories cannot be blocked. - """ - - description: Optional[str] = None - """A short summary of domains in the category.""" - - name: Optional[str] = None - """The name of the category.""" - - subcategories: Optional[List[CategoryListResponseItemSubcategory]] = None - """All subcategories for this category.""" - - -CategoryListResponse = List[CategoryListResponseItem] +CategoryListResponse = List[ZeroTrustGatewayCategories] diff --git a/src/cloudflare/types/zero_trust/gateway/list_get_response.py b/src/cloudflare/types/zero_trust/gateway/list_get_response.py deleted file mode 100644 index d59bdead4..000000000 --- a/src/cloudflare/types/zero_trust/gateway/list_get_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["ListGetResponse"] - - -class ListGetResponse(BaseModel): - id: Optional[str] = None - """API Resource UUID tag.""" - - count: Optional[float] = None - """The number of items in the list.""" - - created_at: Optional[datetime] = None - - description: Optional[str] = None - """The description of the list.""" - - name: Optional[str] = None - """The name of the list.""" - - type: Optional[Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"]] = None - """The type of list.""" - - updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/gateway/list_list_response.py b/src/cloudflare/types/zero_trust/gateway/list_list_response.py index 0e89840ab..50a467cfe 100644 --- a/src/cloudflare/types/zero_trust/gateway/list_list_response.py +++ b/src/cloudflare/types/zero_trust/gateway/list_list_response.py @@ -1,33 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ...._models import BaseModel +from .zero_trust_gateway_lists import ZeroTrustGatewayLists -__all__ = ["ListListResponse", "ListListResponseItem"] +__all__ = ["ListListResponse"] - -class ListListResponseItem(BaseModel): - id: Optional[str] = None - """API Resource UUID tag.""" - - count: Optional[float] = None - """The number of items in the list.""" - - created_at: Optional[datetime] = None - - description: Optional[str] = None - """The description of the list.""" - - name: Optional[str] = None - """The name of the list.""" - - type: Optional[Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"]] = None - """The type of list.""" - - updated_at: Optional[datetime] = None - - -ListListResponse = List[ListListResponseItem] +ListListResponse = List[ZeroTrustGatewayLists] diff --git a/src/cloudflare/types/zero_trust/gateway/list_update_response.py b/src/cloudflare/types/zero_trust/gateway/list_update_response.py deleted file mode 100644 index bd5c7caba..000000000 --- a/src/cloudflare/types/zero_trust/gateway/list_update_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["ListUpdateResponse"] - - -class ListUpdateResponse(BaseModel): - id: Optional[str] = None - """API Resource UUID tag.""" - - count: Optional[float] = None - """The number of items in the list.""" - - created_at: Optional[datetime] = None - - description: Optional[str] = None - """The description of the list.""" - - name: Optional[str] = None - """The name of the list.""" - - type: Optional[Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"]] = None - """The type of list.""" - - updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/gateway/location_create_response.py b/src/cloudflare/types/zero_trust/gateway/location_create_response.py deleted file mode 100644 index 58354311f..000000000 --- a/src/cloudflare/types/zero_trust/gateway/location_create_response.py +++ /dev/null @@ -1,46 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["LocationCreateResponse", "Network"] - - -class Network(BaseModel): - network: str - """The IPv4 address or IPv4 CIDR. IPv4 CIDRs are limited to a maximum of /24.""" - - -class LocationCreateResponse(BaseModel): - id: Optional[object] = None - - client_default: Optional[bool] = None - """True if the location is the default location.""" - - created_at: Optional[datetime] = None - - doh_subdomain: Optional[str] = None - """The DNS over HTTPS domain to send DNS requests to. - - This field is auto-generated by Gateway. - """ - - ecs_support: Optional[bool] = None - """True if the location needs to resolve EDNS queries.""" - - ip: Optional[str] = None - """IPV6 destination ip assigned to this location. - - DNS requests sent to this IP will counted as the request under this location. - This field is auto-generated by Gateway. - """ - - name: Optional[str] = None - """The name of the location.""" - - networks: Optional[List[Network]] = None - """A list of network ranges that requests from this location would originate from.""" - - updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/gateway/location_list_response.py b/src/cloudflare/types/zero_trust/gateway/location_list_response.py index 27923cf95..2ee576578 100644 --- a/src/cloudflare/types/zero_trust/gateway/location_list_response.py +++ b/src/cloudflare/types/zero_trust/gateway/location_list_response.py @@ -1,49 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ...._models import BaseModel +from .zero_trust_gateway_locations import ZeroTrustGatewayLocations -__all__ = ["LocationListResponse", "LocationListResponseItem", "LocationListResponseItemNetwork"] +__all__ = ["LocationListResponse"] - -class LocationListResponseItemNetwork(BaseModel): - network: str - """The IPv4 address or IPv4 CIDR. IPv4 CIDRs are limited to a maximum of /24.""" - - -class LocationListResponseItem(BaseModel): - id: Optional[object] = None - - client_default: Optional[bool] = None - """True if the location is the default location.""" - - created_at: Optional[datetime] = None - - doh_subdomain: Optional[str] = None - """The DNS over HTTPS domain to send DNS requests to. - - This field is auto-generated by Gateway. - """ - - ecs_support: Optional[bool] = None - """True if the location needs to resolve EDNS queries.""" - - ip: Optional[str] = None - """IPV6 destination ip assigned to this location. - - DNS requests sent to this IP will counted as the request under this location. - This field is auto-generated by Gateway. - """ - - name: Optional[str] = None - """The name of the location.""" - - networks: Optional[List[LocationListResponseItemNetwork]] = None - """A list of network ranges that requests from this location would originate from.""" - - updated_at: Optional[datetime] = None - - -LocationListResponse = List[LocationListResponseItem] +LocationListResponse = List[ZeroTrustGatewayLocations] diff --git a/src/cloudflare/types/zero_trust/gateway/location_update_response.py b/src/cloudflare/types/zero_trust/gateway/location_update_response.py deleted file mode 100644 index 405d69aa6..000000000 --- a/src/cloudflare/types/zero_trust/gateway/location_update_response.py +++ /dev/null @@ -1,46 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["LocationUpdateResponse", "Network"] - - -class Network(BaseModel): - network: str - """The IPv4 address or IPv4 CIDR. IPv4 CIDRs are limited to a maximum of /24.""" - - -class LocationUpdateResponse(BaseModel): - id: Optional[object] = None - - client_default: Optional[bool] = None - """True if the location is the default location.""" - - created_at: Optional[datetime] = None - - doh_subdomain: Optional[str] = None - """The DNS over HTTPS domain to send DNS requests to. - - This field is auto-generated by Gateway. - """ - - ecs_support: Optional[bool] = None - """True if the location needs to resolve EDNS queries.""" - - ip: Optional[str] = None - """IPV6 destination ip assigned to this location. - - DNS requests sent to this IP will counted as the request under this location. - This field is auto-generated by Gateway. - """ - - name: Optional[str] = None - """The name of the location.""" - - networks: Optional[List[Network]] = None - """A list of network ranges that requests from this location would originate from.""" - - updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/gateway/logging_get_response.py b/src/cloudflare/types/zero_trust/gateway/logging_get_response.py deleted file mode 100644 index 45e8548e6..000000000 --- a/src/cloudflare/types/zero_trust/gateway/logging_get_response.py +++ /dev/null @@ -1,29 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional - -from ...._models import BaseModel - -__all__ = ["LoggingGetResponse", "SettingsByRuleType"] - - -class SettingsByRuleType(BaseModel): - dns: Optional[object] = None - """Logging settings for DNS firewall.""" - - http: Optional[object] = None - """Logging settings for HTTP/HTTPS firewall.""" - - l4: Optional[object] = None - """Logging settings for Network firewall.""" - - -class LoggingGetResponse(BaseModel): - redact_pii: Optional[bool] = None - """ - Redact personally identifiable information from activity logging (PII fields - are: source IP, user email, user ID, device ID, URL, referrer, user agent). - """ - - settings_by_rule_type: Optional[SettingsByRuleType] = None - """Logging settings by rule type.""" diff --git a/src/cloudflare/types/zero_trust/gateway/proxy_endpoint_create_response.py b/src/cloudflare/types/zero_trust/gateway/proxy_endpoint_create_response.py deleted file mode 100644 index fa011bcd3..000000000 --- a/src/cloudflare/types/zero_trust/gateway/proxy_endpoint_create_response.py +++ /dev/null @@ -1,25 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["ProxyEndpointCreateResponse"] - - -class ProxyEndpointCreateResponse(BaseModel): - id: Optional[object] = None - - created_at: Optional[datetime] = None - - ips: Optional[List[str]] = None - """A list of CIDRs to restrict ingress connections.""" - - name: Optional[str] = None - """The name of the proxy endpoint.""" - - subdomain: Optional[str] = None - """The subdomain to be used as the destination in the proxy client.""" - - updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/gateway/proxy_endpoint_get_response.py b/src/cloudflare/types/zero_trust/gateway/proxy_endpoint_get_response.py deleted file mode 100644 index 7361f7455..000000000 --- a/src/cloudflare/types/zero_trust/gateway/proxy_endpoint_get_response.py +++ /dev/null @@ -1,25 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["ProxyEndpointGetResponse"] - - -class ProxyEndpointGetResponse(BaseModel): - id: Optional[object] = None - - created_at: Optional[datetime] = None - - ips: Optional[List[str]] = None - """A list of CIDRs to restrict ingress connections.""" - - name: Optional[str] = None - """The name of the proxy endpoint.""" - - subdomain: Optional[str] = None - """The subdomain to be used as the destination in the proxy client.""" - - updated_at: Optional[datetime] = None 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 index f3ace3aa6..fd034c10c 100644 --- a/src/cloudflare/types/zero_trust/gateway/proxy_endpoint_list_response.py +++ b/src/cloudflare/types/zero_trust/gateway/proxy_endpoint_list_response.py @@ -1,28 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ...._models import BaseModel +from .zero_trust_gateway_proxy_endpoints import ZeroTrustGatewayProxyEndpoints -__all__ = ["ProxyEndpointListResponse", "ProxyEndpointListResponseItem"] +__all__ = ["ProxyEndpointListResponse"] - -class ProxyEndpointListResponseItem(BaseModel): - id: Optional[object] = None - - created_at: Optional[datetime] = None - - ips: Optional[List[str]] = None - """A list of CIDRs to restrict ingress connections.""" - - name: Optional[str] = None - """The name of the proxy endpoint.""" - - subdomain: Optional[str] = None - """The subdomain to be used as the destination in the proxy client.""" - - updated_at: Optional[datetime] = None - - -ProxyEndpointListResponse = List[ProxyEndpointListResponseItem] +ProxyEndpointListResponse = List[ZeroTrustGatewayProxyEndpoints] diff --git a/src/cloudflare/types/zero_trust/gateway/rule_get_response.py b/src/cloudflare/types/zero_trust/gateway/rule_get_response.py deleted file mode 100644 index 0cbf8c97f..000000000 --- a/src/cloudflare/types/zero_trust/gateway/rule_get_response.py +++ /dev/null @@ -1,376 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = [ - "RuleGetResponse", - "RuleSettings", - "RuleSettingsAuditSSH", - "RuleSettingsBisoAdminControls", - "RuleSettingsCheckSession", - "RuleSettingsDNSResolvers", - "RuleSettingsDNSResolversIPV4", - "RuleSettingsDNSResolversIPV6", - "RuleSettingsEgress", - "RuleSettingsL4override", - "RuleSettingsNotificationSettings", - "RuleSettingsPayloadLog", - "RuleSettingsUntrustedCert", - "Schedule", -] - - -class RuleSettingsAuditSSH(BaseModel): - command_logging: Optional[bool] = None - """Enable to turn on SSH command logging.""" - - -class RuleSettingsBisoAdminControls(BaseModel): - dcp: Optional[bool] = None - """Set to true to enable copy-pasting.""" - - dd: Optional[bool] = None - """Set to true to enable downloading.""" - - dk: Optional[bool] = None - """Set to true to enable keyboard usage.""" - - dp: Optional[bool] = None - """Set to true to enable printing.""" - - du: Optional[bool] = None - """Set to true to enable uploading.""" - - -class RuleSettingsCheckSession(BaseModel): - duration: Optional[str] = None - """Configure how fresh the session needs to be to be considered valid.""" - - enforce: Optional[bool] = None - """Set to true to enable session enforcement.""" - - -class RuleSettingsDNSResolversIPV4(BaseModel): - ip: str - """IP address of upstream resolver.""" - - port: Optional[int] = None - """A port number to use for upstream resolver.""" - - route_through_private_network: Optional[bool] = None - """Whether to connect to this resolver over a private network. - - Must be set when vnet_id is set. - """ - - vnet_id: Optional[str] = None - """Optionally specify a virtual network for this resolver. - - Uses default virtual network id if omitted. - """ - - -class RuleSettingsDNSResolversIPV6(BaseModel): - ip: str - """IP address of upstream resolver.""" - - port: Optional[int] = None - """A port number to use for upstream resolver.""" - - route_through_private_network: Optional[bool] = None - """Whether to connect to this resolver over a private network. - - Must be set when vnet_id is set. - """ - - vnet_id: Optional[str] = None - """Optionally specify a virtual network for this resolver. - - Uses default virtual network id if omitted. - """ - - -class RuleSettingsDNSResolvers(BaseModel): - ipv4: Optional[List[RuleSettingsDNSResolversIPV4]] = None - - ipv6: Optional[List[RuleSettingsDNSResolversIPV6]] = None - - -class RuleSettingsEgress(BaseModel): - ipv4: Optional[str] = None - """The IPv4 address to be used for egress.""" - - ipv4_fallback: Optional[str] = None - """ - The fallback IPv4 address to be used for egress in the event of an error - egressing with the primary IPv4. Can be '0.0.0.0' to indicate local egress via - WARP IPs. - """ - - ipv6: Optional[str] = None - """The IPv6 range to be used for egress.""" - - -class RuleSettingsL4override(BaseModel): - ip: Optional[str] = None - """IPv4 or IPv6 address.""" - - port: Optional[int] = None - """A port number to use for TCP/UDP overrides.""" - - -class RuleSettingsNotificationSettings(BaseModel): - enabled: Optional[bool] = None - """Set notification on""" - - msg: Optional[str] = None - """Customize the message shown in the notification.""" - - support_url: Optional[str] = None - """Optional URL to direct users to additional information. - - If not set, the notification will open a block page. - """ - - -class RuleSettingsPayloadLog(BaseModel): - enabled: Optional[bool] = None - """Set to true to enable DLP payload logging for this rule.""" - - -class RuleSettingsUntrustedCert(BaseModel): - action: Optional[Literal["pass_through", "block", "error"]] = None - """The action performed when an untrusted certificate is seen. - - The default action is an error with HTTP code 526. - """ - - -class RuleSettings(BaseModel): - add_headers: Optional[object] = None - """Add custom headers to allowed requests, in the form of key-value pairs. - - Keys are header names, pointing to an array with its header value(s). - """ - - allow_child_bypass: Optional[bool] = None - """Set by parent MSP accounts to enable their children to bypass this rule.""" - - audit_ssh: Optional[RuleSettingsAuditSSH] = None - """Settings for the Audit SSH action.""" - - biso_admin_controls: Optional[RuleSettingsBisoAdminControls] = None - """Configure how browser isolation behaves.""" - - block_page_enabled: Optional[bool] = None - """Enable the custom block page.""" - - block_reason: Optional[str] = None - """ - The text describing why this block occurred, displayed on the custom block page - (if enabled). - """ - - bypass_parent_rule: Optional[bool] = None - """Set by children MSP accounts to bypass their parent's rules.""" - - check_session: Optional[RuleSettingsCheckSession] = None - """Configure how session check behaves.""" - - dns_resolvers: Optional[RuleSettingsDNSResolvers] = None - """Add your own custom resolvers to route queries that match the resolver policy. - - Cannot be used when resolve_dns_through_cloudflare is set. DNS queries will - route to the address closest to their origin. - """ - - egress: Optional[RuleSettingsEgress] = None - """Configure how Gateway Proxy traffic egresses. - - You can enable this setting for rules with Egress actions and filters, or omit - it to indicate local egress via WARP IPs. - """ - - insecure_disable_dnssec_validation: Optional[bool] = None - """INSECURE - disable DNSSEC validation (for Allow actions).""" - - ip_categories: Optional[bool] = None - """Set to true to enable IPs in DNS resolver category blocks. - - By default categories only block based on domain names. - """ - - ip_indicator_feeds: Optional[bool] = None - """Set to true to include IPs in DNS resolver indicator feed blocks. - - By default indicator feeds only block based on domain names. - """ - - l4override: Optional[RuleSettingsL4override] = None - """Send matching traffic to the supplied destination IP address and port.""" - - notification_settings: Optional[RuleSettingsNotificationSettings] = None - """ - Configure a notification to display on the user's device when this rule is - matched. - """ - - override_host: Optional[str] = None - """Override matching DNS queries with a hostname.""" - - override_ips: Optional[List[str]] = None - """Override matching DNS queries with an IP or set of IPs.""" - - payload_log: Optional[RuleSettingsPayloadLog] = None - """Configure DLP payload logging.""" - - resolve_dns_through_cloudflare: Optional[bool] = None - """ - Enable to send queries that match the policy to Cloudflare's default 1.1.1.1 DNS - resolver. Cannot be set when dns_resolvers are specified. - """ - - untrusted_cert: Optional[RuleSettingsUntrustedCert] = None - """Configure behavior when an upstream cert is invalid or an SSL error occurs.""" - - -class Schedule(BaseModel): - fri: Optional[str] = None - """ - The time intervals when the rule will be active on Fridays, in increasing order - from 00:00-24:00. If this parameter is omitted, the rule will be deactivated on - Fridays. - """ - - mon: Optional[str] = None - """ - The time intervals when the rule will be active on Mondays, in increasing order - from 00:00-24:00. If this parameter is omitted, the rule will be deactivated on - Mondays. - """ - - sat: Optional[str] = None - """ - The time intervals when the rule will be active on Saturdays, in increasing - order from 00:00-24:00. If this parameter is omitted, the rule will be - deactivated on Saturdays. - """ - - sun: Optional[str] = None - """ - The time intervals when the rule will be active on Sundays, in increasing order - from 00:00-24:00. If this parameter is omitted, the rule will be deactivated on - Sundays. - """ - - thu: Optional[str] = None - """ - The time intervals when the rule will be active on Thursdays, in increasing - order from 00:00-24:00. If this parameter is omitted, the rule will be - deactivated on Thursdays. - """ - - time_zone: Optional[str] = None - """The time zone the rule will be evaluated against. - - If a - [valid time zone city name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) - is provided, Gateway will always use the current time at that time zone. If this - parameter is omitted, then Gateway will use the time zone inferred from the - user's source IP to evaluate the rule. If Gateway cannot determine the time zone - from the IP, we will fall back to the time zone of the user's connected data - center. - """ - - tue: Optional[str] = None - """ - The time intervals when the rule will be active on Tuesdays, in increasing order - from 00:00-24:00. If this parameter is omitted, the rule will be deactivated on - Tuesdays. - """ - - wed: Optional[str] = None - """ - The time intervals when the rule will be active on Wednesdays, in increasing - order from 00:00-24:00. If this parameter is omitted, the rule will be - deactivated on Wednesdays. - """ - - -class RuleGetResponse(BaseModel): - id: Optional[str] = None - """The API resource UUID.""" - - action: Optional[ - Literal[ - "on", - "off", - "allow", - "block", - "scan", - "noscan", - "safesearch", - "ytrestricted", - "isolate", - "noisolate", - "override", - "l4_override", - "egress", - "audit_ssh", - ] - ] = None - """ - The action to preform when the associated traffic, identity, and device posture - expressions are either absent or evaluate to `true`. - """ - - created_at: Optional[datetime] = None - - deleted_at: Optional[datetime] = None - """Date of deletion, if any.""" - - description: Optional[str] = None - """The description of the rule.""" - - device_posture: Optional[str] = None - """The wirefilter expression used for device posture check matching.""" - - enabled: Optional[bool] = None - """True if the rule is enabled.""" - - filters: Optional[List[Literal["http", "dns", "l4", "egress"]]] = None - """ - The protocol or layer to evaluate the traffic, identity, and device posture - expressions. - """ - - identity: Optional[str] = None - """The wirefilter expression used for identity matching.""" - - name: Optional[str] = None - """The name of the rule.""" - - precedence: Optional[int] = None - """Precedence sets the order of your rules. - - Lower values indicate higher precedence. At each processing phase, applicable - rules are evaluated in ascending order of this value. - """ - - rule_settings: Optional[RuleSettings] = None - """Additional settings that modify the rule's action.""" - - schedule: Optional[Schedule] = None - """The schedule for activating DNS policies. - - This does not apply to HTTP or network policies. - """ - - traffic: Optional[str] = None - """The wirefilter expression used for traffic matching.""" - - updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/gateway/rule_list_response.py b/src/cloudflare/types/zero_trust/gateway/rule_list_response.py index 2ba06aad1..e15eddcef 100644 --- a/src/cloudflare/types/zero_trust/gateway/rule_list_response.py +++ b/src/cloudflare/types/zero_trust/gateway/rule_list_response.py @@ -1,380 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal +from typing import List -from ...._models import BaseModel +from .zero_trust_gateway_rules import ZeroTrustGatewayRules -__all__ = [ - "RuleListResponse", - "RuleListResponseItem", - "RuleListResponseItemRuleSettings", - "RuleListResponseItemRuleSettingsAuditSSH", - "RuleListResponseItemRuleSettingsBisoAdminControls", - "RuleListResponseItemRuleSettingsCheckSession", - "RuleListResponseItemRuleSettingsDNSResolvers", - "RuleListResponseItemRuleSettingsDNSResolversIPV4", - "RuleListResponseItemRuleSettingsDNSResolversIPV6", - "RuleListResponseItemRuleSettingsEgress", - "RuleListResponseItemRuleSettingsL4override", - "RuleListResponseItemRuleSettingsNotificationSettings", - "RuleListResponseItemRuleSettingsPayloadLog", - "RuleListResponseItemRuleSettingsUntrustedCert", - "RuleListResponseItemSchedule", -] +__all__ = ["RuleListResponse"] - -class RuleListResponseItemRuleSettingsAuditSSH(BaseModel): - command_logging: Optional[bool] = None - """Enable to turn on SSH command logging.""" - - -class RuleListResponseItemRuleSettingsBisoAdminControls(BaseModel): - dcp: Optional[bool] = None - """Set to true to enable copy-pasting.""" - - dd: Optional[bool] = None - """Set to true to enable downloading.""" - - dk: Optional[bool] = None - """Set to true to enable keyboard usage.""" - - dp: Optional[bool] = None - """Set to true to enable printing.""" - - du: Optional[bool] = None - """Set to true to enable uploading.""" - - -class RuleListResponseItemRuleSettingsCheckSession(BaseModel): - duration: Optional[str] = None - """Configure how fresh the session needs to be to be considered valid.""" - - enforce: Optional[bool] = None - """Set to true to enable session enforcement.""" - - -class RuleListResponseItemRuleSettingsDNSResolversIPV4(BaseModel): - ip: str - """IP address of upstream resolver.""" - - port: Optional[int] = None - """A port number to use for upstream resolver.""" - - route_through_private_network: Optional[bool] = None - """Whether to connect to this resolver over a private network. - - Must be set when vnet_id is set. - """ - - vnet_id: Optional[str] = None - """Optionally specify a virtual network for this resolver. - - Uses default virtual network id if omitted. - """ - - -class RuleListResponseItemRuleSettingsDNSResolversIPV6(BaseModel): - ip: str - """IP address of upstream resolver.""" - - port: Optional[int] = None - """A port number to use for upstream resolver.""" - - route_through_private_network: Optional[bool] = None - """Whether to connect to this resolver over a private network. - - Must be set when vnet_id is set. - """ - - vnet_id: Optional[str] = None - """Optionally specify a virtual network for this resolver. - - Uses default virtual network id if omitted. - """ - - -class RuleListResponseItemRuleSettingsDNSResolvers(BaseModel): - ipv4: Optional[List[RuleListResponseItemRuleSettingsDNSResolversIPV4]] = None - - ipv6: Optional[List[RuleListResponseItemRuleSettingsDNSResolversIPV6]] = None - - -class RuleListResponseItemRuleSettingsEgress(BaseModel): - ipv4: Optional[str] = None - """The IPv4 address to be used for egress.""" - - ipv4_fallback: Optional[str] = None - """ - The fallback IPv4 address to be used for egress in the event of an error - egressing with the primary IPv4. Can be '0.0.0.0' to indicate local egress via - WARP IPs. - """ - - ipv6: Optional[str] = None - """The IPv6 range to be used for egress.""" - - -class RuleListResponseItemRuleSettingsL4override(BaseModel): - ip: Optional[str] = None - """IPv4 or IPv6 address.""" - - port: Optional[int] = None - """A port number to use for TCP/UDP overrides.""" - - -class RuleListResponseItemRuleSettingsNotificationSettings(BaseModel): - enabled: Optional[bool] = None - """Set notification on""" - - msg: Optional[str] = None - """Customize the message shown in the notification.""" - - support_url: Optional[str] = None - """Optional URL to direct users to additional information. - - If not set, the notification will open a block page. - """ - - -class RuleListResponseItemRuleSettingsPayloadLog(BaseModel): - enabled: Optional[bool] = None - """Set to true to enable DLP payload logging for this rule.""" - - -class RuleListResponseItemRuleSettingsUntrustedCert(BaseModel): - action: Optional[Literal["pass_through", "block", "error"]] = None - """The action performed when an untrusted certificate is seen. - - The default action is an error with HTTP code 526. - """ - - -class RuleListResponseItemRuleSettings(BaseModel): - add_headers: Optional[object] = None - """Add custom headers to allowed requests, in the form of key-value pairs. - - Keys are header names, pointing to an array with its header value(s). - """ - - allow_child_bypass: Optional[bool] = None - """Set by parent MSP accounts to enable their children to bypass this rule.""" - - audit_ssh: Optional[RuleListResponseItemRuleSettingsAuditSSH] = None - """Settings for the Audit SSH action.""" - - biso_admin_controls: Optional[RuleListResponseItemRuleSettingsBisoAdminControls] = None - """Configure how browser isolation behaves.""" - - block_page_enabled: Optional[bool] = None - """Enable the custom block page.""" - - block_reason: Optional[str] = None - """ - The text describing why this block occurred, displayed on the custom block page - (if enabled). - """ - - bypass_parent_rule: Optional[bool] = None - """Set by children MSP accounts to bypass their parent's rules.""" - - check_session: Optional[RuleListResponseItemRuleSettingsCheckSession] = None - """Configure how session check behaves.""" - - dns_resolvers: Optional[RuleListResponseItemRuleSettingsDNSResolvers] = None - """Add your own custom resolvers to route queries that match the resolver policy. - - Cannot be used when resolve_dns_through_cloudflare is set. DNS queries will - route to the address closest to their origin. - """ - - egress: Optional[RuleListResponseItemRuleSettingsEgress] = None - """Configure how Gateway Proxy traffic egresses. - - You can enable this setting for rules with Egress actions and filters, or omit - it to indicate local egress via WARP IPs. - """ - - insecure_disable_dnssec_validation: Optional[bool] = None - """INSECURE - disable DNSSEC validation (for Allow actions).""" - - ip_categories: Optional[bool] = None - """Set to true to enable IPs in DNS resolver category blocks. - - By default categories only block based on domain names. - """ - - ip_indicator_feeds: Optional[bool] = None - """Set to true to include IPs in DNS resolver indicator feed blocks. - - By default indicator feeds only block based on domain names. - """ - - l4override: Optional[RuleListResponseItemRuleSettingsL4override] = None - """Send matching traffic to the supplied destination IP address and port.""" - - notification_settings: Optional[RuleListResponseItemRuleSettingsNotificationSettings] = None - """ - Configure a notification to display on the user's device when this rule is - matched. - """ - - override_host: Optional[str] = None - """Override matching DNS queries with a hostname.""" - - override_ips: Optional[List[str]] = None - """Override matching DNS queries with an IP or set of IPs.""" - - payload_log: Optional[RuleListResponseItemRuleSettingsPayloadLog] = None - """Configure DLP payload logging.""" - - resolve_dns_through_cloudflare: Optional[bool] = None - """ - Enable to send queries that match the policy to Cloudflare's default 1.1.1.1 DNS - resolver. Cannot be set when dns_resolvers are specified. - """ - - untrusted_cert: Optional[RuleListResponseItemRuleSettingsUntrustedCert] = None - """Configure behavior when an upstream cert is invalid or an SSL error occurs.""" - - -class RuleListResponseItemSchedule(BaseModel): - fri: Optional[str] = None - """ - The time intervals when the rule will be active on Fridays, in increasing order - from 00:00-24:00. If this parameter is omitted, the rule will be deactivated on - Fridays. - """ - - mon: Optional[str] = None - """ - The time intervals when the rule will be active on Mondays, in increasing order - from 00:00-24:00. If this parameter is omitted, the rule will be deactivated on - Mondays. - """ - - sat: Optional[str] = None - """ - The time intervals when the rule will be active on Saturdays, in increasing - order from 00:00-24:00. If this parameter is omitted, the rule will be - deactivated on Saturdays. - """ - - sun: Optional[str] = None - """ - The time intervals when the rule will be active on Sundays, in increasing order - from 00:00-24:00. If this parameter is omitted, the rule will be deactivated on - Sundays. - """ - - thu: Optional[str] = None - """ - The time intervals when the rule will be active on Thursdays, in increasing - order from 00:00-24:00. If this parameter is omitted, the rule will be - deactivated on Thursdays. - """ - - time_zone: Optional[str] = None - """The time zone the rule will be evaluated against. - - If a - [valid time zone city name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) - is provided, Gateway will always use the current time at that time zone. If this - parameter is omitted, then Gateway will use the time zone inferred from the - user's source IP to evaluate the rule. If Gateway cannot determine the time zone - from the IP, we will fall back to the time zone of the user's connected data - center. - """ - - tue: Optional[str] = None - """ - The time intervals when the rule will be active on Tuesdays, in increasing order - from 00:00-24:00. If this parameter is omitted, the rule will be deactivated on - Tuesdays. - """ - - wed: Optional[str] = None - """ - The time intervals when the rule will be active on Wednesdays, in increasing - order from 00:00-24:00. If this parameter is omitted, the rule will be - deactivated on Wednesdays. - """ - - -class RuleListResponseItem(BaseModel): - id: Optional[str] = None - """The API resource UUID.""" - - action: Optional[ - Literal[ - "on", - "off", - "allow", - "block", - "scan", - "noscan", - "safesearch", - "ytrestricted", - "isolate", - "noisolate", - "override", - "l4_override", - "egress", - "audit_ssh", - ] - ] = None - """ - The action to preform when the associated traffic, identity, and device posture - expressions are either absent or evaluate to `true`. - """ - - created_at: Optional[datetime] = None - - deleted_at: Optional[datetime] = None - """Date of deletion, if any.""" - - description: Optional[str] = None - """The description of the rule.""" - - device_posture: Optional[str] = None - """The wirefilter expression used for device posture check matching.""" - - enabled: Optional[bool] = None - """True if the rule is enabled.""" - - filters: Optional[List[Literal["http", "dns", "l4", "egress"]]] = None - """ - The protocol or layer to evaluate the traffic, identity, and device posture - expressions. - """ - - identity: Optional[str] = None - """The wirefilter expression used for identity matching.""" - - name: Optional[str] = None - """The name of the rule.""" - - precedence: Optional[int] = None - """Precedence sets the order of your rules. - - Lower values indicate higher precedence. At each processing phase, applicable - rules are evaluated in ascending order of this value. - """ - - rule_settings: Optional[RuleListResponseItemRuleSettings] = None - """Additional settings that modify the rule's action.""" - - schedule: Optional[RuleListResponseItemSchedule] = None - """The schedule for activating DNS policies. - - This does not apply to HTTP or network policies. - """ - - traffic: Optional[str] = None - """The wirefilter expression used for traffic matching.""" - - updated_at: Optional[datetime] = None - - -RuleListResponse = List[RuleListResponseItem] +RuleListResponse = List[ZeroTrustGatewayRules] diff --git a/src/cloudflare/types/zero_trust/gateway/rule_update_response.py b/src/cloudflare/types/zero_trust/gateway/rule_update_response.py deleted file mode 100644 index 855bf6d41..000000000 --- a/src/cloudflare/types/zero_trust/gateway/rule_update_response.py +++ /dev/null @@ -1,376 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = [ - "RuleUpdateResponse", - "RuleSettings", - "RuleSettingsAuditSSH", - "RuleSettingsBisoAdminControls", - "RuleSettingsCheckSession", - "RuleSettingsDNSResolvers", - "RuleSettingsDNSResolversIPV4", - "RuleSettingsDNSResolversIPV6", - "RuleSettingsEgress", - "RuleSettingsL4override", - "RuleSettingsNotificationSettings", - "RuleSettingsPayloadLog", - "RuleSettingsUntrustedCert", - "Schedule", -] - - -class RuleSettingsAuditSSH(BaseModel): - command_logging: Optional[bool] = None - """Enable to turn on SSH command logging.""" - - -class RuleSettingsBisoAdminControls(BaseModel): - dcp: Optional[bool] = None - """Set to true to enable copy-pasting.""" - - dd: Optional[bool] = None - """Set to true to enable downloading.""" - - dk: Optional[bool] = None - """Set to true to enable keyboard usage.""" - - dp: Optional[bool] = None - """Set to true to enable printing.""" - - du: Optional[bool] = None - """Set to true to enable uploading.""" - - -class RuleSettingsCheckSession(BaseModel): - duration: Optional[str] = None - """Configure how fresh the session needs to be to be considered valid.""" - - enforce: Optional[bool] = None - """Set to true to enable session enforcement.""" - - -class RuleSettingsDNSResolversIPV4(BaseModel): - ip: str - """IP address of upstream resolver.""" - - port: Optional[int] = None - """A port number to use for upstream resolver.""" - - route_through_private_network: Optional[bool] = None - """Whether to connect to this resolver over a private network. - - Must be set when vnet_id is set. - """ - - vnet_id: Optional[str] = None - """Optionally specify a virtual network for this resolver. - - Uses default virtual network id if omitted. - """ - - -class RuleSettingsDNSResolversIPV6(BaseModel): - ip: str - """IP address of upstream resolver.""" - - port: Optional[int] = None - """A port number to use for upstream resolver.""" - - route_through_private_network: Optional[bool] = None - """Whether to connect to this resolver over a private network. - - Must be set when vnet_id is set. - """ - - vnet_id: Optional[str] = None - """Optionally specify a virtual network for this resolver. - - Uses default virtual network id if omitted. - """ - - -class RuleSettingsDNSResolvers(BaseModel): - ipv4: Optional[List[RuleSettingsDNSResolversIPV4]] = None - - ipv6: Optional[List[RuleSettingsDNSResolversIPV6]] = None - - -class RuleSettingsEgress(BaseModel): - ipv4: Optional[str] = None - """The IPv4 address to be used for egress.""" - - ipv4_fallback: Optional[str] = None - """ - The fallback IPv4 address to be used for egress in the event of an error - egressing with the primary IPv4. Can be '0.0.0.0' to indicate local egress via - WARP IPs. - """ - - ipv6: Optional[str] = None - """The IPv6 range to be used for egress.""" - - -class RuleSettingsL4override(BaseModel): - ip: Optional[str] = None - """IPv4 or IPv6 address.""" - - port: Optional[int] = None - """A port number to use for TCP/UDP overrides.""" - - -class RuleSettingsNotificationSettings(BaseModel): - enabled: Optional[bool] = None - """Set notification on""" - - msg: Optional[str] = None - """Customize the message shown in the notification.""" - - support_url: Optional[str] = None - """Optional URL to direct users to additional information. - - If not set, the notification will open a block page. - """ - - -class RuleSettingsPayloadLog(BaseModel): - enabled: Optional[bool] = None - """Set to true to enable DLP payload logging for this rule.""" - - -class RuleSettingsUntrustedCert(BaseModel): - action: Optional[Literal["pass_through", "block", "error"]] = None - """The action performed when an untrusted certificate is seen. - - The default action is an error with HTTP code 526. - """ - - -class RuleSettings(BaseModel): - add_headers: Optional[object] = None - """Add custom headers to allowed requests, in the form of key-value pairs. - - Keys are header names, pointing to an array with its header value(s). - """ - - allow_child_bypass: Optional[bool] = None - """Set by parent MSP accounts to enable their children to bypass this rule.""" - - audit_ssh: Optional[RuleSettingsAuditSSH] = None - """Settings for the Audit SSH action.""" - - biso_admin_controls: Optional[RuleSettingsBisoAdminControls] = None - """Configure how browser isolation behaves.""" - - block_page_enabled: Optional[bool] = None - """Enable the custom block page.""" - - block_reason: Optional[str] = None - """ - The text describing why this block occurred, displayed on the custom block page - (if enabled). - """ - - bypass_parent_rule: Optional[bool] = None - """Set by children MSP accounts to bypass their parent's rules.""" - - check_session: Optional[RuleSettingsCheckSession] = None - """Configure how session check behaves.""" - - dns_resolvers: Optional[RuleSettingsDNSResolvers] = None - """Add your own custom resolvers to route queries that match the resolver policy. - - Cannot be used when resolve_dns_through_cloudflare is set. DNS queries will - route to the address closest to their origin. - """ - - egress: Optional[RuleSettingsEgress] = None - """Configure how Gateway Proxy traffic egresses. - - You can enable this setting for rules with Egress actions and filters, or omit - it to indicate local egress via WARP IPs. - """ - - insecure_disable_dnssec_validation: Optional[bool] = None - """INSECURE - disable DNSSEC validation (for Allow actions).""" - - ip_categories: Optional[bool] = None - """Set to true to enable IPs in DNS resolver category blocks. - - By default categories only block based on domain names. - """ - - ip_indicator_feeds: Optional[bool] = None - """Set to true to include IPs in DNS resolver indicator feed blocks. - - By default indicator feeds only block based on domain names. - """ - - l4override: Optional[RuleSettingsL4override] = None - """Send matching traffic to the supplied destination IP address and port.""" - - notification_settings: Optional[RuleSettingsNotificationSettings] = None - """ - Configure a notification to display on the user's device when this rule is - matched. - """ - - override_host: Optional[str] = None - """Override matching DNS queries with a hostname.""" - - override_ips: Optional[List[str]] = None - """Override matching DNS queries with an IP or set of IPs.""" - - payload_log: Optional[RuleSettingsPayloadLog] = None - """Configure DLP payload logging.""" - - resolve_dns_through_cloudflare: Optional[bool] = None - """ - Enable to send queries that match the policy to Cloudflare's default 1.1.1.1 DNS - resolver. Cannot be set when dns_resolvers are specified. - """ - - untrusted_cert: Optional[RuleSettingsUntrustedCert] = None - """Configure behavior when an upstream cert is invalid or an SSL error occurs.""" - - -class Schedule(BaseModel): - fri: Optional[str] = None - """ - The time intervals when the rule will be active on Fridays, in increasing order - from 00:00-24:00. If this parameter is omitted, the rule will be deactivated on - Fridays. - """ - - mon: Optional[str] = None - """ - The time intervals when the rule will be active on Mondays, in increasing order - from 00:00-24:00. If this parameter is omitted, the rule will be deactivated on - Mondays. - """ - - sat: Optional[str] = None - """ - The time intervals when the rule will be active on Saturdays, in increasing - order from 00:00-24:00. If this parameter is omitted, the rule will be - deactivated on Saturdays. - """ - - sun: Optional[str] = None - """ - The time intervals when the rule will be active on Sundays, in increasing order - from 00:00-24:00. If this parameter is omitted, the rule will be deactivated on - Sundays. - """ - - thu: Optional[str] = None - """ - The time intervals when the rule will be active on Thursdays, in increasing - order from 00:00-24:00. If this parameter is omitted, the rule will be - deactivated on Thursdays. - """ - - time_zone: Optional[str] = None - """The time zone the rule will be evaluated against. - - If a - [valid time zone city name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) - is provided, Gateway will always use the current time at that time zone. If this - parameter is omitted, then Gateway will use the time zone inferred from the - user's source IP to evaluate the rule. If Gateway cannot determine the time zone - from the IP, we will fall back to the time zone of the user's connected data - center. - """ - - tue: Optional[str] = None - """ - The time intervals when the rule will be active on Tuesdays, in increasing order - from 00:00-24:00. If this parameter is omitted, the rule will be deactivated on - Tuesdays. - """ - - wed: Optional[str] = None - """ - The time intervals when the rule will be active on Wednesdays, in increasing - order from 00:00-24:00. If this parameter is omitted, the rule will be - deactivated on Wednesdays. - """ - - -class RuleUpdateResponse(BaseModel): - id: Optional[str] = None - """The API resource UUID.""" - - action: Optional[ - Literal[ - "on", - "off", - "allow", - "block", - "scan", - "noscan", - "safesearch", - "ytrestricted", - "isolate", - "noisolate", - "override", - "l4_override", - "egress", - "audit_ssh", - ] - ] = None - """ - The action to preform when the associated traffic, identity, and device posture - expressions are either absent or evaluate to `true`. - """ - - created_at: Optional[datetime] = None - - deleted_at: Optional[datetime] = None - """Date of deletion, if any.""" - - description: Optional[str] = None - """The description of the rule.""" - - device_posture: Optional[str] = None - """The wirefilter expression used for device posture check matching.""" - - enabled: Optional[bool] = None - """True if the rule is enabled.""" - - filters: Optional[List[Literal["http", "dns", "l4", "egress"]]] = None - """ - The protocol or layer to evaluate the traffic, identity, and device posture - expressions. - """ - - identity: Optional[str] = None - """The wirefilter expression used for identity matching.""" - - name: Optional[str] = None - """The name of the rule.""" - - precedence: Optional[int] = None - """Precedence sets the order of your rules. - - Lower values indicate higher precedence. At each processing phase, applicable - rules are evaluated in ascending order of this value. - """ - - rule_settings: Optional[RuleSettings] = None - """Additional settings that modify the rule's action.""" - - schedule: Optional[Schedule] = None - """The schedule for activating DNS policies. - - This does not apply to HTTP or network policies. - """ - - traffic: Optional[str] = None - """The wirefilter expression used for traffic matching.""" - - updated_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_app_types.py b/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_app_types.py new file mode 100644 index 000000000..266b3166f --- /dev/null +++ b/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_app_types.py @@ -0,0 +1,45 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Union, Optional +from datetime import datetime + +from ...._models import BaseModel + +__all__ = ["ZeroTrustGatewayAppTypes", "ZeroTrustGatewayApplication", "ZeroTrustGatewayApplicationType"] + + +class ZeroTrustGatewayApplication(BaseModel): + id: Optional[int] = None + """The identifier for this application. There is only one application per ID.""" + + application_type_id: Optional[int] = None + """The identifier for the type of this application. + + There can be many applications with the same type. This refers to the `id` of a + returned application type. + """ + + created_at: Optional[datetime] = None + + name: Optional[str] = None + """The name of the application or application type.""" + + +class ZeroTrustGatewayApplicationType(BaseModel): + id: Optional[int] = None + """The identifier for the type of this application. + + There can be many applications with the same type. This refers to the `id` of a + returned application type. + """ + + created_at: Optional[datetime] = None + + description: Optional[str] = None + """A short summary of applications with this type.""" + + name: Optional[str] = None + """The name of the application or application type.""" + + +ZeroTrustGatewayAppTypes = Union[ZeroTrustGatewayApplication, ZeroTrustGatewayApplicationType] diff --git a/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_categories.py b/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_categories.py new file mode 100644 index 000000000..d4a59d712 --- /dev/null +++ b/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_categories.py @@ -0,0 +1,61 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import List, Optional +from typing_extensions import Literal + +from pydantic import Field as FieldInfo + +from ...._models import BaseModel + +__all__ = ["ZeroTrustGatewayCategories", "Subcategory"] + + +class Subcategory(BaseModel): + id: Optional[int] = None + """The identifier for this category. There is only one category per ID.""" + + beta: Optional[bool] = None + """True if the category is in beta and subject to change.""" + + class_: Optional[Literal["free", "premium", "blocked", "removalPending", "noBlock"]] = FieldInfo( + alias="class", default=None + ) + """Which account types are allowed to create policies based on this category. + + `blocked` categories are blocked unconditionally for all accounts. + `removalPending` categories can be removed from policies but not added. + `noBlock` categories cannot be blocked. + """ + + description: Optional[str] = None + """A short summary of domains in the category.""" + + name: Optional[str] = None + """The name of the category.""" + + +class ZeroTrustGatewayCategories(BaseModel): + id: Optional[int] = None + """The identifier for this category. There is only one category per ID.""" + + beta: Optional[bool] = None + """True if the category is in beta and subject to change.""" + + class_: Optional[Literal["free", "premium", "blocked", "removalPending", "noBlock"]] = FieldInfo( + alias="class", default=None + ) + """Which account types are allowed to create policies based on this category. + + `blocked` categories are blocked unconditionally for all accounts. + `removalPending` categories can be removed from policies but not added. + `noBlock` categories cannot be blocked. + """ + + description: Optional[str] = None + """A short summary of domains in the category.""" + + name: Optional[str] = None + """The name of the category.""" + + subcategories: Optional[List[Subcategory]] = None + """All subcategories for this category.""" diff --git a/src/cloudflare/types/zero_trust/gateway/logging_update_response.py b/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_gateway_account_logging_settings.py similarity index 83% rename from src/cloudflare/types/zero_trust/gateway/logging_update_response.py rename to src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_gateway_account_logging_settings.py index affa21a10..072f34cab 100644 --- a/src/cloudflare/types/zero_trust/gateway/logging_update_response.py +++ b/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_gateway_account_logging_settings.py @@ -4,7 +4,7 @@ from typing import Optional from ...._models import BaseModel -__all__ = ["LoggingUpdateResponse", "SettingsByRuleType"] +__all__ = ["ZeroTrustGatewayGatewayAccountLoggingSettings", "SettingsByRuleType"] class SettingsByRuleType(BaseModel): @@ -18,7 +18,7 @@ class SettingsByRuleType(BaseModel): """Logging settings for Network firewall.""" -class LoggingUpdateResponse(BaseModel): +class ZeroTrustGatewayGatewayAccountLoggingSettings(BaseModel): redact_pii: Optional[bool] = None """ Redact personally identifiable information from activity logging (PII fields diff --git a/src/cloudflare/types/zero_trust/gateway/list_edit_response.py b/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_lists.py similarity index 89% rename from src/cloudflare/types/zero_trust/gateway/list_edit_response.py rename to src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_lists.py index 86c1792aa..61044a20e 100644 --- a/src/cloudflare/types/zero_trust/gateway/list_edit_response.py +++ b/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_lists.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["ListEditResponse"] +__all__ = ["ZeroTrustGatewayLists"] -class ListEditResponse(BaseModel): +class ZeroTrustGatewayLists(BaseModel): id: Optional[str] = None """API Resource UUID tag.""" diff --git a/src/cloudflare/types/zero_trust/gateway/location_get_response.py b/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_locations.py similarity index 92% rename from src/cloudflare/types/zero_trust/gateway/location_get_response.py rename to src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_locations.py index 0b2161515..1037e1438 100644 --- a/src/cloudflare/types/zero_trust/gateway/location_get_response.py +++ b/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_locations.py @@ -5,7 +5,7 @@ from datetime import datetime from ...._models import BaseModel -__all__ = ["LocationGetResponse", "Network"] +__all__ = ["ZeroTrustGatewayLocations", "Network"] class Network(BaseModel): @@ -13,7 +13,7 @@ class Network(BaseModel): """The IPv4 address or IPv4 CIDR. IPv4 CIDRs are limited to a maximum of /24.""" -class LocationGetResponse(BaseModel): +class ZeroTrustGatewayLocations(BaseModel): id: Optional[object] = None client_default: Optional[bool] = None diff --git a/src/cloudflare/types/zero_trust/gateway/proxy_endpoint_edit_response.py b/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_proxy_endpoints.py similarity index 85% rename from src/cloudflare/types/zero_trust/gateway/proxy_endpoint_edit_response.py rename to src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_proxy_endpoints.py index 89f712dea..875948f3b 100644 --- a/src/cloudflare/types/zero_trust/gateway/proxy_endpoint_edit_response.py +++ b/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_proxy_endpoints.py @@ -5,10 +5,10 @@ from datetime import datetime from ...._models import BaseModel -__all__ = ["ProxyEndpointEditResponse"] +__all__ = ["ZeroTrustGatewayProxyEndpoints"] -class ProxyEndpointEditResponse(BaseModel): +class ZeroTrustGatewayProxyEndpoints(BaseModel): id: Optional[object] = None created_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/gateway/rule_create_response.py b/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_rules.py similarity index 99% rename from src/cloudflare/types/zero_trust/gateway/rule_create_response.py rename to src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_rules.py index 659153e15..a2b503029 100644 --- a/src/cloudflare/types/zero_trust/gateway/rule_create_response.py +++ b/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_rules.py @@ -7,7 +7,7 @@ from typing_extensions import Literal from ...._models import BaseModel __all__ = [ - "RuleCreateResponse", + "ZeroTrustGatewayRules", "RuleSettings", "RuleSettingsAuditSSH", "RuleSettingsBisoAdminControls", @@ -301,7 +301,7 @@ class Schedule(BaseModel): """ -class RuleCreateResponse(BaseModel): +class ZeroTrustGatewayRules(BaseModel): id: Optional[str] = None """The API resource UUID.""" diff --git a/src/cloudflare/types/zero_trust/gateway/audit_ssh_setting_get_response.py b/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_settings.py similarity index 80% rename from src/cloudflare/types/zero_trust/gateway/audit_ssh_setting_get_response.py rename to src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_settings.py index 0bc2ca136..c63c8bb4d 100644 --- a/src/cloudflare/types/zero_trust/gateway/audit_ssh_setting_get_response.py +++ b/src/cloudflare/types/zero_trust/gateway/zero_trust_gateway_settings.py @@ -5,10 +5,10 @@ from datetime import datetime from ...._models import BaseModel -__all__ = ["AuditSSHSettingGetResponse"] +__all__ = ["ZeroTrustGatewaySettings"] -class AuditSSHSettingGetResponse(BaseModel): +class ZeroTrustGatewaySettings(BaseModel): created_at: Optional[datetime] = None public_key: Optional[str] = None diff --git a/src/cloudflare/types/zero_trust/identity_provider_create_response.py b/src/cloudflare/types/zero_trust/identity_provider_create_response.py deleted file mode 100644 index 50a5afd07..000000000 --- a/src/cloudflare/types/zero_trust/identity_provider_create_response.py +++ /dev/null @@ -1,1346 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = [ - "IdentityProviderCreateResponse", - "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", - "AccessOnetimepin", - "AccessOnetimepinScimConfig", -] - - -class AccessAzureAdConfig(BaseModel): - claims: Optional[List[str]] = None - """Custom claims""" - - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - conditional_access_enabled: Optional[bool] = None - """Should Cloudflare try to load authentication contexts from your account""" - - directory_id: Optional[str] = None - """Your Azure directory uuid""" - - email_claim_name: Optional[str] = None - """The claim name for email in the id_token response.""" - - support_groups: Optional[bool] = None - """Should Cloudflare try to load groups from your account""" - - -class AccessAzureAdScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessAzureAd(BaseModel): - config: AccessAzureAdConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessAzureAdScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessCentrifyConfig(BaseModel): - centrify_account: Optional[str] = None - """Your centrify account url""" - - centrify_app_id: Optional[str] = None - """Your centrify app id""" - - claims: Optional[List[str]] = None - """Custom claims""" - - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - email_claim_name: Optional[str] = None - """The claim name for email in the id_token response.""" - - -class AccessCentrifyScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessCentrify(BaseModel): - config: AccessCentrifyConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessCentrifyScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessFacebookConfig(BaseModel): - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - -class AccessFacebookScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessFacebook(BaseModel): - config: AccessFacebookConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessFacebookScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessGitHubConfig(BaseModel): - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - -class AccessGitHubScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessGitHub(BaseModel): - config: AccessGitHubConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessGitHubScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessGoogleConfig(BaseModel): - claims: Optional[List[str]] = None - """Custom claims""" - - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - email_claim_name: Optional[str] = None - """The claim name for email in the id_token response.""" - - -class AccessGoogleScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessGoogle(BaseModel): - config: AccessGoogleConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessGoogleScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessGoogleAppsConfig(BaseModel): - apps_domain: Optional[str] = None - """Your companies TLD""" - - claims: Optional[List[str]] = None - """Custom claims""" - - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - email_claim_name: Optional[str] = None - """The claim name for email in the id_token response.""" - - -class AccessGoogleAppsScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessGoogleApps(BaseModel): - config: AccessGoogleAppsConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessGoogleAppsScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessLinkedinConfig(BaseModel): - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - -class AccessLinkedinScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessLinkedin(BaseModel): - config: AccessLinkedinConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessLinkedinScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessOidcConfig(BaseModel): - auth_url: Optional[str] = None - """The authorization_endpoint URL of your IdP""" - - certs_url: Optional[str] = None - """The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens""" - - claims: Optional[List[str]] = None - """Custom claims""" - - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - email_claim_name: Optional[str] = None - """The claim name for email in the id_token response.""" - - scopes: Optional[List[str]] = None - """OAuth scopes""" - - token_url: Optional[str] = None - """The token_endpoint URL of your IdP""" - - -class AccessOidcScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessOidc(BaseModel): - config: AccessOidcConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessOidcScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessOktaConfig(BaseModel): - authorization_server_id: Optional[str] = None - """Your okta authorization server id""" - - claims: Optional[List[str]] = None - """Custom claims""" - - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - email_claim_name: Optional[str] = None - """The claim name for email in the id_token response.""" - - okta_account: Optional[str] = None - """Your okta account url""" - - -class AccessOktaScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessOkta(BaseModel): - config: AccessOktaConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessOktaScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessOneloginConfig(BaseModel): - claims: Optional[List[str]] = None - """Custom claims""" - - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - email_claim_name: Optional[str] = None - """The claim name for email in the id_token response.""" - - onelogin_account: Optional[str] = None - """Your OneLogin account url""" - - -class AccessOneloginScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessOnelogin(BaseModel): - config: AccessOneloginConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessOneloginScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessPingoneConfig(BaseModel): - claims: Optional[List[str]] = None - """Custom claims""" - - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - email_claim_name: Optional[str] = None - """The claim name for email in the id_token response.""" - - ping_env_id: Optional[str] = None - """Your PingOne environment identifier""" - - -class AccessPingoneScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessPingone(BaseModel): - config: AccessPingoneConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessPingoneScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessSamlConfigHeaderAttribute(BaseModel): - attribute_name: Optional[str] = None - """attribute name from the IDP""" - - header_name: Optional[str] = None - """header that will be added on the request to the origin""" - - -class AccessSamlConfig(BaseModel): - attributes: Optional[List[str]] = None - """ - A list of SAML attribute names that will be added to your signed JWT token and - can be used in SAML policy rules. - """ - - email_attribute_name: Optional[str] = None - """The attribute name for email in the SAML response.""" - - header_attributes: Optional[List[AccessSamlConfigHeaderAttribute]] = None - """ - Add a list of attribute names that will be returned in the response header from - the Access callback. - """ - - idp_public_certs: Optional[List[str]] = None - """X509 certificate to verify the signature in the SAML authentication response""" - - issuer_url: Optional[str] = None - """IdP Entity ID or Issuer URL""" - - sign_request: Optional[bool] = None - """Sign the SAML authentication request with Access credentials. - - To verify the signature, use the public key from the Access certs endpoints. - """ - - sso_target_url: Optional[str] = None - """URL to send the SAML authentication requests to""" - - -class AccessSamlScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessSaml(BaseModel): - config: AccessSamlConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessSamlScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessYandexConfig(BaseModel): - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - -class AccessYandexScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessYandex(BaseModel): - config: AccessYandexConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessYandexScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessOnetimepinScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessOnetimepin(BaseModel): - config: object - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessOnetimepinScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -IdentityProviderCreateResponse = Union[ - AccessAzureAd, - AccessCentrify, - AccessFacebook, - AccessGitHub, - AccessGoogle, - AccessGoogleApps, - AccessLinkedin, - AccessOidc, - AccessOkta, - AccessOnelogin, - AccessPingone, - AccessSaml, - AccessYandex, - AccessOnetimepin, -] diff --git a/src/cloudflare/types/zero_trust/identity_provider_update_response.py b/src/cloudflare/types/zero_trust/identity_provider_update_response.py deleted file mode 100644 index 061ef0e67..000000000 --- a/src/cloudflare/types/zero_trust/identity_provider_update_response.py +++ /dev/null @@ -1,1346 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Union, Optional -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = [ - "IdentityProviderUpdateResponse", - "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", - "AccessOnetimepin", - "AccessOnetimepinScimConfig", -] - - -class AccessAzureAdConfig(BaseModel): - claims: Optional[List[str]] = None - """Custom claims""" - - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - conditional_access_enabled: Optional[bool] = None - """Should Cloudflare try to load authentication contexts from your account""" - - directory_id: Optional[str] = None - """Your Azure directory uuid""" - - email_claim_name: Optional[str] = None - """The claim name for email in the id_token response.""" - - support_groups: Optional[bool] = None - """Should Cloudflare try to load groups from your account""" - - -class AccessAzureAdScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessAzureAd(BaseModel): - config: AccessAzureAdConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessAzureAdScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessCentrifyConfig(BaseModel): - centrify_account: Optional[str] = None - """Your centrify account url""" - - centrify_app_id: Optional[str] = None - """Your centrify app id""" - - claims: Optional[List[str]] = None - """Custom claims""" - - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - email_claim_name: Optional[str] = None - """The claim name for email in the id_token response.""" - - -class AccessCentrifyScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessCentrify(BaseModel): - config: AccessCentrifyConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessCentrifyScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessFacebookConfig(BaseModel): - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - -class AccessFacebookScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessFacebook(BaseModel): - config: AccessFacebookConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessFacebookScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessGitHubConfig(BaseModel): - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - -class AccessGitHubScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessGitHub(BaseModel): - config: AccessGitHubConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessGitHubScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessGoogleConfig(BaseModel): - claims: Optional[List[str]] = None - """Custom claims""" - - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - email_claim_name: Optional[str] = None - """The claim name for email in the id_token response.""" - - -class AccessGoogleScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessGoogle(BaseModel): - config: AccessGoogleConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessGoogleScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessGoogleAppsConfig(BaseModel): - apps_domain: Optional[str] = None - """Your companies TLD""" - - claims: Optional[List[str]] = None - """Custom claims""" - - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - email_claim_name: Optional[str] = None - """The claim name for email in the id_token response.""" - - -class AccessGoogleAppsScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessGoogleApps(BaseModel): - config: AccessGoogleAppsConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessGoogleAppsScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessLinkedinConfig(BaseModel): - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - -class AccessLinkedinScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessLinkedin(BaseModel): - config: AccessLinkedinConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessLinkedinScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessOidcConfig(BaseModel): - auth_url: Optional[str] = None - """The authorization_endpoint URL of your IdP""" - - certs_url: Optional[str] = None - """The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens""" - - claims: Optional[List[str]] = None - """Custom claims""" - - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - email_claim_name: Optional[str] = None - """The claim name for email in the id_token response.""" - - scopes: Optional[List[str]] = None - """OAuth scopes""" - - token_url: Optional[str] = None - """The token_endpoint URL of your IdP""" - - -class AccessOidcScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessOidc(BaseModel): - config: AccessOidcConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessOidcScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessOktaConfig(BaseModel): - authorization_server_id: Optional[str] = None - """Your okta authorization server id""" - - claims: Optional[List[str]] = None - """Custom claims""" - - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - email_claim_name: Optional[str] = None - """The claim name for email in the id_token response.""" - - okta_account: Optional[str] = None - """Your okta account url""" - - -class AccessOktaScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessOkta(BaseModel): - config: AccessOktaConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessOktaScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessOneloginConfig(BaseModel): - claims: Optional[List[str]] = None - """Custom claims""" - - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - email_claim_name: Optional[str] = None - """The claim name for email in the id_token response.""" - - onelogin_account: Optional[str] = None - """Your OneLogin account url""" - - -class AccessOneloginScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessOnelogin(BaseModel): - config: AccessOneloginConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessOneloginScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessPingoneConfig(BaseModel): - claims: Optional[List[str]] = None - """Custom claims""" - - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - email_claim_name: Optional[str] = None - """The claim name for email in the id_token response.""" - - ping_env_id: Optional[str] = None - """Your PingOne environment identifier""" - - -class AccessPingoneScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessPingone(BaseModel): - config: AccessPingoneConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessPingoneScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessSamlConfigHeaderAttribute(BaseModel): - attribute_name: Optional[str] = None - """attribute name from the IDP""" - - header_name: Optional[str] = None - """header that will be added on the request to the origin""" - - -class AccessSamlConfig(BaseModel): - attributes: Optional[List[str]] = None - """ - A list of SAML attribute names that will be added to your signed JWT token and - can be used in SAML policy rules. - """ - - email_attribute_name: Optional[str] = None - """The attribute name for email in the SAML response.""" - - header_attributes: Optional[List[AccessSamlConfigHeaderAttribute]] = None - """ - Add a list of attribute names that will be returned in the response header from - the Access callback. - """ - - idp_public_certs: Optional[List[str]] = None - """X509 certificate to verify the signature in the SAML authentication response""" - - issuer_url: Optional[str] = None - """IdP Entity ID or Issuer URL""" - - sign_request: Optional[bool] = None - """Sign the SAML authentication request with Access credentials. - - To verify the signature, use the public key from the Access certs endpoints. - """ - - sso_target_url: Optional[str] = None - """URL to send the SAML authentication requests to""" - - -class AccessSamlScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessSaml(BaseModel): - config: AccessSamlConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessSamlScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessYandexConfig(BaseModel): - client_id: Optional[str] = None - """Your OAuth Client ID""" - - client_secret: Optional[str] = None - """Your OAuth Client Secret""" - - -class AccessYandexScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessYandex(BaseModel): - config: AccessYandexConfig - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessYandexScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -class AccessOnetimepinScimConfig(BaseModel): - enabled: Optional[bool] = None - """A flag to enable or disable SCIM for the identity provider.""" - - group_member_deprovision: Optional[bool] = None - """ - A flag to revoke a user's session in Access and force a reauthentication on the - user's Gateway session when they have been added or removed from a group in the - Identity Provider. - """ - - seat_deprovision: Optional[bool] = None - """ - A flag to remove a user's seat in Zero Trust when they have been deprovisioned - in the Identity Provider. This cannot be enabled unless user_deprovision is also - enabled. - """ - - secret: Optional[str] = None - """ - A read-only token generated when the SCIM integration is enabled for the first - time. It is redacted on subsequent requests. If you lose this you will need to - refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - """ - - user_deprovision: Optional[bool] = None - """ - A flag to enable revoking a user's session in Access and Gateway when they have - been deprovisioned in the Identity Provider. - """ - - -class AccessOnetimepin(BaseModel): - config: object - """The configuration parameters for the identity provider. - - To view the required parameters for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - name: str - """The name of the identity provider, shown to users on the login page.""" - - type: Literal[ - "onetimepin", - "azureAD", - "saml", - "centrify", - "facebook", - "github", - "google-apps", - "google", - "linkedin", - "oidc", - "okta", - "onelogin", - "pingone", - "yandex", - ] - """The type of identity provider. - - To determine the value for a specific provider, refer to our - [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - """ - - id: Optional[str] = None - """UUID""" - - scim_config: Optional[AccessOnetimepinScimConfig] = None - """ - The configuration settings for enabling a System for Cross-Domain Identity - Management (SCIM) with the identity provider. - """ - - -IdentityProviderUpdateResponse = Union[ - AccessAzureAd, - AccessCentrify, - AccessFacebook, - AccessGitHub, - AccessGoogle, - AccessGoogleApps, - AccessLinkedin, - AccessOidc, - AccessOkta, - AccessOnelogin, - AccessPingone, - AccessSaml, - AccessYandex, - AccessOnetimepin, -] diff --git a/src/cloudflare/types/zero_trust/networks/__init__.py b/src/cloudflare/types/zero_trust/networks/__init__.py index 1488e9151..d97c804c2 100644 --- a/src/cloudflare/types/zero_trust/networks/__init__.py +++ b/src/cloudflare/types/zero_trust/networks/__init__.py @@ -2,13 +2,12 @@ from __future__ import annotations +from .tunnel_route import TunnelRoute as TunnelRoute +from .tunnel_teamnet import TunnelTeamnet as TunnelTeamnet from .route_edit_params import RouteEditParams as RouteEditParams from .route_list_params import RouteListParams as RouteListParams from .route_create_params import RouteCreateParams as RouteCreateParams -from .route_edit_response import RouteEditResponse as RouteEditResponse -from .route_list_response import RouteListResponse as RouteListResponse -from .route_create_response import RouteCreateResponse as RouteCreateResponse -from .route_delete_response import RouteDeleteResponse as RouteDeleteResponse +from .tunnel_virtual_network import TunnelVirtualNetwork as TunnelVirtualNetwork from .virtual_network_edit_params import VirtualNetworkEditParams as VirtualNetworkEditParams from .virtual_network_list_params import VirtualNetworkListParams as VirtualNetworkListParams from .virtual_network_create_params import VirtualNetworkCreateParams as VirtualNetworkCreateParams diff --git a/src/cloudflare/types/zero_trust/networks/route_create_response.py b/src/cloudflare/types/zero_trust/networks/route_create_response.py deleted file mode 100644 index 2ac25f1fb..000000000 --- a/src/cloudflare/types/zero_trust/networks/route_create_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["RouteCreateResponse"] - - -class RouteCreateResponse(BaseModel): - id: Optional[str] = None - """UUID of the route.""" - - comment: Optional[str] = None - """Optional remark describing the route.""" - - created_at: Optional[object] = None - """Timestamp of when the route was created.""" - - deleted_at: Optional[datetime] = None - """Timestamp of when the route was deleted. - - If `null`, the route has not been deleted. - """ - - network: Optional[str] = None - """The private IPv4 or IPv6 range connected by the route, in CIDR notation.""" - - tunnel_id: Optional[object] = None - """UUID of the Cloudflare Tunnel serving the route.""" - - virtual_network_id: Optional[object] = None - """UUID of the Tunnel Virtual Network this route belongs to. - - If no virtual networks are configured, the route is assigned to the default - virtual network of the account. - """ diff --git a/src/cloudflare/types/zero_trust/networks/route_delete_response.py b/src/cloudflare/types/zero_trust/networks/route_delete_response.py deleted file mode 100644 index 614883cd9..000000000 --- a/src/cloudflare/types/zero_trust/networks/route_delete_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ...._models import BaseModel - -__all__ = ["RouteDeleteResponse"] - - -class RouteDeleteResponse(BaseModel): - id: Optional[str] = None - """UUID of the route.""" - - comment: Optional[str] = None - """Optional remark describing the route.""" - - created_at: Optional[object] = None - """Timestamp of when the route was created.""" - - deleted_at: Optional[datetime] = None - """Timestamp of when the route was deleted. - - If `null`, the route has not been deleted. - """ - - network: Optional[str] = None - """The private IPv4 or IPv6 range connected by the route, in CIDR notation.""" - - tunnel_id: Optional[object] = None - """UUID of the Cloudflare Tunnel serving the route.""" - - virtual_network_id: Optional[object] = None - """UUID of the Tunnel Virtual Network this route belongs to. - - If no virtual networks are configured, the route is assigned to the default - virtual network of the account. - """ diff --git a/src/cloudflare/types/zero_trust/networks/routes/__init__.py b/src/cloudflare/types/zero_trust/networks/routes/__init__.py index e449beb3c..3b4a753fc 100644 --- a/src/cloudflare/types/zero_trust/networks/routes/__init__.py +++ b/src/cloudflare/types/zero_trust/networks/routes/__init__.py @@ -3,9 +3,5 @@ from __future__ import annotations from .ip_get_params import IPGetParams as IPGetParams -from .ip_get_response import IPGetResponse as IPGetResponse from .network_create_params import NetworkCreateParams as NetworkCreateParams from .network_delete_params import NetworkDeleteParams as NetworkDeleteParams -from .network_edit_response import NetworkEditResponse as NetworkEditResponse -from .network_create_response import NetworkCreateResponse as NetworkCreateResponse -from .network_delete_response import NetworkDeleteResponse as NetworkDeleteResponse diff --git a/src/cloudflare/types/zero_trust/networks/routes/ip_get_response.py b/src/cloudflare/types/zero_trust/networks/routes/ip_get_response.py deleted file mode 100644 index 5bd0a1c48..000000000 --- a/src/cloudflare/types/zero_trust/networks/routes/ip_get_response.py +++ /dev/null @@ -1,48 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ....._models import BaseModel - -__all__ = ["IPGetResponse"] - - -class IPGetResponse(BaseModel): - id: Optional[str] = None - """UUID of the route.""" - - comment: Optional[str] = None - """Optional remark describing the route.""" - - created_at: Optional[object] = None - """Timestamp of when the route was created.""" - - deleted_at: Optional[datetime] = None - """Timestamp of when the route was deleted. - - If `null`, the route has not been deleted. - """ - - network: Optional[str] = None - """The private IPv4 or IPv6 range connected by the route, in CIDR notation.""" - - tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]] = None - """The type of tunnel.""" - - tunnel_id: Optional[object] = None - """UUID of the Cloudflare Tunnel serving the route.""" - - tunnel_name: Optional[object] = None - """The user-friendly name of the Cloudflare Tunnel serving the route.""" - - virtual_network_id: Optional[object] = None - """UUID of the Tunnel Virtual Network this route belongs to. - - If no virtual networks are configured, the route is assigned to the default - virtual network of the account. - """ - - virtual_network_name: Optional[str] = None - """A user-friendly name for the virtual network.""" diff --git a/src/cloudflare/types/zero_trust/networks/routes/network_create_response.py b/src/cloudflare/types/zero_trust/networks/routes/network_create_response.py deleted file mode 100644 index da8344fc7..000000000 --- a/src/cloudflare/types/zero_trust/networks/routes/network_create_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ....._models import BaseModel - -__all__ = ["NetworkCreateResponse"] - - -class NetworkCreateResponse(BaseModel): - id: Optional[str] = None - """UUID of the route.""" - - comment: Optional[str] = None - """Optional remark describing the route.""" - - created_at: Optional[object] = None - """Timestamp of when the route was created.""" - - deleted_at: Optional[datetime] = None - """Timestamp of when the route was deleted. - - If `null`, the route has not been deleted. - """ - - network: Optional[str] = None - """The private IPv4 or IPv6 range connected by the route, in CIDR notation.""" - - tunnel_id: Optional[object] = None - """UUID of the Cloudflare Tunnel serving the route.""" - - virtual_network_id: Optional[object] = None - """UUID of the Tunnel Virtual Network this route belongs to. - - If no virtual networks are configured, the route is assigned to the default - virtual network of the account. - """ diff --git a/src/cloudflare/types/zero_trust/networks/routes/network_delete_response.py b/src/cloudflare/types/zero_trust/networks/routes/network_delete_response.py deleted file mode 100644 index 5a45344df..000000000 --- a/src/cloudflare/types/zero_trust/networks/routes/network_delete_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ....._models import BaseModel - -__all__ = ["NetworkDeleteResponse"] - - -class NetworkDeleteResponse(BaseModel): - id: Optional[str] = None - """UUID of the route.""" - - comment: Optional[str] = None - """Optional remark describing the route.""" - - created_at: Optional[object] = None - """Timestamp of when the route was created.""" - - deleted_at: Optional[datetime] = None - """Timestamp of when the route was deleted. - - If `null`, the route has not been deleted. - """ - - network: Optional[str] = None - """The private IPv4 or IPv6 range connected by the route, in CIDR notation.""" - - tunnel_id: Optional[object] = None - """UUID of the Cloudflare Tunnel serving the route.""" - - virtual_network_id: Optional[object] = None - """UUID of the Tunnel Virtual Network this route belongs to. - - If no virtual networks are configured, the route is assigned to the default - virtual network of the account. - """ diff --git a/src/cloudflare/types/zero_trust/networks/routes/network_edit_response.py b/src/cloudflare/types/zero_trust/networks/routes/network_edit_response.py deleted file mode 100644 index ec56c981c..000000000 --- a/src/cloudflare/types/zero_trust/networks/routes/network_edit_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ....._models import BaseModel - -__all__ = ["NetworkEditResponse"] - - -class NetworkEditResponse(BaseModel): - id: Optional[str] = None - """UUID of the route.""" - - comment: Optional[str] = None - """Optional remark describing the route.""" - - created_at: Optional[object] = None - """Timestamp of when the route was created.""" - - deleted_at: Optional[datetime] = None - """Timestamp of when the route was deleted. - - If `null`, the route has not been deleted. - """ - - network: Optional[str] = None - """The private IPv4 or IPv6 range connected by the route, in CIDR notation.""" - - tunnel_id: Optional[object] = None - """UUID of the Cloudflare Tunnel serving the route.""" - - virtual_network_id: Optional[object] = None - """UUID of the Tunnel Virtual Network this route belongs to. - - If no virtual networks are configured, the route is assigned to the default - virtual network of the account. - """ diff --git a/src/cloudflare/types/zero_trust/networks/route_edit_response.py b/src/cloudflare/types/zero_trust/networks/tunnel_route.py similarity index 93% rename from src/cloudflare/types/zero_trust/networks/route_edit_response.py rename to src/cloudflare/types/zero_trust/networks/tunnel_route.py index 898124026..64ef229dc 100644 --- a/src/cloudflare/types/zero_trust/networks/route_edit_response.py +++ b/src/cloudflare/types/zero_trust/networks/tunnel_route.py @@ -5,10 +5,10 @@ from datetime import datetime from ...._models import BaseModel -__all__ = ["RouteEditResponse"] +__all__ = ["TunnelRoute"] -class RouteEditResponse(BaseModel): +class TunnelRoute(BaseModel): id: Optional[str] = None """UUID of the route.""" diff --git a/src/cloudflare/types/zero_trust/networks/route_list_response.py b/src/cloudflare/types/zero_trust/networks/tunnel_teamnet.py similarity index 95% rename from src/cloudflare/types/zero_trust/networks/route_list_response.py rename to src/cloudflare/types/zero_trust/networks/tunnel_teamnet.py index a80d4fdff..9a3d654bd 100644 --- a/src/cloudflare/types/zero_trust/networks/route_list_response.py +++ b/src/cloudflare/types/zero_trust/networks/tunnel_teamnet.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["RouteListResponse"] +__all__ = ["TunnelTeamnet"] -class RouteListResponse(BaseModel): +class TunnelTeamnet(BaseModel): id: Optional[str] = None """UUID of the route.""" diff --git a/src/cloudflare/types/zero_trust/networks/tunnel_virtual_network.py b/src/cloudflare/types/zero_trust/networks/tunnel_virtual_network.py new file mode 100644 index 000000000..cd313d64b --- /dev/null +++ b/src/cloudflare/types/zero_trust/networks/tunnel_virtual_network.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional + +from ...._models import BaseModel + +__all__ = ["TunnelVirtualNetwork"] + + +class TunnelVirtualNetwork(BaseModel): + id: str + """UUID of the virtual network.""" + + comment: str + """Optional remark describing the virtual network.""" + + created_at: object + """Timestamp of when the virtual network was created.""" + + is_default_network: bool + """If `true`, this virtual network is the default for the account.""" + + name: str + """A user-friendly name for the virtual network.""" + + deleted_at: Optional[object] = None + """Timestamp of when the virtual network was deleted. + + If `null`, the virtual network has not been deleted. + """ 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 index b540d8eed..898173aaf 100644 --- a/src/cloudflare/types/zero_trust/networks/virtual_network_list_response.py +++ b/src/cloudflare/types/zero_trust/networks/virtual_network_list_response.py @@ -1,33 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional +from typing import List -from ...._models import BaseModel +from .tunnel_virtual_network import TunnelVirtualNetwork -__all__ = ["VirtualNetworkListResponse", "VirtualNetworkListResponseItem"] +__all__ = ["VirtualNetworkListResponse"] - -class VirtualNetworkListResponseItem(BaseModel): - id: str - """UUID of the virtual network.""" - - comment: str - """Optional remark describing the virtual network.""" - - created_at: object - """Timestamp of when the virtual network was created.""" - - is_default_network: bool - """If `true`, this virtual network is the default for the account.""" - - name: str - """A user-friendly name for the virtual network.""" - - deleted_at: Optional[object] = None - """Timestamp of when the virtual network was deleted. - - If `null`, the virtual network has not been deleted. - """ - - -VirtualNetworkListResponse = List[VirtualNetworkListResponseItem] +VirtualNetworkListResponse = List[TunnelVirtualNetwork] diff --git a/src/cloudflare/types/zero_trust/organization_create_response.py b/src/cloudflare/types/zero_trust/organization_create_response.py deleted file mode 100644 index 5954874cc..000000000 --- a/src/cloudflare/types/zero_trust/organization_create_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["OrganizationCreateResponse", "CustomPages", "LoginDesign"] - - -class CustomPages(BaseModel): - forbidden: Optional[str] = None - """ - The uid of the custom page to use when a user is denied access after failing a - non-identity rule. - """ - - identity_denied: Optional[str] = None - """The uid of the custom page to use when a user is denied access.""" - - -class LoginDesign(BaseModel): - background_color: Optional[str] = None - """The background color on your login page.""" - - footer_text: Optional[str] = None - """The text at the bottom of your login page.""" - - header_text: Optional[str] = None - """The text at the top of your login page.""" - - logo_path: Optional[str] = None - """The URL of the logo on your login page.""" - - text_color: Optional[str] = None - """The text color on your login page.""" - - -class OrganizationCreateResponse(BaseModel): - allow_authenticate_via_warp: Optional[bool] = None - """ - When set to true, users can authenticate via WARP for any application in your - organization. Application settings will take precedence over this value. - """ - - auth_domain: Optional[str] = None - """The unique subdomain assigned to your Zero Trust organization.""" - - auto_redirect_to_identity: Optional[bool] = None - """ - When set to `true`, users skip the identity provider selection step during - login. - """ - - created_at: Optional[datetime] = None - - custom_pages: Optional[CustomPages] = None - - is_ui_read_only: Optional[bool] = None - """Lock all settings as Read-Only in the Dashboard, regardless of user permission. - - Updates may only be made via the API or Terraform for this account when enabled. - """ - - login_design: Optional[LoginDesign] = None - - name: Optional[str] = None - """The name of your Zero Trust organization.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for applications will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - ui_read_only_toggle_reason: Optional[str] = None - """A description of the reason why the UI read only field is being toggled.""" - - updated_at: Optional[datetime] = None - - user_seat_expiration_inactive_time: Optional[str] = None - """The amount of time a user seat is inactive before it expires. - - When the user seat exceeds the set time of inactivity, the user is removed as an - active seat and no longer counts against your Teams seat count. Must be in the - format `300ms` or `2h45m`. Valid time units are: `ns`, `us` (or `µs`), `ms`, - `s`, `m`, `h`. - """ - - warp_auth_session_duration: Optional[str] = None - """The amount of time that tokens issued for applications will be valid. - - Must be in the format `30m` or `2h45m`. Valid time units are: m, h. - """ diff --git a/src/cloudflare/types/zero_trust/organization_update_response.py b/src/cloudflare/types/zero_trust/organization_update_response.py deleted file mode 100644 index afd40fcdf..000000000 --- a/src/cloudflare/types/zero_trust/organization_update_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["OrganizationUpdateResponse", "CustomPages", "LoginDesign"] - - -class CustomPages(BaseModel): - forbidden: Optional[str] = None - """ - The uid of the custom page to use when a user is denied access after failing a - non-identity rule. - """ - - identity_denied: Optional[str] = None - """The uid of the custom page to use when a user is denied access.""" - - -class LoginDesign(BaseModel): - background_color: Optional[str] = None - """The background color on your login page.""" - - footer_text: Optional[str] = None - """The text at the bottom of your login page.""" - - header_text: Optional[str] = None - """The text at the top of your login page.""" - - logo_path: Optional[str] = None - """The URL of the logo on your login page.""" - - text_color: Optional[str] = None - """The text color on your login page.""" - - -class OrganizationUpdateResponse(BaseModel): - allow_authenticate_via_warp: Optional[bool] = None - """ - When set to true, users can authenticate via WARP for any application in your - organization. Application settings will take precedence over this value. - """ - - auth_domain: Optional[str] = None - """The unique subdomain assigned to your Zero Trust organization.""" - - auto_redirect_to_identity: Optional[bool] = None - """ - When set to `true`, users skip the identity provider selection step during - login. - """ - - created_at: Optional[datetime] = None - - custom_pages: Optional[CustomPages] = None - - is_ui_read_only: Optional[bool] = None - """Lock all settings as Read-Only in the Dashboard, regardless of user permission. - - Updates may only be made via the API or Terraform for this account when enabled. - """ - - login_design: Optional[LoginDesign] = None - - name: Optional[str] = None - """The name of your Zero Trust organization.""" - - session_duration: Optional[str] = None - """The amount of time that tokens issued for applications will be valid. - - Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), - ms, s, m, h. - """ - - ui_read_only_toggle_reason: Optional[str] = None - """A description of the reason why the UI read only field is being toggled.""" - - updated_at: Optional[datetime] = None - - user_seat_expiration_inactive_time: Optional[str] = None - """The amount of time a user seat is inactive before it expires. - - When the user seat exceeds the set time of inactivity, the user is removed as an - active seat and no longer counts against your Teams seat count. Must be in the - format `300ms` or `2h45m`. Valid time units are: `ns`, `us` (or `µs`), `ms`, - `s`, `m`, `h`. - """ - - warp_auth_session_duration: Optional[str] = None - """The amount of time that tokens issued for applications will be valid. - - Must be in the format `30m` or `2h45m`. Valid time units are: m, h. - """ diff --git a/src/cloudflare/types/zero_trust/seat_edit_response.py b/src/cloudflare/types/zero_trust/seat_edit_response.py index 2bf92907a..0551aa5b2 100644 --- a/src/cloudflare/types/zero_trust/seat_edit_response.py +++ b/src/cloudflare/types/zero_trust/seat_edit_response.py @@ -1,26 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ..._models import BaseModel +from .access_seats import AccessSeats -__all__ = ["SeatEditResponse", "SeatEditResponseItem"] +__all__ = ["SeatEditResponse"] - -class SeatEditResponseItem(BaseModel): - access_seat: Optional[bool] = None - """True if the seat is part of Access.""" - - created_at: Optional[datetime] = None - - gateway_seat: Optional[bool] = None - """True if the seat is part of Gateway.""" - - seat_uid: Optional[str] = None - """Identifier""" - - updated_at: Optional[datetime] = None - - -SeatEditResponse = List[SeatEditResponseItem] +SeatEditResponse = List[AccessSeats] diff --git a/src/cloudflare/types/zero_trust/teams_devices_devices.py b/src/cloudflare/types/zero_trust/teams_devices_devices.py new file mode 100644 index 000000000..d351e05e6 --- /dev/null +++ b/src/cloudflare/types/zero_trust/teams_devices_devices.py @@ -0,0 +1,80 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["TeamsDevicesDevices", "User"] + + +class User(BaseModel): + id: Optional[str] = None + """UUID""" + + email: Optional[str] = None + """The contact email address of the user.""" + + name: Optional[str] = None + """The enrolled device user's name.""" + + +class TeamsDevicesDevices(BaseModel): + id: Optional[str] = None + """Device ID.""" + + created: Optional[datetime] = None + """When the device was created.""" + + deleted: Optional[bool] = None + """True if the device was deleted.""" + + device_type: Optional[Literal["windows", "mac", "linux", "android", "ios"]] = None + + ip: Optional[str] = None + """IPv4 or IPv6 address.""" + + key: Optional[str] = None + """The device's public key.""" + + last_seen: Optional[datetime] = None + """When the device last connected to Cloudflare services.""" + + mac_address: Optional[str] = None + """The device mac address.""" + + manufacturer: Optional[str] = None + """The device manufacturer name.""" + + model: Optional[str] = None + """The device model name.""" + + name: Optional[str] = None + """The device name.""" + + os_distro_name: Optional[str] = None + """The Linux distro name.""" + + os_distro_revision: Optional[str] = None + """The Linux distro revision.""" + + os_version: Optional[str] = None + """The operating system version.""" + + os_version_extra: Optional[str] = None + """The operating system version extra parameter.""" + + revoked_at: Optional[datetime] = None + """When the device was revoked.""" + + serial_number: Optional[str] = None + """The device serial number.""" + + updated: Optional[datetime] = None + """When the device was updated.""" + + user: Optional[User] = None + + version: Optional[str] = None + """The WARP client version.""" diff --git a/src/cloudflare/types/zero_trust/tunnel_get_response.py b/src/cloudflare/types/zero_trust/tunnel_argo_tunnel.py similarity index 93% rename from src/cloudflare/types/zero_trust/tunnel_get_response.py rename to src/cloudflare/types/zero_trust/tunnel_argo_tunnel.py index 6c01ec102..370e8cd60 100644 --- a/src/cloudflare/types/zero_trust/tunnel_get_response.py +++ b/src/cloudflare/types/zero_trust/tunnel_argo_tunnel.py @@ -5,7 +5,7 @@ from datetime import datetime from ..._models import BaseModel -__all__ = ["TunnelGetResponse", "Connection"] +__all__ = ["TunnelArgoTunnel", "Connection"] class Connection(BaseModel): @@ -24,7 +24,7 @@ class Connection(BaseModel): """UUID of the Cloudflare Tunnel connection.""" -class TunnelGetResponse(BaseModel): +class TunnelArgoTunnel(BaseModel): id: str """UUID of the tunnel.""" diff --git a/src/cloudflare/types/zero_trust/tunnel_create_response.py b/src/cloudflare/types/zero_trust/tunnel_create_response.py deleted file mode 100644 index f75e3a3f7..000000000 --- a/src/cloudflare/types/zero_trust/tunnel_create_response.py +++ /dev/null @@ -1,44 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["TunnelCreateResponse", "Connection"] - - -class Connection(BaseModel): - colo_name: Optional[str] = None - """The Cloudflare data center used for this connection.""" - - is_pending_reconnect: Optional[bool] = None - """ - Cloudflare continues to track connections for several minutes after they - disconnect. This is an optimization to improve latency and reliability of - reconnecting. If `true`, the connection has disconnected but is still being - tracked. If `false`, the connection is actively serving traffic. - """ - - uuid: Optional[str] = None - """UUID of the Cloudflare Tunnel connection.""" - - -class TunnelCreateResponse(BaseModel): - id: str - """UUID of the tunnel.""" - - connections: List[Connection] - """The tunnel connections between your origin and Cloudflare's edge.""" - - created_at: datetime - """Timestamp of when the tunnel was created.""" - - name: str - """A user-friendly name for the tunnel.""" - - deleted_at: Optional[datetime] = None - """Timestamp of when the tunnel was deleted. - - If `null`, the tunnel has not been deleted. - """ diff --git a/src/cloudflare/types/zero_trust/tunnel_delete_response.py b/src/cloudflare/types/zero_trust/tunnel_delete_response.py deleted file mode 100644 index 97d24dcc6..000000000 --- a/src/cloudflare/types/zero_trust/tunnel_delete_response.py +++ /dev/null @@ -1,44 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["TunnelDeleteResponse", "Connection"] - - -class Connection(BaseModel): - colo_name: Optional[str] = None - """The Cloudflare data center used for this connection.""" - - is_pending_reconnect: Optional[bool] = None - """ - Cloudflare continues to track connections for several minutes after they - disconnect. This is an optimization to improve latency and reliability of - reconnecting. If `true`, the connection has disconnected but is still being - tracked. If `false`, the connection is actively serving traffic. - """ - - uuid: Optional[str] = None - """UUID of the Cloudflare Tunnel connection.""" - - -class TunnelDeleteResponse(BaseModel): - id: str - """UUID of the tunnel.""" - - connections: List[Connection] - """The tunnel connections between your origin and Cloudflare's edge.""" - - created_at: datetime - """Timestamp of when the tunnel was created.""" - - name: str - """A user-friendly name for the tunnel.""" - - deleted_at: Optional[datetime] = None - """Timestamp of when the tunnel was deleted. - - If `null`, the tunnel has not been deleted. - """ diff --git a/src/cloudflare/types/zero_trust/tunnels/__init__.py b/src/cloudflare/types/zero_trust/tunnels/__init__.py index 4ff9770dd..6e9032962 100644 --- a/src/cloudflare/types/zero_trust/tunnels/__init__.py +++ b/src/cloudflare/types/zero_trust/tunnels/__init__.py @@ -3,7 +3,7 @@ from __future__ import annotations from .token_get_response import TokenGetResponse as TokenGetResponse -from .connector_get_response import ConnectorGetResponse as ConnectorGetResponse +from .tunnel_tunnel_client import TunnelTunnelClient as TunnelTunnelClient from .connection_get_response import ConnectionGetResponse as ConnectionGetResponse from .connection_delete_params import ConnectionDeleteParams as ConnectionDeleteParams from .management_create_params import ManagementCreateParams as ManagementCreateParams diff --git a/src/cloudflare/types/zero_trust/tunnels/connection_get_response.py b/src/cloudflare/types/zero_trust/tunnels/connection_get_response.py index 7356073d2..cd51898ac 100644 --- a/src/cloudflare/types/zero_trust/tunnels/connection_get_response.py +++ b/src/cloudflare/types/zero_trust/tunnels/connection_get_response.py @@ -1,68 +1,9 @@ # File generated from our OpenAPI spec by Stainless. -from typing import List, Optional -from datetime import datetime +from typing import List -from ...._models import BaseModel +from .tunnel_tunnel_client import TunnelTunnelClient -__all__ = ["ConnectionGetResponse", "ConnectionGetResponseItem", "ConnectionGetResponseItemConn"] +__all__ = ["ConnectionGetResponse"] - -class ConnectionGetResponseItemConn(BaseModel): - id: Optional[str] = None - """UUID of the Cloudflare Tunnel connection.""" - - client_id: Optional[object] = None - """UUID of the cloudflared instance.""" - - client_version: Optional[str] = None - """The cloudflared version used to establish this connection.""" - - colo_name: Optional[str] = None - """The Cloudflare data center used for this connection.""" - - is_pending_reconnect: Optional[bool] = None - """ - Cloudflare continues to track connections for several minutes after they - disconnect. This is an optimization to improve latency and reliability of - reconnecting. If `true`, the connection has disconnected but is still being - tracked. If `false`, the connection is actively serving traffic. - """ - - opened_at: Optional[datetime] = None - """Timestamp of when the connection was established.""" - - origin_ip: Optional[str] = None - """The public IP address of the host running cloudflared.""" - - uuid: Optional[str] = None - """UUID of the Cloudflare Tunnel connection.""" - - -class ConnectionGetResponseItem(BaseModel): - id: Optional[str] = None - """UUID of the Cloudflare Tunnel connection.""" - - arch: Optional[str] = None - """The cloudflared OS architecture used to establish this connection.""" - - config_version: Optional[int] = None - """The version of the remote tunnel configuration. - - Used internally to sync cloudflared with the Zero Trust dashboard. - """ - - conns: Optional[List[ConnectionGetResponseItemConn]] = None - """The Cloudflare Tunnel connections between your origin and Cloudflare's edge.""" - - features: Optional[List[str]] = None - """Features enabled for the Cloudflare Tunnel.""" - - run_at: Optional[datetime] = None - """Timestamp of when the tunnel connection was started.""" - - version: Optional[str] = None - """The cloudflared version used to establish this connection.""" - - -ConnectionGetResponse = List[ConnectionGetResponseItem] +ConnectionGetResponse = List[TunnelTunnelClient] diff --git a/src/cloudflare/types/zero_trust/tunnels/connector_get_response.py b/src/cloudflare/types/zero_trust/tunnels/tunnel_tunnel_client.py similarity index 96% rename from src/cloudflare/types/zero_trust/tunnels/connector_get_response.py rename to src/cloudflare/types/zero_trust/tunnels/tunnel_tunnel_client.py index 1329881af..4ba78a240 100644 --- a/src/cloudflare/types/zero_trust/tunnels/connector_get_response.py +++ b/src/cloudflare/types/zero_trust/tunnels/tunnel_tunnel_client.py @@ -5,7 +5,7 @@ from datetime import datetime from ...._models import BaseModel -__all__ = ["ConnectorGetResponse", "Conn"] +__all__ = ["TunnelTunnelClient", "Conn"] class Conn(BaseModel): @@ -39,7 +39,7 @@ class Conn(BaseModel): """UUID of the Cloudflare Tunnel connection.""" -class ConnectorGetResponse(BaseModel): +class TunnelTunnelClient(BaseModel): id: Optional[str] = None """UUID of the Cloudflare Tunnel connection.""" diff --git a/src/cloudflare/types/zones/setting_edit_params.py b/src/cloudflare/types/zones/setting_edit_params.py index a96d84f9b..8fd6f215e 100644 --- a/src/cloudflare/types/zones/setting_edit_params.py +++ b/src/cloudflare/types/zones/setting_edit_params.py @@ -2,72 +2,70 @@ from __future__ import annotations -from typing import List, Union, Iterable, Optional +from typing import Union, Iterable 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, +) + __all__ = [ "SettingEditParams", "Item", - "ItemZones0rtt", - "ItemZonesAdvancedDDOS", - "ItemZonesAlwaysOnline", - "ItemZonesAlwaysUseHTTPS", - "ItemZonesAutomaticHTTPSRewrites", - "ItemZonesBrotli", - "ItemZonesBrowserCacheTTL", - "ItemZonesBrowserCheck", - "ItemZonesCacheLevel", - "ItemZonesChallengeTTL", - "ItemZonesCiphers", "ItemZonesCNAMEFlattening", - "ItemZonesDevelopmentMode", - "ItemZonesEarlyHints", "ItemZonesEdgeCacheTTL", - "ItemZonesEmailObfuscation", - "ItemZonesH2Prioritization", - "ItemZonesHotlinkProtection", - "ItemZonesHTTP2", - "ItemZonesHTTP3", - "ItemZonesImageResizing", - "ItemZonesIPGeolocation", - "ItemZonesIPV6", "ItemZonesMaxUpload", - "ItemZonesMinTLSVersion", - "ItemZonesMinify", - "ItemZonesMinifyValue", - "ItemZonesMirage", - "ItemZonesMobileRedirect", - "ItemZonesMobileRedirectValue", - "ItemZonesNEL", - "ItemZonesNELValue", - "ItemZonesOpportunisticEncryption", - "ItemZonesOpportunisticOnion", - "ItemZonesOrangeToOrange", - "ItemZonesOriginErrorPagePassThru", - "ItemZonesPolish", - "ItemZonesPrefetchPreload", - "ItemZonesProxyReadTimeout", - "ItemZonesPseudoIPV4", - "ItemZonesResponseBuffering", - "ItemZonesRocketLoader", "ItemZonesSchemasAutomaticPlatformOptimization", - "ItemZonesSchemasAutomaticPlatformOptimizationValue", - "ItemZonesSecurityHeader", - "ItemZonesSecurityHeaderValue", - "ItemZonesSecurityHeaderValueStrictTransportSecurity", - "ItemZonesSecurityLevel", - "ItemZonesServerSideExclude", "ItemZonesSha1Support", - "ItemZonesSortQueryStringForCache", - "ItemZonesSSL", - "ItemZonesSSLRecommender", "ItemZonesTLS1_2Only", - "ItemZonesTLS1_3", - "ItemZonesTLSClientAuth", - "ItemZonesTrueClientIPHeader", - "ItemZonesWAF", - "ItemZonesWebp", - "ItemZonesWebsockets", ] @@ -79,127 +77,6 @@ class SettingEditParams(TypedDict, total=False): """One or more zone setting objects. Must contain an ID and a value.""" -class ItemZones0rtt(TypedDict, total=False): - id: Required[Literal["0rtt"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesAdvancedDDOS(TypedDict, total=False): - id: Required[Literal["advanced_ddos"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesAlwaysOnline(TypedDict, total=False): - id: Required[Literal["always_online"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesAlwaysUseHTTPS(TypedDict, total=False): - id: Required[Literal["always_use_https"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesAutomaticHTTPSRewrites(TypedDict, total=False): - id: Required[Literal["automatic_https_rewrites"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesBrotli(TypedDict, total=False): - id: Required[Literal["brotli"]] - """ID of the zone setting.""" - - value: Required[Literal["off", "on"]] - """Current value of the zone setting.""" - - -class ItemZonesBrowserCacheTTL(TypedDict, total=False): - id: Required[Literal["browser_cache_ttl"]] - """ID of the zone setting.""" - - value: Required[ - Literal[ - 0, - 30, - 60, - 120, - 300, - 1200, - 1800, - 3600, - 7200, - 10800, - 14400, - 18000, - 28800, - 43200, - 57600, - 72000, - 86400, - 172800, - 259200, - 345600, - 432000, - 691200, - 1382400, - 2073600, - 2678400, - 5356800, - 16070400, - 31536000, - ] - ] - """Current value of the zone setting.""" - - -class ItemZonesBrowserCheck(TypedDict, total=False): - id: Required[Literal["browser_check"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesCacheLevel(TypedDict, total=False): - id: Required[Literal["cache_level"]] - """ID of the zone setting.""" - - value: Required[Literal["aggressive", "basic", "simplified"]] - """Current value of the zone setting.""" - - -class ItemZonesChallengeTTL(TypedDict, total=False): - id: Required[Literal["challenge_ttl"]] - """ID of the zone setting.""" - - value: Required[ - Literal[300, 900, 1800, 2700, 3600, 7200, 10800, 14400, 28800, 57600, 86400, 604800, 2592000, 31536000] - ] - """Current value of the zone setting.""" - - -class ItemZonesCiphers(TypedDict, total=False): - id: Required[Literal["ciphers"]] - """ID of the zone setting.""" - - value: Required[List[str]] - """Current value of the zone setting.""" - - class ItemZonesCNAMEFlattening(TypedDict, total=False): id: Required[Literal["cname_flattening"]] """How to flatten the cname destination.""" @@ -208,22 +85,6 @@ class ItemZonesCNAMEFlattening(TypedDict, total=False): """Current value of the zone setting.""" -class ItemZonesDevelopmentMode(TypedDict, total=False): - id: Required[Literal["development_mode"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesEarlyHints(TypedDict, total=False): - id: Required[Literal["early_hints"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - class ItemZonesEdgeCacheTTL(TypedDict, total=False): id: Required[Literal["edge_cache_ttl"]] """ID of the zone setting.""" @@ -256,70 +117,6 @@ class ItemZonesEdgeCacheTTL(TypedDict, total=False): """Current value of the zone setting.""" -class ItemZonesEmailObfuscation(TypedDict, total=False): - id: Required[Literal["email_obfuscation"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesH2Prioritization(TypedDict, total=False): - id: Required[Literal["h2_prioritization"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off", "custom"]] - """Current value of the zone setting.""" - - -class ItemZonesHotlinkProtection(TypedDict, total=False): - id: Required[Literal["hotlink_protection"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesHTTP2(TypedDict, total=False): - id: Required[Literal["http2"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesHTTP3(TypedDict, total=False): - id: Required[Literal["http3"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesImageResizing(TypedDict, total=False): - id: Required[Literal["image_resizing"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off", "open"]] - """Current value of the zone setting.""" - - -class ItemZonesIPGeolocation(TypedDict, total=False): - id: Required[Literal["ip_geolocation"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesIPV6(TypedDict, total=False): - id: Required[Literal["ipv6"]] - """ID of the zone setting.""" - - value: Required[Literal["off", "on"]] - """Current value of the zone setting.""" - - class ItemZonesMaxUpload(TypedDict, total=False): id: Required[Literal["max_upload"]] """identifier of the zone setting.""" @@ -328,237 +125,11 @@ class ItemZonesMaxUpload(TypedDict, total=False): """Current value of the zone setting.""" -class ItemZonesMinTLSVersion(TypedDict, total=False): - id: Required[Literal["min_tls_version"]] - """ID of the zone setting.""" - - value: Required[Literal["1.0", "1.1", "1.2", "1.3"]] - """Current value of the zone setting.""" - - -class ItemZonesMinifyValue(TypedDict, total=False): - css: Literal["on", "off"] - """Automatically minify all CSS files for your website.""" - - html: Literal["on", "off"] - """Automatically minify all HTML files for your website.""" - - js: Literal["on", "off"] - """Automatically minify all JavaScript files for your website.""" - - -class ItemZonesMinify(TypedDict, total=False): - id: Required[Literal["minify"]] - """Zone setting identifier.""" - - value: Required[ItemZonesMinifyValue] - """Current value of the zone setting.""" - - -class ItemZonesMirage(TypedDict, total=False): - id: Required[Literal["mirage"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesMobileRedirectValue(TypedDict, total=False): - mobile_subdomain: Optional[str] - """ - Which subdomain prefix you wish to redirect visitors on mobile devices to - (subdomain must already exist). - """ - - status: Literal["on", "off"] - """Whether or not mobile redirect is enabled.""" - - strip_uri: bool - """ - Whether to drop the current page path and redirect to the mobile subdomain URL - root, or keep the path and redirect to the same page on the mobile subdomain. - """ - - -class ItemZonesMobileRedirect(TypedDict, total=False): - id: Required[Literal["mobile_redirect"]] - """Identifier of the zone setting.""" - - value: Required[ItemZonesMobileRedirectValue] - """Current value of the zone setting.""" - - -class ItemZonesNELValue(TypedDict, total=False): - enabled: bool - - -class ItemZonesNEL(TypedDict, total=False): - id: Required[Literal["nel"]] - """Zone setting identifier.""" - - value: Required[ItemZonesNELValue] - """Current value of the zone setting.""" - - -class ItemZonesOpportunisticEncryption(TypedDict, total=False): - id: Required[Literal["opportunistic_encryption"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesOpportunisticOnion(TypedDict, total=False): - id: Required[Literal["opportunistic_onion"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesOrangeToOrange(TypedDict, total=False): - id: Required[Literal["orange_to_orange"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesOriginErrorPagePassThru(TypedDict, total=False): - id: Required[Literal["origin_error_page_pass_thru"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesPolish(TypedDict, total=False): - id: Required[Literal["polish"]] - """ID of the zone setting.""" - - value: Required[Literal["off", "lossless", "lossy"]] - """Current value of the zone setting.""" - - -class ItemZonesPrefetchPreload(TypedDict, total=False): - id: Required[Literal["prefetch_preload"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesProxyReadTimeout(TypedDict, total=False): - id: Required[Literal["proxy_read_timeout"]] - """ID of the zone setting.""" - - value: Required[float] - """Current value of the zone setting.""" - - -class ItemZonesPseudoIPV4(TypedDict, total=False): - id: Required[Literal["pseudo_ipv4"]] - """Value of the Pseudo IPv4 setting.""" - - value: Required[Literal["off", "add_header", "overwrite_header"]] - """Current value of the zone setting.""" - - -class ItemZonesResponseBuffering(TypedDict, total=False): - id: Required[Literal["response_buffering"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesRocketLoader(TypedDict, total=False): - id: Required[Literal["rocket_loader"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesSchemasAutomaticPlatformOptimizationValue(TypedDict, total=False): - cache_by_device_type: Required[bool] - """ - Indicates whether or not - [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) - is enabled. - """ - - cf: Required[bool] - """Indicates whether or not Cloudflare proxy is enabled.""" - - enabled: Required[bool] - """Indicates whether or not Automatic Platform Optimization is enabled.""" - - hostnames: Required[List[str]] - """ - An array of hostnames where Automatic Platform Optimization for WordPress is - activated. - """ - - wordpress: Required[bool] - """Indicates whether or not site is powered by WordPress.""" - - wp_plugin: Required[bool] - """ - Indicates whether or not - [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is - installed. - """ - - class ItemZonesSchemasAutomaticPlatformOptimization(TypedDict, total=False): id: Required[Literal["automatic_platform_optimization"]] """ID of the zone setting.""" - value: Required[ItemZonesSchemasAutomaticPlatformOptimizationValue] - """Current value of the zone setting.""" - - -class ItemZonesSecurityHeaderValueStrictTransportSecurity(TypedDict, total=False): - enabled: bool - """Whether or not strict transport security is enabled.""" - - include_subdomains: bool - """Include all subdomains for strict transport security.""" - - max_age: float - """Max age in seconds of the strict transport security.""" - - nosniff: bool - """Whether or not to include 'X-Content-Type-Options: nosniff' header.""" - - -class ItemZonesSecurityHeaderValue(TypedDict, total=False): - strict_transport_security: ItemZonesSecurityHeaderValueStrictTransportSecurity - """Strict Transport Security.""" - - -class ItemZonesSecurityHeader(TypedDict, total=False): - id: Required[Literal["security_header"]] - """ID of the zone's security header.""" - - value: Required[ItemZonesSecurityHeaderValue] - """Current value of the zone setting.""" - - -class ItemZonesSecurityLevel(TypedDict, total=False): - id: Required[Literal["security_level"]] - """ID of the zone setting.""" - - value: Required[Literal["off", "essentially_off", "low", "medium", "high", "under_attack"]] - """Current value of the zone setting.""" - - -class ItemZonesServerSideExclude(TypedDict, total=False): - id: Required[Literal["server_side_exclude"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] + value: Required[ZonesAutomaticPlatformOptimizationParam] """Current value of the zone setting.""" @@ -570,30 +141,6 @@ class ItemZonesSha1Support(TypedDict, total=False): """Current value of the zone setting.""" -class ItemZonesSortQueryStringForCache(TypedDict, total=False): - id: Required[Literal["sort_query_string_for_cache"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesSSL(TypedDict, total=False): - id: Required[Literal["ssl"]] - """ID of the zone setting.""" - - value: Required[Literal["off", "flexible", "full", "strict"]] - """Current value of the zone setting.""" - - -class ItemZonesSSLRecommender(TypedDict, total=False): - id: Literal["ssl_recommender"] - """Enrollment value for SSL/TLS Recommender.""" - - enabled: bool - """ssl-recommender enrollment setting.""" - - class ItemZonesTLS1_2Only(TypedDict, total=False): id: Required[Literal["tls_1_2_only"]] """Zone setting identifier.""" @@ -602,107 +149,59 @@ class ItemZonesTLS1_2Only(TypedDict, total=False): """Current value of the zone setting.""" -class ItemZonesTLS1_3(TypedDict, total=False): - id: Required[Literal["tls_1_3"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off", "zrt"]] - """Current value of the zone setting.""" - - -class ItemZonesTLSClientAuth(TypedDict, total=False): - id: Required[Literal["tls_client_auth"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesTrueClientIPHeader(TypedDict, total=False): - id: Required[Literal["true_client_ip_header"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesWAF(TypedDict, total=False): - id: Required[Literal["waf"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" - - -class ItemZonesWebp(TypedDict, total=False): - id: Required[Literal["webp"]] - """ID of the zone setting.""" - - value: Required[Literal["off", "on"]] - """Current value of the zone setting.""" - - -class ItemZonesWebsockets(TypedDict, total=False): - id: Required[Literal["websockets"]] - """ID of the zone setting.""" - - value: Required[Literal["off", "on"]] - """Current value of the zone setting.""" - - Item = Union[ - ItemZones0rtt, - ItemZonesAdvancedDDOS, - ItemZonesAlwaysOnline, - ItemZonesAlwaysUseHTTPS, - ItemZonesAutomaticHTTPSRewrites, - ItemZonesBrotli, - ItemZonesBrowserCacheTTL, - ItemZonesBrowserCheck, - ItemZonesCacheLevel, - ItemZonesChallengeTTL, - ItemZonesCiphers, + Zones0rttParam, + ZonesAdvancedDDOSParam, + ZonesAlwaysOnlineParam, + ZonesAlwaysUseHTTPSParam, + ZonesAutomaticHTTPSRewritesParam, + ZonesBrotliParam, + ZonesBrowserCacheTTLParam, + ZonesBrowserCheckParam, + ZonesCacheLevelParam, + ZonesChallengeTTLParam, + ZonesCiphersParam, ItemZonesCNAMEFlattening, - ItemZonesDevelopmentMode, - ItemZonesEarlyHints, + ZonesDevelopmentModeParam, + ZonesEarlyHintsParam, ItemZonesEdgeCacheTTL, - ItemZonesEmailObfuscation, - ItemZonesH2Prioritization, - ItemZonesHotlinkProtection, - ItemZonesHTTP2, - ItemZonesHTTP3, - ItemZonesImageResizing, - ItemZonesIPGeolocation, - ItemZonesIPV6, + ZonesEmailObfuscationParam, + ZonesH2PrioritizationParam, + ZonesHotlinkProtectionParam, + ZonesHTTP2Param, + ZonesHTTP3Param, + ZonesImageResizingParam, + ZonesIPGeolocationParam, + ZonesIPV6Param, ItemZonesMaxUpload, - ItemZonesMinTLSVersion, - ItemZonesMinify, - ItemZonesMirage, - ItemZonesMobileRedirect, - ItemZonesNEL, - ItemZonesOpportunisticEncryption, - ItemZonesOpportunisticOnion, - ItemZonesOrangeToOrange, - ItemZonesOriginErrorPagePassThru, - ItemZonesPolish, - ItemZonesPrefetchPreload, - ItemZonesProxyReadTimeout, - ItemZonesPseudoIPV4, - ItemZonesResponseBuffering, - ItemZonesRocketLoader, + ZonesMinTLSVersionParam, + ZonesMinifyParam, + ZonesMirageParam, + ZonesMobileRedirectParam, + ZonesNELParam, + ZonesOpportunisticEncryptionParam, + ZonesOpportunisticOnionParam, + ZonesOrangeToOrangeParam, + ZonesOriginErrorPagePassThruParam, + ZonesPolishParam, + ZonesPrefetchPreloadParam, + ZonesProxyReadTimeoutParam, + ZonesPseudoIPV4Param, + ZonesBufferingParam, + ZonesRocketLoaderParam, ItemZonesSchemasAutomaticPlatformOptimization, - ItemZonesSecurityHeader, - ItemZonesSecurityLevel, - ItemZonesServerSideExclude, + ZonesSecurityHeaderParam, + ZonesSecurityLevelParam, + ZonesServerSideExcludeParam, ItemZonesSha1Support, - ItemZonesSortQueryStringForCache, - ItemZonesSSL, - ItemZonesSSLRecommender, + ZonesSortQueryStringForCacheParam, + ZonesSSLParam, + ZonesSSLRecommenderParam, ItemZonesTLS1_2Only, - ItemZonesTLS1_3, - ItemZonesTLSClientAuth, - ItemZonesTrueClientIPHeader, - ItemZonesWAF, - ItemZonesWebp, - ItemZonesWebsockets, + ZonesTLS1_3Param, + ZonesTLSClientAuthParam, + ZonesTrueClientIPHeaderParam, + ZonesWAFParam, + ZonesWebpParam, + ZonesWebsocketsParam, ] diff --git a/src/cloudflare/types/zones/setting_edit_response.py b/src/cloudflare/types/zones/setting_edit_response.py index 45c1bf16c..04471aaad 100644 --- a/src/cloudflare/types/zones/setting_edit_response.py +++ b/src/cloudflare/types/zones/setting_edit_response.py @@ -4,290 +4,71 @@ from typing import List, Union, Optional from datetime import datetime 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, +) from ..._models import BaseModel __all__ = [ "SettingEditResponse", "SettingEditResponseItem", - "SettingEditResponseItemZones0rtt", - "SettingEditResponseItemZonesAdvancedDDOS", - "SettingEditResponseItemZonesAlwaysOnline", - "SettingEditResponseItemZonesAlwaysUseHTTPS", - "SettingEditResponseItemZonesAutomaticHTTPSRewrites", - "SettingEditResponseItemZonesBrotli", - "SettingEditResponseItemZonesBrowserCacheTTL", - "SettingEditResponseItemZonesBrowserCheck", - "SettingEditResponseItemZonesCacheLevel", - "SettingEditResponseItemZonesChallengeTTL", - "SettingEditResponseItemZonesCiphers", "SettingEditResponseItemZonesCNAMEFlattening", - "SettingEditResponseItemZonesDevelopmentMode", - "SettingEditResponseItemZonesEarlyHints", "SettingEditResponseItemZonesEdgeCacheTTL", - "SettingEditResponseItemZonesEmailObfuscation", - "SettingEditResponseItemZonesH2Prioritization", - "SettingEditResponseItemZonesHotlinkProtection", - "SettingEditResponseItemZonesHTTP2", - "SettingEditResponseItemZonesHTTP3", - "SettingEditResponseItemZonesImageResizing", - "SettingEditResponseItemZonesIPGeolocation", - "SettingEditResponseItemZonesIPV6", "SettingEditResponseItemZonesMaxUpload", - "SettingEditResponseItemZonesMinTLSVersion", - "SettingEditResponseItemZonesMinify", - "SettingEditResponseItemZonesMinifyValue", - "SettingEditResponseItemZonesMirage", - "SettingEditResponseItemZonesMobileRedirect", - "SettingEditResponseItemZonesMobileRedirectValue", - "SettingEditResponseItemZonesNEL", - "SettingEditResponseItemZonesNELValue", - "SettingEditResponseItemZonesOpportunisticEncryption", - "SettingEditResponseItemZonesOpportunisticOnion", - "SettingEditResponseItemZonesOrangeToOrange", - "SettingEditResponseItemZonesOriginErrorPagePassThru", - "SettingEditResponseItemZonesPolish", - "SettingEditResponseItemZonesPrefetchPreload", - "SettingEditResponseItemZonesProxyReadTimeout", - "SettingEditResponseItemZonesPseudoIPV4", - "SettingEditResponseItemZonesResponseBuffering", - "SettingEditResponseItemZonesRocketLoader", "SettingEditResponseItemZonesSchemasAutomaticPlatformOptimization", - "SettingEditResponseItemZonesSchemasAutomaticPlatformOptimizationValue", - "SettingEditResponseItemZonesSecurityHeader", - "SettingEditResponseItemZonesSecurityHeaderValue", - "SettingEditResponseItemZonesSecurityHeaderValueStrictTransportSecurity", - "SettingEditResponseItemZonesSecurityLevel", - "SettingEditResponseItemZonesServerSideExclude", "SettingEditResponseItemZonesSha1Support", - "SettingEditResponseItemZonesSortQueryStringForCache", - "SettingEditResponseItemZonesSSL", - "SettingEditResponseItemZonesSSLRecommender", "SettingEditResponseItemZonesTLS1_2Only", - "SettingEditResponseItemZonesTLS1_3", - "SettingEditResponseItemZonesTLSClientAuth", - "SettingEditResponseItemZonesTrueClientIPHeader", - "SettingEditResponseItemZonesWAF", - "SettingEditResponseItemZonesWebp", - "SettingEditResponseItemZonesWebsockets", ] -class SettingEditResponseItemZones0rtt(BaseModel): - id: Literal["0rtt"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesAdvancedDDOS(BaseModel): - id: Literal["advanced_ddos"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesAlwaysOnline(BaseModel): - id: Literal["always_online"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesAlwaysUseHTTPS(BaseModel): - id: Literal["always_use_https"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesAutomaticHTTPSRewrites(BaseModel): - id: Literal["automatic_https_rewrites"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesBrotli(BaseModel): - id: Literal["brotli"] - """ID of the zone setting.""" - - value: Literal["off", "on"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesBrowserCacheTTL(BaseModel): - id: Literal["browser_cache_ttl"] - """ID of the zone setting.""" - - value: Literal[ - 0, - 30, - 60, - 120, - 300, - 1200, - 1800, - 3600, - 7200, - 10800, - 14400, - 18000, - 28800, - 43200, - 57600, - 72000, - 86400, - 172800, - 259200, - 345600, - 432000, - 691200, - 1382400, - 2073600, - 2678400, - 5356800, - 16070400, - 31536000, - ] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesBrowserCheck(BaseModel): - id: Literal["browser_check"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesCacheLevel(BaseModel): - id: Literal["cache_level"] - """ID of the zone setting.""" - - value: Literal["aggressive", "basic", "simplified"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesChallengeTTL(BaseModel): - id: Literal["challenge_ttl"] - """ID of the zone setting.""" - - value: Literal[300, 900, 1800, 2700, 3600, 7200, 10800, 14400, 28800, 57600, 86400, 604800, 2592000, 31536000] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesCiphers(BaseModel): - id: Literal["ciphers"] - """ID of the zone setting.""" - - value: List[str] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - class SettingEditResponseItemZonesCNAMEFlattening(BaseModel): id: Literal["cname_flattening"] """How to flatten the cname destination.""" @@ -305,47 +86,6 @@ class SettingEditResponseItemZonesCNAMEFlattening(BaseModel): """last time this setting was modified.""" -class SettingEditResponseItemZonesDevelopmentMode(BaseModel): - id: Literal["development_mode"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - time_remaining: Optional[float] = None - """ - Value of the zone setting. Notes: The interval (in seconds) from when - development mode expires (positive integer) or last expired (negative integer) - for the domain. If development mode has never been enabled, this value is false. - """ - - -class SettingEditResponseItemZonesEarlyHints(BaseModel): - id: Literal["early_hints"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - class SettingEditResponseItemZonesEdgeCacheTTL(BaseModel): id: Literal["edge_cache_ttl"] """ID of the zone setting.""" @@ -385,142 +125,6 @@ class SettingEditResponseItemZonesEdgeCacheTTL(BaseModel): """last time this setting was modified.""" -class SettingEditResponseItemZonesEmailObfuscation(BaseModel): - id: Literal["email_obfuscation"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesH2Prioritization(BaseModel): - id: Literal["h2_prioritization"] - """ID of the zone setting.""" - - value: Literal["on", "off", "custom"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesHotlinkProtection(BaseModel): - id: Literal["hotlink_protection"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesHTTP2(BaseModel): - id: Literal["http2"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesHTTP3(BaseModel): - id: Literal["http3"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesImageResizing(BaseModel): - id: Literal["image_resizing"] - """ID of the zone setting.""" - - value: Literal["on", "off", "open"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesIPGeolocation(BaseModel): - id: Literal["ip_geolocation"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesIPV6(BaseModel): - id: Literal["ipv6"] - """ID of the zone setting.""" - - value: Literal["off", "on"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - class SettingEditResponseItemZonesMaxUpload(BaseModel): id: Literal["max_upload"] """identifier of the zone setting.""" @@ -538,399 +142,11 @@ class SettingEditResponseItemZonesMaxUpload(BaseModel): """last time this setting was modified.""" -class SettingEditResponseItemZonesMinTLSVersion(BaseModel): - id: Literal["min_tls_version"] - """ID of the zone setting.""" - - value: Literal["1.0", "1.1", "1.2", "1.3"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesMinifyValue(BaseModel): - css: Optional[Literal["on", "off"]] = None - """Automatically minify all CSS files for your website.""" - - html: Optional[Literal["on", "off"]] = None - """Automatically minify all HTML files for your website.""" - - js: Optional[Literal["on", "off"]] = None - """Automatically minify all JavaScript files for your website.""" - - -class SettingEditResponseItemZonesMinify(BaseModel): - id: Literal["minify"] - """Zone setting identifier.""" - - value: SettingEditResponseItemZonesMinifyValue - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesMirage(BaseModel): - id: Literal["mirage"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesMobileRedirectValue(BaseModel): - mobile_subdomain: Optional[str] = None - """ - Which subdomain prefix you wish to redirect visitors on mobile devices to - (subdomain must already exist). - """ - - status: Optional[Literal["on", "off"]] = None - """Whether or not mobile redirect is enabled.""" - - strip_uri: Optional[bool] = None - """ - Whether to drop the current page path and redirect to the mobile subdomain URL - root, or keep the path and redirect to the same page on the mobile subdomain. - """ - - -class SettingEditResponseItemZonesMobileRedirect(BaseModel): - id: Literal["mobile_redirect"] - """Identifier of the zone setting.""" - - value: SettingEditResponseItemZonesMobileRedirectValue - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesNELValue(BaseModel): - enabled: Optional[bool] = None - - -class SettingEditResponseItemZonesNEL(BaseModel): - id: Literal["nel"] - """Zone setting identifier.""" - - value: SettingEditResponseItemZonesNELValue - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesOpportunisticEncryption(BaseModel): - id: Literal["opportunistic_encryption"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesOpportunisticOnion(BaseModel): - id: Literal["opportunistic_onion"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesOrangeToOrange(BaseModel): - id: Literal["orange_to_orange"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesOriginErrorPagePassThru(BaseModel): - id: Literal["origin_error_page_pass_thru"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesPolish(BaseModel): - id: Literal["polish"] - """ID of the zone setting.""" - - value: Literal["off", "lossless", "lossy"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesPrefetchPreload(BaseModel): - id: Literal["prefetch_preload"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesProxyReadTimeout(BaseModel): - id: Literal["proxy_read_timeout"] - """ID of the zone setting.""" - - value: float - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesPseudoIPV4(BaseModel): - id: Literal["pseudo_ipv4"] - """Value of the Pseudo IPv4 setting.""" - - value: Literal["off", "add_header", "overwrite_header"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesResponseBuffering(BaseModel): - id: Literal["response_buffering"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesRocketLoader(BaseModel): - id: Literal["rocket_loader"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesSchemasAutomaticPlatformOptimizationValue(BaseModel): - cache_by_device_type: bool - """ - Indicates whether or not - [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) - is enabled. - """ - - cf: bool - """Indicates whether or not Cloudflare proxy is enabled.""" - - enabled: bool - """Indicates whether or not Automatic Platform Optimization is enabled.""" - - hostnames: List[str] - """ - An array of hostnames where Automatic Platform Optimization for WordPress is - activated. - """ - - wordpress: bool - """Indicates whether or not site is powered by WordPress.""" - - wp_plugin: bool - """ - Indicates whether or not - [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is - installed. - """ - - class SettingEditResponseItemZonesSchemasAutomaticPlatformOptimization(BaseModel): id: Literal["automatic_platform_optimization"] """ID of the zone setting.""" - value: SettingEditResponseItemZonesSchemasAutomaticPlatformOptimizationValue - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesSecurityHeaderValueStrictTransportSecurity(BaseModel): - enabled: Optional[bool] = None - """Whether or not strict transport security is enabled.""" - - include_subdomains: Optional[bool] = None - """Include all subdomains for strict transport security.""" - - max_age: Optional[float] = None - """Max age in seconds of the strict transport security.""" - - nosniff: Optional[bool] = None - """Whether or not to include 'X-Content-Type-Options: nosniff' header.""" - - -class SettingEditResponseItemZonesSecurityHeaderValue(BaseModel): - strict_transport_security: Optional[SettingEditResponseItemZonesSecurityHeaderValueStrictTransportSecurity] = None - """Strict Transport Security.""" - - -class SettingEditResponseItemZonesSecurityHeader(BaseModel): - id: Literal["security_header"] - """ID of the zone's security header.""" - - value: SettingEditResponseItemZonesSecurityHeaderValue - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesSecurityLevel(BaseModel): - id: Literal["security_level"] - """ID of the zone setting.""" - - value: Literal["off", "essentially_off", "low", "medium", "high", "under_attack"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesServerSideExclude(BaseModel): - id: Literal["server_side_exclude"] - """ID of the zone setting.""" - - value: Literal["on", "off"] + value: ZonesAutomaticPlatformOptimization """Current value of the zone setting.""" editable: Optional[Literal[True, False]] = None @@ -960,48 +176,6 @@ class SettingEditResponseItemZonesSha1Support(BaseModel): """last time this setting was modified.""" -class SettingEditResponseItemZonesSortQueryStringForCache(BaseModel): - id: Literal["sort_query_string_for_cache"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesSSL(BaseModel): - id: Literal["ssl"] - """ID of the zone setting.""" - - value: Literal["off", "flexible", "full", "strict"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesSSLRecommender(BaseModel): - id: Optional[Literal["ssl_recommender"]] = None - """Enrollment value for SSL/TLS Recommender.""" - - enabled: Optional[bool] = None - """ssl-recommender enrollment setting.""" - - class SettingEditResponseItemZonesTLS1_2Only(BaseModel): id: Literal["tls_1_2_only"] """Zone setting identifier.""" @@ -1019,163 +193,61 @@ class SettingEditResponseItemZonesTLS1_2Only(BaseModel): """last time this setting was modified.""" -class SettingEditResponseItemZonesTLS1_3(BaseModel): - id: Literal["tls_1_3"] - """ID of the zone setting.""" - - value: Literal["on", "off", "zrt"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesTLSClientAuth(BaseModel): - id: Literal["tls_client_auth"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesTrueClientIPHeader(BaseModel): - id: Literal["true_client_ip_header"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesWAF(BaseModel): - id: Literal["waf"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesWebp(BaseModel): - id: Literal["webp"] - """ID of the zone setting.""" - - value: Literal["off", "on"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesWebsockets(BaseModel): - id: Literal["websockets"] - """ID of the zone setting.""" - - value: Literal["off", "on"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - SettingEditResponseItem = Union[ - SettingEditResponseItemZones0rtt, - SettingEditResponseItemZonesAdvancedDDOS, - SettingEditResponseItemZonesAlwaysOnline, - SettingEditResponseItemZonesAlwaysUseHTTPS, - SettingEditResponseItemZonesAutomaticHTTPSRewrites, - SettingEditResponseItemZonesBrotli, - SettingEditResponseItemZonesBrowserCacheTTL, - SettingEditResponseItemZonesBrowserCheck, - SettingEditResponseItemZonesCacheLevel, - SettingEditResponseItemZonesChallengeTTL, - SettingEditResponseItemZonesCiphers, + Zones0rtt, + ZonesAdvancedDDOS, + ZonesAlwaysOnline, + ZonesAlwaysUseHTTPS, + ZonesAutomaticHTTPSRewrites, + ZonesBrotli, + ZonesBrowserCacheTTL, + ZonesBrowserCheck, + ZonesCacheLevel, + ZonesChallengeTTL, + ZonesCiphers, SettingEditResponseItemZonesCNAMEFlattening, - SettingEditResponseItemZonesDevelopmentMode, - SettingEditResponseItemZonesEarlyHints, + ZonesDevelopmentMode, + ZonesEarlyHints, SettingEditResponseItemZonesEdgeCacheTTL, - SettingEditResponseItemZonesEmailObfuscation, - SettingEditResponseItemZonesH2Prioritization, - SettingEditResponseItemZonesHotlinkProtection, - SettingEditResponseItemZonesHTTP2, - SettingEditResponseItemZonesHTTP3, - SettingEditResponseItemZonesImageResizing, - SettingEditResponseItemZonesIPGeolocation, - SettingEditResponseItemZonesIPV6, + ZonesEmailObfuscation, + ZonesH2Prioritization, + ZonesHotlinkProtection, + ZonesHTTP2, + ZonesHTTP3, + ZonesImageResizing, + ZonesIPGeolocation, + ZonesIPV6, SettingEditResponseItemZonesMaxUpload, - SettingEditResponseItemZonesMinTLSVersion, - SettingEditResponseItemZonesMinify, - SettingEditResponseItemZonesMirage, - SettingEditResponseItemZonesMobileRedirect, - SettingEditResponseItemZonesNEL, - SettingEditResponseItemZonesOpportunisticEncryption, - SettingEditResponseItemZonesOpportunisticOnion, - SettingEditResponseItemZonesOrangeToOrange, - SettingEditResponseItemZonesOriginErrorPagePassThru, - SettingEditResponseItemZonesPolish, - SettingEditResponseItemZonesPrefetchPreload, - SettingEditResponseItemZonesProxyReadTimeout, - SettingEditResponseItemZonesPseudoIPV4, - SettingEditResponseItemZonesResponseBuffering, - SettingEditResponseItemZonesRocketLoader, + ZonesMinTLSVersion, + ZonesMinify, + ZonesMirage, + ZonesMobileRedirect, + ZonesNEL, + ZonesOpportunisticEncryption, + ZonesOpportunisticOnion, + ZonesOrangeToOrange, + ZonesOriginErrorPagePassThru, + ZonesPolish, + ZonesPrefetchPreload, + ZonesProxyReadTimeout, + ZonesPseudoIPV4, + ZonesBuffering, + ZonesRocketLoader, SettingEditResponseItemZonesSchemasAutomaticPlatformOptimization, - SettingEditResponseItemZonesSecurityHeader, - SettingEditResponseItemZonesSecurityLevel, - SettingEditResponseItemZonesServerSideExclude, + ZonesSecurityHeader, + ZonesSecurityLevel, + ZonesServerSideExclude, SettingEditResponseItemZonesSha1Support, - SettingEditResponseItemZonesSortQueryStringForCache, - SettingEditResponseItemZonesSSL, - SettingEditResponseItemZonesSSLRecommender, + ZonesSortQueryStringForCache, + ZonesSSL, + ZonesSSLRecommender, SettingEditResponseItemZonesTLS1_2Only, - SettingEditResponseItemZonesTLS1_3, - SettingEditResponseItemZonesTLSClientAuth, - SettingEditResponseItemZonesTrueClientIPHeader, - SettingEditResponseItemZonesWAF, - SettingEditResponseItemZonesWebp, - SettingEditResponseItemZonesWebsockets, + ZonesTLS1_3, + ZonesTLSClientAuth, + ZonesTrueClientIPHeader, + ZonesWAF, + ZonesWebp, + ZonesWebsockets, ] SettingEditResponse = List[SettingEditResponseItem] diff --git a/src/cloudflare/types/zones/setting_get_response.py b/src/cloudflare/types/zones/setting_get_response.py index 9d9bc2f31..8eac450eb 100644 --- a/src/cloudflare/types/zones/setting_get_response.py +++ b/src/cloudflare/types/zones/setting_get_response.py @@ -4,290 +4,71 @@ from typing import List, Union, Optional from datetime import datetime 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, +) from ..._models import BaseModel __all__ = [ "SettingGetResponse", "SettingGetResponseItem", - "SettingGetResponseItemZones0rtt", - "SettingGetResponseItemZonesAdvancedDDOS", - "SettingGetResponseItemZonesAlwaysOnline", - "SettingGetResponseItemZonesAlwaysUseHTTPS", - "SettingGetResponseItemZonesAutomaticHTTPSRewrites", - "SettingGetResponseItemZonesBrotli", - "SettingGetResponseItemZonesBrowserCacheTTL", - "SettingGetResponseItemZonesBrowserCheck", - "SettingGetResponseItemZonesCacheLevel", - "SettingGetResponseItemZonesChallengeTTL", - "SettingGetResponseItemZonesCiphers", "SettingGetResponseItemZonesCNAMEFlattening", - "SettingGetResponseItemZonesDevelopmentMode", - "SettingGetResponseItemZonesEarlyHints", "SettingGetResponseItemZonesEdgeCacheTTL", - "SettingGetResponseItemZonesEmailObfuscation", - "SettingGetResponseItemZonesH2Prioritization", - "SettingGetResponseItemZonesHotlinkProtection", - "SettingGetResponseItemZonesHTTP2", - "SettingGetResponseItemZonesHTTP3", - "SettingGetResponseItemZonesImageResizing", - "SettingGetResponseItemZonesIPGeolocation", - "SettingGetResponseItemZonesIPV6", "SettingGetResponseItemZonesMaxUpload", - "SettingGetResponseItemZonesMinTLSVersion", - "SettingGetResponseItemZonesMinify", - "SettingGetResponseItemZonesMinifyValue", - "SettingGetResponseItemZonesMirage", - "SettingGetResponseItemZonesMobileRedirect", - "SettingGetResponseItemZonesMobileRedirectValue", - "SettingGetResponseItemZonesNEL", - "SettingGetResponseItemZonesNELValue", - "SettingGetResponseItemZonesOpportunisticEncryption", - "SettingGetResponseItemZonesOpportunisticOnion", - "SettingGetResponseItemZonesOrangeToOrange", - "SettingGetResponseItemZonesOriginErrorPagePassThru", - "SettingGetResponseItemZonesPolish", - "SettingGetResponseItemZonesPrefetchPreload", - "SettingGetResponseItemZonesProxyReadTimeout", - "SettingGetResponseItemZonesPseudoIPV4", - "SettingGetResponseItemZonesResponseBuffering", - "SettingGetResponseItemZonesRocketLoader", "SettingGetResponseItemZonesSchemasAutomaticPlatformOptimization", - "SettingGetResponseItemZonesSchemasAutomaticPlatformOptimizationValue", - "SettingGetResponseItemZonesSecurityHeader", - "SettingGetResponseItemZonesSecurityHeaderValue", - "SettingGetResponseItemZonesSecurityHeaderValueStrictTransportSecurity", - "SettingGetResponseItemZonesSecurityLevel", - "SettingGetResponseItemZonesServerSideExclude", "SettingGetResponseItemZonesSha1Support", - "SettingGetResponseItemZonesSortQueryStringForCache", - "SettingGetResponseItemZonesSSL", - "SettingGetResponseItemZonesSSLRecommender", "SettingGetResponseItemZonesTLS1_2Only", - "SettingGetResponseItemZonesTLS1_3", - "SettingGetResponseItemZonesTLSClientAuth", - "SettingGetResponseItemZonesTrueClientIPHeader", - "SettingGetResponseItemZonesWAF", - "SettingGetResponseItemZonesWebp", - "SettingGetResponseItemZonesWebsockets", ] -class SettingGetResponseItemZones0rtt(BaseModel): - id: Literal["0rtt"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesAdvancedDDOS(BaseModel): - id: Literal["advanced_ddos"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesAlwaysOnline(BaseModel): - id: Literal["always_online"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesAlwaysUseHTTPS(BaseModel): - id: Literal["always_use_https"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesAutomaticHTTPSRewrites(BaseModel): - id: Literal["automatic_https_rewrites"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesBrotli(BaseModel): - id: Literal["brotli"] - """ID of the zone setting.""" - - value: Literal["off", "on"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesBrowserCacheTTL(BaseModel): - id: Literal["browser_cache_ttl"] - """ID of the zone setting.""" - - value: Literal[ - 0, - 30, - 60, - 120, - 300, - 1200, - 1800, - 3600, - 7200, - 10800, - 14400, - 18000, - 28800, - 43200, - 57600, - 72000, - 86400, - 172800, - 259200, - 345600, - 432000, - 691200, - 1382400, - 2073600, - 2678400, - 5356800, - 16070400, - 31536000, - ] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesBrowserCheck(BaseModel): - id: Literal["browser_check"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesCacheLevel(BaseModel): - id: Literal["cache_level"] - """ID of the zone setting.""" - - value: Literal["aggressive", "basic", "simplified"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesChallengeTTL(BaseModel): - id: Literal["challenge_ttl"] - """ID of the zone setting.""" - - value: Literal[300, 900, 1800, 2700, 3600, 7200, 10800, 14400, 28800, 57600, 86400, 604800, 2592000, 31536000] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesCiphers(BaseModel): - id: Literal["ciphers"] - """ID of the zone setting.""" - - value: List[str] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - class SettingGetResponseItemZonesCNAMEFlattening(BaseModel): id: Literal["cname_flattening"] """How to flatten the cname destination.""" @@ -305,47 +86,6 @@ class SettingGetResponseItemZonesCNAMEFlattening(BaseModel): """last time this setting was modified.""" -class SettingGetResponseItemZonesDevelopmentMode(BaseModel): - id: Literal["development_mode"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - time_remaining: Optional[float] = None - """ - Value of the zone setting. Notes: The interval (in seconds) from when - development mode expires (positive integer) or last expired (negative integer) - for the domain. If development mode has never been enabled, this value is false. - """ - - -class SettingGetResponseItemZonesEarlyHints(BaseModel): - id: Literal["early_hints"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - class SettingGetResponseItemZonesEdgeCacheTTL(BaseModel): id: Literal["edge_cache_ttl"] """ID of the zone setting.""" @@ -385,142 +125,6 @@ class SettingGetResponseItemZonesEdgeCacheTTL(BaseModel): """last time this setting was modified.""" -class SettingGetResponseItemZonesEmailObfuscation(BaseModel): - id: Literal["email_obfuscation"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesH2Prioritization(BaseModel): - id: Literal["h2_prioritization"] - """ID of the zone setting.""" - - value: Literal["on", "off", "custom"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesHotlinkProtection(BaseModel): - id: Literal["hotlink_protection"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesHTTP2(BaseModel): - id: Literal["http2"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesHTTP3(BaseModel): - id: Literal["http3"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesImageResizing(BaseModel): - id: Literal["image_resizing"] - """ID of the zone setting.""" - - value: Literal["on", "off", "open"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesIPGeolocation(BaseModel): - id: Literal["ip_geolocation"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesIPV6(BaseModel): - id: Literal["ipv6"] - """ID of the zone setting.""" - - value: Literal["off", "on"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - class SettingGetResponseItemZonesMaxUpload(BaseModel): id: Literal["max_upload"] """identifier of the zone setting.""" @@ -538,399 +142,11 @@ class SettingGetResponseItemZonesMaxUpload(BaseModel): """last time this setting was modified.""" -class SettingGetResponseItemZonesMinTLSVersion(BaseModel): - id: Literal["min_tls_version"] - """ID of the zone setting.""" - - value: Literal["1.0", "1.1", "1.2", "1.3"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesMinifyValue(BaseModel): - css: Optional[Literal["on", "off"]] = None - """Automatically minify all CSS files for your website.""" - - html: Optional[Literal["on", "off"]] = None - """Automatically minify all HTML files for your website.""" - - js: Optional[Literal["on", "off"]] = None - """Automatically minify all JavaScript files for your website.""" - - -class SettingGetResponseItemZonesMinify(BaseModel): - id: Literal["minify"] - """Zone setting identifier.""" - - value: SettingGetResponseItemZonesMinifyValue - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesMirage(BaseModel): - id: Literal["mirage"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesMobileRedirectValue(BaseModel): - mobile_subdomain: Optional[str] = None - """ - Which subdomain prefix you wish to redirect visitors on mobile devices to - (subdomain must already exist). - """ - - status: Optional[Literal["on", "off"]] = None - """Whether or not mobile redirect is enabled.""" - - strip_uri: Optional[bool] = None - """ - Whether to drop the current page path and redirect to the mobile subdomain URL - root, or keep the path and redirect to the same page on the mobile subdomain. - """ - - -class SettingGetResponseItemZonesMobileRedirect(BaseModel): - id: Literal["mobile_redirect"] - """Identifier of the zone setting.""" - - value: SettingGetResponseItemZonesMobileRedirectValue - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesNELValue(BaseModel): - enabled: Optional[bool] = None - - -class SettingGetResponseItemZonesNEL(BaseModel): - id: Literal["nel"] - """Zone setting identifier.""" - - value: SettingGetResponseItemZonesNELValue - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesOpportunisticEncryption(BaseModel): - id: Literal["opportunistic_encryption"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesOpportunisticOnion(BaseModel): - id: Literal["opportunistic_onion"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesOrangeToOrange(BaseModel): - id: Literal["orange_to_orange"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesOriginErrorPagePassThru(BaseModel): - id: Literal["origin_error_page_pass_thru"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesPolish(BaseModel): - id: Literal["polish"] - """ID of the zone setting.""" - - value: Literal["off", "lossless", "lossy"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesPrefetchPreload(BaseModel): - id: Literal["prefetch_preload"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesProxyReadTimeout(BaseModel): - id: Literal["proxy_read_timeout"] - """ID of the zone setting.""" - - value: float - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesPseudoIPV4(BaseModel): - id: Literal["pseudo_ipv4"] - """Value of the Pseudo IPv4 setting.""" - - value: Literal["off", "add_header", "overwrite_header"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesResponseBuffering(BaseModel): - id: Literal["response_buffering"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesRocketLoader(BaseModel): - id: Literal["rocket_loader"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesSchemasAutomaticPlatformOptimizationValue(BaseModel): - cache_by_device_type: bool - """ - Indicates whether or not - [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) - is enabled. - """ - - cf: bool - """Indicates whether or not Cloudflare proxy is enabled.""" - - enabled: bool - """Indicates whether or not Automatic Platform Optimization is enabled.""" - - hostnames: List[str] - """ - An array of hostnames where Automatic Platform Optimization for WordPress is - activated. - """ - - wordpress: bool - """Indicates whether or not site is powered by WordPress.""" - - wp_plugin: bool - """ - Indicates whether or not - [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is - installed. - """ - - class SettingGetResponseItemZonesSchemasAutomaticPlatformOptimization(BaseModel): id: Literal["automatic_platform_optimization"] """ID of the zone setting.""" - value: SettingGetResponseItemZonesSchemasAutomaticPlatformOptimizationValue - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesSecurityHeaderValueStrictTransportSecurity(BaseModel): - enabled: Optional[bool] = None - """Whether or not strict transport security is enabled.""" - - include_subdomains: Optional[bool] = None - """Include all subdomains for strict transport security.""" - - max_age: Optional[float] = None - """Max age in seconds of the strict transport security.""" - - nosniff: Optional[bool] = None - """Whether or not to include 'X-Content-Type-Options: nosniff' header.""" - - -class SettingGetResponseItemZonesSecurityHeaderValue(BaseModel): - strict_transport_security: Optional[SettingGetResponseItemZonesSecurityHeaderValueStrictTransportSecurity] = None - """Strict Transport Security.""" - - -class SettingGetResponseItemZonesSecurityHeader(BaseModel): - id: Literal["security_header"] - """ID of the zone's security header.""" - - value: SettingGetResponseItemZonesSecurityHeaderValue - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesSecurityLevel(BaseModel): - id: Literal["security_level"] - """ID of the zone setting.""" - - value: Literal["off", "essentially_off", "low", "medium", "high", "under_attack"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesServerSideExclude(BaseModel): - id: Literal["server_side_exclude"] - """ID of the zone setting.""" - - value: Literal["on", "off"] + value: ZonesAutomaticPlatformOptimization """Current value of the zone setting.""" editable: Optional[Literal[True, False]] = None @@ -960,48 +176,6 @@ class SettingGetResponseItemZonesSha1Support(BaseModel): """last time this setting was modified.""" -class SettingGetResponseItemZonesSortQueryStringForCache(BaseModel): - id: Literal["sort_query_string_for_cache"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesSSL(BaseModel): - id: Literal["ssl"] - """ID of the zone setting.""" - - value: Literal["off", "flexible", "full", "strict"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesSSLRecommender(BaseModel): - id: Optional[Literal["ssl_recommender"]] = None - """Enrollment value for SSL/TLS Recommender.""" - - enabled: Optional[bool] = None - """ssl-recommender enrollment setting.""" - - class SettingGetResponseItemZonesTLS1_2Only(BaseModel): id: Literal["tls_1_2_only"] """Zone setting identifier.""" @@ -1019,163 +193,61 @@ class SettingGetResponseItemZonesTLS1_2Only(BaseModel): """last time this setting was modified.""" -class SettingGetResponseItemZonesTLS1_3(BaseModel): - id: Literal["tls_1_3"] - """ID of the zone setting.""" - - value: Literal["on", "off", "zrt"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesTLSClientAuth(BaseModel): - id: Literal["tls_client_auth"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesTrueClientIPHeader(BaseModel): - id: Literal["true_client_ip_header"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesWAF(BaseModel): - id: Literal["waf"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesWebp(BaseModel): - id: Literal["webp"] - """ID of the zone setting.""" - - value: Literal["off", "on"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesWebsockets(BaseModel): - id: Literal["websockets"] - """ID of the zone setting.""" - - value: Literal["off", "on"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - SettingGetResponseItem = Union[ - SettingGetResponseItemZones0rtt, - SettingGetResponseItemZonesAdvancedDDOS, - SettingGetResponseItemZonesAlwaysOnline, - SettingGetResponseItemZonesAlwaysUseHTTPS, - SettingGetResponseItemZonesAutomaticHTTPSRewrites, - SettingGetResponseItemZonesBrotli, - SettingGetResponseItemZonesBrowserCacheTTL, - SettingGetResponseItemZonesBrowserCheck, - SettingGetResponseItemZonesCacheLevel, - SettingGetResponseItemZonesChallengeTTL, - SettingGetResponseItemZonesCiphers, + Zones0rtt, + ZonesAdvancedDDOS, + ZonesAlwaysOnline, + ZonesAlwaysUseHTTPS, + ZonesAutomaticHTTPSRewrites, + ZonesBrotli, + ZonesBrowserCacheTTL, + ZonesBrowserCheck, + ZonesCacheLevel, + ZonesChallengeTTL, + ZonesCiphers, SettingGetResponseItemZonesCNAMEFlattening, - SettingGetResponseItemZonesDevelopmentMode, - SettingGetResponseItemZonesEarlyHints, + ZonesDevelopmentMode, + ZonesEarlyHints, SettingGetResponseItemZonesEdgeCacheTTL, - SettingGetResponseItemZonesEmailObfuscation, - SettingGetResponseItemZonesH2Prioritization, - SettingGetResponseItemZonesHotlinkProtection, - SettingGetResponseItemZonesHTTP2, - SettingGetResponseItemZonesHTTP3, - SettingGetResponseItemZonesImageResizing, - SettingGetResponseItemZonesIPGeolocation, - SettingGetResponseItemZonesIPV6, + ZonesEmailObfuscation, + ZonesH2Prioritization, + ZonesHotlinkProtection, + ZonesHTTP2, + ZonesHTTP3, + ZonesImageResizing, + ZonesIPGeolocation, + ZonesIPV6, SettingGetResponseItemZonesMaxUpload, - SettingGetResponseItemZonesMinTLSVersion, - SettingGetResponseItemZonesMinify, - SettingGetResponseItemZonesMirage, - SettingGetResponseItemZonesMobileRedirect, - SettingGetResponseItemZonesNEL, - SettingGetResponseItemZonesOpportunisticEncryption, - SettingGetResponseItemZonesOpportunisticOnion, - SettingGetResponseItemZonesOrangeToOrange, - SettingGetResponseItemZonesOriginErrorPagePassThru, - SettingGetResponseItemZonesPolish, - SettingGetResponseItemZonesPrefetchPreload, - SettingGetResponseItemZonesProxyReadTimeout, - SettingGetResponseItemZonesPseudoIPV4, - SettingGetResponseItemZonesResponseBuffering, - SettingGetResponseItemZonesRocketLoader, + ZonesMinTLSVersion, + ZonesMinify, + ZonesMirage, + ZonesMobileRedirect, + ZonesNEL, + ZonesOpportunisticEncryption, + ZonesOpportunisticOnion, + ZonesOrangeToOrange, + ZonesOriginErrorPagePassThru, + ZonesPolish, + ZonesPrefetchPreload, + ZonesProxyReadTimeout, + ZonesPseudoIPV4, + ZonesBuffering, + ZonesRocketLoader, SettingGetResponseItemZonesSchemasAutomaticPlatformOptimization, - SettingGetResponseItemZonesSecurityHeader, - SettingGetResponseItemZonesSecurityLevel, - SettingGetResponseItemZonesServerSideExclude, + ZonesSecurityHeader, + ZonesSecurityLevel, + ZonesServerSideExclude, SettingGetResponseItemZonesSha1Support, - SettingGetResponseItemZonesSortQueryStringForCache, - SettingGetResponseItemZonesSSL, - SettingGetResponseItemZonesSSLRecommender, + ZonesSortQueryStringForCache, + ZonesSSL, + ZonesSSLRecommender, SettingGetResponseItemZonesTLS1_2Only, - SettingGetResponseItemZonesTLS1_3, - SettingGetResponseItemZonesTLSClientAuth, - SettingGetResponseItemZonesTrueClientIPHeader, - SettingGetResponseItemZonesWAF, - SettingGetResponseItemZonesWebp, - SettingGetResponseItemZonesWebsockets, + ZonesTLS1_3, + ZonesTLSClientAuth, + ZonesTrueClientIPHeader, + ZonesWAF, + ZonesWebp, + ZonesWebsockets, ] SettingGetResponse = List[SettingGetResponseItem] diff --git a/src/cloudflare/types/zones/settings/__init__.py b/src/cloudflare/types/zones/settings/__init__.py index bdb348a7b..9c9a60b61 100644 --- a/src/cloudflare/types/zones/settings/__init__.py +++ b/src/cloudflare/types/zones/settings/__init__.py @@ -2,153 +2,152 @@ 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 .nel_get_response import NELGetResponse as NELGetResponse -from .ssl_get_response import SSLGetResponse as SSLGetResponse -from .waf_get_response import WAFGetResponse as WAFGetResponse 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 .http2_edit_params import HTTP2EditParams as HTTP2EditParams from .http3_edit_params import HTTP3EditParams as HTTP3EditParams -from .ipv6_get_response import IPV6GetResponse as IPV6GetResponse -from .nel_edit_response import NELEditResponse as NELEditResponse -from .ssl_edit_response import SSLEditResponse as SSLEditResponse -from .waf_edit_response import WAFEditResponse as WAFEditResponse -from .webp_get_response import WebpGetResponse as WebpGetResponse +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 .brotli_edit_params import BrotliEditParams as BrotliEditParams from .cipher_edit_params import CipherEditParams as CipherEditParams -from .http2_get_response import HTTP2GetResponse as HTTP2GetResponse -from .http3_get_response import HTTP3GetResponse as HTTP3GetResponse -from .ipv6_edit_response import IPV6EditResponse as IPV6EditResponse 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 .webp_edit_response import WebpEditResponse as WebpEditResponse -from .brotli_get_response import BrotliGetResponse as BrotliGetResponse -from .cipher_get_response import CipherGetResponse as CipherGetResponse -from .http2_edit_response import HTTP2EditResponse as HTTP2EditResponse -from .http3_edit_response import HTTP3EditResponse as HTTP3EditResponse -from .minify_get_response import MinifyGetResponse as MinifyGetResponse -from .mirage_get_response import MirageGetResponse as MirageGetResponse -from .polish_get_response import PolishGetResponse as PolishGetResponse +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 .tls_1_3_edit_params import TLS1_3EditParams as TLS1_3EditParams -from .brotli_edit_response import BrotliEditResponse as BrotliEditResponse -from .cipher_edit_response import CipherEditResponse as CipherEditResponse -from .minify_edit_response import MinifyEditResponse as MinifyEditResponse -from .mirage_edit_response import MirageEditResponse as MirageEditResponse -from .polish_edit_response import PolishEditResponse as PolishEditResponse -from .tls_1_3_get_response import TLS1_3GetResponse as TLS1_3GetResponse +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 .zero_rtt_edit_params import ZeroRTTEditParams as ZeroRTTEditParams -from .tls_1_3_edit_response import TLS1_3EditResponse as TLS1_3EditResponse +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 .websocket_edit_params import WebsocketEditParams as WebsocketEditParams -from .zero_rtt_get_response import ZeroRTTGetResponse as ZeroRTTGetResponse +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 .websocket_get_response import WebsocketGetResponse as WebsocketGetResponse -from .zero_rtt_edit_response import ZeroRTTEditResponse as ZeroRTTEditResponse +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 .cache_level_edit_params import CacheLevelEditParams as CacheLevelEditParams -from .early_hint_get_response import EarlyHintGetResponse as EarlyHintGetResponse from .pseudo_ipv4_edit_params import PseudoIPV4EditParams as PseudoIPV4EditParams -from .websocket_edit_response import WebsocketEditResponse as WebsocketEditResponse -from .cache_level_get_response import CacheLevelGetResponse as CacheLevelGetResponse -from .early_hint_edit_response import EarlyHintEditResponse as EarlyHintEditResponse +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 .font_setting_edit_params import FontSettingEditParams as FontSettingEditParams -from .pseudo_ipv4_get_response import PseudoIPV4GetResponse as PseudoIPV4GetResponse +from .zones_hotlink_protection import ZonesHotlinkProtection as ZonesHotlinkProtection +from .zones_proxy_read_timeout import ZonesProxyReadTimeout as ZonesProxyReadTimeout from .always_online_edit_params import AlwaysOnlineEditParams as AlwaysOnlineEditParams from .browser_check_edit_params import BrowserCheckEditParams as BrowserCheckEditParams -from .cache_level_edit_response import CacheLevelEditResponse as CacheLevelEditResponse from .challenge_ttl_edit_params import ChallengeTTLEditParams as ChallengeTTLEditParams -from .font_setting_get_response import FontSettingGetResponse as FontSettingGetResponse -from .pseudo_ipv4_edit_response import PseudoIPV4EditResponse as PseudoIPV4EditResponse from .rocket_loader_edit_params import RocketLoaderEditParams as RocketLoaderEditParams -from .advanced_ddos_get_response import AdvancedDDOSGetResponse as AdvancedDDOSGetResponse -from .always_online_get_response import AlwaysOnlineGetResponse as AlwaysOnlineGetResponse -from .browser_check_get_response import BrowserCheckGetResponse as BrowserCheckGetResponse -from .challenge_ttl_get_response import ChallengeTTLGetResponse as ChallengeTTLGetResponse -from .font_setting_edit_response import FontSettingEditResponse as FontSettingEditResponse +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 .image_resizing_edit_params import ImageResizingEditParams as ImageResizingEditParams from .ip_geolocation_edit_params import IPGeolocationEditParams as IPGeolocationEditParams -from .rocket_loader_get_response import RocketLoaderGetResponse as RocketLoaderGetResponse from .security_level_edit_params import SecurityLevelEditParams as SecurityLevelEditParams -from .always_online_edit_response import AlwaysOnlineEditResponse as AlwaysOnlineEditResponse -from .browser_check_edit_response import BrowserCheckEditResponse as BrowserCheckEditResponse -from .challenge_ttl_edit_response import ChallengeTTLEditResponse as ChallengeTTLEditResponse -from .image_resizing_get_response import ImageResizingGetResponse as ImageResizingGetResponse -from .ip_geolocation_get_response import IPGeolocationGetResponse as IPGeolocationGetResponse +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 .min_tls_version_edit_params import MinTLSVersionEditParams as MinTLSVersionEditParams from .mobile_redirect_edit_params import MobileRedirectEditParams as MobileRedirectEditParams -from .rocket_loader_edit_response import RocketLoaderEditResponse as RocketLoaderEditResponse from .security_header_edit_params import SecurityHeaderEditParams as SecurityHeaderEditParams -from .security_level_get_response import SecurityLevelGetResponse as SecurityLevelGetResponse 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 .always_use_https_edit_params import AlwaysUseHTTPSEditParams as AlwaysUseHTTPSEditParams from .development_mode_edit_params import DevelopmentModeEditParams as DevelopmentModeEditParams -from .image_resizing_edit_response import ImageResizingEditResponse as ImageResizingEditResponse -from .ip_geolocation_edit_response import IPGeolocationEditResponse as IPGeolocationEditResponse -from .min_tls_version_get_response import MinTLSVersionGetResponse as MinTLSVersionGetResponse -from .mobile_redirect_get_response import MobileRedirectGetResponse as MobileRedirectGetResponse from .orange_to_orange_edit_params import OrangeToOrangeEditParams as OrangeToOrangeEditParams from .prefetch_preload_edit_params import PrefetchPreloadEditParams as PrefetchPreloadEditParams -from .security_header_get_response import SecurityHeaderGetResponse as SecurityHeaderGetResponse -from .security_level_edit_response import SecurityLevelEditResponse as SecurityLevelEditResponse -from .ssl_recommender_get_response import SSLRecommenderGetResponse as SSLRecommenderGetResponse -from .tls_client_auth_get_response import TLSClientAuthGetResponse as TLSClientAuthGetResponse -from .always_use_https_get_response import AlwaysUseHTTPSGetResponse as AlwaysUseHTTPSGetResponse +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 .browser_cache_ttl_edit_params import BrowserCacheTTLEditParams as BrowserCacheTTLEditParams -from .development_mode_get_response import DevelopmentModeGetResponse as DevelopmentModeGetResponse from .email_obfuscation_edit_params import EmailObfuscationEditParams as EmailObfuscationEditParams from .h2_prioritization_edit_params import H2PrioritizationEditParams as H2PrioritizationEditParams -from .min_tls_version_edit_response import MinTLSVersionEditResponse as MinTLSVersionEditResponse -from .mobile_redirect_edit_response import MobileRedirectEditResponse as MobileRedirectEditResponse -from .orange_to_orange_get_response import OrangeToOrangeGetResponse as OrangeToOrangeGetResponse -from .prefetch_preload_get_response import PrefetchPreloadGetResponse as PrefetchPreloadGetResponse -from .security_header_edit_response import SecurityHeaderEditResponse as SecurityHeaderEditResponse -from .ssl_recommender_edit_response import SSLRecommenderEditResponse as SSLRecommenderEditResponse -from .tls_client_auth_edit_response import TLSClientAuthEditResponse as TLSClientAuthEditResponse -from .always_use_https_edit_response import AlwaysUseHTTPSEditResponse as AlwaysUseHTTPSEditResponse -from .browser_cache_ttl_get_response import BrowserCacheTTLGetResponse as BrowserCacheTTLGetResponse -from .development_mode_edit_response import DevelopmentModeEditResponse as DevelopmentModeEditResponse -from .email_obfuscation_get_response import EmailObfuscationGetResponse as EmailObfuscationGetResponse -from .h2_prioritization_get_response import H2PrioritizationGetResponse as H2PrioritizationGetResponse +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 .hotlink_protection_edit_params import HotlinkProtectionEditParams as HotlinkProtectionEditParams -from .orange_to_orange_edit_response import OrangeToOrangeEditResponse as OrangeToOrangeEditResponse -from .prefetch_preload_edit_response import PrefetchPreloadEditResponse as PrefetchPreloadEditResponse from .proxy_read_timeout_edit_params import ProxyReadTimeoutEditParams as ProxyReadTimeoutEditParams from .response_buffering_edit_params import ResponseBufferingEditParams as ResponseBufferingEditParams -from .browser_cache_ttl_edit_response import BrowserCacheTTLEditResponse as BrowserCacheTTLEditResponse -from .email_obfuscation_edit_response import EmailObfuscationEditResponse as EmailObfuscationEditResponse -from .h2_prioritization_edit_response import H2PrioritizationEditResponse as H2PrioritizationEditResponse -from .hotlink_protection_get_response import HotlinkProtectionGetResponse as HotlinkProtectionGetResponse +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 .opportunistic_onion_edit_params import OpportunisticOnionEditParams as OpportunisticOnionEditParams -from .proxy_read_timeout_get_response import ProxyReadTimeoutGetResponse as ProxyReadTimeoutGetResponse -from .response_buffering_get_response import ResponseBufferingGetResponse as ResponseBufferingGetResponse from .server_side_exclude_edit_params import ServerSideExcludeEditParams as ServerSideExcludeEditParams -from .hotlink_protection_edit_response import HotlinkProtectionEditResponse as HotlinkProtectionEditResponse -from .opportunistic_onion_get_response import OpportunisticOnionGetResponse as OpportunisticOnionGetResponse -from .proxy_read_timeout_edit_response import ProxyReadTimeoutEditResponse as ProxyReadTimeoutEditResponse -from .response_buffering_edit_response import ResponseBufferingEditResponse as ResponseBufferingEditResponse -from .server_side_exclude_get_response import ServerSideExcludeGetResponse as ServerSideExcludeGetResponse -from .opportunistic_onion_edit_response import OpportunisticOnionEditResponse as OpportunisticOnionEditResponse -from .server_side_exclude_edit_response import ServerSideExcludeEditResponse as ServerSideExcludeEditResponse +from .zones_opportunistic_onion_param import ZonesOpportunisticOnionParam as ZonesOpportunisticOnionParam +from .zones_server_side_exclude_param import ZonesServerSideExcludeParam as ZonesServerSideExcludeParam from .true_client_ip_header_edit_params import TrueClientIPHeaderEditParams as TrueClientIPHeaderEditParams -from .true_client_ip_header_get_response import TrueClientIPHeaderGetResponse as TrueClientIPHeaderGetResponse +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 .automatic_https_rewrite_edit_params import AutomaticHTTPSRewriteEditParams as AutomaticHTTPSRewriteEditParams from .origin_max_http_version_edit_params import OriginMaxHTTPVersionEditParams as OriginMaxHTTPVersionEditParams -from .true_client_ip_header_edit_response import TrueClientIPHeaderEditResponse as TrueClientIPHeaderEditResponse -from .automatic_https_rewrite_get_response import AutomaticHTTPSRewriteGetResponse as AutomaticHTTPSRewriteGetResponse from .opportunistic_encryption_edit_params import OpportunisticEncryptionEditParams as OpportunisticEncryptionEditParams from .origin_max_http_version_get_response import OriginMaxHTTPVersionGetResponse as OriginMaxHTTPVersionGetResponse -from .automatic_https_rewrite_edit_response import ( - AutomaticHTTPSRewriteEditResponse as AutomaticHTTPSRewriteEditResponse, -) -from .opportunistic_encryption_get_response import ( - OpportunisticEncryptionGetResponse as OpportunisticEncryptionGetResponse, -) +from .zones_automatic_https_rewrites_param import ZonesAutomaticHTTPSRewritesParam as ZonesAutomaticHTTPSRewritesParam +from .zones_opportunistic_encryption_param import ZonesOpportunisticEncryptionParam as ZonesOpportunisticEncryptionParam from .origin_max_http_version_edit_response import OriginMaxHTTPVersionEditResponse as OriginMaxHTTPVersionEditResponse -from .opportunistic_encryption_edit_response import ( - OpportunisticEncryptionEditResponse as OpportunisticEncryptionEditResponse, +from .zones_automatic_platform_optimization import ( + ZonesAutomaticPlatformOptimization as ZonesAutomaticPlatformOptimization, ) from .origin_error_page_pass_thru_edit_params import ( OriginErrorPagePassThruEditParams as OriginErrorPagePassThruEditParams, @@ -156,24 +155,15 @@ from .origin_error_page_pass_thru_edit_params import ( from .sort_query_string_for_cache_edit_params import ( SortQueryStringForCacheEditParams as SortQueryStringForCacheEditParams, ) -from .origin_error_page_pass_thru_get_response import ( - OriginErrorPagePassThruGetResponse as OriginErrorPagePassThruGetResponse, +from .zones_origin_error_page_pass_thru_param import ( + ZonesOriginErrorPagePassThruParam as ZonesOriginErrorPagePassThruParam, ) -from .sort_query_string_for_cache_get_response import ( - SortQueryStringForCacheGetResponse as SortQueryStringForCacheGetResponse, -) -from .origin_error_page_pass_thru_edit_response import ( - OriginErrorPagePassThruEditResponse as OriginErrorPagePassThruEditResponse, -) -from .sort_query_string_for_cache_edit_response import ( - SortQueryStringForCacheEditResponse as SortQueryStringForCacheEditResponse, +from .zones_sort_query_string_for_cache_param import ( + ZonesSortQueryStringForCacheParam as ZonesSortQueryStringForCacheParam, ) from .automatic_platform_optimization_edit_params import ( AutomaticPlatformOptimizationEditParams as AutomaticPlatformOptimizationEditParams, ) -from .automatic_platform_optimization_get_response import ( - AutomaticPlatformOptimizationGetResponse as AutomaticPlatformOptimizationGetResponse, -) -from .automatic_platform_optimization_edit_response import ( - AutomaticPlatformOptimizationEditResponse as AutomaticPlatformOptimizationEditResponse, +from .zones_automatic_platform_optimization_param import ( + ZonesAutomaticPlatformOptimizationParam as ZonesAutomaticPlatformOptimizationParam, ) diff --git a/src/cloudflare/types/zones/settings/always_online_edit_response.py b/src/cloudflare/types/zones/settings/always_online_edit_response.py deleted file mode 100644 index 76c3580a3..000000000 --- a/src/cloudflare/types/zones/settings/always_online_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["AlwaysOnlineEditResponse"] - - -class AlwaysOnlineEditResponse(BaseModel): - id: Literal["always_online"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/always_use_https_edit_response.py b/src/cloudflare/types/zones/settings/always_use_https_edit_response.py deleted file mode 100644 index 39c28cf90..000000000 --- a/src/cloudflare/types/zones/settings/always_use_https_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["AlwaysUseHTTPSEditResponse"] - - -class AlwaysUseHTTPSEditResponse(BaseModel): - id: Literal["always_use_https"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/automatic_https_rewrite_edit_response.py b/src/cloudflare/types/zones/settings/automatic_https_rewrite_edit_response.py deleted file mode 100644 index cc54de63d..000000000 --- a/src/cloudflare/types/zones/settings/automatic_https_rewrite_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["AutomaticHTTPSRewriteEditResponse"] - - -class AutomaticHTTPSRewriteEditResponse(BaseModel): - id: Literal["automatic_https_rewrites"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" 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 1019f29d2..f2c1fd336 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 @@ -2,45 +2,15 @@ from __future__ import annotations -from typing import List from typing_extensions import Required, TypedDict -__all__ = ["AutomaticPlatformOptimizationEditParams", "Value"] +from .zones_automatic_platform_optimization_param import ZonesAutomaticPlatformOptimizationParam + +__all__ = ["AutomaticPlatformOptimizationEditParams"] class AutomaticPlatformOptimizationEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[Value] - - -class Value(TypedDict, total=False): - cache_by_device_type: Required[bool] - """ - Indicates whether or not - [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) - is enabled. - """ - - cf: Required[bool] - """Indicates whether or not Cloudflare proxy is enabled.""" - - enabled: Required[bool] - """Indicates whether or not Automatic Platform Optimization is enabled.""" - - hostnames: Required[List[str]] - """ - An array of hostnames where Automatic Platform Optimization for WordPress is - activated. - """ - - wordpress: Required[bool] - """Indicates whether or not site is powered by WordPress.""" - - wp_plugin: Required[bool] - """ - Indicates whether or not - [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is - installed. - """ + value: Required[ZonesAutomaticPlatformOptimizationParam] diff --git a/src/cloudflare/types/zones/settings/brotli_edit_response.py b/src/cloudflare/types/zones/settings/brotli_edit_response.py deleted file mode 100644 index 02387bced..000000000 --- a/src/cloudflare/types/zones/settings/brotli_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["BrotliEditResponse"] - - -class BrotliEditResponse(BaseModel): - id: Literal["brotli"] - """ID of the zone setting.""" - - value: Literal["off", "on"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/browser_cache_ttl_edit_response.py b/src/cloudflare/types/zones/settings/browser_cache_ttl_edit_response.py deleted file mode 100644 index 272b59e43..000000000 --- a/src/cloudflare/types/zones/settings/browser_cache_ttl_edit_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["BrowserCacheTTLEditResponse"] - - -class BrowserCacheTTLEditResponse(BaseModel): - id: Literal["browser_cache_ttl"] - """ID of the zone setting.""" - - value: Literal[ - 0, - 30, - 60, - 120, - 300, - 1200, - 1800, - 3600, - 7200, - 10800, - 14400, - 18000, - 28800, - 43200, - 57600, - 72000, - 86400, - 172800, - 259200, - 345600, - 432000, - 691200, - 1382400, - 2073600, - 2678400, - 5356800, - 16070400, - 31536000, - ] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/browser_check_edit_response.py b/src/cloudflare/types/zones/settings/browser_check_edit_response.py deleted file mode 100644 index e38958b3f..000000000 --- a/src/cloudflare/types/zones/settings/browser_check_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["BrowserCheckEditResponse"] - - -class BrowserCheckEditResponse(BaseModel): - id: Literal["browser_check"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/cache_level_edit_response.py b/src/cloudflare/types/zones/settings/cache_level_edit_response.py deleted file mode 100644 index 4792cd9ef..000000000 --- a/src/cloudflare/types/zones/settings/cache_level_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["CacheLevelEditResponse"] - - -class CacheLevelEditResponse(BaseModel): - id: Literal["cache_level"] - """ID of the zone setting.""" - - value: Literal["aggressive", "basic", "simplified"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/challenge_ttl_edit_response.py b/src/cloudflare/types/zones/settings/challenge_ttl_edit_response.py deleted file mode 100644 index 625657241..000000000 --- a/src/cloudflare/types/zones/settings/challenge_ttl_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["ChallengeTTLEditResponse"] - - -class ChallengeTTLEditResponse(BaseModel): - id: Literal["challenge_ttl"] - """ID of the zone setting.""" - - value: Literal[300, 900, 1800, 2700, 3600, 7200, 10800, 14400, 28800, 57600, 86400, 604800, 2592000, 31536000] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/cipher_edit_response.py b/src/cloudflare/types/zones/settings/cipher_edit_response.py deleted file mode 100644 index 79216db89..000000000 --- a/src/cloudflare/types/zones/settings/cipher_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["CipherEditResponse"] - - -class CipherEditResponse(BaseModel): - id: Literal["ciphers"] - """ID of the zone setting.""" - - value: List[str] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/development_mode_edit_response.py b/src/cloudflare/types/zones/settings/development_mode_edit_response.py deleted file mode 100644 index a995ade85..000000000 --- a/src/cloudflare/types/zones/settings/development_mode_edit_response.py +++ /dev/null @@ -1,33 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["DevelopmentModeEditResponse"] - - -class DevelopmentModeEditResponse(BaseModel): - id: Literal["development_mode"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - time_remaining: Optional[float] = None - """ - Value of the zone setting. Notes: The interval (in seconds) from when - development mode expires (positive integer) or last expired (negative integer) - for the domain. If development mode has never been enabled, this value is false. - """ diff --git a/src/cloudflare/types/zones/settings/early_hint_edit_response.py b/src/cloudflare/types/zones/settings/early_hint_edit_response.py deleted file mode 100644 index cd8cd6f13..000000000 --- a/src/cloudflare/types/zones/settings/early_hint_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["EarlyHintEditResponse"] - - -class EarlyHintEditResponse(BaseModel): - id: Literal["early_hints"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/email_obfuscation_edit_response.py b/src/cloudflare/types/zones/settings/email_obfuscation_edit_response.py deleted file mode 100644 index 4562e4c9a..000000000 --- a/src/cloudflare/types/zones/settings/email_obfuscation_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["EmailObfuscationEditResponse"] - - -class EmailObfuscationEditResponse(BaseModel): - id: Literal["email_obfuscation"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/font_setting_edit_response.py b/src/cloudflare/types/zones/settings/font_setting_edit_response.py deleted file mode 100644 index b7715e75d..000000000 --- a/src/cloudflare/types/zones/settings/font_setting_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["FontSettingEditResponse"] - - -class FontSettingEditResponse(BaseModel): - id: Literal["fonts"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" 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 8b71d7281..6ec66c315 100644 --- a/src/cloudflare/types/zones/settings/h2_prioritization_edit_params.py +++ b/src/cloudflare/types/zones/settings/h2_prioritization_edit_params.py @@ -2,26 +2,20 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict -__all__ = ["H2PrioritizationEditParams", "Value"] +from .zones_h2_prioritization_param import ZonesH2PrioritizationParam + +__all__ = ["H2PrioritizationEditParams"] class H2PrioritizationEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[Value] + value: Required[ZonesH2PrioritizationParam] """ HTTP/2 Edge Prioritization optimises the delivery of resources served through HTTP/2 to improve page load performance. It also supports fine control of content delivery when used in conjunction with Workers. """ - - -class Value(TypedDict, total=False): - id: Required[Literal["h2_prioritization"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off", "custom"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/h2_prioritization_edit_response.py b/src/cloudflare/types/zones/settings/h2_prioritization_edit_response.py deleted file mode 100644 index 0dff1e3d5..000000000 --- a/src/cloudflare/types/zones/settings/h2_prioritization_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["H2PrioritizationEditResponse"] - - -class H2PrioritizationEditResponse(BaseModel): - id: Literal["h2_prioritization"] - """ID of the zone setting.""" - - value: Literal["on", "off", "custom"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/hotlink_protection_edit_response.py b/src/cloudflare/types/zones/settings/hotlink_protection_edit_response.py deleted file mode 100644 index a448801db..000000000 --- a/src/cloudflare/types/zones/settings/hotlink_protection_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["HotlinkProtectionEditResponse"] - - -class HotlinkProtectionEditResponse(BaseModel): - id: Literal["hotlink_protection"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/http2_edit_response.py b/src/cloudflare/types/zones/settings/http2_edit_response.py deleted file mode 100644 index 55e0cace3..000000000 --- a/src/cloudflare/types/zones/settings/http2_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["HTTP2EditResponse"] - - -class HTTP2EditResponse(BaseModel): - id: Literal["http2"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/http3_edit_response.py b/src/cloudflare/types/zones/settings/http3_edit_response.py deleted file mode 100644 index a127cb577..000000000 --- a/src/cloudflare/types/zones/settings/http3_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["HTTP3EditResponse"] - - -class HTTP3EditResponse(BaseModel): - id: Literal["http3"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" 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 989b71be5..70881bec3 100644 --- a/src/cloudflare/types/zones/settings/image_resizing_edit_params.py +++ b/src/cloudflare/types/zones/settings/image_resizing_edit_params.py @@ -2,27 +2,21 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict -__all__ = ["ImageResizingEditParams", "Value"] +from .zones_image_resizing_param import ZonesImageResizingParam + +__all__ = ["ImageResizingEditParams"] class ImageResizingEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[Value] + value: Required[ZonesImageResizingParam] """ Image Resizing provides on-demand resizing, conversion and optimisation for images served through Cloudflare's network. Refer to the [Image Resizing documentation](https://developers.cloudflare.com/images/) for more information. """ - - -class Value(TypedDict, total=False): - id: Required[Literal["image_resizing"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off", "open"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/image_resizing_edit_response.py b/src/cloudflare/types/zones/settings/image_resizing_edit_response.py deleted file mode 100644 index 91d073b25..000000000 --- a/src/cloudflare/types/zones/settings/image_resizing_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["ImageResizingEditResponse"] - - -class ImageResizingEditResponse(BaseModel): - id: Literal["image_resizing"] - """ID of the zone setting.""" - - value: Literal["on", "off", "open"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/ip_geolocation_edit_response.py b/src/cloudflare/types/zones/settings/ip_geolocation_edit_response.py deleted file mode 100644 index 5bd2254fd..000000000 --- a/src/cloudflare/types/zones/settings/ip_geolocation_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["IPGeolocationEditResponse"] - - -class IPGeolocationEditResponse(BaseModel): - id: Literal["ip_geolocation"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/ipv6_edit_response.py b/src/cloudflare/types/zones/settings/ipv6_edit_response.py deleted file mode 100644 index 08cca7e81..000000000 --- a/src/cloudflare/types/zones/settings/ipv6_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["IPV6EditResponse"] - - -class IPV6EditResponse(BaseModel): - id: Literal["ipv6"] - """ID of the zone setting.""" - - value: Literal["off", "on"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/min_tls_version_edit_response.py b/src/cloudflare/types/zones/settings/min_tls_version_edit_response.py deleted file mode 100644 index 980c9a8c7..000000000 --- a/src/cloudflare/types/zones/settings/min_tls_version_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["MinTLSVersionEditResponse"] - - -class MinTLSVersionEditResponse(BaseModel): - id: Literal["min_tls_version"] - """ID of the zone setting.""" - - value: Literal["1.0", "1.1", "1.2", "1.3"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/minify_edit_response.py b/src/cloudflare/types/zones/settings/minify_edit_response.py deleted file mode 100644 index c90fcdf70..000000000 --- a/src/cloudflare/types/zones/settings/minify_edit_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["MinifyEditResponse", "Value"] - - -class Value(BaseModel): - css: Optional[Literal["on", "off"]] = None - """Automatically minify all CSS files for your website.""" - - html: Optional[Literal["on", "off"]] = None - """Automatically minify all HTML files for your website.""" - - js: Optional[Literal["on", "off"]] = None - """Automatically minify all JavaScript files for your website.""" - - -class MinifyEditResponse(BaseModel): - id: Literal["minify"] - """Zone setting identifier.""" - - value: Value - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/mirage_edit_response.py b/src/cloudflare/types/zones/settings/mirage_edit_response.py deleted file mode 100644 index 5ae4f464c..000000000 --- a/src/cloudflare/types/zones/settings/mirage_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["MirageEditResponse"] - - -class MirageEditResponse(BaseModel): - id: Literal["mirage"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/mobile_redirect_edit_response.py b/src/cloudflare/types/zones/settings/mobile_redirect_edit_response.py deleted file mode 100644 index 7de357e40..000000000 --- a/src/cloudflare/types/zones/settings/mobile_redirect_edit_response.py +++ /dev/null @@ -1,43 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["MobileRedirectEditResponse", "Value"] - - -class Value(BaseModel): - mobile_subdomain: Optional[str] = None - """ - Which subdomain prefix you wish to redirect visitors on mobile devices to - (subdomain must already exist). - """ - - status: Optional[Literal["on", "off"]] = None - """Whether or not mobile redirect is enabled.""" - - strip_uri: Optional[bool] = None - """ - Whether to drop the current page path and redirect to the mobile subdomain URL - root, or keep the path and redirect to the same page on the mobile subdomain. - """ - - -class MobileRedirectEditResponse(BaseModel): - id: Literal["mobile_redirect"] - """Identifier of the zone setting.""" - - value: Value - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/nel_edit_params.py b/src/cloudflare/types/zones/settings/nel_edit_params.py index 8ebe2106e..22f967079 100644 --- a/src/cloudflare/types/zones/settings/nel_edit_params.py +++ b/src/cloudflare/types/zones/settings/nel_edit_params.py @@ -2,26 +2,16 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict -__all__ = ["NELEditParams", "Value", "ValueValue"] +from .zones_nel_param import ZonesNELParam + +__all__ = ["NELEditParams"] class NELEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[Value] + value: Required[ZonesNELParam] """Enable Network Error Logging reporting on your zone. (Beta)""" - - -class ValueValue(TypedDict, total=False): - enabled: bool - - -class Value(TypedDict, total=False): - id: Required[Literal["nel"]] - """Zone setting identifier.""" - - value: Required[ValueValue] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/nel_edit_response.py b/src/cloudflare/types/zones/settings/nel_edit_response.py deleted file mode 100644 index d66978ec4..000000000 --- a/src/cloudflare/types/zones/settings/nel_edit_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["NELEditResponse", "Value"] - - -class Value(BaseModel): - enabled: Optional[bool] = None - - -class NELEditResponse(BaseModel): - id: Literal["nel"] - """Zone setting identifier.""" - - value: Value - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/opportunistic_encryption_edit_response.py b/src/cloudflare/types/zones/settings/opportunistic_encryption_edit_response.py deleted file mode 100644 index 45af2c426..000000000 --- a/src/cloudflare/types/zones/settings/opportunistic_encryption_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["OpportunisticEncryptionEditResponse"] - - -class OpportunisticEncryptionEditResponse(BaseModel): - id: Literal["opportunistic_encryption"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/opportunistic_onion_edit_response.py b/src/cloudflare/types/zones/settings/opportunistic_onion_edit_response.py deleted file mode 100644 index 75f8068a6..000000000 --- a/src/cloudflare/types/zones/settings/opportunistic_onion_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["OpportunisticOnionEditResponse"] - - -class OpportunisticOnionEditResponse(BaseModel): - id: Literal["opportunistic_onion"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" 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 76013b598..52356ce77 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 @@ -2,25 +2,19 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict -__all__ = ["OrangeToOrangeEditParams", "Value"] +from .zones_orange_to_orange_param import ZonesOrangeToOrangeParam + +__all__ = ["OrangeToOrangeEditParams"] class OrangeToOrangeEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[Value] + value: Required[ZonesOrangeToOrangeParam] """ Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also on Cloudflare. """ - - -class Value(TypedDict, total=False): - id: Required[Literal["orange_to_orange"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/orange_to_orange_edit_response.py b/src/cloudflare/types/zones/settings/orange_to_orange_edit_response.py deleted file mode 100644 index f41fc9544..000000000 --- a/src/cloudflare/types/zones/settings/orange_to_orange_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["OrangeToOrangeEditResponse"] - - -class OrangeToOrangeEditResponse(BaseModel): - id: Literal["orange_to_orange"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/origin_error_page_pass_thru_edit_response.py b/src/cloudflare/types/zones/settings/origin_error_page_pass_thru_edit_response.py deleted file mode 100644 index a1c0e9074..000000000 --- a/src/cloudflare/types/zones/settings/origin_error_page_pass_thru_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["OriginErrorPagePassThruEditResponse"] - - -class OriginErrorPagePassThruEditResponse(BaseModel): - id: Literal["origin_error_page_pass_thru"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/polish_edit_params.py b/src/cloudflare/types/zones/settings/polish_edit_params.py index 80353995b..fa040bd70 100644 --- a/src/cloudflare/types/zones/settings/polish_edit_params.py +++ b/src/cloudflare/types/zones/settings/polish_edit_params.py @@ -2,16 +2,18 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict -__all__ = ["PolishEditParams", "Value"] +from .zones_polish_param import ZonesPolishParam + +__all__ = ["PolishEditParams"] class PolishEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[Value] + value: Required[ZonesPolishParam] """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 @@ -20,11 +22,3 @@ class PolishEditParams(TypedDict, total=False): a lower-resolution image first and ending in a higher-resolution version. Not recommended for hi-res photography sites. """ - - -class Value(TypedDict, total=False): - id: Required[Literal["polish"]] - """ID of the zone setting.""" - - value: Required[Literal["off", "lossless", "lossy"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/polish_edit_response.py b/src/cloudflare/types/zones/settings/polish_edit_response.py deleted file mode 100644 index e36c5a539..000000000 --- a/src/cloudflare/types/zones/settings/polish_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["PolishEditResponse"] - - -class PolishEditResponse(BaseModel): - id: Literal["polish"] - """ID of the zone setting.""" - - value: Literal["off", "lossless", "lossy"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/prefetch_preload_edit_response.py b/src/cloudflare/types/zones/settings/prefetch_preload_edit_response.py deleted file mode 100644 index ad000befa..000000000 --- a/src/cloudflare/types/zones/settings/prefetch_preload_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["PrefetchPreloadEditResponse"] - - -class PrefetchPreloadEditResponse(BaseModel): - id: Literal["prefetch_preload"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" 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 c3ec77e63..7dbe40d3e 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 @@ -2,22 +2,16 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict -__all__ = ["ProxyReadTimeoutEditParams", "Value"] +from .zones_proxy_read_timeout_param import ZonesProxyReadTimeoutParam + +__all__ = ["ProxyReadTimeoutEditParams"] class ProxyReadTimeoutEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[Value] + value: Required[ZonesProxyReadTimeoutParam] """Maximum time between two read operations from origin.""" - - -class Value(TypedDict, total=False): - id: Required[Literal["proxy_read_timeout"]] - """ID of the zone setting.""" - - value: Required[float] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/proxy_read_timeout_edit_response.py b/src/cloudflare/types/zones/settings/proxy_read_timeout_edit_response.py deleted file mode 100644 index 3b4a13ec4..000000000 --- a/src/cloudflare/types/zones/settings/proxy_read_timeout_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["ProxyReadTimeoutEditResponse"] - - -class ProxyReadTimeoutEditResponse(BaseModel): - id: Literal["proxy_read_timeout"] - """ID of the zone setting.""" - - value: float - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/pseudo_ipv4_edit_response.py b/src/cloudflare/types/zones/settings/pseudo_ipv4_edit_response.py deleted file mode 100644 index 59dac443c..000000000 --- a/src/cloudflare/types/zones/settings/pseudo_ipv4_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["PseudoIPV4EditResponse"] - - -class PseudoIPV4EditResponse(BaseModel): - id: Literal["pseudo_ipv4"] - """Value of the Pseudo IPv4 setting.""" - - value: Literal["off", "add_header", "overwrite_header"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/response_buffering_edit_response.py b/src/cloudflare/types/zones/settings/response_buffering_edit_response.py deleted file mode 100644 index 5b570afc2..000000000 --- a/src/cloudflare/types/zones/settings/response_buffering_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["ResponseBufferingEditResponse"] - - -class ResponseBufferingEditResponse(BaseModel): - id: Literal["response_buffering"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" 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 643ec817e..0853c0ea6 100644 --- a/src/cloudflare/types/zones/settings/rocket_loader_edit_params.py +++ b/src/cloudflare/types/zones/settings/rocket_loader_edit_params.py @@ -2,16 +2,18 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict -__all__ = ["RocketLoaderEditParams", "Value"] +from .zones_rocket_loader_param import ZonesRocketLoaderParam + +__all__ = ["RocketLoaderEditParams"] class RocketLoaderEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[Value] + value: Required[ZonesRocketLoaderParam] """ Rocket Loader is a general-purpose asynchronous JavaScript optimisation that prioritises rendering your content while loading your site's Javascript @@ -24,11 +26,3 @@ class RocketLoaderEditParams(TypedDict, total=False): [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) for more information. """ - - -class Value(TypedDict, total=False): - id: Required[Literal["rocket_loader"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/rocket_loader_edit_response.py b/src/cloudflare/types/zones/settings/rocket_loader_edit_response.py deleted file mode 100644 index c7a36ebb2..000000000 --- a/src/cloudflare/types/zones/settings/rocket_loader_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["RocketLoaderEditResponse"] - - -class RocketLoaderEditResponse(BaseModel): - id: Literal["rocket_loader"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/security_header_edit_response.py b/src/cloudflare/types/zones/settings/security_header_edit_response.py deleted file mode 100644 index 795f63f1a..000000000 --- a/src/cloudflare/types/zones/settings/security_header_edit_response.py +++ /dev/null @@ -1,45 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["SecurityHeaderEditResponse", "Value", "ValueStrictTransportSecurity"] - - -class ValueStrictTransportSecurity(BaseModel): - enabled: Optional[bool] = None - """Whether or not strict transport security is enabled.""" - - include_subdomains: Optional[bool] = None - """Include all subdomains for strict transport security.""" - - max_age: Optional[float] = None - """Max age in seconds of the strict transport security.""" - - nosniff: Optional[bool] = None - """Whether or not to include 'X-Content-Type-Options: nosniff' header.""" - - -class Value(BaseModel): - strict_transport_security: Optional[ValueStrictTransportSecurity] = None - """Strict Transport Security.""" - - -class SecurityHeaderEditResponse(BaseModel): - id: Literal["security_header"] - """ID of the zone's security header.""" - - value: Value - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/security_level_edit_response.py b/src/cloudflare/types/zones/settings/security_level_edit_response.py deleted file mode 100644 index 49a89aa06..000000000 --- a/src/cloudflare/types/zones/settings/security_level_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["SecurityLevelEditResponse"] - - -class SecurityLevelEditResponse(BaseModel): - id: Literal["security_level"] - """ID of the zone setting.""" - - value: Literal["off", "essentially_off", "low", "medium", "high", "under_attack"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/server_side_exclude_edit_response.py b/src/cloudflare/types/zones/settings/server_side_exclude_edit_response.py deleted file mode 100644 index f8071a251..000000000 --- a/src/cloudflare/types/zones/settings/server_side_exclude_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["ServerSideExcludeEditResponse"] - - -class ServerSideExcludeEditResponse(BaseModel): - id: Literal["server_side_exclude"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/sort_query_string_for_cache_edit_response.py b/src/cloudflare/types/zones/settings/sort_query_string_for_cache_edit_response.py deleted file mode 100644 index f5d0842c5..000000000 --- a/src/cloudflare/types/zones/settings/sort_query_string_for_cache_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["SortQueryStringForCacheEditResponse"] - - -class SortQueryStringForCacheEditResponse(BaseModel): - id: Literal["sort_query_string_for_cache"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/font_setting_get_response.py b/src/cloudflare/types/zones/settings/speed_cloudflare_fonts.py similarity index 88% rename from src/cloudflare/types/zones/settings/font_setting_get_response.py rename to src/cloudflare/types/zones/settings/speed_cloudflare_fonts.py index 42ee97b08..72f4b6699 100644 --- a/src/cloudflare/types/zones/settings/font_setting_get_response.py +++ b/src/cloudflare/types/zones/settings/speed_cloudflare_fonts.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["FontSettingGetResponse"] +__all__ = ["SpeedCloudflareFonts"] -class FontSettingGetResponse(BaseModel): +class SpeedCloudflareFonts(BaseModel): id: Literal["fonts"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/ssl_edit_response.py b/src/cloudflare/types/zones/settings/ssl_edit_response.py deleted file mode 100644 index 60698328c..000000000 --- a/src/cloudflare/types/zones/settings/ssl_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["SSLEditResponse"] - - -class SSLEditResponse(BaseModel): - id: Literal["ssl"] - """ID of the zone setting.""" - - value: Literal["off", "flexible", "full", "strict"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" 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 1b10e1319..6a78b2f6a 100644 --- a/src/cloudflare/types/zones/settings/ssl_recommender_edit_params.py +++ b/src/cloudflare/types/zones/settings/ssl_recommender_edit_params.py @@ -2,26 +2,20 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict -__all__ = ["SSLRecommenderEditParams", "Value"] +from .zones_ssl_recommender_param import ZonesSSLRecommenderParam + +__all__ = ["SSLRecommenderEditParams"] class SSLRecommenderEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[Value] + value: Required[ZonesSSLRecommenderParam] """ Enrollment in the SSL/TLS Recommender service which tries to detect and recommend (by sending periodic emails) the most secure SSL/TLS setting your origin servers support. """ - - -class Value(TypedDict, total=False): - id: Literal["ssl_recommender"] - """Enrollment value for SSL/TLS Recommender.""" - - enabled: bool - """ssl-recommender enrollment setting.""" diff --git a/src/cloudflare/types/zones/settings/ssl_recommender_edit_response.py b/src/cloudflare/types/zones/settings/ssl_recommender_edit_response.py deleted file mode 100644 index a6ae4f71c..000000000 --- a/src/cloudflare/types/zones/settings/ssl_recommender_edit_response.py +++ /dev/null @@ -1,16 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["SSLRecommenderEditResponse"] - - -class SSLRecommenderEditResponse(BaseModel): - id: Optional[Literal["ssl_recommender"]] = None - """Enrollment value for SSL/TLS Recommender.""" - - enabled: Optional[bool] = None - """ssl-recommender enrollment setting.""" diff --git a/src/cloudflare/types/zones/settings/tls_1_3_edit_response.py b/src/cloudflare/types/zones/settings/tls_1_3_edit_response.py deleted file mode 100644 index 415103850..000000000 --- a/src/cloudflare/types/zones/settings/tls_1_3_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["TLS1_3EditResponse"] - - -class TLS1_3EditResponse(BaseModel): - id: Literal["tls_1_3"] - """ID of the zone setting.""" - - value: Literal["on", "off", "zrt"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/tls_client_auth_edit_response.py b/src/cloudflare/types/zones/settings/tls_client_auth_edit_response.py deleted file mode 100644 index 62457f4d1..000000000 --- a/src/cloudflare/types/zones/settings/tls_client_auth_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["TLSClientAuthEditResponse"] - - -class TLSClientAuthEditResponse(BaseModel): - id: Literal["tls_client_auth"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/true_client_ip_header_edit_response.py b/src/cloudflare/types/zones/settings/true_client_ip_header_edit_response.py deleted file mode 100644 index 18cbc8bec..000000000 --- a/src/cloudflare/types/zones/settings/true_client_ip_header_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["TrueClientIPHeaderEditResponse"] - - -class TrueClientIPHeaderEditResponse(BaseModel): - id: Literal["true_client_ip_header"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/waf_edit_response.py b/src/cloudflare/types/zones/settings/waf_edit_response.py deleted file mode 100644 index 9f33d1309..000000000 --- a/src/cloudflare/types/zones/settings/waf_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["WAFEditResponse"] - - -class WAFEditResponse(BaseModel): - id: Literal["waf"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/webp_edit_response.py b/src/cloudflare/types/zones/settings/webp_edit_response.py deleted file mode 100644 index 6ef8a9728..000000000 --- a/src/cloudflare/types/zones/settings/webp_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["WebpEditResponse"] - - -class WebpEditResponse(BaseModel): - id: Literal["webp"] - """ID of the zone setting.""" - - value: Literal["off", "on"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/websocket_edit_response.py b/src/cloudflare/types/zones/settings/websocket_edit_response.py deleted file mode 100644 index 32d9058c1..000000000 --- a/src/cloudflare/types/zones/settings/websocket_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["WebsocketEditResponse"] - - -class WebsocketEditResponse(BaseModel): - id: Literal["websockets"] - """ID of the zone setting.""" - - value: Literal["off", "on"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/zero_rtt_edit_response.py b/src/cloudflare/types/zones/settings/zero_rtt_edit_response.py deleted file mode 100644 index 5e733d36b..000000000 --- a/src/cloudflare/types/zones/settings/zero_rtt_edit_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ...._models import BaseModel - -__all__ = ["ZeroRTTEditResponse"] - - -class ZeroRTTEditResponse(BaseModel): - id: Literal["0rtt"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" diff --git a/src/cloudflare/types/zones/settings/zero_rtt_get_response.py b/src/cloudflare/types/zones/settings/zones_0rtt.py similarity index 89% rename from src/cloudflare/types/zones/settings/zero_rtt_get_response.py rename to src/cloudflare/types/zones/settings/zones_0rtt.py index 8a6c4cbda..c03f3cf4c 100644 --- a/src/cloudflare/types/zones/settings/zero_rtt_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_0rtt.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["ZeroRTTGetResponse"] +__all__ = ["Zones0rtt"] -class ZeroRTTGetResponse(BaseModel): +class Zones0rtt(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/zones_0rtt_param.py new file mode 100644 index 000000000..6f269f6ef --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_0rtt_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["Zones0rttParam"] + + +class Zones0rttParam(TypedDict, total=False): + id: Required[Literal["0rtt"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/advanced_ddos_get_response.py b/src/cloudflare/types/zones/settings/zones_advanced_ddos.py similarity index 88% rename from src/cloudflare/types/zones/settings/advanced_ddos_get_response.py rename to src/cloudflare/types/zones/settings/zones_advanced_ddos.py index ce3ab0c37..cca438779 100644 --- a/src/cloudflare/types/zones/settings/advanced_ddos_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_advanced_ddos.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["AdvancedDDOSGetResponse"] +__all__ = ["ZonesAdvancedDDOS"] -class AdvancedDDOSGetResponse(BaseModel): +class ZonesAdvancedDDOS(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/zones_advanced_ddos_param.py new file mode 100644 index 000000000..383d06002 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_advanced_ddos_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesAdvancedDDOSParam"] + + +class ZonesAdvancedDDOSParam(TypedDict, total=False): + id: Required[Literal["advanced_ddos"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/always_online_get_response.py b/src/cloudflare/types/zones/settings/zones_always_online.py similarity index 88% rename from src/cloudflare/types/zones/settings/always_online_get_response.py rename to src/cloudflare/types/zones/settings/zones_always_online.py index 686a1613b..31cd457a5 100644 --- a/src/cloudflare/types/zones/settings/always_online_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_always_online.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["AlwaysOnlineGetResponse"] +__all__ = ["ZonesAlwaysOnline"] -class AlwaysOnlineGetResponse(BaseModel): +class ZonesAlwaysOnline(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/zones_always_online_param.py new file mode 100644 index 000000000..44d9734da --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_always_online_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesAlwaysOnlineParam"] + + +class ZonesAlwaysOnlineParam(TypedDict, total=False): + id: Required[Literal["always_online"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/always_use_https_get_response.py b/src/cloudflare/types/zones/settings/zones_always_use_https.py similarity index 87% rename from src/cloudflare/types/zones/settings/always_use_https_get_response.py rename to src/cloudflare/types/zones/settings/zones_always_use_https.py index cf89113d3..c95636b2a 100644 --- a/src/cloudflare/types/zones/settings/always_use_https_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_always_use_https.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["AlwaysUseHTTPSGetResponse"] +__all__ = ["ZonesAlwaysUseHTTPS"] -class AlwaysUseHTTPSGetResponse(BaseModel): +class ZonesAlwaysUseHTTPS(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/zones_always_use_https_param.py new file mode 100644 index 000000000..a4b09bc80 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_always_use_https_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesAlwaysUseHTTPSParam"] + + +class ZonesAlwaysUseHTTPSParam(TypedDict, total=False): + id: Required[Literal["always_use_https"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/automatic_https_rewrite_get_response.py b/src/cloudflare/types/zones/settings/zones_automatic_https_rewrites.py similarity index 86% rename from src/cloudflare/types/zones/settings/automatic_https_rewrite_get_response.py rename to src/cloudflare/types/zones/settings/zones_automatic_https_rewrites.py index dd2f62420..a8a124dc2 100644 --- a/src/cloudflare/types/zones/settings/automatic_https_rewrite_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_automatic_https_rewrites.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["AutomaticHTTPSRewriteGetResponse"] +__all__ = ["ZonesAutomaticHTTPSRewrites"] -class AutomaticHTTPSRewriteGetResponse(BaseModel): +class ZonesAutomaticHTTPSRewrites(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/zones_automatic_https_rewrites_param.py new file mode 100644 index 000000000..351c36f5d --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_automatic_https_rewrites_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesAutomaticHTTPSRewritesParam"] + + +class ZonesAutomaticHTTPSRewritesParam(TypedDict, total=False): + id: Required[Literal["automatic_https_rewrites"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/automatic_platform_optimization_get_response.py b/src/cloudflare/types/zones/settings/zones_automatic_platform_optimization.py similarity index 88% rename from src/cloudflare/types/zones/settings/automatic_platform_optimization_get_response.py rename to src/cloudflare/types/zones/settings/zones_automatic_platform_optimization.py index 32cb3d91c..c0ac6a599 100644 --- a/src/cloudflare/types/zones/settings/automatic_platform_optimization_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_automatic_platform_optimization.py @@ -4,10 +4,10 @@ from typing import List from ...._models import BaseModel -__all__ = ["AutomaticPlatformOptimizationGetResponse"] +__all__ = ["ZonesAutomaticPlatformOptimization"] -class AutomaticPlatformOptimizationGetResponse(BaseModel): +class ZonesAutomaticPlatformOptimization(BaseModel): cache_by_device_type: bool """ Indicates whether or not diff --git a/src/cloudflare/types/zones/settings/automatic_platform_optimization_edit_response.py b/src/cloudflare/types/zones/settings/zones_automatic_platform_optimization_param.py similarity index 64% rename from src/cloudflare/types/zones/settings/automatic_platform_optimization_edit_response.py rename to src/cloudflare/types/zones/settings/zones_automatic_platform_optimization_param.py index dce2e4d3f..4c097c086 100644 --- a/src/cloudflare/types/zones/settings/automatic_platform_optimization_edit_response.py +++ b/src/cloudflare/types/zones/settings/zones_automatic_platform_optimization_param.py @@ -1,36 +1,37 @@ # File generated from our OpenAPI spec by Stainless. +from __future__ import annotations + from typing import List +from typing_extensions import Required, TypedDict -from ...._models import BaseModel - -__all__ = ["AutomaticPlatformOptimizationEditResponse"] +__all__ = ["ZonesAutomaticPlatformOptimizationParam"] -class AutomaticPlatformOptimizationEditResponse(BaseModel): - cache_by_device_type: bool +class ZonesAutomaticPlatformOptimizationParam(TypedDict, total=False): + cache_by_device_type: Required[bool] """ Indicates whether or not [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) is enabled. """ - cf: bool + cf: Required[bool] """Indicates whether or not Cloudflare proxy is enabled.""" - enabled: bool + enabled: Required[bool] """Indicates whether or not Automatic Platform Optimization is enabled.""" - hostnames: List[str] + hostnames: Required[List[str]] """ An array of hostnames where Automatic Platform Optimization for WordPress is activated. """ - wordpress: bool + wordpress: Required[bool] """Indicates whether or not site is powered by WordPress.""" - wp_plugin: bool + wp_plugin: Required[bool] """ Indicates whether or not [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is diff --git a/src/cloudflare/types/zones/settings/brotli_get_response.py b/src/cloudflare/types/zones/settings/zones_brotli.py similarity index 89% rename from src/cloudflare/types/zones/settings/brotli_get_response.py rename to src/cloudflare/types/zones/settings/zones_brotli.py index 3c99fa896..3cb4e20d0 100644 --- a/src/cloudflare/types/zones/settings/brotli_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_brotli.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["BrotliGetResponse"] +__all__ = ["ZonesBrotli"] -class BrotliGetResponse(BaseModel): +class ZonesBrotli(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/zones_brotli_param.py new file mode 100644 index 000000000..b76d77983 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_brotli_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesBrotliParam"] + + +class ZonesBrotliParam(TypedDict, total=False): + id: Required[Literal["brotli"]] + """ID of the zone setting.""" + + value: Required[Literal["off", "on"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/browser_cache_ttl_get_response.py b/src/cloudflare/types/zones/settings/zones_browser_cache_ttl.py similarity index 92% rename from src/cloudflare/types/zones/settings/browser_cache_ttl_get_response.py rename to src/cloudflare/types/zones/settings/zones_browser_cache_ttl.py index c84b56275..50c6bd36b 100644 --- a/src/cloudflare/types/zones/settings/browser_cache_ttl_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_browser_cache_ttl.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["BrowserCacheTTLGetResponse"] +__all__ = ["ZonesBrowserCacheTTL"] -class BrowserCacheTTLGetResponse(BaseModel): +class ZonesBrowserCacheTTL(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/zones_browser_cache_ttl_param.py new file mode 100644 index 000000000..bb3ac7c8d --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_browser_cache_ttl_param.py @@ -0,0 +1,46 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesBrowserCacheTTLParam"] + + +class ZonesBrowserCacheTTLParam(TypedDict, total=False): + id: Required[Literal["browser_cache_ttl"]] + """ID of the zone setting.""" + + value: Required[ + Literal[ + 0, + 30, + 60, + 120, + 300, + 1200, + 1800, + 3600, + 7200, + 10800, + 14400, + 18000, + 28800, + 43200, + 57600, + 72000, + 86400, + 172800, + 259200, + 345600, + 432000, + 691200, + 1382400, + 2073600, + 2678400, + 5356800, + 16070400, + 31536000, + ] + ] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/browser_check_get_response.py b/src/cloudflare/types/zones/settings/zones_browser_check.py similarity index 88% rename from src/cloudflare/types/zones/settings/browser_check_get_response.py rename to src/cloudflare/types/zones/settings/zones_browser_check.py index f5bb1ef9b..703f6fa71 100644 --- a/src/cloudflare/types/zones/settings/browser_check_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_browser_check.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["BrowserCheckGetResponse"] +__all__ = ["ZonesBrowserCheck"] -class BrowserCheckGetResponse(BaseModel): +class ZonesBrowserCheck(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/zones_browser_check_param.py new file mode 100644 index 000000000..1fe470d61 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_browser_check_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesBrowserCheckParam"] + + +class ZonesBrowserCheckParam(TypedDict, total=False): + id: Required[Literal["browser_check"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/response_buffering_get_response.py b/src/cloudflare/types/zones/settings/zones_buffering.py similarity index 87% rename from src/cloudflare/types/zones/settings/response_buffering_get_response.py rename to src/cloudflare/types/zones/settings/zones_buffering.py index d3152ba27..bf81e3a0c 100644 --- a/src/cloudflare/types/zones/settings/response_buffering_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_buffering.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["ResponseBufferingGetResponse"] +__all__ = ["ZonesBuffering"] -class ResponseBufferingGetResponse(BaseModel): +class ZonesBuffering(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/zones_buffering_param.py new file mode 100644 index 000000000..db8b86c92 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_buffering_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesBufferingParam"] + + +class ZonesBufferingParam(TypedDict, total=False): + id: Required[Literal["response_buffering"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/cache_level_get_response.py b/src/cloudflare/types/zones/settings/zones_cache_level.py similarity index 89% rename from src/cloudflare/types/zones/settings/cache_level_get_response.py rename to src/cloudflare/types/zones/settings/zones_cache_level.py index 208f0d69d..3905f69f3 100644 --- a/src/cloudflare/types/zones/settings/cache_level_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_cache_level.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["CacheLevelGetResponse"] +__all__ = ["ZonesCacheLevel"] -class CacheLevelGetResponse(BaseModel): +class ZonesCacheLevel(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/zones_cache_level_param.py new file mode 100644 index 000000000..c61ba4819 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_cache_level_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesCacheLevelParam"] + + +class ZonesCacheLevelParam(TypedDict, total=False): + id: Required[Literal["cache_level"]] + """ID of the zone setting.""" + + value: Required[Literal["aggressive", "basic", "simplified"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/challenge_ttl_get_response.py b/src/cloudflare/types/zones/settings/zones_challenge_ttl.py similarity index 89% rename from src/cloudflare/types/zones/settings/challenge_ttl_get_response.py rename to src/cloudflare/types/zones/settings/zones_challenge_ttl.py index 4f8034254..a646c457f 100644 --- a/src/cloudflare/types/zones/settings/challenge_ttl_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_challenge_ttl.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["ChallengeTTLGetResponse"] +__all__ = ["ZonesChallengeTTL"] -class ChallengeTTLGetResponse(BaseModel): +class ZonesChallengeTTL(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/zones_challenge_ttl_param.py new file mode 100644 index 000000000..28ff41f06 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_challenge_ttl_param.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesChallengeTTLParam"] + + +class ZonesChallengeTTLParam(TypedDict, total=False): + id: Required[Literal["challenge_ttl"]] + """ID of the zone setting.""" + + value: Required[ + Literal[300, 900, 1800, 2700, 3600, 7200, 10800, 14400, 28800, 57600, 86400, 604800, 2592000, 31536000] + ] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/cipher_get_response.py b/src/cloudflare/types/zones/settings/zones_ciphers.py similarity index 89% rename from src/cloudflare/types/zones/settings/cipher_get_response.py rename to src/cloudflare/types/zones/settings/zones_ciphers.py index 3bfcc133d..0a4708af2 100644 --- a/src/cloudflare/types/zones/settings/cipher_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_ciphers.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["CipherGetResponse"] +__all__ = ["ZonesCiphers"] -class CipherGetResponse(BaseModel): +class ZonesCiphers(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/zones_ciphers_param.py new file mode 100644 index 000000000..a7e755532 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_ciphers_param.py @@ -0,0 +1,16 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing import List +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesCiphersParam"] + + +class ZonesCiphersParam(TypedDict, total=False): + id: Required[Literal["ciphers"]] + """ID of the zone setting.""" + + value: Required[List[str]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/development_mode_get_response.py b/src/cloudflare/types/zones/settings/zones_development_mode.py similarity index 91% rename from src/cloudflare/types/zones/settings/development_mode_get_response.py rename to src/cloudflare/types/zones/settings/zones_development_mode.py index c50da5a51..2920a4c02 100644 --- a/src/cloudflare/types/zones/settings/development_mode_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_development_mode.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["DevelopmentModeGetResponse"] +__all__ = ["ZonesDevelopmentMode"] -class DevelopmentModeGetResponse(BaseModel): +class ZonesDevelopmentMode(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/zones_development_mode_param.py new file mode 100644 index 000000000..f1bc2bf35 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_development_mode_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesDevelopmentModeParam"] + + +class ZonesDevelopmentModeParam(TypedDict, total=False): + id: Required[Literal["development_mode"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/early_hint_get_response.py b/src/cloudflare/types/zones/settings/zones_early_hints.py similarity index 88% rename from src/cloudflare/types/zones/settings/early_hint_get_response.py rename to src/cloudflare/types/zones/settings/zones_early_hints.py index 2f96a7a82..b995640df 100644 --- a/src/cloudflare/types/zones/settings/early_hint_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_early_hints.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["EarlyHintGetResponse"] +__all__ = ["ZonesEarlyHints"] -class EarlyHintGetResponse(BaseModel): +class ZonesEarlyHints(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/zones_early_hints_param.py new file mode 100644 index 000000000..66a656915 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_early_hints_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesEarlyHintsParam"] + + +class ZonesEarlyHintsParam(TypedDict, total=False): + id: Required[Literal["early_hints"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/email_obfuscation_get_response.py b/src/cloudflare/types/zones/settings/zones_email_obfuscation.py similarity index 87% rename from src/cloudflare/types/zones/settings/email_obfuscation_get_response.py rename to src/cloudflare/types/zones/settings/zones_email_obfuscation.py index d96ce8fe2..8724c7915 100644 --- a/src/cloudflare/types/zones/settings/email_obfuscation_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_email_obfuscation.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["EmailObfuscationGetResponse"] +__all__ = ["ZonesEmailObfuscation"] -class EmailObfuscationGetResponse(BaseModel): +class ZonesEmailObfuscation(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/zones_email_obfuscation_param.py new file mode 100644 index 000000000..55483f17c --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_email_obfuscation_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesEmailObfuscationParam"] + + +class ZonesEmailObfuscationParam(TypedDict, total=False): + id: Required[Literal["email_obfuscation"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/h2_prioritization_get_response.py b/src/cloudflare/types/zones/settings/zones_h2_prioritization.py similarity index 87% rename from src/cloudflare/types/zones/settings/h2_prioritization_get_response.py rename to src/cloudflare/types/zones/settings/zones_h2_prioritization.py index 6b0222e75..a39d9b495 100644 --- a/src/cloudflare/types/zones/settings/h2_prioritization_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_h2_prioritization.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["H2PrioritizationGetResponse"] +__all__ = ["ZonesH2Prioritization"] -class H2PrioritizationGetResponse(BaseModel): +class ZonesH2Prioritization(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/zones_h2_prioritization_param.py new file mode 100644 index 000000000..dd65981aa --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_h2_prioritization_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesH2PrioritizationParam"] + + +class ZonesH2PrioritizationParam(TypedDict, total=False): + id: Required[Literal["h2_prioritization"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off", "custom"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/hotlink_protection_get_response.py b/src/cloudflare/types/zones/settings/zones_hotlink_protection.py similarity index 87% rename from src/cloudflare/types/zones/settings/hotlink_protection_get_response.py rename to src/cloudflare/types/zones/settings/zones_hotlink_protection.py index 1f526dcda..54a6c7192 100644 --- a/src/cloudflare/types/zones/settings/hotlink_protection_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_hotlink_protection.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["HotlinkProtectionGetResponse"] +__all__ = ["ZonesHotlinkProtection"] -class HotlinkProtectionGetResponse(BaseModel): +class ZonesHotlinkProtection(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/zones_hotlink_protection_param.py new file mode 100644 index 000000000..4f22271a2 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_hotlink_protection_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesHotlinkProtectionParam"] + + +class ZonesHotlinkProtectionParam(TypedDict, total=False): + id: Required[Literal["hotlink_protection"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/http2_get_response.py b/src/cloudflare/types/zones/settings/zones_http2.py similarity index 89% rename from src/cloudflare/types/zones/settings/http2_get_response.py rename to src/cloudflare/types/zones/settings/zones_http2.py index 1d3745625..e49649757 100644 --- a/src/cloudflare/types/zones/settings/http2_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_http2.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["HTTP2GetResponse"] +__all__ = ["ZonesHTTP2"] -class HTTP2GetResponse(BaseModel): +class ZonesHTTP2(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/zones_http2_param.py new file mode 100644 index 000000000..d719b7609 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_http2_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesHTTP2Param"] + + +class ZonesHTTP2Param(TypedDict, total=False): + id: Required[Literal["http2"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/http3_get_response.py b/src/cloudflare/types/zones/settings/zones_http3.py similarity index 89% rename from src/cloudflare/types/zones/settings/http3_get_response.py rename to src/cloudflare/types/zones/settings/zones_http3.py index 03b83b340..9b1a01050 100644 --- a/src/cloudflare/types/zones/settings/http3_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_http3.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["HTTP3GetResponse"] +__all__ = ["ZonesHTTP3"] -class HTTP3GetResponse(BaseModel): +class ZonesHTTP3(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/zones_http3_param.py new file mode 100644 index 000000000..845093b12 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_http3_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesHTTP3Param"] + + +class ZonesHTTP3Param(TypedDict, total=False): + id: Required[Literal["http3"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/image_resizing_get_response.py b/src/cloudflare/types/zones/settings/zones_image_resizing.py similarity index 88% rename from src/cloudflare/types/zones/settings/image_resizing_get_response.py rename to src/cloudflare/types/zones/settings/zones_image_resizing.py index e2c4899bc..fb8262b8a 100644 --- a/src/cloudflare/types/zones/settings/image_resizing_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_image_resizing.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["ImageResizingGetResponse"] +__all__ = ["ZonesImageResizing"] -class ImageResizingGetResponse(BaseModel): +class ZonesImageResizing(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/zones_image_resizing_param.py new file mode 100644 index 000000000..3c7eb9f90 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_image_resizing_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesImageResizingParam"] + + +class ZonesImageResizingParam(TypedDict, total=False): + id: Required[Literal["image_resizing"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off", "open"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/ip_geolocation_get_response.py b/src/cloudflare/types/zones/settings/zones_ip_geolocation.py similarity index 87% rename from src/cloudflare/types/zones/settings/ip_geolocation_get_response.py rename to src/cloudflare/types/zones/settings/zones_ip_geolocation.py index 7cb116e63..9aac5fde1 100644 --- a/src/cloudflare/types/zones/settings/ip_geolocation_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_ip_geolocation.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["IPGeolocationGetResponse"] +__all__ = ["ZonesIPGeolocation"] -class IPGeolocationGetResponse(BaseModel): +class ZonesIPGeolocation(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/zones_ip_geolocation_param.py new file mode 100644 index 000000000..6a28f9ba6 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_ip_geolocation_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesIPGeolocationParam"] + + +class ZonesIPGeolocationParam(TypedDict, total=False): + id: Required[Literal["ip_geolocation"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/ipv6_get_response.py b/src/cloudflare/types/zones/settings/zones_ipv6.py similarity index 90% rename from src/cloudflare/types/zones/settings/ipv6_get_response.py rename to src/cloudflare/types/zones/settings/zones_ipv6.py index f3ac154cb..9b2e0490d 100644 --- a/src/cloudflare/types/zones/settings/ipv6_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_ipv6.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["IPV6GetResponse"] +__all__ = ["ZonesIPV6"] -class IPV6GetResponse(BaseModel): +class ZonesIPV6(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/zones_ipv6_param.py new file mode 100644 index 000000000..6fdba7d10 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_ipv6_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesIPV6Param"] + + +class ZonesIPV6Param(TypedDict, total=False): + id: Required[Literal["ipv6"]] + """ID of the zone setting.""" + + value: Required[Literal["off", "on"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/min_tls_version_get_response.py b/src/cloudflare/types/zones/settings/zones_min_tls_version.py similarity index 88% rename from src/cloudflare/types/zones/settings/min_tls_version_get_response.py rename to src/cloudflare/types/zones/settings/zones_min_tls_version.py index 8d2d33fa4..c74b8d2e5 100644 --- a/src/cloudflare/types/zones/settings/min_tls_version_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_min_tls_version.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["MinTLSVersionGetResponse"] +__all__ = ["ZonesMinTLSVersion"] -class MinTLSVersionGetResponse(BaseModel): +class ZonesMinTLSVersion(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/zones_min_tls_version_param.py new file mode 100644 index 000000000..3411016ab --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_min_tls_version_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesMinTLSVersionParam"] + + +class ZonesMinTLSVersionParam(TypedDict, total=False): + id: Required[Literal["min_tls_version"]] + """ID of the zone setting.""" + + value: Required[Literal["1.0", "1.1", "1.2", "1.3"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/minify_get_response.py b/src/cloudflare/types/zones/settings/zones_minify.py similarity index 92% rename from src/cloudflare/types/zones/settings/minify_get_response.py rename to src/cloudflare/types/zones/settings/zones_minify.py index f5ac0b2d1..a32c5042e 100644 --- a/src/cloudflare/types/zones/settings/minify_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_minify.py @@ -6,7 +6,7 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["MinifyGetResponse", "Value"] +__all__ = ["ZonesMinify", "Value"] class Value(BaseModel): @@ -20,7 +20,7 @@ class Value(BaseModel): """Automatically minify all JavaScript files for your website.""" -class MinifyGetResponse(BaseModel): +class ZonesMinify(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/zones_minify_param.py new file mode 100644 index 000000000..09425a20a --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_minify_param.py @@ -0,0 +1,26 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesMinifyParam", "Value"] + + +class Value(TypedDict, total=False): + css: Literal["on", "off"] + """Automatically minify all CSS files for your website.""" + + html: Literal["on", "off"] + """Automatically minify all HTML files for your website.""" + + js: Literal["on", "off"] + """Automatically minify all JavaScript files for your website.""" + + +class ZonesMinifyParam(TypedDict, total=False): + id: Required[Literal["minify"]] + """Zone setting identifier.""" + + value: Required[Value] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/mirage_get_response.py b/src/cloudflare/types/zones/settings/zones_mirage.py similarity index 89% rename from src/cloudflare/types/zones/settings/mirage_get_response.py rename to src/cloudflare/types/zones/settings/zones_mirage.py index 752edd6ba..176fa9e71 100644 --- a/src/cloudflare/types/zones/settings/mirage_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_mirage.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["MirageGetResponse"] +__all__ = ["ZonesMirage"] -class MirageGetResponse(BaseModel): +class ZonesMirage(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/zones_mirage_param.py new file mode 100644 index 000000000..453c91d61 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_mirage_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesMirageParam"] + + +class ZonesMirageParam(TypedDict, total=False): + id: Required[Literal["mirage"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/mobile_redirect_get_response.py b/src/cloudflare/types/zones/settings/zones_mobile_redirect.py similarity index 92% rename from src/cloudflare/types/zones/settings/mobile_redirect_get_response.py rename to src/cloudflare/types/zones/settings/zones_mobile_redirect.py index 564b26cdf..c579836ac 100644 --- a/src/cloudflare/types/zones/settings/mobile_redirect_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_mobile_redirect.py @@ -6,7 +6,7 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["MobileRedirectGetResponse", "Value"] +__all__ = ["ZonesMobileRedirect", "Value"] class Value(BaseModel): @@ -26,7 +26,7 @@ class Value(BaseModel): """ -class MobileRedirectGetResponse(BaseModel): +class ZonesMobileRedirect(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/zones_mobile_redirect_param.py new file mode 100644 index 000000000..5e435b462 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_mobile_redirect_param.py @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing import Optional +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesMobileRedirectParam", "Value"] + + +class Value(TypedDict, total=False): + mobile_subdomain: Optional[str] + """ + Which subdomain prefix you wish to redirect visitors on mobile devices to + (subdomain must already exist). + """ + + status: Literal["on", "off"] + """Whether or not mobile redirect is enabled.""" + + strip_uri: bool + """ + Whether to drop the current page path and redirect to the mobile subdomain URL + root, or keep the path and redirect to the same page on the mobile subdomain. + """ + + +class ZonesMobileRedirectParam(TypedDict, total=False): + id: Required[Literal["mobile_redirect"]] + """Identifier of the zone setting.""" + + value: Required[Value] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/nel_get_response.py b/src/cloudflare/types/zones/settings/zones_nel.py similarity index 89% rename from src/cloudflare/types/zones/settings/nel_get_response.py rename to src/cloudflare/types/zones/settings/zones_nel.py index 41e36e502..27a18f2f4 100644 --- a/src/cloudflare/types/zones/settings/nel_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_nel.py @@ -6,14 +6,14 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["NELGetResponse", "Value"] +__all__ = ["ZonesNEL", "Value"] class Value(BaseModel): enabled: Optional[bool] = None -class NELGetResponse(BaseModel): +class ZonesNEL(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/zones_nel_param.py new file mode 100644 index 000000000..604605a5d --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_nel_param.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesNELParam", "Value"] + + +class Value(TypedDict, total=False): + enabled: bool + + +class ZonesNELParam(TypedDict, total=False): + id: Required[Literal["nel"]] + """Zone setting identifier.""" + + value: Required[Value] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/opportunistic_encryption_get_response.py b/src/cloudflare/types/zones/settings/zones_opportunistic_encryption.py similarity index 85% rename from src/cloudflare/types/zones/settings/opportunistic_encryption_get_response.py rename to src/cloudflare/types/zones/settings/zones_opportunistic_encryption.py index 6921fd9c8..83c10a6c4 100644 --- a/src/cloudflare/types/zones/settings/opportunistic_encryption_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_opportunistic_encryption.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["OpportunisticEncryptionGetResponse"] +__all__ = ["ZonesOpportunisticEncryption"] -class OpportunisticEncryptionGetResponse(BaseModel): +class ZonesOpportunisticEncryption(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/zones_opportunistic_encryption_param.py new file mode 100644 index 000000000..ef32542a0 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_opportunistic_encryption_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesOpportunisticEncryptionParam"] + + +class ZonesOpportunisticEncryptionParam(TypedDict, total=False): + id: Required[Literal["opportunistic_encryption"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/opportunistic_onion_get_response.py b/src/cloudflare/types/zones/settings/zones_opportunistic_onion.py similarity index 86% rename from src/cloudflare/types/zones/settings/opportunistic_onion_get_response.py rename to src/cloudflare/types/zones/settings/zones_opportunistic_onion.py index ded8bc2d0..a157a4e21 100644 --- a/src/cloudflare/types/zones/settings/opportunistic_onion_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_opportunistic_onion.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["OpportunisticOnionGetResponse"] +__all__ = ["ZonesOpportunisticOnion"] -class OpportunisticOnionGetResponse(BaseModel): +class ZonesOpportunisticOnion(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/zones_opportunistic_onion_param.py new file mode 100644 index 000000000..d9b149769 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_opportunistic_onion_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesOpportunisticOnionParam"] + + +class ZonesOpportunisticOnionParam(TypedDict, total=False): + id: Required[Literal["opportunistic_onion"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/orange_to_orange_get_response.py b/src/cloudflare/types/zones/settings/zones_orange_to_orange.py similarity index 87% rename from src/cloudflare/types/zones/settings/orange_to_orange_get_response.py rename to src/cloudflare/types/zones/settings/zones_orange_to_orange.py index ea354f527..9a366cf25 100644 --- a/src/cloudflare/types/zones/settings/orange_to_orange_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_orange_to_orange.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["OrangeToOrangeGetResponse"] +__all__ = ["ZonesOrangeToOrange"] -class OrangeToOrangeGetResponse(BaseModel): +class ZonesOrangeToOrange(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/zones_orange_to_orange_param.py new file mode 100644 index 000000000..a2f0fbcc9 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_orange_to_orange_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesOrangeToOrangeParam"] + + +class ZonesOrangeToOrangeParam(TypedDict, total=False): + id: Required[Literal["orange_to_orange"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/origin_error_page_pass_thru_get_response.py b/src/cloudflare/types/zones/settings/zones_origin_error_page_pass_thru.py similarity index 85% rename from src/cloudflare/types/zones/settings/origin_error_page_pass_thru_get_response.py rename to src/cloudflare/types/zones/settings/zones_origin_error_page_pass_thru.py index 71a3962b0..c7af89c2b 100644 --- a/src/cloudflare/types/zones/settings/origin_error_page_pass_thru_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_origin_error_page_pass_thru.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["OriginErrorPagePassThruGetResponse"] +__all__ = ["ZonesOriginErrorPagePassThru"] -class OriginErrorPagePassThruGetResponse(BaseModel): +class ZonesOriginErrorPagePassThru(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/zones_origin_error_page_pass_thru_param.py new file mode 100644 index 000000000..c0cb179e4 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_origin_error_page_pass_thru_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesOriginErrorPagePassThruParam"] + + +class ZonesOriginErrorPagePassThruParam(TypedDict, total=False): + id: Required[Literal["origin_error_page_pass_thru"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/polish_get_response.py b/src/cloudflare/types/zones/settings/zones_polish.py similarity index 89% rename from src/cloudflare/types/zones/settings/polish_get_response.py rename to src/cloudflare/types/zones/settings/zones_polish.py index 38b1d373a..a60589ced 100644 --- a/src/cloudflare/types/zones/settings/polish_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_polish.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["PolishGetResponse"] +__all__ = ["ZonesPolish"] -class PolishGetResponse(BaseModel): +class ZonesPolish(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/zones_polish_param.py new file mode 100644 index 000000000..06951603f --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_polish_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesPolishParam"] + + +class ZonesPolishParam(TypedDict, total=False): + id: Required[Literal["polish"]] + """ID of the zone setting.""" + + value: Required[Literal["off", "lossless", "lossy"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/prefetch_preload_get_response.py b/src/cloudflare/types/zones/settings/zones_prefetch_preload.py similarity index 87% rename from src/cloudflare/types/zones/settings/prefetch_preload_get_response.py rename to src/cloudflare/types/zones/settings/zones_prefetch_preload.py index e7dd1cf89..92af10d49 100644 --- a/src/cloudflare/types/zones/settings/prefetch_preload_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_prefetch_preload.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["PrefetchPreloadGetResponse"] +__all__ = ["ZonesPrefetchPreload"] -class PrefetchPreloadGetResponse(BaseModel): +class ZonesPrefetchPreload(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/zones_prefetch_preload_param.py new file mode 100644 index 000000000..3439b1e64 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_prefetch_preload_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesPrefetchPreloadParam"] + + +class ZonesPrefetchPreloadParam(TypedDict, total=False): + id: Required[Literal["prefetch_preload"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/proxy_read_timeout_get_response.py b/src/cloudflare/types/zones/settings/zones_proxy_read_timeout.py similarity index 86% rename from src/cloudflare/types/zones/settings/proxy_read_timeout_get_response.py rename to src/cloudflare/types/zones/settings/zones_proxy_read_timeout.py index 10c692432..68e39e42b 100644 --- a/src/cloudflare/types/zones/settings/proxy_read_timeout_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_proxy_read_timeout.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["ProxyReadTimeoutGetResponse"] +__all__ = ["ZonesProxyReadTimeout"] -class ProxyReadTimeoutGetResponse(BaseModel): +class ZonesProxyReadTimeout(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/zones_proxy_read_timeout_param.py new file mode 100644 index 000000000..6f53793c4 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_proxy_read_timeout_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesProxyReadTimeoutParam"] + + +class ZonesProxyReadTimeoutParam(TypedDict, total=False): + id: Required[Literal["proxy_read_timeout"]] + """ID of the zone setting.""" + + value: Required[float] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/pseudo_ipv4_get_response.py b/src/cloudflare/types/zones/settings/zones_pseudo_ipv4.py similarity index 89% rename from src/cloudflare/types/zones/settings/pseudo_ipv4_get_response.py rename to src/cloudflare/types/zones/settings/zones_pseudo_ipv4.py index 693fd91e0..f249c743e 100644 --- a/src/cloudflare/types/zones/settings/pseudo_ipv4_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_pseudo_ipv4.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["PseudoIPV4GetResponse"] +__all__ = ["ZonesPseudoIPV4"] -class PseudoIPV4GetResponse(BaseModel): +class ZonesPseudoIPV4(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/zones_pseudo_ipv4_param.py new file mode 100644 index 000000000..6f0440da7 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_pseudo_ipv4_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesPseudoIPV4Param"] + + +class ZonesPseudoIPV4Param(TypedDict, total=False): + id: Required[Literal["pseudo_ipv4"]] + """Value of the Pseudo IPv4 setting.""" + + value: Required[Literal["off", "add_header", "overwrite_header"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/rocket_loader_get_response.py b/src/cloudflare/types/zones/settings/zones_rocket_loader.py similarity index 88% rename from src/cloudflare/types/zones/settings/rocket_loader_get_response.py rename to src/cloudflare/types/zones/settings/zones_rocket_loader.py index cac543bfa..78f7cdfcc 100644 --- a/src/cloudflare/types/zones/settings/rocket_loader_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_rocket_loader.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["RocketLoaderGetResponse"] +__all__ = ["ZonesRocketLoader"] -class RocketLoaderGetResponse(BaseModel): +class ZonesRocketLoader(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/zones_rocket_loader_param.py new file mode 100644 index 000000000..029d73837 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_rocket_loader_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesRocketLoaderParam"] + + +class ZonesRocketLoaderParam(TypedDict, total=False): + id: Required[Literal["rocket_loader"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/security_header_get_response.py b/src/cloudflare/types/zones/settings/zones_security_header.py similarity index 90% rename from src/cloudflare/types/zones/settings/security_header_get_response.py rename to src/cloudflare/types/zones/settings/zones_security_header.py index 3f8992ec4..ec01b5326 100644 --- a/src/cloudflare/types/zones/settings/security_header_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_security_header.py @@ -6,7 +6,7 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["SecurityHeaderGetResponse", "Value", "ValueStrictTransportSecurity"] +__all__ = ["ZonesSecurityHeader", "Value", "ValueStrictTransportSecurity"] class ValueStrictTransportSecurity(BaseModel): @@ -28,7 +28,7 @@ class Value(BaseModel): """Strict Transport Security.""" -class SecurityHeaderGetResponse(BaseModel): +class ZonesSecurityHeader(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/zones_security_header_param.py new file mode 100644 index 000000000..23f3e3515 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_security_header_param.py @@ -0,0 +1,34 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesSecurityHeaderParam", "Value", "ValueStrictTransportSecurity"] + + +class ValueStrictTransportSecurity(TypedDict, total=False): + enabled: bool + """Whether or not strict transport security is enabled.""" + + include_subdomains: bool + """Include all subdomains for strict transport security.""" + + max_age: float + """Max age in seconds of the strict transport security.""" + + nosniff: bool + """Whether or not to include 'X-Content-Type-Options: nosniff' header.""" + + +class Value(TypedDict, total=False): + strict_transport_security: ValueStrictTransportSecurity + """Strict Transport Security.""" + + +class ZonesSecurityHeaderParam(TypedDict, total=False): + id: Required[Literal["security_header"]] + """ID of the zone's security header.""" + + value: Required[Value] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/security_level_get_response.py b/src/cloudflare/types/zones/settings/zones_security_level.py similarity index 88% rename from src/cloudflare/types/zones/settings/security_level_get_response.py rename to src/cloudflare/types/zones/settings/zones_security_level.py index 4666a81d0..c1db0d105 100644 --- a/src/cloudflare/types/zones/settings/security_level_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_security_level.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["SecurityLevelGetResponse"] +__all__ = ["ZonesSecurityLevel"] -class SecurityLevelGetResponse(BaseModel): +class ZonesSecurityLevel(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/zones_security_level_param.py new file mode 100644 index 000000000..655edebbc --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_security_level_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesSecurityLevelParam"] + + +class ZonesSecurityLevelParam(TypedDict, total=False): + id: Required[Literal["security_level"]] + """ID of the zone setting.""" + + value: Required[Literal["off", "essentially_off", "low", "medium", "high", "under_attack"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/server_side_exclude_get_response.py b/src/cloudflare/types/zones/settings/zones_server_side_exclude.py similarity index 87% rename from src/cloudflare/types/zones/settings/server_side_exclude_get_response.py rename to src/cloudflare/types/zones/settings/zones_server_side_exclude.py index 543143f41..d2ebfb25c 100644 --- a/src/cloudflare/types/zones/settings/server_side_exclude_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_server_side_exclude.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["ServerSideExcludeGetResponse"] +__all__ = ["ZonesServerSideExclude"] -class ServerSideExcludeGetResponse(BaseModel): +class ZonesServerSideExclude(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/zones_server_side_exclude_param.py new file mode 100644 index 000000000..dd0fcb81f --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_server_side_exclude_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesServerSideExcludeParam"] + + +class ZonesServerSideExcludeParam(TypedDict, total=False): + id: Required[Literal["server_side_exclude"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/sort_query_string_for_cache_get_response.py b/src/cloudflare/types/zones/settings/zones_sort_query_string_for_cache.py similarity index 85% rename from src/cloudflare/types/zones/settings/sort_query_string_for_cache_get_response.py rename to src/cloudflare/types/zones/settings/zones_sort_query_string_for_cache.py index f3509af4f..4028fabe3 100644 --- a/src/cloudflare/types/zones/settings/sort_query_string_for_cache_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_sort_query_string_for_cache.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["SortQueryStringForCacheGetResponse"] +__all__ = ["ZonesSortQueryStringForCache"] -class SortQueryStringForCacheGetResponse(BaseModel): +class ZonesSortQueryStringForCache(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/zones_sort_query_string_for_cache_param.py new file mode 100644 index 000000000..3eb09470a --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_sort_query_string_for_cache_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesSortQueryStringForCacheParam"] + + +class ZonesSortQueryStringForCacheParam(TypedDict, total=False): + id: Required[Literal["sort_query_string_for_cache"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/ssl_get_response.py b/src/cloudflare/types/zones/settings/zones_ssl.py similarity index 90% rename from src/cloudflare/types/zones/settings/ssl_get_response.py rename to src/cloudflare/types/zones/settings/zones_ssl.py index 53f84012f..9df5b30c7 100644 --- a/src/cloudflare/types/zones/settings/ssl_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_ssl.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["SSLGetResponse"] +__all__ = ["ZonesSSL"] -class SSLGetResponse(BaseModel): +class ZonesSSL(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/zones_ssl_param.py new file mode 100644 index 000000000..b03609821 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_ssl_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesSSLParam"] + + +class ZonesSSLParam(TypedDict, total=False): + id: Required[Literal["ssl"]] + """ID of the zone setting.""" + + value: Required[Literal["off", "flexible", "full", "strict"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/ssl_recommender_get_response.py b/src/cloudflare/types/zones/settings/zones_ssl_recommender.py similarity index 80% rename from src/cloudflare/types/zones/settings/ssl_recommender_get_response.py rename to src/cloudflare/types/zones/settings/zones_ssl_recommender.py index ca0913449..16c3dd5b5 100644 --- a/src/cloudflare/types/zones/settings/ssl_recommender_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_ssl_recommender.py @@ -5,10 +5,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["SSLRecommenderGetResponse"] +__all__ = ["ZonesSSLRecommender"] -class SSLRecommenderGetResponse(BaseModel): +class ZonesSSLRecommender(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/zones_ssl_recommender_param.py new file mode 100644 index 000000000..6378bf6f9 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_ssl_recommender_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, TypedDict + +__all__ = ["ZonesSSLRecommenderParam"] + + +class ZonesSSLRecommenderParam(TypedDict, total=False): + id: Literal["ssl_recommender"] + """Enrollment value for SSL/TLS Recommender.""" + + enabled: bool + """ssl-recommender enrollment setting.""" diff --git a/src/cloudflare/types/zones/settings/tls_1_3_get_response.py b/src/cloudflare/types/zones/settings/zones_tls_1_3.py similarity index 89% rename from src/cloudflare/types/zones/settings/tls_1_3_get_response.py rename to src/cloudflare/types/zones/settings/zones_tls_1_3.py index db06fc3e3..ab07f648f 100644 --- a/src/cloudflare/types/zones/settings/tls_1_3_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_tls_1_3.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["TLS1_3GetResponse"] +__all__ = ["ZonesTLS1_3"] -class TLS1_3GetResponse(BaseModel): +class ZonesTLS1_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/zones_tls_1_3_param.py new file mode 100644 index 000000000..142329062 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_tls_1_3_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesTLS1_3Param"] + + +class ZonesTLS1_3Param(TypedDict, total=False): + id: Required[Literal["tls_1_3"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off", "zrt"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/tls_client_auth_get_response.py b/src/cloudflare/types/zones/settings/zones_tls_client_auth.py similarity index 87% rename from src/cloudflare/types/zones/settings/tls_client_auth_get_response.py rename to src/cloudflare/types/zones/settings/zones_tls_client_auth.py index 89f247d66..82ea2984a 100644 --- a/src/cloudflare/types/zones/settings/tls_client_auth_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_tls_client_auth.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["TLSClientAuthGetResponse"] +__all__ = ["ZonesTLSClientAuth"] -class TLSClientAuthGetResponse(BaseModel): +class ZonesTLSClientAuth(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/zones_tls_client_auth_param.py new file mode 100644 index 000000000..a0d9ab557 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_tls_client_auth_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesTLSClientAuthParam"] + + +class ZonesTLSClientAuthParam(TypedDict, total=False): + id: Required[Literal["tls_client_auth"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/true_client_ip_header_get_response.py b/src/cloudflare/types/zones/settings/zones_true_client_ip_header.py similarity index 86% rename from src/cloudflare/types/zones/settings/true_client_ip_header_get_response.py rename to src/cloudflare/types/zones/settings/zones_true_client_ip_header.py index 3707674d7..9f20da0c4 100644 --- a/src/cloudflare/types/zones/settings/true_client_ip_header_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_true_client_ip_header.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["TrueClientIPHeaderGetResponse"] +__all__ = ["ZonesTrueClientIPHeader"] -class TrueClientIPHeaderGetResponse(BaseModel): +class ZonesTrueClientIPHeader(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/zones_true_client_ip_header_param.py new file mode 100644 index 000000000..566d4c030 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_true_client_ip_header_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesTrueClientIPHeaderParam"] + + +class ZonesTrueClientIPHeaderParam(TypedDict, total=False): + id: Required[Literal["true_client_ip_header"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/waf_get_response.py b/src/cloudflare/types/zones/settings/zones_waf.py similarity index 90% rename from src/cloudflare/types/zones/settings/waf_get_response.py rename to src/cloudflare/types/zones/settings/zones_waf.py index b3dba7318..db36969c5 100644 --- a/src/cloudflare/types/zones/settings/waf_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_waf.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["WAFGetResponse"] +__all__ = ["ZonesWAF"] -class WAFGetResponse(BaseModel): +class ZonesWAF(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/zones_waf_param.py new file mode 100644 index 000000000..9402730e9 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_waf_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesWAFParam"] + + +class ZonesWAFParam(TypedDict, total=False): + id: Required[Literal["waf"]] + """ID of the zone setting.""" + + value: Required[Literal["on", "off"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/webp_get_response.py b/src/cloudflare/types/zones/settings/zones_webp.py similarity index 90% rename from src/cloudflare/types/zones/settings/webp_get_response.py rename to src/cloudflare/types/zones/settings/zones_webp.py index 6b4892154..064097d14 100644 --- a/src/cloudflare/types/zones/settings/webp_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_webp.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["WebpGetResponse"] +__all__ = ["ZonesWebp"] -class WebpGetResponse(BaseModel): +class ZonesWebp(BaseModel): id: Literal["webp"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_webp_param.py b/src/cloudflare/types/zones/settings/zones_webp_param.py new file mode 100644 index 000000000..c27c3f566 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_webp_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesWebpParam"] + + +class ZonesWebpParam(TypedDict, total=False): + id: Required[Literal["webp"]] + """ID of the zone setting.""" + + value: Required[Literal["off", "on"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/websocket_get_response.py b/src/cloudflare/types/zones/settings/zones_websockets.py similarity index 88% rename from src/cloudflare/types/zones/settings/websocket_get_response.py rename to src/cloudflare/types/zones/settings/zones_websockets.py index 645325a62..a1e9f6ad0 100644 --- a/src/cloudflare/types/zones/settings/websocket_get_response.py +++ b/src/cloudflare/types/zones/settings/zones_websockets.py @@ -6,10 +6,10 @@ from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["WebsocketGetResponse"] +__all__ = ["ZonesWebsockets"] -class WebsocketGetResponse(BaseModel): +class ZonesWebsockets(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/zones_websockets_param.py new file mode 100644 index 000000000..a21cf5db4 --- /dev/null +++ b/src/cloudflare/types/zones/settings/zones_websockets_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ZonesWebsocketsParam"] + + +class ZonesWebsocketsParam(TypedDict, total=False): + id: Required[Literal["websockets"]] + """ID of the zone setting.""" + + value: Required[Literal["off", "on"]] + """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones_page_rule.py b/src/cloudflare/types/zones_page_rule.py new file mode 100644 index 000000000..6feedd21b --- /dev/null +++ b/src/cloudflare/types/zones_page_rule.py @@ -0,0 +1,83 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import List, Optional +from datetime import datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["ZonesPageRule", "Action", "ActionValue", "Target", "TargetConstraint"] + + +class ActionValue(BaseModel): + type: Optional[Literal["temporary", "permanent"]] = None + """The response type for the URL redirect.""" + + url: Optional[str] = None + """ + The URL to redirect the request to. Notes: ${num} refers to the position of '\\**' + in the constraint value. + """ + + +class Action(BaseModel): + modified_on: Optional[datetime] = None + """The timestamp of when the override was last modified.""" + + name: Optional[Literal["forward_url"]] = None + """The type of route.""" + + value: Optional[ActionValue] = None + + +class TargetConstraint(BaseModel): + operator: Literal["matches", "contains", "equals", "not_equal", "not_contain"] + """ + The matches operator can use asterisks and pipes as wildcard and 'or' operators. + """ + + value: str + """The URL pattern to match against the current request. + + The pattern may contain up to four asterisks ('\\**') as placeholders. + """ + + +class Target(BaseModel): + constraint: TargetConstraint + """String constraint.""" + + target: Literal["url"] + """A target based on the URL of the request.""" + + +class ZonesPageRule(BaseModel): + id: str + """Identifier""" + + actions: List[Action] + """The set of actions to perform if the targets of this rule match the request. + + Actions can redirect to another URL or override settings, but not both. + """ + + created_on: datetime + """The timestamp of when the Page Rule was created.""" + + modified_on: datetime + """The timestamp of when the Page Rule was last modified.""" + + priority: int + """ + The priority of the rule, used to define which Page Rule is processed over + another. A higher number indicates a higher priority. For example, if you have a + catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to + take precedence (rule B: `/images/special/*`), specify a higher priority for + rule B so it overrides rule A. + """ + + status: Literal["active", "disabled"] + """The status of the Page Rule.""" + + targets: List[Target] + """The rule targets to evaluate on each request.""" diff --git a/tests/api_resources/addressing/prefixes/bgp/test_bindings.py b/tests/api_resources/addressing/prefixes/bgp/test_bindings.py index ad7968504..a622a8f8c 100644 --- a/tests/api_resources/addressing/prefixes/bgp/test_bindings.py +++ b/tests/api_resources/addressing/prefixes/bgp/test_bindings.py @@ -10,10 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.addressing.prefixes.bgp import ( - BindingGetResponse, BindingListResponse, - BindingCreateResponse, BindingDeleteResponse, + AddressingServiceBinding, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -29,7 +28,7 @@ class TestBindings: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BindingCreateResponse, binding, path=["response"]) + assert_matches_type(AddressingServiceBinding, binding, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +39,7 @@ class TestBindings: cidr="192.0.2.0/24", service_id="2db684ee7ca04e159946fd05b99e1bcd", ) - assert_matches_type(BindingCreateResponse, binding, path=["response"]) + assert_matches_type(AddressingServiceBinding, binding, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +52,7 @@ class TestBindings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" binding = response.parse() - assert_matches_type(BindingCreateResponse, binding, path=["response"]) + assert_matches_type(AddressingServiceBinding, binding, path=["response"]) @pytest.mark.skip() @parametrize @@ -66,7 +65,7 @@ class TestBindings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" binding = response.parse() - assert_matches_type(BindingCreateResponse, binding, path=["response"]) + assert_matches_type(AddressingServiceBinding, binding, path=["response"]) assert cast(Any, response.is_closed) is True @@ -209,7 +208,7 @@ class TestBindings: account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BindingGetResponse, binding, path=["response"]) + assert_matches_type(AddressingServiceBinding, binding, path=["response"]) @pytest.mark.skip() @parametrize @@ -223,7 +222,7 @@ class TestBindings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" binding = response.parse() - assert_matches_type(BindingGetResponse, binding, path=["response"]) + assert_matches_type(AddressingServiceBinding, binding, path=["response"]) @pytest.mark.skip() @parametrize @@ -237,7 +236,7 @@ class TestBindings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" binding = response.parse() - assert_matches_type(BindingGetResponse, binding, path=["response"]) + assert_matches_type(AddressingServiceBinding, binding, path=["response"]) assert cast(Any, response.is_closed) is True @@ -276,7 +275,7 @@ class TestAsyncBindings: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BindingCreateResponse, binding, path=["response"]) + assert_matches_type(AddressingServiceBinding, binding, path=["response"]) @pytest.mark.skip() @parametrize @@ -287,7 +286,7 @@ class TestAsyncBindings: cidr="192.0.2.0/24", service_id="2db684ee7ca04e159946fd05b99e1bcd", ) - assert_matches_type(BindingCreateResponse, binding, path=["response"]) + assert_matches_type(AddressingServiceBinding, binding, path=["response"]) @pytest.mark.skip() @parametrize @@ -300,7 +299,7 @@ class TestAsyncBindings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" binding = await response.parse() - assert_matches_type(BindingCreateResponse, binding, path=["response"]) + assert_matches_type(AddressingServiceBinding, binding, path=["response"]) @pytest.mark.skip() @parametrize @@ -313,7 +312,7 @@ class TestAsyncBindings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" binding = await response.parse() - assert_matches_type(BindingCreateResponse, binding, path=["response"]) + assert_matches_type(AddressingServiceBinding, binding, path=["response"]) assert cast(Any, response.is_closed) is True @@ -456,7 +455,7 @@ class TestAsyncBindings: account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BindingGetResponse, binding, path=["response"]) + assert_matches_type(AddressingServiceBinding, binding, path=["response"]) @pytest.mark.skip() @parametrize @@ -470,7 +469,7 @@ class TestAsyncBindings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" binding = await response.parse() - assert_matches_type(BindingGetResponse, binding, path=["response"]) + assert_matches_type(AddressingServiceBinding, binding, path=["response"]) @pytest.mark.skip() @parametrize @@ -484,7 +483,7 @@ class TestAsyncBindings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" binding = await response.parse() - assert_matches_type(BindingGetResponse, binding, path=["response"]) + assert_matches_type(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 9146ce2a8..c3e451eb1 100644 --- a/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py +++ b/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py @@ -9,11 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.addressing.prefixes.bgp import ( - PrefixGetResponse, - PrefixEditResponse, - PrefixListResponse, -) +from cloudflare.types.addressing.prefixes.bgp import PrefixListResponse, AddressingIpamBGPPrefixes base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -81,7 +77,7 @@ class TestPrefixes: account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PrefixEditResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamBGPPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -92,7 +88,7 @@ class TestPrefixes: prefix_id="023e105f4ecef8ad9ca31a8372d0c353", on_demand={"advertised": True}, ) - assert_matches_type(PrefixEditResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamBGPPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +102,7 @@ class TestPrefixes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = response.parse() - assert_matches_type(PrefixEditResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamBGPPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -120,7 +116,7 @@ class TestPrefixes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = response.parse() - assert_matches_type(PrefixEditResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamBGPPrefixes, prefix, path=["response"]) assert cast(Any, response.is_closed) is True @@ -156,7 +152,7 @@ class TestPrefixes: account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PrefixGetResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamBGPPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -170,7 +166,7 @@ class TestPrefixes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = response.parse() - assert_matches_type(PrefixGetResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamBGPPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -184,7 +180,7 @@ class TestPrefixes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = response.parse() - assert_matches_type(PrefixGetResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamBGPPrefixes, prefix, path=["response"]) assert cast(Any, response.is_closed) is True @@ -276,7 +272,7 @@ class TestAsyncPrefixes: account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PrefixEditResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamBGPPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -287,7 +283,7 @@ class TestAsyncPrefixes: prefix_id="023e105f4ecef8ad9ca31a8372d0c353", on_demand={"advertised": True}, ) - assert_matches_type(PrefixEditResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamBGPPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -301,7 +297,7 @@ class TestAsyncPrefixes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = await response.parse() - assert_matches_type(PrefixEditResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamBGPPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -315,7 +311,7 @@ class TestAsyncPrefixes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = await response.parse() - assert_matches_type(PrefixEditResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamBGPPrefixes, prefix, path=["response"]) assert cast(Any, response.is_closed) is True @@ -351,7 +347,7 @@ class TestAsyncPrefixes: account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PrefixGetResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamBGPPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -365,7 +361,7 @@ class TestAsyncPrefixes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = await response.parse() - assert_matches_type(PrefixGetResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamBGPPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -379,7 +375,7 @@ class TestAsyncPrefixes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = await response.parse() - assert_matches_type(PrefixGetResponse, prefix, path=["response"]) + assert_matches_type(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 375af80d9..cc69826b5 100644 --- a/tests/api_resources/addressing/prefixes/test_delegations.py +++ b/tests/api_resources/addressing/prefixes/test_delegations.py @@ -11,8 +11,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.addressing.prefixes import ( DelegationListResponse, - DelegationCreateResponse, DelegationDeleteResponse, + AddressingIpamDelegations, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +30,7 @@ class TestDelegations: cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", ) - assert_matches_type(DelegationCreateResponse, delegation, path=["response"]) + assert_matches_type(AddressingIpamDelegations, delegation, path=["response"]) @pytest.mark.skip() @parametrize @@ -45,7 +45,7 @@ class TestDelegations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" delegation = response.parse() - assert_matches_type(DelegationCreateResponse, delegation, path=["response"]) + assert_matches_type(AddressingIpamDelegations, delegation, path=["response"]) @pytest.mark.skip() @parametrize @@ -60,7 +60,7 @@ class TestDelegations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" delegation = response.parse() - assert_matches_type(DelegationCreateResponse, delegation, path=["response"]) + assert_matches_type(AddressingIpamDelegations, delegation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -212,7 +212,7 @@ class TestAsyncDelegations: cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", ) - assert_matches_type(DelegationCreateResponse, delegation, path=["response"]) + assert_matches_type(AddressingIpamDelegations, delegation, path=["response"]) @pytest.mark.skip() @parametrize @@ -227,7 +227,7 @@ class TestAsyncDelegations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" delegation = await response.parse() - assert_matches_type(DelegationCreateResponse, delegation, path=["response"]) + assert_matches_type(AddressingIpamDelegations, delegation, path=["response"]) @pytest.mark.skip() @parametrize @@ -242,7 +242,7 @@ class TestAsyncDelegations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" delegation = await response.parse() - assert_matches_type(DelegationCreateResponse, delegation, path=["response"]) + assert_matches_type(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 e2930b2c4..f895dd867 100644 --- a/tests/api_resources/addressing/test_address_maps.py +++ b/tests/api_resources/addressing/test_address_maps.py @@ -10,8 +10,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.addressing import ( + AddressingAddressMaps, AddressMapGetResponse, - AddressMapEditResponse, AddressMapListResponse, AddressMapCreateResponse, AddressMapDeleteResponse, @@ -176,7 +176,7 @@ class TestAddressMaps: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AddressMapEditResponse, address_map, path=["response"]) + assert_matches_type(AddressingAddressMaps, address_map, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +188,7 @@ class TestAddressMaps: description="My Ecommerce zones", enabled=True, ) - assert_matches_type(AddressMapEditResponse, address_map, path=["response"]) + assert_matches_type(AddressingAddressMaps, address_map, path=["response"]) @pytest.mark.skip() @parametrize @@ -201,7 +201,7 @@ class TestAddressMaps: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" address_map = response.parse() - assert_matches_type(AddressMapEditResponse, address_map, path=["response"]) + assert_matches_type(AddressingAddressMaps, address_map, path=["response"]) @pytest.mark.skip() @parametrize @@ -214,7 +214,7 @@ class TestAddressMaps: assert response.http_request.headers.get("X-Stainless-Lang") == "python" address_map = response.parse() - assert_matches_type(AddressMapEditResponse, address_map, path=["response"]) + assert_matches_type(AddressingAddressMaps, address_map, path=["response"]) assert cast(Any, response.is_closed) is True @@ -442,7 +442,7 @@ class TestAsyncAddressMaps: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AddressMapEditResponse, address_map, path=["response"]) + assert_matches_type(AddressingAddressMaps, address_map, path=["response"]) @pytest.mark.skip() @parametrize @@ -454,7 +454,7 @@ class TestAsyncAddressMaps: description="My Ecommerce zones", enabled=True, ) - assert_matches_type(AddressMapEditResponse, address_map, path=["response"]) + assert_matches_type(AddressingAddressMaps, address_map, path=["response"]) @pytest.mark.skip() @parametrize @@ -467,7 +467,7 @@ class TestAsyncAddressMaps: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" address_map = await response.parse() - assert_matches_type(AddressMapEditResponse, address_map, path=["response"]) + assert_matches_type(AddressingAddressMaps, address_map, path=["response"]) @pytest.mark.skip() @parametrize @@ -480,7 +480,7 @@ class TestAsyncAddressMaps: assert response.http_request.headers.get("X-Stainless-Lang") == "python" address_map = await response.parse() - assert_matches_type(AddressMapEditResponse, address_map, path=["response"]) + assert_matches_type(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 d38f9b12c..a0dee4c99 100644 --- a/tests/api_resources/addressing/test_prefixes.py +++ b/tests/api_resources/addressing/test_prefixes.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.addressing import ( - PrefixGetResponse, - PrefixEditResponse, PrefixListResponse, - PrefixCreateResponse, PrefixDeleteResponse, + AddressingIpamPrefixes, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -32,7 +30,7 @@ class TestPrefixes: cidr="192.0.2.0/24", loa_document_id="d933b1530bc56c9953cf8ce166da8004", ) - assert_matches_type(PrefixCreateResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +45,7 @@ class TestPrefixes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = response.parse() - assert_matches_type(PrefixCreateResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -62,7 +60,7 @@ class TestPrefixes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = response.parse() - assert_matches_type(PrefixCreateResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) assert cast(Any, response.is_closed) is True @@ -179,7 +177,7 @@ class TestPrefixes: account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) - assert_matches_type(PrefixEditResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -193,7 +191,7 @@ class TestPrefixes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = response.parse() - assert_matches_type(PrefixEditResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -207,7 +205,7 @@ class TestPrefixes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = response.parse() - assert_matches_type(PrefixEditResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) assert cast(Any, response.is_closed) is True @@ -235,7 +233,7 @@ class TestPrefixes: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PrefixGetResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -248,7 +246,7 @@ class TestPrefixes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = response.parse() - assert_matches_type(PrefixGetResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -261,7 +259,7 @@ class TestPrefixes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = response.parse() - assert_matches_type(PrefixGetResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) assert cast(Any, response.is_closed) is True @@ -293,7 +291,7 @@ class TestAsyncPrefixes: cidr="192.0.2.0/24", loa_document_id="d933b1530bc56c9953cf8ce166da8004", ) - assert_matches_type(PrefixCreateResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -308,7 +306,7 @@ class TestAsyncPrefixes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = await response.parse() - assert_matches_type(PrefixCreateResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -323,7 +321,7 @@ class TestAsyncPrefixes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = await response.parse() - assert_matches_type(PrefixCreateResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) assert cast(Any, response.is_closed) is True @@ -440,7 +438,7 @@ class TestAsyncPrefixes: account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) - assert_matches_type(PrefixEditResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -454,7 +452,7 @@ class TestAsyncPrefixes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = await response.parse() - assert_matches_type(PrefixEditResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -468,7 +466,7 @@ class TestAsyncPrefixes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = await response.parse() - assert_matches_type(PrefixEditResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) assert cast(Any, response.is_closed) is True @@ -496,7 +494,7 @@ class TestAsyncPrefixes: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PrefixGetResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -509,7 +507,7 @@ class TestAsyncPrefixes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = await response.parse() - assert_matches_type(PrefixGetResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -522,7 +520,7 @@ class TestAsyncPrefixes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = await response.parse() - assert_matches_type(PrefixGetResponse, prefix, path=["response"]) + assert_matches_type(AddressingIpamPrefixes, prefix, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/alerting/v3/destinations/test_webhooks.py b/tests/api_resources/alerting/v3/destinations/test_webhooks.py index e42e20c99..bf2dfea6d 100644 --- a/tests/api_resources/alerting/v3/destinations/test_webhooks.py +++ b/tests/api_resources/alerting/v3/destinations/test_webhooks.py @@ -10,7 +10,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.alerting.v3.destinations import ( - WebhookGetResponse, + AaaWebhooks, WebhookListResponse, WebhookCreateResponse, WebhookDeleteResponse, @@ -259,7 +259,7 @@ class TestWebhooks: "b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(WebhookGetResponse, webhook, path=["response"]) + assert_matches_type(AaaWebhooks, webhook, path=["response"]) @pytest.mark.skip() @parametrize @@ -272,7 +272,7 @@ class TestWebhooks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" webhook = response.parse() - assert_matches_type(WebhookGetResponse, webhook, path=["response"]) + assert_matches_type(AaaWebhooks, webhook, path=["response"]) @pytest.mark.skip() @parametrize @@ -285,7 +285,7 @@ class TestWebhooks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" webhook = response.parse() - assert_matches_type(WebhookGetResponse, webhook, path=["response"]) + assert_matches_type(AaaWebhooks, webhook, path=["response"]) assert cast(Any, response.is_closed) is True @@ -544,7 +544,7 @@ class TestAsyncWebhooks: "b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(WebhookGetResponse, webhook, path=["response"]) + assert_matches_type(AaaWebhooks, webhook, path=["response"]) @pytest.mark.skip() @parametrize @@ -557,7 +557,7 @@ class TestAsyncWebhooks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" webhook = await response.parse() - assert_matches_type(WebhookGetResponse, webhook, path=["response"]) + assert_matches_type(AaaWebhooks, webhook, path=["response"]) @pytest.mark.skip() @parametrize @@ -570,7 +570,7 @@ class TestAsyncWebhooks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" webhook = await response.parse() - assert_matches_type(WebhookGetResponse, webhook, path=["response"]) + assert_matches_type(AaaWebhooks, webhook, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/alerting/v3/test_histories.py b/tests/api_resources/alerting/v3/test_histories.py index ef3ea0d02..34f5f07e0 100644 --- a/tests/api_resources/alerting/v3/test_histories.py +++ b/tests/api_resources/alerting/v3/test_histories.py @@ -11,7 +11,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.alerting.v3 import HistoryListResponse +from cloudflare.types.alerting.v3 import AaaHistory base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ class TestHistories: history = client.alerting.v3.histories.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[HistoryListResponse], history, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[AaaHistory], history, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestHistories: per_page=5, since=parse_datetime("2022-05-19T20:29:58.679897Z"), ) - assert_matches_type(SyncV4PagePaginationArray[HistoryListResponse], history, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[AaaHistory], history, path=["response"]) @pytest.mark.skip() @parametrize @@ -49,7 +49,7 @@ class TestHistories: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" history = response.parse() - assert_matches_type(SyncV4PagePaginationArray[HistoryListResponse], history, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[AaaHistory], history, path=["response"]) @pytest.mark.skip() @parametrize @@ -61,7 +61,7 @@ class TestHistories: assert response.http_request.headers.get("X-Stainless-Lang") == "python" history = response.parse() - assert_matches_type(SyncV4PagePaginationArray[HistoryListResponse], history, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[AaaHistory], history, path=["response"]) assert cast(Any, response.is_closed) is True @@ -83,7 +83,7 @@ class TestAsyncHistories: history = await async_client.alerting.v3.histories.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[HistoryListResponse], history, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[AaaHistory], history, path=["response"]) @pytest.mark.skip() @parametrize @@ -95,7 +95,7 @@ class TestAsyncHistories: per_page=5, since=parse_datetime("2022-05-19T20:29:58.679897Z"), ) - assert_matches_type(AsyncV4PagePaginationArray[HistoryListResponse], history, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[AaaHistory], history, path=["response"]) @pytest.mark.skip() @parametrize @@ -107,7 +107,7 @@ class TestAsyncHistories: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" history = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[HistoryListResponse], history, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[AaaHistory], history, path=["response"]) @pytest.mark.skip() @parametrize @@ -119,7 +119,7 @@ class TestAsyncHistories: assert response.http_request.headers.get("X-Stainless-Lang") == "python" history = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[HistoryListResponse], history, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[AaaHistory], history, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/alerting/v3/test_policies.py b/tests/api_resources/alerting/v3/test_policies.py index bd7f0cf2d..0ae10d7f2 100644 --- a/tests/api_resources/alerting/v3/test_policies.py +++ b/tests/api_resources/alerting/v3/test_policies.py @@ -10,7 +10,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.alerting.v3 import ( - PolicyGetResponse, + AaaPolicies, PolicyListResponse, PolicyCreateResponse, PolicyDeleteResponse, @@ -369,7 +369,7 @@ class TestPolicies: "0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(AaaPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -382,7 +382,7 @@ class TestPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(AaaPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -395,7 +395,7 @@ class TestPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(AaaPolicies, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -764,7 +764,7 @@ class TestAsyncPolicies: "0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(AaaPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -777,7 +777,7 @@ class TestAsyncPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(AaaPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -790,7 +790,7 @@ class TestAsyncPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(AaaPolicies, policy, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/cache/test_variants.py b/tests/api_resources/cache/test_variants.py index 98dd8330b..1aa29b972 100644 --- a/tests/api_resources/cache/test_variants.py +++ b/tests/api_resources/cache/test_variants.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.cache import VariantGetResponse, VariantEditResponse, VariantDeleteResponse +from cloudflare.types.cache import CacheVariants, VariantGetResponse, VariantEditResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestVariants: variant = client.cache.variants.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(VariantDeleteResponse, variant, path=["response"]) + assert_matches_type(CacheVariants, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,7 @@ class TestVariants: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = response.parse() - assert_matches_type(VariantDeleteResponse, variant, path=["response"]) + assert_matches_type(CacheVariants, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ class TestVariants: assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = response.parse() - assert_matches_type(VariantDeleteResponse, variant, path=["response"]) + assert_matches_type(CacheVariants, variant, path=["response"]) assert cast(Any, response.is_closed) is True @@ -178,7 +178,7 @@ class TestAsyncVariants: variant = await async_client.cache.variants.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(VariantDeleteResponse, variant, path=["response"]) + assert_matches_type(CacheVariants, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -190,7 +190,7 @@ class TestAsyncVariants: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = await response.parse() - assert_matches_type(VariantDeleteResponse, variant, path=["response"]) + assert_matches_type(CacheVariants, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -202,7 +202,7 @@ class TestAsyncVariants: assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = await response.parse() - assert_matches_type(VariantDeleteResponse, variant, path=["response"]) + assert_matches_type(CacheVariants, variant, 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 32def09d0..2b3d5f9fd 100644 --- a/tests/api_resources/certificate_authorities/test_hostname_associations.py +++ b/tests/api_resources/certificate_authorities/test_hostname_associations.py @@ -10,8 +10,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.certificate_authorities import ( - HostnameAssociationGetResponse, - HostnameAssociationUpdateResponse, + TLSCertificatesAndHostnamesHostnameAssociation, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -26,7 +25,7 @@ class TestHostnameAssociations: hostname_association = client.certificate_authorities.hostname_associations.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HostnameAssociationUpdateResponse, hostname_association, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -36,7 +35,7 @@ class TestHostnameAssociations: hostnames=["api.example.com", "api.example.com", "api.example.com"], mtls_certificate_id="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", ) - assert_matches_type(HostnameAssociationUpdateResponse, hostname_association, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -48,7 +47,7 @@ class TestHostnameAssociations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = response.parse() - assert_matches_type(HostnameAssociationUpdateResponse, hostname_association, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -60,7 +59,7 @@ class TestHostnameAssociations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = response.parse() - assert_matches_type(HostnameAssociationUpdateResponse, hostname_association, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) assert cast(Any, response.is_closed) is True @@ -78,7 +77,7 @@ class TestHostnameAssociations: hostname_association = client.certificate_authorities.hostname_associations.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HostnameAssociationGetResponse, hostname_association, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -87,7 +86,7 @@ class TestHostnameAssociations: zone_id="023e105f4ecef8ad9ca31a8372d0c353", mtls_certificate_id="b2134436-2555-4acf-be5b-26c48136575e", ) - assert_matches_type(HostnameAssociationGetResponse, hostname_association, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -99,7 +98,7 @@ class TestHostnameAssociations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = response.parse() - assert_matches_type(HostnameAssociationGetResponse, hostname_association, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -111,7 +110,7 @@ class TestHostnameAssociations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = response.parse() - assert_matches_type(HostnameAssociationGetResponse, hostname_association, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) assert cast(Any, response.is_closed) is True @@ -133,7 +132,7 @@ class TestAsyncHostnameAssociations: hostname_association = await async_client.certificate_authorities.hostname_associations.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HostnameAssociationUpdateResponse, hostname_association, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -143,7 +142,7 @@ class TestAsyncHostnameAssociations: hostnames=["api.example.com", "api.example.com", "api.example.com"], mtls_certificate_id="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", ) - assert_matches_type(HostnameAssociationUpdateResponse, hostname_association, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +154,7 @@ class TestAsyncHostnameAssociations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = await response.parse() - assert_matches_type(HostnameAssociationUpdateResponse, hostname_association, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -167,7 +166,7 @@ class TestAsyncHostnameAssociations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = await response.parse() - assert_matches_type(HostnameAssociationUpdateResponse, hostname_association, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) assert cast(Any, response.is_closed) is True @@ -185,7 +184,7 @@ class TestAsyncHostnameAssociations: hostname_association = await async_client.certificate_authorities.hostname_associations.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HostnameAssociationGetResponse, hostname_association, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -194,7 +193,7 @@ class TestAsyncHostnameAssociations: zone_id="023e105f4ecef8ad9ca31a8372d0c353", mtls_certificate_id="b2134436-2555-4acf-be5b-26c48136575e", ) - assert_matches_type(HostnameAssociationGetResponse, hostname_association, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -206,7 +205,7 @@ class TestAsyncHostnameAssociations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = await response.parse() - assert_matches_type(HostnameAssociationGetResponse, hostname_association, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -218,7 +217,7 @@ class TestAsyncHostnameAssociations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = await response.parse() - assert_matches_type(HostnameAssociationGetResponse, hostname_association, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/challenges/test_widgets.py b/tests/api_resources/challenges/test_widgets.py index 63750b4c6..2f67e181f 100644 --- a/tests/api_resources/challenges/test_widgets.py +++ b/tests/api_resources/challenges/test_widgets.py @@ -11,12 +11,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.challenges import ( - WidgetGetResponse, - WidgetListResponse, - WidgetCreateResponse, - WidgetDeleteResponse, - WidgetUpdateResponse, - WidgetRotateSecretResponse, + NcChallengesAdminWidgetList, + NcChallengesAdminWidgetDetail, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -34,7 +30,7 @@ class TestWidgets: mode="invisible", name="blog.cloudflare.com login form", ) - assert_matches_type(Optional[WidgetCreateResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +49,7 @@ class TestWidgets: offlabel=True, region="world", ) - assert_matches_type(Optional[WidgetCreateResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -68,7 +64,7 @@ class TestWidgets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(Optional[WidgetCreateResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -83,7 +79,7 @@ class TestWidgets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(Optional[WidgetCreateResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -108,7 +104,7 @@ class TestWidgets: mode="invisible", name="blog.cloudflare.com login form", ) - assert_matches_type(Optional[WidgetUpdateResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -123,7 +119,7 @@ class TestWidgets: clearance_level="interactive", offlabel=True, ) - assert_matches_type(Optional[WidgetUpdateResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -139,7 +135,7 @@ class TestWidgets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(Optional[WidgetUpdateResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +151,7 @@ class TestWidgets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(Optional[WidgetUpdateResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -186,7 +182,7 @@ class TestWidgets: widget = client.challenges.widgets.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[WidgetListResponse], widget, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[NcChallengesAdminWidgetList], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -198,7 +194,7 @@ class TestWidgets: page=1, per_page=5, ) - assert_matches_type(SyncV4PagePaginationArray[WidgetListResponse], widget, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[NcChallengesAdminWidgetList], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -210,7 +206,7 @@ class TestWidgets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(SyncV4PagePaginationArray[WidgetListResponse], widget, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[NcChallengesAdminWidgetList], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -222,7 +218,7 @@ class TestWidgets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(SyncV4PagePaginationArray[WidgetListResponse], widget, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[NcChallengesAdminWidgetList], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -241,7 +237,7 @@ class TestWidgets: "0x4AAF00AAAABn0R22HWm-YUc", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[WidgetDeleteResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -254,7 +250,7 @@ class TestWidgets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(Optional[WidgetDeleteResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -267,7 +263,7 @@ class TestWidgets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(Optional[WidgetDeleteResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -293,7 +289,7 @@ class TestWidgets: "0x4AAF00AAAABn0R22HWm-YUc", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[WidgetGetResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -306,7 +302,7 @@ class TestWidgets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(Optional[WidgetGetResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -319,7 +315,7 @@ class TestWidgets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(Optional[WidgetGetResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -345,7 +341,7 @@ class TestWidgets: "0x4AAF00AAAABn0R22HWm-YUc", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[WidgetRotateSecretResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -355,7 +351,7 @@ class TestWidgets: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", invalidate_immediately=True, ) - assert_matches_type(Optional[WidgetRotateSecretResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -368,7 +364,7 @@ class TestWidgets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(Optional[WidgetRotateSecretResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -381,7 +377,7 @@ class TestWidgets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(Optional[WidgetRotateSecretResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -413,7 +409,7 @@ class TestAsyncWidgets: mode="invisible", name="blog.cloudflare.com login form", ) - assert_matches_type(Optional[WidgetCreateResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -432,7 +428,7 @@ class TestAsyncWidgets: offlabel=True, region="world", ) - assert_matches_type(Optional[WidgetCreateResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -447,7 +443,7 @@ class TestAsyncWidgets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(Optional[WidgetCreateResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -462,7 +458,7 @@ class TestAsyncWidgets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(Optional[WidgetCreateResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -487,7 +483,7 @@ class TestAsyncWidgets: mode="invisible", name="blog.cloudflare.com login form", ) - assert_matches_type(Optional[WidgetUpdateResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -502,7 +498,7 @@ class TestAsyncWidgets: clearance_level="interactive", offlabel=True, ) - assert_matches_type(Optional[WidgetUpdateResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -518,7 +514,7 @@ class TestAsyncWidgets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(Optional[WidgetUpdateResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -534,7 +530,7 @@ class TestAsyncWidgets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(Optional[WidgetUpdateResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -565,7 +561,7 @@ class TestAsyncWidgets: widget = await async_client.challenges.widgets.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[WidgetListResponse], widget, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[NcChallengesAdminWidgetList], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -577,7 +573,7 @@ class TestAsyncWidgets: page=1, per_page=5, ) - assert_matches_type(AsyncV4PagePaginationArray[WidgetListResponse], widget, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[NcChallengesAdminWidgetList], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -589,7 +585,7 @@ class TestAsyncWidgets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[WidgetListResponse], widget, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[NcChallengesAdminWidgetList], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -601,7 +597,7 @@ class TestAsyncWidgets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[WidgetListResponse], widget, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[NcChallengesAdminWidgetList], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -620,7 +616,7 @@ class TestAsyncWidgets: "0x4AAF00AAAABn0R22HWm-YUc", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[WidgetDeleteResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -633,7 +629,7 @@ class TestAsyncWidgets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(Optional[WidgetDeleteResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -646,7 +642,7 @@ class TestAsyncWidgets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(Optional[WidgetDeleteResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -672,7 +668,7 @@ class TestAsyncWidgets: "0x4AAF00AAAABn0R22HWm-YUc", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[WidgetGetResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -685,7 +681,7 @@ class TestAsyncWidgets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(Optional[WidgetGetResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -698,7 +694,7 @@ class TestAsyncWidgets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(Optional[WidgetGetResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -724,7 +720,7 @@ class TestAsyncWidgets: "0x4AAF00AAAABn0R22HWm-YUc", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[WidgetRotateSecretResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -734,7 +730,7 @@ class TestAsyncWidgets: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", invalidate_immediately=True, ) - assert_matches_type(Optional[WidgetRotateSecretResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -747,7 +743,7 @@ class TestAsyncWidgets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(Optional[WidgetRotateSecretResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -760,7 +756,7 @@ class TestAsyncWidgets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(Optional[WidgetRotateSecretResponse], widget, path=["response"]) + assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/cloudforce_one/requests/test_message.py b/tests/api_resources/cloudforce_one/requests/test_message.py index 8b06a22a5..4bad3b758 100644 --- a/tests/api_resources/cloudforce_one/requests/test_message.py +++ b/tests/api_resources/cloudforce_one/requests/test_message.py @@ -12,9 +12,8 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.types.cloudforce_one.requests import ( MessageGetResponse, - MessageCreateResponse, MessageDeleteResponse, - MessageUpdateResponse, + CloudforceOneRequestMessageItem, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +29,7 @@ class TestMessage: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(MessageCreateResponse, message, path=["response"]) + assert_matches_type(CloudforceOneRequestMessageItem, message, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +39,7 @@ class TestMessage: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="Can you elaborate on the type of DoS that occurred?", ) - assert_matches_type(MessageCreateResponse, message, path=["response"]) + assert_matches_type(CloudforceOneRequestMessageItem, message, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +52,7 @@ class TestMessage: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = response.parse() - assert_matches_type(MessageCreateResponse, message, path=["response"]) + assert_matches_type(CloudforceOneRequestMessageItem, message, path=["response"]) @pytest.mark.skip() @parametrize @@ -66,7 +65,7 @@ class TestMessage: assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = response.parse() - assert_matches_type(MessageCreateResponse, message, path=["response"]) + assert_matches_type(CloudforceOneRequestMessageItem, message, path=["response"]) assert cast(Any, response.is_closed) is True @@ -93,7 +92,7 @@ class TestMessage: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) - assert_matches_type(MessageUpdateResponse, message, path=["response"]) + assert_matches_type(CloudforceOneRequestMessageItem, message, path=["response"]) @pytest.mark.skip() @parametrize @@ -108,7 +107,7 @@ class TestMessage: summary="DoS attack", tlp="clear", ) - assert_matches_type(MessageUpdateResponse, message, path=["response"]) + assert_matches_type(CloudforceOneRequestMessageItem, message, path=["response"]) @pytest.mark.skip() @parametrize @@ -122,7 +121,7 @@ class TestMessage: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = response.parse() - assert_matches_type(MessageUpdateResponse, message, path=["response"]) + assert_matches_type(CloudforceOneRequestMessageItem, message, path=["response"]) @pytest.mark.skip() @parametrize @@ -136,7 +135,7 @@ class TestMessage: assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = response.parse() - assert_matches_type(MessageUpdateResponse, message, path=["response"]) + assert_matches_type(CloudforceOneRequestMessageItem, message, path=["response"]) assert cast(Any, response.is_closed) is True @@ -302,7 +301,7 @@ class TestAsyncMessage: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(MessageCreateResponse, message, path=["response"]) + assert_matches_type(CloudforceOneRequestMessageItem, message, path=["response"]) @pytest.mark.skip() @parametrize @@ -312,7 +311,7 @@ class TestAsyncMessage: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="Can you elaborate on the type of DoS that occurred?", ) - assert_matches_type(MessageCreateResponse, message, path=["response"]) + assert_matches_type(CloudforceOneRequestMessageItem, message, path=["response"]) @pytest.mark.skip() @parametrize @@ -325,7 +324,7 @@ class TestAsyncMessage: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = await response.parse() - assert_matches_type(MessageCreateResponse, message, path=["response"]) + assert_matches_type(CloudforceOneRequestMessageItem, message, path=["response"]) @pytest.mark.skip() @parametrize @@ -338,7 +337,7 @@ class TestAsyncMessage: assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = await response.parse() - assert_matches_type(MessageCreateResponse, message, path=["response"]) + assert_matches_type(CloudforceOneRequestMessageItem, message, path=["response"]) assert cast(Any, response.is_closed) is True @@ -365,7 +364,7 @@ class TestAsyncMessage: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) - assert_matches_type(MessageUpdateResponse, message, path=["response"]) + assert_matches_type(CloudforceOneRequestMessageItem, message, path=["response"]) @pytest.mark.skip() @parametrize @@ -380,7 +379,7 @@ class TestAsyncMessage: summary="DoS attack", tlp="clear", ) - assert_matches_type(MessageUpdateResponse, message, path=["response"]) + assert_matches_type(CloudforceOneRequestMessageItem, message, path=["response"]) @pytest.mark.skip() @parametrize @@ -394,7 +393,7 @@ class TestAsyncMessage: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = await response.parse() - assert_matches_type(MessageUpdateResponse, message, path=["response"]) + assert_matches_type(CloudforceOneRequestMessageItem, message, path=["response"]) @pytest.mark.skip() @parametrize @@ -408,7 +407,7 @@ class TestAsyncMessage: assert response.http_request.headers.get("X-Stainless-Lang") == "python" message = await response.parse() - assert_matches_type(MessageUpdateResponse, message, path=["response"]) + assert_matches_type(CloudforceOneRequestMessageItem, message, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/cloudforce_one/requests/test_priority.py b/tests/api_resources/cloudforce_one/requests/test_priority.py index 88c88ce16..4dd8f5f48 100644 --- a/tests/api_resources/cloudforce_one/requests/test_priority.py +++ b/tests/api_resources/cloudforce_one/requests/test_priority.py @@ -9,12 +9,10 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.types.cloudforce_one import CloudforceOneQuota, CloudforceOneRequestItem from cloudflare.types.cloudforce_one.requests import ( - PriorityGetResponse, - PriorityQuotaResponse, - PriorityCreateResponse, PriorityDeleteResponse, - PriorityUpdateResponse, + CloudforceOnePriorityItem, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -33,7 +31,7 @@ class TestPriority: requirement="DoS attacks carried out by CVEs", tlp="clear", ) - assert_matches_type(PriorityCreateResponse, priority, path=["response"]) + assert_matches_type(CloudforceOnePriorityItem, priority, path=["response"]) @pytest.mark.skip() @parametrize @@ -49,7 +47,7 @@ class TestPriority: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = response.parse() - assert_matches_type(PriorityCreateResponse, priority, path=["response"]) + assert_matches_type(CloudforceOnePriorityItem, priority, path=["response"]) @pytest.mark.skip() @parametrize @@ -65,7 +63,7 @@ class TestPriority: assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = response.parse() - assert_matches_type(PriorityCreateResponse, priority, path=["response"]) + assert_matches_type(CloudforceOnePriorityItem, priority, path=["response"]) assert cast(Any, response.is_closed) is True @@ -92,7 +90,7 @@ class TestPriority: requirement="DoS attacks carried out by CVEs", tlp="clear", ) - assert_matches_type(PriorityUpdateResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, priority, path=["response"]) @pytest.mark.skip() @parametrize @@ -109,7 +107,7 @@ class TestPriority: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = response.parse() - assert_matches_type(PriorityUpdateResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, priority, path=["response"]) @pytest.mark.skip() @parametrize @@ -126,7 +124,7 @@ class TestPriority: assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = response.parse() - assert_matches_type(PriorityUpdateResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, priority, path=["response"]) assert cast(Any, response.is_closed) is True @@ -212,7 +210,7 @@ class TestPriority: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PriorityGetResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, priority, path=["response"]) @pytest.mark.skip() @parametrize @@ -225,7 +223,7 @@ class TestPriority: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = response.parse() - assert_matches_type(PriorityGetResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, priority, path=["response"]) @pytest.mark.skip() @parametrize @@ -238,7 +236,7 @@ class TestPriority: assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = response.parse() - assert_matches_type(PriorityGetResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, priority, path=["response"]) assert cast(Any, response.is_closed) is True @@ -263,7 +261,7 @@ class TestPriority: priority = client.cloudforce_one.requests.priority.quota( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PriorityQuotaResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneQuota, priority, path=["response"]) @pytest.mark.skip() @parametrize @@ -275,7 +273,7 @@ class TestPriority: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = response.parse() - assert_matches_type(PriorityQuotaResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneQuota, priority, path=["response"]) @pytest.mark.skip() @parametrize @@ -287,7 +285,7 @@ class TestPriority: assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = response.parse() - assert_matches_type(PriorityQuotaResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneQuota, priority, path=["response"]) assert cast(Any, response.is_closed) is True @@ -313,7 +311,7 @@ class TestAsyncPriority: requirement="DoS attacks carried out by CVEs", tlp="clear", ) - assert_matches_type(PriorityCreateResponse, priority, path=["response"]) + assert_matches_type(CloudforceOnePriorityItem, priority, path=["response"]) @pytest.mark.skip() @parametrize @@ -329,7 +327,7 @@ class TestAsyncPriority: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = await response.parse() - assert_matches_type(PriorityCreateResponse, priority, path=["response"]) + assert_matches_type(CloudforceOnePriorityItem, priority, path=["response"]) @pytest.mark.skip() @parametrize @@ -345,7 +343,7 @@ class TestAsyncPriority: assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = await response.parse() - assert_matches_type(PriorityCreateResponse, priority, path=["response"]) + assert_matches_type(CloudforceOnePriorityItem, priority, path=["response"]) assert cast(Any, response.is_closed) is True @@ -372,7 +370,7 @@ class TestAsyncPriority: requirement="DoS attacks carried out by CVEs", tlp="clear", ) - assert_matches_type(PriorityUpdateResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, priority, path=["response"]) @pytest.mark.skip() @parametrize @@ -389,7 +387,7 @@ class TestAsyncPriority: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = await response.parse() - assert_matches_type(PriorityUpdateResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, priority, path=["response"]) @pytest.mark.skip() @parametrize @@ -406,7 +404,7 @@ class TestAsyncPriority: assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = await response.parse() - assert_matches_type(PriorityUpdateResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, priority, path=["response"]) assert cast(Any, response.is_closed) is True @@ -492,7 +490,7 @@ class TestAsyncPriority: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PriorityGetResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, priority, path=["response"]) @pytest.mark.skip() @parametrize @@ -505,7 +503,7 @@ class TestAsyncPriority: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = await response.parse() - assert_matches_type(PriorityGetResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, priority, path=["response"]) @pytest.mark.skip() @parametrize @@ -518,7 +516,7 @@ class TestAsyncPriority: assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = await response.parse() - assert_matches_type(PriorityGetResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, priority, path=["response"]) assert cast(Any, response.is_closed) is True @@ -543,7 +541,7 @@ class TestAsyncPriority: priority = await async_client.cloudforce_one.requests.priority.quota( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PriorityQuotaResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneQuota, priority, path=["response"]) @pytest.mark.skip() @parametrize @@ -555,7 +553,7 @@ class TestAsyncPriority: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = await response.parse() - assert_matches_type(PriorityQuotaResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneQuota, priority, path=["response"]) @pytest.mark.skip() @parametrize @@ -567,7 +565,7 @@ class TestAsyncPriority: assert response.http_request.headers.get("X-Stainless-Lang") == "python" priority = await response.parse() - assert_matches_type(PriorityQuotaResponse, priority, path=["response"]) + assert_matches_type(CloudforceOneQuota, priority, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/cloudforce_one/test_requests.py b/tests/api_resources/cloudforce_one/test_requests.py index 9b5cb7de5..97eedbfe6 100644 --- a/tests/api_resources/cloudforce_one/test_requests.py +++ b/tests/api_resources/cloudforce_one/test_requests.py @@ -12,14 +12,12 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.cloudforce_one import ( - RequestGetResponse, - RequestListResponse, - RequestQuotaResponse, - RequestTypesResponse, - RequestCreateResponse, + CloudforceOneQuota, RequestDeleteResponse, - RequestUpdateResponse, - RequestConstantsResponse, + CloudforceOneRequestItem, + CloudforceOneRequestTypes, + CloudforceOneRequestListItem, + CloudforceOneRequestConstants, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -34,7 +32,7 @@ class TestRequests: request = client.cloudforce_one.requests.create( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RequestCreateResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +45,7 @@ class TestRequests: summary="DoS attack", tlp="clear", ) - assert_matches_type(RequestCreateResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -59,7 +57,7 @@ class TestRequests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(RequestCreateResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -71,7 +69,7 @@ class TestRequests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(RequestCreateResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) assert cast(Any, response.is_closed) is True @@ -90,7 +88,7 @@ class TestRequests: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RequestUpdateResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -104,7 +102,7 @@ class TestRequests: summary="DoS attack", tlp="clear", ) - assert_matches_type(RequestUpdateResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -117,7 +115,7 @@ class TestRequests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(RequestUpdateResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -130,7 +128,7 @@ class TestRequests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(RequestUpdateResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) assert cast(Any, response.is_closed) is True @@ -157,7 +155,7 @@ class TestRequests: page=0, per_page=10, ) - assert_matches_type(SyncV4PagePaginationArray[RequestListResponse], request, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[CloudforceOneRequestListItem], request, path=["response"]) @pytest.mark.skip() @parametrize @@ -175,7 +173,7 @@ class TestRequests: sort_order="asc", status="open", ) - assert_matches_type(SyncV4PagePaginationArray[RequestListResponse], request, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[CloudforceOneRequestListItem], request, path=["response"]) @pytest.mark.skip() @parametrize @@ -189,7 +187,7 @@ class TestRequests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(SyncV4PagePaginationArray[RequestListResponse], request, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[CloudforceOneRequestListItem], request, path=["response"]) @pytest.mark.skip() @parametrize @@ -203,7 +201,7 @@ class TestRequests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(SyncV4PagePaginationArray[RequestListResponse], request, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[CloudforceOneRequestListItem], request, path=["response"]) assert cast(Any, response.is_closed) is True @@ -275,7 +273,7 @@ class TestRequests: request = client.cloudforce_one.requests.constants( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RequestConstantsResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestConstants, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -287,7 +285,7 @@ class TestRequests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(RequestConstantsResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestConstants, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -299,7 +297,7 @@ class TestRequests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(RequestConstantsResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestConstants, request, path=["response"]) assert cast(Any, response.is_closed) is True @@ -318,7 +316,7 @@ class TestRequests: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RequestGetResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -331,7 +329,7 @@ class TestRequests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(RequestGetResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -344,7 +342,7 @@ class TestRequests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(RequestGetResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) assert cast(Any, response.is_closed) is True @@ -369,7 +367,7 @@ class TestRequests: request = client.cloudforce_one.requests.quota( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RequestQuotaResponse, request, path=["response"]) + assert_matches_type(CloudforceOneQuota, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -381,7 +379,7 @@ class TestRequests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(RequestQuotaResponse, request, path=["response"]) + assert_matches_type(CloudforceOneQuota, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -393,7 +391,7 @@ class TestRequests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(RequestQuotaResponse, request, path=["response"]) + assert_matches_type(CloudforceOneQuota, request, path=["response"]) assert cast(Any, response.is_closed) is True @@ -411,7 +409,7 @@ class TestRequests: request = client.cloudforce_one.requests.types( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RequestTypesResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestTypes, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -423,7 +421,7 @@ class TestRequests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(RequestTypesResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestTypes, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -435,7 +433,7 @@ class TestRequests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = response.parse() - assert_matches_type(RequestTypesResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestTypes, request, path=["response"]) assert cast(Any, response.is_closed) is True @@ -457,7 +455,7 @@ class TestAsyncRequests: request = await async_client.cloudforce_one.requests.create( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RequestCreateResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -470,7 +468,7 @@ class TestAsyncRequests: summary="DoS attack", tlp="clear", ) - assert_matches_type(RequestCreateResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -482,7 +480,7 @@ class TestAsyncRequests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(RequestCreateResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -494,7 +492,7 @@ class TestAsyncRequests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(RequestCreateResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) assert cast(Any, response.is_closed) is True @@ -513,7 +511,7 @@ class TestAsyncRequests: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RequestUpdateResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -527,7 +525,7 @@ class TestAsyncRequests: summary="DoS attack", tlp="clear", ) - assert_matches_type(RequestUpdateResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -540,7 +538,7 @@ class TestAsyncRequests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(RequestUpdateResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -553,7 +551,7 @@ class TestAsyncRequests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(RequestUpdateResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) assert cast(Any, response.is_closed) is True @@ -580,7 +578,7 @@ class TestAsyncRequests: page=0, per_page=10, ) - assert_matches_type(AsyncV4PagePaginationArray[RequestListResponse], request, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[CloudforceOneRequestListItem], request, path=["response"]) @pytest.mark.skip() @parametrize @@ -598,7 +596,7 @@ class TestAsyncRequests: sort_order="asc", status="open", ) - assert_matches_type(AsyncV4PagePaginationArray[RequestListResponse], request, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[CloudforceOneRequestListItem], request, path=["response"]) @pytest.mark.skip() @parametrize @@ -612,7 +610,7 @@ class TestAsyncRequests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[RequestListResponse], request, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[CloudforceOneRequestListItem], request, path=["response"]) @pytest.mark.skip() @parametrize @@ -626,7 +624,7 @@ class TestAsyncRequests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[RequestListResponse], request, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[CloudforceOneRequestListItem], request, path=["response"]) assert cast(Any, response.is_closed) is True @@ -698,7 +696,7 @@ class TestAsyncRequests: request = await async_client.cloudforce_one.requests.constants( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RequestConstantsResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestConstants, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -710,7 +708,7 @@ class TestAsyncRequests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(RequestConstantsResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestConstants, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -722,7 +720,7 @@ class TestAsyncRequests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(RequestConstantsResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestConstants, request, path=["response"]) assert cast(Any, response.is_closed) is True @@ -741,7 +739,7 @@ class TestAsyncRequests: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RequestGetResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -754,7 +752,7 @@ class TestAsyncRequests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(RequestGetResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -767,7 +765,7 @@ class TestAsyncRequests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(RequestGetResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestItem, request, path=["response"]) assert cast(Any, response.is_closed) is True @@ -792,7 +790,7 @@ class TestAsyncRequests: request = await async_client.cloudforce_one.requests.quota( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RequestQuotaResponse, request, path=["response"]) + assert_matches_type(CloudforceOneQuota, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -804,7 +802,7 @@ class TestAsyncRequests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(RequestQuotaResponse, request, path=["response"]) + assert_matches_type(CloudforceOneQuota, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -816,7 +814,7 @@ class TestAsyncRequests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(RequestQuotaResponse, request, path=["response"]) + assert_matches_type(CloudforceOneQuota, request, path=["response"]) assert cast(Any, response.is_closed) is True @@ -834,7 +832,7 @@ class TestAsyncRequests: request = await async_client.cloudforce_one.requests.types( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RequestTypesResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestTypes, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -846,7 +844,7 @@ class TestAsyncRequests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(RequestTypesResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestTypes, request, path=["response"]) @pytest.mark.skip() @parametrize @@ -858,7 +856,7 @@ class TestAsyncRequests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" request = await response.parse() - assert_matches_type(RequestTypesResponse, request, path=["response"]) + assert_matches_type(CloudforceOneRequestTypes, request, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/d1/test_database.py b/tests/api_resources/d1/test_database.py index e34e14396..cd0d48bb1 100644 --- a/tests/api_resources/d1/test_database.py +++ b/tests/api_resources/d1/test_database.py @@ -10,10 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.d1 import ( - DatabaseGetResponse, - DatabaseListResponse, + D1CreateDatabase, + D1DatabaseDetails, DatabaseQueryResponse, - DatabaseCreateResponse, DatabaseDeleteResponse, ) from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray @@ -31,7 +30,7 @@ class TestDatabase: account_id="023e105f4ecef8ad9ca31a8372d0c353", name="my-database", ) - assert_matches_type(DatabaseCreateResponse, database, path=["response"]) + assert_matches_type(D1CreateDatabase, database, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +43,7 @@ class TestDatabase: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" database = response.parse() - assert_matches_type(DatabaseCreateResponse, database, path=["response"]) + assert_matches_type(D1CreateDatabase, database, path=["response"]) @pytest.mark.skip() @parametrize @@ -57,7 +56,7 @@ class TestDatabase: assert response.http_request.headers.get("X-Stainless-Lang") == "python" database = response.parse() - assert_matches_type(DatabaseCreateResponse, database, path=["response"]) + assert_matches_type(D1CreateDatabase, database, path=["response"]) assert cast(Any, response.is_closed) is True @@ -76,7 +75,7 @@ class TestDatabase: database = client.d1.database.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[DatabaseListResponse], database, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[D1CreateDatabase], database, path=["response"]) @pytest.mark.skip() @parametrize @@ -87,7 +86,7 @@ class TestDatabase: page=1, per_page=10, ) - assert_matches_type(SyncV4PagePaginationArray[DatabaseListResponse], database, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[D1CreateDatabase], database, path=["response"]) @pytest.mark.skip() @parametrize @@ -99,7 +98,7 @@ class TestDatabase: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" database = response.parse() - assert_matches_type(SyncV4PagePaginationArray[DatabaseListResponse], database, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[D1CreateDatabase], database, path=["response"]) @pytest.mark.skip() @parametrize @@ -111,7 +110,7 @@ class TestDatabase: assert response.http_request.headers.get("X-Stainless-Lang") == "python" database = response.parse() - assert_matches_type(SyncV4PagePaginationArray[DatabaseListResponse], database, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[D1CreateDatabase], database, path=["response"]) assert cast(Any, response.is_closed) is True @@ -182,7 +181,7 @@ class TestDatabase: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DatabaseGetResponse, database, path=["response"]) + assert_matches_type(D1DatabaseDetails, database, path=["response"]) @pytest.mark.skip() @parametrize @@ -195,7 +194,7 @@ class TestDatabase: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" database = response.parse() - assert_matches_type(DatabaseGetResponse, database, path=["response"]) + assert_matches_type(D1DatabaseDetails, database, path=["response"]) @pytest.mark.skip() @parametrize @@ -208,7 +207,7 @@ class TestDatabase: assert response.http_request.headers.get("X-Stainless-Lang") == "python" database = response.parse() - assert_matches_type(DatabaseGetResponse, database, path=["response"]) + assert_matches_type(D1DatabaseDetails, database, path=["response"]) assert cast(Any, response.is_closed) is True @@ -306,7 +305,7 @@ class TestAsyncDatabase: account_id="023e105f4ecef8ad9ca31a8372d0c353", name="my-database", ) - assert_matches_type(DatabaseCreateResponse, database, path=["response"]) + assert_matches_type(D1CreateDatabase, database, path=["response"]) @pytest.mark.skip() @parametrize @@ -319,7 +318,7 @@ class TestAsyncDatabase: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" database = await response.parse() - assert_matches_type(DatabaseCreateResponse, database, path=["response"]) + assert_matches_type(D1CreateDatabase, database, path=["response"]) @pytest.mark.skip() @parametrize @@ -332,7 +331,7 @@ class TestAsyncDatabase: assert response.http_request.headers.get("X-Stainless-Lang") == "python" database = await response.parse() - assert_matches_type(DatabaseCreateResponse, database, path=["response"]) + assert_matches_type(D1CreateDatabase, database, path=["response"]) assert cast(Any, response.is_closed) is True @@ -351,7 +350,7 @@ class TestAsyncDatabase: database = await async_client.d1.database.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[DatabaseListResponse], database, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[D1CreateDatabase], database, path=["response"]) @pytest.mark.skip() @parametrize @@ -362,7 +361,7 @@ class TestAsyncDatabase: page=1, per_page=10, ) - assert_matches_type(AsyncV4PagePaginationArray[DatabaseListResponse], database, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[D1CreateDatabase], database, path=["response"]) @pytest.mark.skip() @parametrize @@ -374,7 +373,7 @@ class TestAsyncDatabase: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" database = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[DatabaseListResponse], database, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[D1CreateDatabase], database, path=["response"]) @pytest.mark.skip() @parametrize @@ -386,7 +385,7 @@ class TestAsyncDatabase: assert response.http_request.headers.get("X-Stainless-Lang") == "python" database = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[DatabaseListResponse], database, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[D1CreateDatabase], database, path=["response"]) assert cast(Any, response.is_closed) is True @@ -457,7 +456,7 @@ class TestAsyncDatabase: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DatabaseGetResponse, database, path=["response"]) + assert_matches_type(D1DatabaseDetails, database, path=["response"]) @pytest.mark.skip() @parametrize @@ -470,7 +469,7 @@ class TestAsyncDatabase: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" database = await response.parse() - assert_matches_type(DatabaseGetResponse, database, path=["response"]) + assert_matches_type(D1DatabaseDetails, database, path=["response"]) @pytest.mark.skip() @parametrize @@ -483,7 +482,7 @@ class TestAsyncDatabase: assert response.http_request.headers.get("X-Stainless-Lang") == "python" database = await response.parse() - assert_matches_type(DatabaseGetResponse, database, path=["response"]) + assert_matches_type(D1DatabaseDetails, database, 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 ce6ad40bc..ce11a5e8a 100644 --- a/tests/api_resources/dcv_delegation/test_uuid.py +++ b/tests/api_resources/dcv_delegation/test_uuid.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.dcv_delegation import UUIDGetResponse +from cloudflare.types.dcv_delegation import TLSCertificatesAndHostnamesUUIDObject base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestUUID: uuid = client.dcv_delegation.uuid.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(UUIDGetResponse, uuid, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUUIDObject, uuid, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,7 @@ class TestUUID: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" uuid = response.parse() - assert_matches_type(UUIDGetResponse, uuid, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUUIDObject, uuid, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ class TestUUID: assert response.http_request.headers.get("X-Stainless-Lang") == "python" uuid = response.parse() - assert_matches_type(UUIDGetResponse, uuid, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUUIDObject, uuid, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestAsyncUUID: uuid = await async_client.dcv_delegation.uuid.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(UUIDGetResponse, uuid, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUUIDObject, uuid, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestAsyncUUID: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" uuid = await response.parse() - assert_matches_type(UUIDGetResponse, uuid, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUUIDObject, uuid, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestAsyncUUID: assert response.http_request.headers.get("X-Stainless-Lang") == "python" uuid = await response.parse() - assert_matches_type(UUIDGetResponse, uuid, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUUIDObject, uuid, 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 8ed38784a..88d724eab 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 @@ import pytest 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 BytimeGetResponse +from cloudflare.types.dns.analytics.reports import DNSDNSAnalyticsAPIReportBytime base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestBytimes: bytime = client.dns.analytics.reports.bytimes.get( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BytimeGetResponse, bytime, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +40,7 @@ class TestBytimes: time_delta="hour", until=parse_datetime("2023-11-11T13:00:00Z"), ) - assert_matches_type(BytimeGetResponse, bytime, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -52,7 +52,7 @@ class TestBytimes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bytime = response.parse() - assert_matches_type(BytimeGetResponse, bytime, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -64,7 +64,7 @@ class TestBytimes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bytime = response.parse() - assert_matches_type(BytimeGetResponse, bytime, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) assert cast(Any, response.is_closed) is True @@ -86,7 +86,7 @@ class TestAsyncBytimes: bytime = await async_client.dns.analytics.reports.bytimes.get( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BytimeGetResponse, bytime, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -102,7 +102,7 @@ class TestAsyncBytimes: time_delta="hour", until=parse_datetime("2023-11-11T13:00:00Z"), ) - assert_matches_type(BytimeGetResponse, bytime, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -114,7 +114,7 @@ class TestAsyncBytimes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bytime = await response.parse() - assert_matches_type(BytimeGetResponse, bytime, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -126,7 +126,7 @@ class TestAsyncBytimes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bytime = await response.parse() - assert_matches_type(BytimeGetResponse, bytime, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReportBytime, 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 124d42850..263b4b52d 100644 --- a/tests/api_resources/dns/analytics/test_reports.py +++ b/tests/api_resources/dns/analytics/test_reports.py @@ -10,7 +10,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.dns.analytics import ReportGetResponse +from cloudflare.types.dns.analytics import DNSDNSAnalyticsAPIReport base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestReports: report = client.dns.analytics.reports.get( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ReportGetResponse, report, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,7 @@ class TestReports: sort="+responseCode,-queryName", until=parse_datetime("2023-11-11T13:00:00Z"), ) - assert_matches_type(ReportGetResponse, report, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -51,7 +51,7 @@ class TestReports: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" report = response.parse() - assert_matches_type(ReportGetResponse, report, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -63,7 +63,7 @@ class TestReports: assert response.http_request.headers.get("X-Stainless-Lang") == "python" report = response.parse() - assert_matches_type(ReportGetResponse, report, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) assert cast(Any, response.is_closed) is True @@ -85,7 +85,7 @@ class TestAsyncReports: report = await async_client.dns.analytics.reports.get( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ReportGetResponse, report, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -100,7 +100,7 @@ class TestAsyncReports: sort="+responseCode,-queryName", until=parse_datetime("2023-11-11T13:00:00Z"), ) - assert_matches_type(ReportGetResponse, report, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -112,7 +112,7 @@ class TestAsyncReports: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" report = await response.parse() - assert_matches_type(ReportGetResponse, report, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -124,7 +124,7 @@ class TestAsyncReports: assert response.http_request.headers.get("X-Stainless-Lang") == "python" report = await response.parse() - assert_matches_type(ReportGetResponse, report, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReport, 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 4c6cdb528..7cb6360b3 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.dns.firewall.analytics.reports import BytimeGetResponse +from cloudflare.types.dns.analytics.reports import DNSDNSAnalyticsAPIReportBytime base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ class TestBytimes: "023e105f4ecef8ad9ca31a8372d0c353", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BytimeGetResponse, bytime, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +42,7 @@ class TestBytimes: time_delta="hour", until=parse_datetime("2023-11-11T13:00:00Z"), ) - assert_matches_type(BytimeGetResponse, bytime, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +55,7 @@ class TestBytimes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bytime = response.parse() - assert_matches_type(BytimeGetResponse, bytime, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -68,7 +68,7 @@ class TestBytimes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bytime = response.parse() - assert_matches_type(BytimeGetResponse, bytime, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) assert cast(Any, response.is_closed) is True @@ -98,7 +98,7 @@ class TestAsyncBytimes: "023e105f4ecef8ad9ca31a8372d0c353", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BytimeGetResponse, bytime, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -115,7 +115,7 @@ class TestAsyncBytimes: time_delta="hour", until=parse_datetime("2023-11-11T13:00:00Z"), ) - assert_matches_type(BytimeGetResponse, bytime, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -128,7 +128,7 @@ class TestAsyncBytimes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bytime = await response.parse() - assert_matches_type(BytimeGetResponse, bytime, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -141,7 +141,7 @@ class TestAsyncBytimes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bytime = await response.parse() - assert_matches_type(BytimeGetResponse, bytime, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReportBytime, 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 3672a21d4..a95be0948 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.dns.firewall.analytics import ReportGetResponse +from cloudflare.types.dns.analytics import DNSDNSAnalyticsAPIReport base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ class TestReports: "023e105f4ecef8ad9ca31a8372d0c353", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ReportGetResponse, report, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +41,7 @@ class TestReports: sort="+responseCode,-queryName", until=parse_datetime("2023-11-11T13:00:00Z"), ) - assert_matches_type(ReportGetResponse, report, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -54,7 +54,7 @@ class TestReports: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" report = response.parse() - assert_matches_type(ReportGetResponse, report, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -67,7 +67,7 @@ class TestReports: assert response.http_request.headers.get("X-Stainless-Lang") == "python" report = response.parse() - assert_matches_type(ReportGetResponse, report, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) assert cast(Any, response.is_closed) is True @@ -97,7 +97,7 @@ class TestAsyncReports: "023e105f4ecef8ad9ca31a8372d0c353", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ReportGetResponse, report, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -113,7 +113,7 @@ class TestAsyncReports: sort="+responseCode,-queryName", until=parse_datetime("2023-11-11T13:00:00Z"), ) - assert_matches_type(ReportGetResponse, report, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -126,7 +126,7 @@ class TestAsyncReports: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" report = await response.parse() - assert_matches_type(ReportGetResponse, report, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -139,7 +139,7 @@ class TestAsyncReports: assert response.http_request.headers.get("X-Stainless-Lang") == "python" report = await response.parse() - assert_matches_type(ReportGetResponse, report, path=["response"]) + assert_matches_type(DNSDNSAnalyticsAPIReport, 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 2ea2a77d0..5331070ad 100644 --- a/tests/api_resources/dns/test_firewall.py +++ b/tests/api_resources/dns/test_firewall.py @@ -10,10 +10,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.dns import ( - FirewallGetResponse, - FirewallEditResponse, - FirewallListResponse, - FirewallCreateResponse, + DNSFirewallDNSFirewall, FirewallDeleteResponse, ) from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray @@ -32,7 +29,7 @@ class TestFirewall: name="My Awesome DNS Firewall cluster", upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], ) - assert_matches_type(FirewallCreateResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +52,7 @@ class TestFirewall: ratelimit=600, retries=2, ) - assert_matches_type(FirewallCreateResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -69,7 +66,7 @@ class TestFirewall: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(FirewallCreateResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -83,7 +80,7 @@ class TestFirewall: assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(FirewallCreateResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -103,7 +100,7 @@ class TestFirewall: firewall = client.dns.firewall.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[FirewallListResponse], firewall, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DNSFirewallDNSFirewall], firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -113,7 +110,7 @@ class TestFirewall: page=1, per_page=1, ) - assert_matches_type(SyncV4PagePaginationArray[FirewallListResponse], firewall, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DNSFirewallDNSFirewall], firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -125,7 +122,7 @@ class TestFirewall: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(SyncV4PagePaginationArray[FirewallListResponse], firewall, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DNSFirewallDNSFirewall], firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -137,7 +134,7 @@ class TestFirewall: assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(SyncV4PagePaginationArray[FirewallListResponse], firewall, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DNSFirewallDNSFirewall], firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -215,7 +212,7 @@ class TestFirewall: name="My Awesome DNS Firewall cluster", upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], ) - assert_matches_type(FirewallEditResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -240,7 +237,7 @@ class TestFirewall: ratelimit=600, retries=2, ) - assert_matches_type(FirewallEditResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -260,7 +257,7 @@ class TestFirewall: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(FirewallEditResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -280,7 +277,7 @@ class TestFirewall: assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(FirewallEditResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -320,7 +317,7 @@ class TestFirewall: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(FirewallGetResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -333,7 +330,7 @@ class TestFirewall: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(FirewallGetResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -346,7 +343,7 @@ class TestFirewall: assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(FirewallGetResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -377,7 +374,7 @@ class TestAsyncFirewall: name="My Awesome DNS Firewall cluster", upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], ) - assert_matches_type(FirewallCreateResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -400,7 +397,7 @@ class TestAsyncFirewall: ratelimit=600, retries=2, ) - assert_matches_type(FirewallCreateResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -414,7 +411,7 @@ class TestAsyncFirewall: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(FirewallCreateResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -428,7 +425,7 @@ class TestAsyncFirewall: assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(FirewallCreateResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -448,7 +445,7 @@ class TestAsyncFirewall: firewall = await async_client.dns.firewall.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[FirewallListResponse], firewall, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DNSFirewallDNSFirewall], firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -458,7 +455,7 @@ class TestAsyncFirewall: page=1, per_page=1, ) - assert_matches_type(AsyncV4PagePaginationArray[FirewallListResponse], firewall, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DNSFirewallDNSFirewall], firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -470,7 +467,7 @@ class TestAsyncFirewall: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[FirewallListResponse], firewall, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DNSFirewallDNSFirewall], firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -482,7 +479,7 @@ class TestAsyncFirewall: assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[FirewallListResponse], firewall, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DNSFirewallDNSFirewall], firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -560,7 +557,7 @@ class TestAsyncFirewall: name="My Awesome DNS Firewall cluster", upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], ) - assert_matches_type(FirewallEditResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -585,7 +582,7 @@ class TestAsyncFirewall: ratelimit=600, retries=2, ) - assert_matches_type(FirewallEditResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -605,7 +602,7 @@ class TestAsyncFirewall: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(FirewallEditResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -625,7 +622,7 @@ class TestAsyncFirewall: assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(FirewallEditResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -665,7 +662,7 @@ class TestAsyncFirewall: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(FirewallGetResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -678,7 +675,7 @@ class TestAsyncFirewall: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(FirewallGetResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -691,7 +688,7 @@ class TestAsyncFirewall: assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(FirewallGetResponse, firewall, path=["response"]) + assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/email_routing/routing/rules/test_catch_alls.py b/tests/api_resources/email_routing/routing/rules/test_catch_alls.py index 111cf3b82..ec90fb446 100644 --- a/tests/api_resources/email_routing/routing/rules/test_catch_alls.py +++ b/tests/api_resources/email_routing/routing/rules/test_catch_alls.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.email_routing.routing.rules import ( - CatchAllGetResponse, - CatchAllUpdateResponse, -) +from cloudflare.types.email_routing.routing.rules import EmailCatchAllRule base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -28,7 +25,7 @@ class TestCatchAlls: actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) - assert_matches_type(CatchAllUpdateResponse, catch_all, path=["response"]) + assert_matches_type(EmailCatchAllRule, catch_all, path=["response"]) @pytest.mark.skip() @parametrize @@ -65,7 +62,7 @@ class TestCatchAlls: enabled=True, name="Send to user@example.net rule.", ) - assert_matches_type(CatchAllUpdateResponse, catch_all, path=["response"]) + assert_matches_type(EmailCatchAllRule, catch_all, path=["response"]) @pytest.mark.skip() @parametrize @@ -79,7 +76,7 @@ class TestCatchAlls: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" catch_all = response.parse() - assert_matches_type(CatchAllUpdateResponse, catch_all, path=["response"]) + assert_matches_type(EmailCatchAllRule, catch_all, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +90,7 @@ class TestCatchAlls: assert response.http_request.headers.get("X-Stainless-Lang") == "python" catch_all = response.parse() - assert_matches_type(CatchAllUpdateResponse, catch_all, path=["response"]) + assert_matches_type(EmailCatchAllRule, catch_all, path=["response"]) assert cast(Any, response.is_closed) is True @@ -113,7 +110,7 @@ class TestCatchAlls: catch_all = client.email_routing.routing.rules.catch_alls.get( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CatchAllGetResponse, catch_all, path=["response"]) + assert_matches_type(EmailCatchAllRule, catch_all, path=["response"]) @pytest.mark.skip() @parametrize @@ -125,7 +122,7 @@ class TestCatchAlls: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" catch_all = response.parse() - assert_matches_type(CatchAllGetResponse, catch_all, path=["response"]) + assert_matches_type(EmailCatchAllRule, catch_all, path=["response"]) @pytest.mark.skip() @parametrize @@ -137,7 +134,7 @@ class TestCatchAlls: assert response.http_request.headers.get("X-Stainless-Lang") == "python" catch_all = response.parse() - assert_matches_type(CatchAllGetResponse, catch_all, path=["response"]) + assert_matches_type(EmailCatchAllRule, catch_all, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +158,7 @@ class TestAsyncCatchAlls: actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) - assert_matches_type(CatchAllUpdateResponse, catch_all, path=["response"]) + assert_matches_type(EmailCatchAllRule, catch_all, path=["response"]) @pytest.mark.skip() @parametrize @@ -198,7 +195,7 @@ class TestAsyncCatchAlls: enabled=True, name="Send to user@example.net rule.", ) - assert_matches_type(CatchAllUpdateResponse, catch_all, path=["response"]) + assert_matches_type(EmailCatchAllRule, catch_all, path=["response"]) @pytest.mark.skip() @parametrize @@ -212,7 +209,7 @@ class TestAsyncCatchAlls: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" catch_all = await response.parse() - assert_matches_type(CatchAllUpdateResponse, catch_all, path=["response"]) + assert_matches_type(EmailCatchAllRule, catch_all, path=["response"]) @pytest.mark.skip() @parametrize @@ -226,7 +223,7 @@ class TestAsyncCatchAlls: assert response.http_request.headers.get("X-Stainless-Lang") == "python" catch_all = await response.parse() - assert_matches_type(CatchAllUpdateResponse, catch_all, path=["response"]) + assert_matches_type(EmailCatchAllRule, catch_all, path=["response"]) assert cast(Any, response.is_closed) is True @@ -246,7 +243,7 @@ class TestAsyncCatchAlls: catch_all = await async_client.email_routing.routing.rules.catch_alls.get( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CatchAllGetResponse, catch_all, path=["response"]) + assert_matches_type(EmailCatchAllRule, catch_all, path=["response"]) @pytest.mark.skip() @parametrize @@ -258,7 +255,7 @@ class TestAsyncCatchAlls: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" catch_all = await response.parse() - assert_matches_type(CatchAllGetResponse, catch_all, path=["response"]) + assert_matches_type(EmailCatchAllRule, catch_all, path=["response"]) @pytest.mark.skip() @parametrize @@ -270,7 +267,7 @@ class TestAsyncCatchAlls: assert response.http_request.headers.get("X-Stainless-Lang") == "python" catch_all = await response.parse() - assert_matches_type(CatchAllGetResponse, catch_all, path=["response"]) + assert_matches_type(EmailCatchAllRule, catch_all, 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 be67d1cb6..f1597b8b1 100644 --- a/tests/api_resources/firewall/test_lockdowns.py +++ b/tests/api_resources/firewall/test_lockdowns.py @@ -11,11 +11,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.firewall import ( - LockdownGetResponse, - LockdownListResponse, - LockdownCreateResponse, + LegacyJhsZonelockdown, LockdownDeleteResponse, - LockdownUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -31,7 +28,7 @@ class TestLockdowns: "023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[LockdownCreateResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +41,7 @@ class TestLockdowns: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = response.parse() - assert_matches_type(Optional[LockdownCreateResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -57,7 +54,7 @@ class TestLockdowns: assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = response.parse() - assert_matches_type(Optional[LockdownCreateResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) assert cast(Any, response.is_closed) is True @@ -78,7 +75,7 @@ class TestLockdowns: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[LockdownUpdateResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -92,7 +89,7 @@ class TestLockdowns: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = response.parse() - assert_matches_type(Optional[LockdownUpdateResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +103,7 @@ class TestLockdowns: assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = response.parse() - assert_matches_type(Optional[LockdownUpdateResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) assert cast(Any, response.is_closed) is True @@ -133,7 +130,7 @@ class TestLockdowns: lockdown = client.firewall.lockdowns.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[LockdownListResponse], lockdown, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -150,7 +147,7 @@ class TestLockdowns: priority=5, uri_search="/some/path", ) - assert_matches_type(SyncV4PagePaginationArray[LockdownListResponse], lockdown, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -162,7 +159,7 @@ class TestLockdowns: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = response.parse() - assert_matches_type(SyncV4PagePaginationArray[LockdownListResponse], lockdown, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -174,7 +171,7 @@ class TestLockdowns: assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = response.parse() - assert_matches_type(SyncV4PagePaginationArray[LockdownListResponse], lockdown, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsZonelockdown], lockdown, path=["response"]) assert cast(Any, response.is_closed) is True @@ -245,7 +242,7 @@ class TestLockdowns: "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LockdownGetResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -258,7 +255,7 @@ class TestLockdowns: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = response.parse() - assert_matches_type(Optional[LockdownGetResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -271,7 +268,7 @@ class TestLockdowns: assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = response.parse() - assert_matches_type(Optional[LockdownGetResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) assert cast(Any, response.is_closed) is True @@ -301,7 +298,7 @@ class TestAsyncLockdowns: "023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[LockdownCreateResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -314,7 +311,7 @@ class TestAsyncLockdowns: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = await response.parse() - assert_matches_type(Optional[LockdownCreateResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -327,7 +324,7 @@ class TestAsyncLockdowns: assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = await response.parse() - assert_matches_type(Optional[LockdownCreateResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) assert cast(Any, response.is_closed) is True @@ -348,7 +345,7 @@ class TestAsyncLockdowns: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[LockdownUpdateResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -362,7 +359,7 @@ class TestAsyncLockdowns: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = await response.parse() - assert_matches_type(Optional[LockdownUpdateResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -376,7 +373,7 @@ class TestAsyncLockdowns: assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = await response.parse() - assert_matches_type(Optional[LockdownUpdateResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) assert cast(Any, response.is_closed) is True @@ -403,7 +400,7 @@ class TestAsyncLockdowns: lockdown = await async_client.firewall.lockdowns.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[LockdownListResponse], lockdown, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -420,7 +417,7 @@ class TestAsyncLockdowns: priority=5, uri_search="/some/path", ) - assert_matches_type(AsyncV4PagePaginationArray[LockdownListResponse], lockdown, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -432,7 +429,7 @@ class TestAsyncLockdowns: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[LockdownListResponse], lockdown, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -444,7 +441,7 @@ class TestAsyncLockdowns: assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[LockdownListResponse], lockdown, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsZonelockdown], lockdown, path=["response"]) assert cast(Any, response.is_closed) is True @@ -515,7 +512,7 @@ class TestAsyncLockdowns: "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LockdownGetResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -528,7 +525,7 @@ class TestAsyncLockdowns: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = await response.parse() - assert_matches_type(Optional[LockdownGetResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -541,7 +538,7 @@ class TestAsyncLockdowns: assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = await response.parse() - assert_matches_type(Optional[LockdownGetResponse], lockdown, path=["response"]) + assert_matches_type(Optional[LegacyJhsZonelockdown], 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 59d2446e0..6b87c99fc 100644 --- a/tests/api_resources/firewall/test_rules.py +++ b/tests/api_resources/firewall/test_rules.py @@ -11,12 +11,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.firewall import ( - RuleGetResponse, RuleEditResponse, - RuleListResponse, RuleCreateResponse, - RuleDeleteResponse, - RuleUpdateResponse, + LegacyJhsFilterRule, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -79,7 +76,7 @@ class TestRules: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +90,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -107,7 +104,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -134,7 +131,7 @@ class TestRules: rule = client.firewall.rules.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -147,7 +144,7 @@ class TestRules: paused=False, per_page=5, ) - assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -159,7 +156,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +168,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsFilterRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -190,7 +187,7 @@ class TestRules: "372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -200,7 +197,7 @@ class TestRules: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", delete_filter_if_unused=True, ) - assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -213,7 +210,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -226,7 +223,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -309,7 +306,7 @@ class TestRules: "372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[RuleGetResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -322,7 +319,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleGetResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -335,7 +332,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleGetResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -412,7 +409,7 @@ class TestAsyncRules: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -426,7 +423,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -440,7 +437,7 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -467,7 +464,7 @@ class TestAsyncRules: rule = await async_client.firewall.rules.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -480,7 +477,7 @@ class TestAsyncRules: paused=False, per_page=5, ) - assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -492,7 +489,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -504,7 +501,7 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsFilterRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -523,7 +520,7 @@ class TestAsyncRules: "372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -533,7 +530,7 @@ class TestAsyncRules: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", delete_filter_if_unused=True, ) - assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -546,7 +543,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -559,7 +556,7 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -642,7 +639,7 @@ class TestAsyncRules: "372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[RuleGetResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -655,7 +652,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleGetResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -668,7 +665,7 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleGetResponse], rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilterRule], 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 a663a5675..893f77823 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.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginati from cloudflare.types.firewall.waf.packages import ( GroupGetResponse, GroupEditResponse, - GroupListResponse, + WAFManagedRulesSchemasGroup, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -29,7 +29,7 @@ class TestGroups: "a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[GroupListResponse], group, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +44,7 @@ class TestGroups: page=1, per_page=5, ) - assert_matches_type(SyncV4PagePaginationArray[GroupListResponse], group, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -57,7 +57,7 @@ class TestGroups: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = response.parse() - assert_matches_type(SyncV4PagePaginationArray[GroupListResponse], group, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -70,7 +70,7 @@ class TestGroups: assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = response.parse() - assert_matches_type(SyncV4PagePaginationArray[GroupListResponse], group, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], group, path=["response"]) assert cast(Any, response.is_closed) is True @@ -239,7 +239,7 @@ class TestAsyncGroups: "a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[GroupListResponse], group, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -254,7 +254,7 @@ class TestAsyncGroups: page=1, per_page=5, ) - assert_matches_type(AsyncV4PagePaginationArray[GroupListResponse], group, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -267,7 +267,7 @@ class TestAsyncGroups: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[GroupListResponse], group, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -280,7 +280,7 @@ class TestAsyncGroups: assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[GroupListResponse], group, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], group, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/firewall/waf/packages/test_rules.py b/tests/api_resources/firewall/waf/packages/test_rules.py index e237b4082..432aacc8b 100644 --- a/tests/api_resources/firewall/waf/packages/test_rules.py +++ b/tests/api_resources/firewall/waf/packages/test_rules.py @@ -13,7 +13,7 @@ from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginati from cloudflare.types.firewall.waf.packages import ( RuleGetResponse, RuleEditResponse, - RuleListResponse, + WAFManagedRulesRule, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -29,7 +29,7 @@ class TestRules: "a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WAFManagedRulesRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +44,7 @@ class TestRules: page=1, per_page=5, ) - assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WAFManagedRulesRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -57,7 +57,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WAFManagedRulesRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -70,7 +70,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WAFManagedRulesRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -239,7 +239,7 @@ class TestAsyncRules: "a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WAFManagedRulesRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -254,7 +254,7 @@ class TestAsyncRules: page=1, per_page=5, ) - assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WAFManagedRulesRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -267,7 +267,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WAFManagedRulesRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -280,7 +280,7 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WAFManagedRulesRule], rule, 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 92b2a0a57..45ac26992 100644 --- a/tests/api_resources/firewall/waf/test_overrides.py +++ b/tests/api_resources/firewall/waf/test_overrides.py @@ -11,11 +11,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.firewall.waf import ( - OverrideGetResponse, - OverrideListResponse, - OverrideCreateResponse, + LegacyJhsOverride, OverrideDeleteResponse, - OverrideUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -31,7 +28,7 @@ class TestOverrides: "023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[OverrideCreateResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +41,7 @@ class TestOverrides: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = response.parse() - assert_matches_type(Optional[OverrideCreateResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -57,7 +54,7 @@ class TestOverrides: assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = response.parse() - assert_matches_type(Optional[OverrideCreateResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) assert cast(Any, response.is_closed) is True @@ -78,7 +75,7 @@ class TestOverrides: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[OverrideUpdateResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -92,7 +89,7 @@ class TestOverrides: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = response.parse() - assert_matches_type(Optional[OverrideUpdateResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +103,7 @@ class TestOverrides: assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = response.parse() - assert_matches_type(Optional[OverrideUpdateResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) assert cast(Any, response.is_closed) is True @@ -133,7 +130,7 @@ class TestOverrides: override = client.firewall.waf.overrides.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[OverrideListResponse], override, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -143,7 +140,7 @@ class TestOverrides: page=1, per_page=5, ) - assert_matches_type(SyncV4PagePaginationArray[OverrideListResponse], override, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +152,7 @@ class TestOverrides: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = response.parse() - assert_matches_type(SyncV4PagePaginationArray[OverrideListResponse], override, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -167,7 +164,7 @@ class TestOverrides: assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = response.parse() - assert_matches_type(SyncV4PagePaginationArray[OverrideListResponse], override, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsOverride], override, path=["response"]) assert cast(Any, response.is_closed) is True @@ -238,7 +235,7 @@ class TestOverrides: "de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[OverrideGetResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -251,7 +248,7 @@ class TestOverrides: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = response.parse() - assert_matches_type(Optional[OverrideGetResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -264,7 +261,7 @@ class TestOverrides: assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = response.parse() - assert_matches_type(Optional[OverrideGetResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) assert cast(Any, response.is_closed) is True @@ -294,7 +291,7 @@ class TestAsyncOverrides: "023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[OverrideCreateResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -307,7 +304,7 @@ class TestAsyncOverrides: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = await response.parse() - assert_matches_type(Optional[OverrideCreateResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -320,7 +317,7 @@ class TestAsyncOverrides: assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = await response.parse() - assert_matches_type(Optional[OverrideCreateResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) assert cast(Any, response.is_closed) is True @@ -341,7 +338,7 @@ class TestAsyncOverrides: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[OverrideUpdateResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -355,7 +352,7 @@ class TestAsyncOverrides: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = await response.parse() - assert_matches_type(Optional[OverrideUpdateResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -369,7 +366,7 @@ class TestAsyncOverrides: assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = await response.parse() - assert_matches_type(Optional[OverrideUpdateResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) assert cast(Any, response.is_closed) is True @@ -396,7 +393,7 @@ class TestAsyncOverrides: override = await async_client.firewall.waf.overrides.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[OverrideListResponse], override, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -406,7 +403,7 @@ class TestAsyncOverrides: page=1, per_page=5, ) - assert_matches_type(AsyncV4PagePaginationArray[OverrideListResponse], override, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -418,7 +415,7 @@ class TestAsyncOverrides: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[OverrideListResponse], override, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -430,7 +427,7 @@ class TestAsyncOverrides: assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[OverrideListResponse], override, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsOverride], override, path=["response"]) assert cast(Any, response.is_closed) is True @@ -501,7 +498,7 @@ class TestAsyncOverrides: "de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[OverrideGetResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -514,7 +511,7 @@ class TestAsyncOverrides: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = await response.parse() - assert_matches_type(Optional[OverrideGetResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -527,7 +524,7 @@ class TestAsyncOverrides: assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = await response.parse() - assert_matches_type(Optional[OverrideGetResponse], override, path=["response"]) + assert_matches_type(Optional[LegacyJhsOverride], 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 eab9dda3a..80cf14a35 100644 --- a/tests/api_resources/healthchecks/test_previews.py +++ b/tests/api_resources/healthchecks/test_previews.py @@ -9,11 +9,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.healthchecks import ( - PreviewGetResponse, - PreviewCreateResponse, - PreviewDeleteResponse, -) +from cloudflare.types import HealthchecksHealthchecks +from cloudflare.types.healthchecks import PreviewDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -29,7 +26,7 @@ class TestPreviews: address="www.example.com", name="server-1", ) - assert_matches_type(PreviewCreateResponse, preview, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -65,7 +62,7 @@ class TestPreviews: healthcheck_timeout=0, type="HTTPS", ) - assert_matches_type(PreviewCreateResponse, preview, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -79,7 +76,7 @@ class TestPreviews: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = response.parse() - assert_matches_type(PreviewCreateResponse, preview, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +90,7 @@ class TestPreviews: assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = response.parse() - assert_matches_type(PreviewCreateResponse, preview, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) assert cast(Any, response.is_closed) is True @@ -166,7 +163,7 @@ class TestPreviews: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -179,7 +176,7 @@ class TestPreviews: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = response.parse() - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -192,7 +189,7 @@ class TestPreviews: assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = response.parse() - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) assert cast(Any, response.is_closed) is True @@ -223,7 +220,7 @@ class TestAsyncPreviews: address="www.example.com", name="server-1", ) - assert_matches_type(PreviewCreateResponse, preview, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -259,7 +256,7 @@ class TestAsyncPreviews: healthcheck_timeout=0, type="HTTPS", ) - assert_matches_type(PreviewCreateResponse, preview, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -273,7 +270,7 @@ class TestAsyncPreviews: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = await response.parse() - assert_matches_type(PreviewCreateResponse, preview, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -287,7 +284,7 @@ class TestAsyncPreviews: assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = await response.parse() - assert_matches_type(PreviewCreateResponse, preview, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) assert cast(Any, response.is_closed) is True @@ -360,7 +357,7 @@ class TestAsyncPreviews: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -373,7 +370,7 @@ class TestAsyncPreviews: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = await response.parse() - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -386,7 +383,7 @@ class TestAsyncPreviews: assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = await response.parse() - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, preview, 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 1c90f380e..42235df30 100644 --- a/tests/api_resources/hostnames/settings/test_tls.py +++ b/tests/api_resources/hostnames/settings/test_tls.py @@ -9,7 +9,11 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.hostnames.settings import TLSGetResponse, TLSDeleteResponse, TLSUpdateResponse +from cloudflare.types.hostnames.settings import ( + TLSGetResponse, + TLSCertificatesAndHostnamesSettingObject, + TLSCertificatesAndHostnamesSettingObjectDelete, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -26,7 +30,7 @@ class TestTLS: setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], ) - assert_matches_type(TLSUpdateResponse, tls, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSettingObject, tls, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +45,7 @@ class TestTLS: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = response.parse() - assert_matches_type(TLSUpdateResponse, tls, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSettingObject, tls, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +60,7 @@ class TestTLS: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = response.parse() - assert_matches_type(TLSUpdateResponse, tls, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSettingObject, tls, path=["response"]) assert cast(Any, response.is_closed) is True @@ -87,7 +91,7 @@ class TestTLS: zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) - assert_matches_type(TLSDeleteResponse, tls, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSettingObjectDelete, tls, path=["response"]) @pytest.mark.skip() @parametrize @@ -101,7 +105,7 @@ class TestTLS: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = response.parse() - assert_matches_type(TLSDeleteResponse, tls, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSettingObjectDelete, tls, path=["response"]) @pytest.mark.skip() @parametrize @@ -115,7 +119,7 @@ class TestTLS: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = response.parse() - assert_matches_type(TLSDeleteResponse, tls, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSettingObjectDelete, tls, path=["response"]) assert cast(Any, response.is_closed) is True @@ -195,7 +199,7 @@ class TestAsyncTLS: setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], ) - assert_matches_type(TLSUpdateResponse, tls, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSettingObject, tls, path=["response"]) @pytest.mark.skip() @parametrize @@ -210,7 +214,7 @@ class TestAsyncTLS: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = await response.parse() - assert_matches_type(TLSUpdateResponse, tls, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSettingObject, tls, path=["response"]) @pytest.mark.skip() @parametrize @@ -225,7 +229,7 @@ class TestAsyncTLS: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = await response.parse() - assert_matches_type(TLSUpdateResponse, tls, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSettingObject, tls, path=["response"]) assert cast(Any, response.is_closed) is True @@ -256,7 +260,7 @@ class TestAsyncTLS: zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) - assert_matches_type(TLSDeleteResponse, tls, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSettingObjectDelete, tls, path=["response"]) @pytest.mark.skip() @parametrize @@ -270,7 +274,7 @@ class TestAsyncTLS: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = await response.parse() - assert_matches_type(TLSDeleteResponse, tls, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSettingObjectDelete, tls, path=["response"]) @pytest.mark.skip() @parametrize @@ -284,7 +288,7 @@ class TestAsyncTLS: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = await response.parse() - assert_matches_type(TLSDeleteResponse, tls, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSettingObjectDelete, tls, 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 4379021da..90c20ffed 100644 --- a/tests/api_resources/images/test_v1.py +++ b/tests/api_resources/images/test_v1.py @@ -11,10 +11,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePagination, AsyncV4PagePagination from cloudflare.types.images import ( - V1GetResponse, - V1EditResponse, + ImagesImage, V1ListResponse, - V1CreateResponse, V1DeleteResponse, ) @@ -30,7 +28,7 @@ class TestV1: v1 = client.images.v1.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(V1CreateResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +38,7 @@ class TestV1: metadata={}, require_signed_urls=True, ) - assert_matches_type(V1CreateResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -52,7 +50,7 @@ class TestV1: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = response.parse() - assert_matches_type(V1CreateResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -64,7 +62,7 @@ class TestV1: assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = response.parse() - assert_matches_type(V1CreateResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) assert cast(Any, response.is_closed) is True @@ -187,7 +185,7 @@ class TestV1: "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(V1EditResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -198,7 +196,7 @@ class TestV1: metadata={}, require_signed_urls=True, ) - assert_matches_type(V1EditResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -211,7 +209,7 @@ class TestV1: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = response.parse() - assert_matches_type(V1EditResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -224,7 +222,7 @@ class TestV1: assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = response.parse() - assert_matches_type(V1EditResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) assert cast(Any, response.is_closed) is True @@ -250,7 +248,7 @@ class TestV1: "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(V1GetResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -263,7 +261,7 @@ class TestV1: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = response.parse() - assert_matches_type(V1GetResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -276,7 +274,7 @@ class TestV1: assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = response.parse() - assert_matches_type(V1GetResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) assert cast(Any, response.is_closed) is True @@ -305,7 +303,7 @@ class TestAsyncV1: v1 = await async_client.images.v1.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(V1CreateResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -315,7 +313,7 @@ class TestAsyncV1: metadata={}, require_signed_urls=True, ) - assert_matches_type(V1CreateResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -327,7 +325,7 @@ class TestAsyncV1: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = await response.parse() - assert_matches_type(V1CreateResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -339,7 +337,7 @@ class TestAsyncV1: assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = await response.parse() - assert_matches_type(V1CreateResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) assert cast(Any, response.is_closed) is True @@ -462,7 +460,7 @@ class TestAsyncV1: "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(V1EditResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -473,7 +471,7 @@ class TestAsyncV1: metadata={}, require_signed_urls=True, ) - assert_matches_type(V1EditResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -486,7 +484,7 @@ class TestAsyncV1: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = await response.parse() - assert_matches_type(V1EditResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -499,7 +497,7 @@ class TestAsyncV1: assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = await response.parse() - assert_matches_type(V1EditResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) assert cast(Any, response.is_closed) is True @@ -525,7 +523,7 @@ class TestAsyncV1: "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(V1GetResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -538,7 +536,7 @@ class TestAsyncV1: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = await response.parse() - assert_matches_type(V1GetResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -551,7 +549,7 @@ class TestAsyncV1: assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = await response.parse() - assert_matches_type(V1GetResponse, v1, path=["response"]) + assert_matches_type(ImagesImage, v1, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/images/v1/test_keys.py b/tests/api_resources/images/v1/test_keys.py index 3f66934a8..14b1e4d05 100644 --- a/tests/api_resources/images/v1/test_keys.py +++ b/tests/api_resources/images/v1/test_keys.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.images.v1 import KeyListResponse +from cloudflare.types.images.v1 import ImagesImageKeys base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestKeys: key = client.images.v1.keys.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(KeyListResponse, key, path=["response"]) + assert_matches_type(ImagesImageKeys, key, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,7 @@ class TestKeys: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" key = response.parse() - assert_matches_type(KeyListResponse, key, path=["response"]) + assert_matches_type(ImagesImageKeys, key, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ class TestKeys: assert response.http_request.headers.get("X-Stainless-Lang") == "python" key = response.parse() - assert_matches_type(KeyListResponse, key, path=["response"]) + assert_matches_type(ImagesImageKeys, key, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestAsyncKeys: key = await async_client.images.v1.keys.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(KeyListResponse, key, path=["response"]) + assert_matches_type(ImagesImageKeys, key, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestAsyncKeys: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" key = await response.parse() - assert_matches_type(KeyListResponse, key, path=["response"]) + assert_matches_type(ImagesImageKeys, key, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestAsyncKeys: assert response.http_request.headers.get("X-Stainless-Lang") == "python" key = await response.parse() - assert_matches_type(KeyListResponse, key, path=["response"]) + assert_matches_type(ImagesImageKeys, key, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/images/v1/test_stats.py b/tests/api_resources/images/v1/test_stats.py index 4c9a354fb..4a2e00f7d 100644 --- a/tests/api_resources/images/v1/test_stats.py +++ b/tests/api_resources/images/v1/test_stats.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.images.v1 import StatGetResponse +from cloudflare.types.images.v1 import ImagesImagesStats base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestStats: stat = client.images.v1.stats.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(StatGetResponse, stat, path=["response"]) + assert_matches_type(ImagesImagesStats, stat, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,7 @@ class TestStats: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" stat = response.parse() - assert_matches_type(StatGetResponse, stat, path=["response"]) + assert_matches_type(ImagesImagesStats, stat, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ class TestStats: assert response.http_request.headers.get("X-Stainless-Lang") == "python" stat = response.parse() - assert_matches_type(StatGetResponse, stat, path=["response"]) + assert_matches_type(ImagesImagesStats, stat, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestAsyncStats: stat = await async_client.images.v1.stats.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(StatGetResponse, stat, path=["response"]) + assert_matches_type(ImagesImagesStats, stat, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestAsyncStats: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" stat = await response.parse() - assert_matches_type(StatGetResponse, stat, path=["response"]) + assert_matches_type(ImagesImagesStats, stat, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestAsyncStats: assert response.http_request.headers.get("X-Stainless-Lang") == "python" stat = await response.parse() - assert_matches_type(StatGetResponse, stat, path=["response"]) + assert_matches_type(ImagesImagesStats, stat, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/images/v1/test_variants.py b/tests/api_resources/images/v1/test_variants.py index abddb71a3..dbcc2c7d7 100644 --- a/tests/api_resources/images/v1/test_variants.py +++ b/tests/api_resources/images/v1/test_variants.py @@ -10,10 +10,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.images.v1 import ( - VariantGetResponse, - VariantEditResponse, - VariantListResponse, - VariantCreateResponse, + ImageVariant, + ImageVariants, VariantDeleteResponse, ) @@ -36,7 +34,7 @@ class TestVariants: "width": 1366, }, ) - assert_matches_type(VariantCreateResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -52,7 +50,7 @@ class TestVariants: }, never_require_signed_urls=True, ) - assert_matches_type(VariantCreateResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -71,7 +69,7 @@ class TestVariants: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = response.parse() - assert_matches_type(VariantCreateResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -90,7 +88,7 @@ class TestVariants: assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = response.parse() - assert_matches_type(VariantCreateResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) assert cast(Any, response.is_closed) is True @@ -115,7 +113,7 @@ class TestVariants: variant = client.images.v1.variants.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(VariantListResponse, variant, path=["response"]) + assert_matches_type(ImageVariants, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -127,7 +125,7 @@ class TestVariants: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = response.parse() - assert_matches_type(VariantListResponse, variant, path=["response"]) + assert_matches_type(ImageVariants, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -139,7 +137,7 @@ class TestVariants: assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = response.parse() - assert_matches_type(VariantListResponse, variant, path=["response"]) + assert_matches_type(ImageVariants, variant, path=["response"]) assert cast(Any, response.is_closed) is True @@ -210,7 +208,7 @@ class TestVariants: "width": 1366, }, ) - assert_matches_type(VariantEditResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -226,7 +224,7 @@ class TestVariants: }, never_require_signed_urls=True, ) - assert_matches_type(VariantEditResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -245,7 +243,7 @@ class TestVariants: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = response.parse() - assert_matches_type(VariantEditResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -264,7 +262,7 @@ class TestVariants: assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = response.parse() - assert_matches_type(VariantEditResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) assert cast(Any, response.is_closed) is True @@ -290,7 +288,7 @@ class TestVariants: "hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(VariantGetResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -303,7 +301,7 @@ class TestVariants: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = response.parse() - assert_matches_type(VariantGetResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -316,7 +314,7 @@ class TestVariants: assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = response.parse() - assert_matches_type(VariantGetResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) assert cast(Any, response.is_closed) is True @@ -346,7 +344,7 @@ class TestAsyncVariants: "width": 1366, }, ) - assert_matches_type(VariantCreateResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -362,7 +360,7 @@ class TestAsyncVariants: }, never_require_signed_urls=True, ) - assert_matches_type(VariantCreateResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -381,7 +379,7 @@ class TestAsyncVariants: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = await response.parse() - assert_matches_type(VariantCreateResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -400,7 +398,7 @@ class TestAsyncVariants: assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = await response.parse() - assert_matches_type(VariantCreateResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) assert cast(Any, response.is_closed) is True @@ -425,7 +423,7 @@ class TestAsyncVariants: variant = await async_client.images.v1.variants.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(VariantListResponse, variant, path=["response"]) + assert_matches_type(ImageVariants, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -437,7 +435,7 @@ class TestAsyncVariants: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = await response.parse() - assert_matches_type(VariantListResponse, variant, path=["response"]) + assert_matches_type(ImageVariants, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -449,7 +447,7 @@ class TestAsyncVariants: assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = await response.parse() - assert_matches_type(VariantListResponse, variant, path=["response"]) + assert_matches_type(ImageVariants, variant, path=["response"]) assert cast(Any, response.is_closed) is True @@ -520,7 +518,7 @@ class TestAsyncVariants: "width": 1366, }, ) - assert_matches_type(VariantEditResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -536,7 +534,7 @@ class TestAsyncVariants: }, never_require_signed_urls=True, ) - assert_matches_type(VariantEditResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -555,7 +553,7 @@ class TestAsyncVariants: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = await response.parse() - assert_matches_type(VariantEditResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -574,7 +572,7 @@ class TestAsyncVariants: assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = await response.parse() - assert_matches_type(VariantEditResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) assert cast(Any, response.is_closed) is True @@ -600,7 +598,7 @@ class TestAsyncVariants: "hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(VariantGetResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -613,7 +611,7 @@ class TestAsyncVariants: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = await response.parse() - assert_matches_type(VariantGetResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -626,7 +624,7 @@ class TestAsyncVariants: assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = await response.parse() - assert_matches_type(VariantGetResponse, variant, path=["response"]) + assert_matches_type(ImageVariant, variant, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/intel/indicator_feeds/test_permissions.py b/tests/api_resources/intel/indicator_feeds/test_permissions.py index f7fc50ffb..e7e5c8b32 100644 --- a/tests/api_resources/intel/indicator_feeds/test_permissions.py +++ b/tests/api_resources/intel/indicator_feeds/test_permissions.py @@ -10,9 +10,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.intel.indicator_feeds import ( + IntelPermissionsUpdate, PermissionListResponse, - PermissionCreateResponse, - PermissionDeleteResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +26,7 @@ class TestPermissions: permission = client.intel.indicator_feeds.permissions.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PermissionCreateResponse, permission, path=["response"]) + assert_matches_type(IntelPermissionsUpdate, permission, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +36,7 @@ class TestPermissions: account_tag="823f45f16fd2f7e21e1e054aga4d2859", feed_id=1, ) - assert_matches_type(PermissionCreateResponse, permission, path=["response"]) + assert_matches_type(IntelPermissionsUpdate, permission, path=["response"]) @pytest.mark.skip() @parametrize @@ -49,7 +48,7 @@ class TestPermissions: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = response.parse() - assert_matches_type(PermissionCreateResponse, permission, path=["response"]) + assert_matches_type(IntelPermissionsUpdate, permission, path=["response"]) @pytest.mark.skip() @parametrize @@ -61,7 +60,7 @@ class TestPermissions: assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = response.parse() - assert_matches_type(PermissionCreateResponse, permission, path=["response"]) + assert_matches_type(IntelPermissionsUpdate, permission, path=["response"]) assert cast(Any, response.is_closed) is True @@ -121,7 +120,7 @@ class TestPermissions: permission = client.intel.indicator_feeds.permissions.delete( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) + assert_matches_type(IntelPermissionsUpdate, permission, path=["response"]) @pytest.mark.skip() @parametrize @@ -131,7 +130,7 @@ class TestPermissions: account_tag="823f45f16fd2f7e21e1e054aga4d2859", feed_id=1, ) - assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) + assert_matches_type(IntelPermissionsUpdate, permission, path=["response"]) @pytest.mark.skip() @parametrize @@ -143,7 +142,7 @@ class TestPermissions: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = response.parse() - assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) + assert_matches_type(IntelPermissionsUpdate, permission, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +154,7 @@ class TestPermissions: assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = response.parse() - assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) + assert_matches_type(IntelPermissionsUpdate, permission, path=["response"]) assert cast(Any, response.is_closed) is True @@ -177,7 +176,7 @@ class TestAsyncPermissions: permission = await async_client.intel.indicator_feeds.permissions.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PermissionCreateResponse, permission, path=["response"]) + assert_matches_type(IntelPermissionsUpdate, permission, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +186,7 @@ class TestAsyncPermissions: account_tag="823f45f16fd2f7e21e1e054aga4d2859", feed_id=1, ) - assert_matches_type(PermissionCreateResponse, permission, path=["response"]) + assert_matches_type(IntelPermissionsUpdate, permission, path=["response"]) @pytest.mark.skip() @parametrize @@ -199,7 +198,7 @@ class TestAsyncPermissions: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = await response.parse() - assert_matches_type(PermissionCreateResponse, permission, path=["response"]) + assert_matches_type(IntelPermissionsUpdate, permission, path=["response"]) @pytest.mark.skip() @parametrize @@ -211,7 +210,7 @@ class TestAsyncPermissions: assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = await response.parse() - assert_matches_type(PermissionCreateResponse, permission, path=["response"]) + assert_matches_type(IntelPermissionsUpdate, permission, path=["response"]) assert cast(Any, response.is_closed) is True @@ -271,7 +270,7 @@ class TestAsyncPermissions: permission = await async_client.intel.indicator_feeds.permissions.delete( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) + assert_matches_type(IntelPermissionsUpdate, permission, path=["response"]) @pytest.mark.skip() @parametrize @@ -281,7 +280,7 @@ class TestAsyncPermissions: account_tag="823f45f16fd2f7e21e1e054aga4d2859", feed_id=1, ) - assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) + assert_matches_type(IntelPermissionsUpdate, permission, path=["response"]) @pytest.mark.skip() @parametrize @@ -293,7 +292,7 @@ class TestAsyncPermissions: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = await response.parse() - assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) + assert_matches_type(IntelPermissionsUpdate, permission, path=["response"]) @pytest.mark.skip() @parametrize @@ -305,7 +304,7 @@ class TestAsyncPermissions: assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission = await response.parse() - assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) + assert_matches_type(IntelPermissionsUpdate, permission, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/intel/test_asn.py b/tests/api_resources/intel/test_asn.py index 1bf190a9e..abb08f01e 100644 --- a/tests/api_resources/intel/test_asn.py +++ b/tests/api_resources/intel/test_asn.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.intel import ASNGetResponse +from cloudflare.types.intel import IntelASN base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestASN: 0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ASNGetResponse, asn, path=["response"]) + assert_matches_type(IntelASN, asn, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestASN: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" asn = response.parse() - assert_matches_type(ASNGetResponse, asn, path=["response"]) + assert_matches_type(IntelASN, asn, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestASN: assert response.http_request.headers.get("X-Stainless-Lang") == "python" asn = response.parse() - assert_matches_type(ASNGetResponse, asn, path=["response"]) + assert_matches_type(IntelASN, asn, path=["response"]) assert cast(Any, response.is_closed) is True @@ -74,7 +74,7 @@ class TestAsyncASN: 0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ASNGetResponse, asn, path=["response"]) + assert_matches_type(IntelASN, asn, path=["response"]) @pytest.mark.skip() @parametrize @@ -87,7 +87,7 @@ class TestAsyncASN: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" asn = await response.parse() - assert_matches_type(ASNGetResponse, asn, path=["response"]) + assert_matches_type(IntelASN, asn, path=["response"]) @pytest.mark.skip() @parametrize @@ -100,7 +100,7 @@ class TestAsyncASN: assert response.http_request.headers.get("X-Stainless-Lang") == "python" asn = await response.parse() - assert_matches_type(ASNGetResponse, asn, path=["response"]) + assert_matches_type(IntelASN, asn, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/intel/test_dns.py b/tests/api_resources/intel/test_dns.py index 3b19a4152..170441768 100644 --- a/tests/api_resources/intel/test_dns.py +++ b/tests/api_resources/intel/test_dns.py @@ -10,7 +10,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_date -from cloudflare.types.intel import DNSGetResponse +from cloudflare.types.intel import IntelPassiveDNSByIP base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestDNS: dns = client.intel.dns.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSGetResponse, dns, path=["response"]) + assert_matches_type(IntelPassiveDNSByIP, dns, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,7 @@ class TestDNS: "start": parse_date("2021-04-01"), }, ) - assert_matches_type(DNSGetResponse, dns, path=["response"]) + assert_matches_type(IntelPassiveDNSByIP, dns, path=["response"]) @pytest.mark.skip() @parametrize @@ -51,7 +51,7 @@ class TestDNS: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" dns = response.parse() - assert_matches_type(DNSGetResponse, dns, path=["response"]) + assert_matches_type(IntelPassiveDNSByIP, dns, path=["response"]) @pytest.mark.skip() @parametrize @@ -63,7 +63,7 @@ class TestDNS: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dns = response.parse() - assert_matches_type(DNSGetResponse, dns, path=["response"]) + assert_matches_type(IntelPassiveDNSByIP, dns, path=["response"]) assert cast(Any, response.is_closed) is True @@ -85,7 +85,7 @@ class TestAsyncDNS: dns = await async_client.intel.dns.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSGetResponse, dns, path=["response"]) + assert_matches_type(IntelPassiveDNSByIP, dns, path=["response"]) @pytest.mark.skip() @parametrize @@ -100,7 +100,7 @@ class TestAsyncDNS: "start": parse_date("2021-04-01"), }, ) - assert_matches_type(DNSGetResponse, dns, path=["response"]) + assert_matches_type(IntelPassiveDNSByIP, dns, path=["response"]) @pytest.mark.skip() @parametrize @@ -112,7 +112,7 @@ class TestAsyncDNS: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" dns = await response.parse() - assert_matches_type(DNSGetResponse, dns, path=["response"]) + assert_matches_type(IntelPassiveDNSByIP, dns, path=["response"]) @pytest.mark.skip() @parametrize @@ -124,7 +124,7 @@ class TestAsyncDNS: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dns = await response.parse() - assert_matches_type(DNSGetResponse, dns, path=["response"]) + assert_matches_type(IntelPassiveDNSByIP, dns, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/intel/test_domains.py b/tests/api_resources/intel/test_domains.py index 640cfd464..c3ecdacc6 100644 --- a/tests/api_resources/intel/test_domains.py +++ b/tests/api_resources/intel/test_domains.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.intel import DomainGetResponse +from cloudflare.types.intel import IntelDomain base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestDomains: domain = client.intel.domains.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DomainGetResponse, domain, path=["response"]) + assert_matches_type(IntelDomain, domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -32,7 +32,7 @@ class TestDomains: account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="string", ) - assert_matches_type(DomainGetResponse, domain, path=["response"]) + assert_matches_type(IntelDomain, domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +44,7 @@ class TestDomains: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = response.parse() - assert_matches_type(DomainGetResponse, domain, path=["response"]) + assert_matches_type(IntelDomain, domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +56,7 @@ class TestDomains: assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = response.parse() - assert_matches_type(DomainGetResponse, domain, path=["response"]) + assert_matches_type(IntelDomain, domain, path=["response"]) assert cast(Any, response.is_closed) is True @@ -78,7 +78,7 @@ class TestAsyncDomains: domain = await async_client.intel.domains.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DomainGetResponse, domain, path=["response"]) + assert_matches_type(IntelDomain, domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -87,7 +87,7 @@ class TestAsyncDomains: account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="string", ) - assert_matches_type(DomainGetResponse, domain, path=["response"]) + assert_matches_type(IntelDomain, domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -99,7 +99,7 @@ class TestAsyncDomains: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = await response.parse() - assert_matches_type(DomainGetResponse, domain, path=["response"]) + assert_matches_type(IntelDomain, domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -111,7 +111,7 @@ class TestAsyncDomains: assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = await response.parse() - assert_matches_type(DomainGetResponse, domain, path=["response"]) + assert_matches_type(IntelDomain, domain, 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 b51494766..d2a7f87d6 100644 --- a/tests/api_resources/intel/test_indicator_feeds.py +++ b/tests/api_resources/intel/test_indicator_feeds.py @@ -10,10 +10,10 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.intel import ( - IndicatorFeedGetResponse, + IntelUpdateFeed, + IntelIndicatorFeedItem, IndicatorFeedListResponse, - IndicatorFeedCreateResponse, - IndicatorFeedUpdateResponse, + IntelIndicatorFeedMetadata, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -28,7 +28,7 @@ class TestIndicatorFeeds: indicator_feed = client.intel.indicator_feeds.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelIndicatorFeedItem, indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -38,7 +38,7 @@ class TestIndicatorFeeds: description="example feed description", name="example_feed_1", ) - assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelIndicatorFeedItem, indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestIndicatorFeeds: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = response.parse() - assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelIndicatorFeedItem, indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -62,7 +62,7 @@ class TestIndicatorFeeds: assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = response.parse() - assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelIndicatorFeedItem, indicator_feed, path=["response"]) assert cast(Any, response.is_closed) is True @@ -81,7 +81,7 @@ class TestIndicatorFeeds: 12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelUpdateFeed, indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -91,7 +91,7 @@ class TestIndicatorFeeds: account_id="023e105f4ecef8ad9ca31a8372d0c353", source="@/Users/me/test.stix2", ) - assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelUpdateFeed, indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -104,7 +104,7 @@ class TestIndicatorFeeds: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = response.parse() - assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelUpdateFeed, indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -117,7 +117,7 @@ class TestIndicatorFeeds: assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = response.parse() - assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelUpdateFeed, indicator_feed, path=["response"]) assert cast(Any, response.is_closed) is True @@ -225,7 +225,7 @@ class TestIndicatorFeeds: 12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelIndicatorFeedMetadata, indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -238,7 +238,7 @@ class TestIndicatorFeeds: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = response.parse() - assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelIndicatorFeedMetadata, indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -251,7 +251,7 @@ class TestIndicatorFeeds: assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = response.parse() - assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelIndicatorFeedMetadata, indicator_feed, path=["response"]) assert cast(Any, response.is_closed) is True @@ -274,7 +274,7 @@ class TestAsyncIndicatorFeeds: indicator_feed = await async_client.intel.indicator_feeds.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelIndicatorFeedItem, indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -284,7 +284,7 @@ class TestAsyncIndicatorFeeds: description="example feed description", name="example_feed_1", ) - assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelIndicatorFeedItem, indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -296,7 +296,7 @@ class TestAsyncIndicatorFeeds: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = await response.parse() - assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelIndicatorFeedItem, indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -308,7 +308,7 @@ class TestAsyncIndicatorFeeds: assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = await response.parse() - assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelIndicatorFeedItem, indicator_feed, path=["response"]) assert cast(Any, response.is_closed) is True @@ -327,7 +327,7 @@ class TestAsyncIndicatorFeeds: 12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelUpdateFeed, indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -337,7 +337,7 @@ class TestAsyncIndicatorFeeds: account_id="023e105f4ecef8ad9ca31a8372d0c353", source="@/Users/me/test.stix2", ) - assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelUpdateFeed, indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -350,7 +350,7 @@ class TestAsyncIndicatorFeeds: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = await response.parse() - assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelUpdateFeed, indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -363,7 +363,7 @@ class TestAsyncIndicatorFeeds: assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = await response.parse() - assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelUpdateFeed, indicator_feed, path=["response"]) assert cast(Any, response.is_closed) is True @@ -471,7 +471,7 @@ class TestAsyncIndicatorFeeds: 12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelIndicatorFeedMetadata, indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -484,7 +484,7 @@ class TestAsyncIndicatorFeeds: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = await response.parse() - assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelIndicatorFeedMetadata, indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -497,7 +497,7 @@ class TestAsyncIndicatorFeeds: assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = await response.parse() - assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"]) + assert_matches_type(IntelIndicatorFeedMetadata, indicator_feed, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/intel/test_whois.py b/tests/api_resources/intel/test_whois.py index cd5da6a79..d829546b2 100644 --- a/tests/api_resources/intel/test_whois.py +++ b/tests/api_resources/intel/test_whois.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.intel import WhoisGetResponse +from cloudflare.types.intel import IntelWhois base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestWhois: whois = client.intel.whois.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(WhoisGetResponse, whois, path=["response"]) + assert_matches_type(IntelWhois, whois, path=["response"]) @pytest.mark.skip() @parametrize @@ -32,7 +32,7 @@ class TestWhois: account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="string", ) - assert_matches_type(WhoisGetResponse, whois, path=["response"]) + assert_matches_type(IntelWhois, whois, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +44,7 @@ class TestWhois: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" whois = response.parse() - assert_matches_type(WhoisGetResponse, whois, path=["response"]) + assert_matches_type(IntelWhois, whois, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +56,7 @@ class TestWhois: assert response.http_request.headers.get("X-Stainless-Lang") == "python" whois = response.parse() - assert_matches_type(WhoisGetResponse, whois, path=["response"]) + assert_matches_type(IntelWhois, whois, path=["response"]) assert cast(Any, response.is_closed) is True @@ -78,7 +78,7 @@ class TestAsyncWhois: whois = await async_client.intel.whois.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(WhoisGetResponse, whois, path=["response"]) + assert_matches_type(IntelWhois, whois, path=["response"]) @pytest.mark.skip() @parametrize @@ -87,7 +87,7 @@ class TestAsyncWhois: account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="string", ) - assert_matches_type(WhoisGetResponse, whois, path=["response"]) + assert_matches_type(IntelWhois, whois, path=["response"]) @pytest.mark.skip() @parametrize @@ -99,7 +99,7 @@ class TestAsyncWhois: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" whois = await response.parse() - assert_matches_type(WhoisGetResponse, whois, path=["response"]) + assert_matches_type(IntelWhois, whois, path=["response"]) @pytest.mark.skip() @parametrize @@ -111,7 +111,7 @@ class TestAsyncWhois: assert response.http_request.headers.get("X-Stainless-Lang") == "python" whois = await response.parse() - assert_matches_type(WhoisGetResponse, whois, path=["response"]) + assert_matches_type(IntelWhois, whois, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/kv/test_namespaces.py b/tests/api_resources/kv/test_namespaces.py index 46dd91c9b..b4fda7906 100644 --- a/tests/api_resources/kv/test_namespaces.py +++ b/tests/api_resources/kv/test_namespaces.py @@ -10,8 +10,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.kv import ( - NamespaceListResponse, - NamespaceCreateResponse, + WorkersKVNamespace, NamespaceDeleteResponse, NamespaceUpdateResponse, ) @@ -30,7 +29,7 @@ class TestNamespaces: account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) - assert_matches_type(NamespaceCreateResponse, namespace, path=["response"]) + assert_matches_type(WorkersKVNamespace, namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -43,7 +42,7 @@ class TestNamespaces: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" namespace = response.parse() - assert_matches_type(NamespaceCreateResponse, namespace, path=["response"]) + assert_matches_type(WorkersKVNamespace, namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +55,7 @@ class TestNamespaces: assert response.http_request.headers.get("X-Stainless-Lang") == "python" namespace = response.parse() - assert_matches_type(NamespaceCreateResponse, namespace, path=["response"]) + assert_matches_type(WorkersKVNamespace, namespace, path=["response"]) assert cast(Any, response.is_closed) is True @@ -132,7 +131,7 @@ class TestNamespaces: namespace = client.kv.namespaces.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[NamespaceListResponse], namespace, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WorkersKVNamespace], namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -144,7 +143,7 @@ class TestNamespaces: page=1, per_page=5, ) - assert_matches_type(SyncV4PagePaginationArray[NamespaceListResponse], namespace, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WorkersKVNamespace], namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -156,7 +155,7 @@ class TestNamespaces: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" namespace = response.parse() - assert_matches_type(SyncV4PagePaginationArray[NamespaceListResponse], namespace, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WorkersKVNamespace], namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -168,7 +167,7 @@ class TestNamespaces: assert response.http_request.headers.get("X-Stainless-Lang") == "python" namespace = response.parse() - assert_matches_type(SyncV4PagePaginationArray[NamespaceListResponse], namespace, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WorkersKVNamespace], namespace, path=["response"]) assert cast(Any, response.is_closed) is True @@ -243,7 +242,7 @@ class TestAsyncNamespaces: account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) - assert_matches_type(NamespaceCreateResponse, namespace, path=["response"]) + assert_matches_type(WorkersKVNamespace, namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -256,7 +255,7 @@ class TestAsyncNamespaces: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" namespace = await response.parse() - assert_matches_type(NamespaceCreateResponse, namespace, path=["response"]) + assert_matches_type(WorkersKVNamespace, namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -269,7 +268,7 @@ class TestAsyncNamespaces: assert response.http_request.headers.get("X-Stainless-Lang") == "python" namespace = await response.parse() - assert_matches_type(NamespaceCreateResponse, namespace, path=["response"]) + assert_matches_type(WorkersKVNamespace, namespace, path=["response"]) assert cast(Any, response.is_closed) is True @@ -345,7 +344,7 @@ class TestAsyncNamespaces: namespace = await async_client.kv.namespaces.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[NamespaceListResponse], namespace, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WorkersKVNamespace], namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -357,7 +356,7 @@ class TestAsyncNamespaces: page=1, per_page=5, ) - assert_matches_type(AsyncV4PagePaginationArray[NamespaceListResponse], namespace, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WorkersKVNamespace], namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -369,7 +368,7 @@ class TestAsyncNamespaces: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" namespace = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[NamespaceListResponse], namespace, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WorkersKVNamespace], namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -381,7 +380,7 @@ class TestAsyncNamespaces: assert response.http_request.headers.get("X-Stainless-Lang") == "python" namespace = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[NamespaceListResponse], namespace, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WorkersKVNamespace], namespace, 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 5bfed2184..d030ae20d 100644 --- a/tests/api_resources/load_balancers/test_monitors.py +++ b/tests/api_resources/load_balancers/test_monitors.py @@ -10,13 +10,10 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.load_balancers import ( - MonitorGetResponse, - MonitorEditResponse, MonitorListResponse, - MonitorCreateResponse, MonitorDeleteResponse, - MonitorUpdateResponse, ) +from cloudflare.types.user.load_balancers import LoadBalancingMonitor base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -31,7 +28,7 @@ class TestMonitors: account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) - assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -58,7 +55,7 @@ class TestMonitors: load_balancer_monitor_timeout=0, type="https", ) - assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -71,7 +68,7 @@ class TestMonitors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +81,7 @@ class TestMonitors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) assert cast(Any, response.is_closed) is True @@ -105,7 +102,7 @@ class TestMonitors: account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) - assert_matches_type(MonitorUpdateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -133,7 +130,7 @@ class TestMonitors: load_balancer_monitor_timeout=0, type="https", ) - assert_matches_type(MonitorUpdateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -147,7 +144,7 @@ class TestMonitors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(MonitorUpdateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -161,7 +158,7 @@ class TestMonitors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(MonitorUpdateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) assert cast(Any, response.is_closed) is True @@ -284,7 +281,7 @@ class TestMonitors: account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) - assert_matches_type(MonitorEditResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -312,7 +309,7 @@ class TestMonitors: load_balancer_monitor_timeout=0, type="https", ) - assert_matches_type(MonitorEditResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -326,7 +323,7 @@ class TestMonitors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(MonitorEditResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -340,7 +337,7 @@ class TestMonitors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(MonitorEditResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) assert cast(Any, response.is_closed) is True @@ -368,7 +365,7 @@ class TestMonitors: "f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(MonitorGetResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -381,7 +378,7 @@ class TestMonitors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(MonitorGetResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -394,7 +391,7 @@ class TestMonitors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(MonitorGetResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) assert cast(Any, response.is_closed) is True @@ -424,7 +421,7 @@ class TestAsyncMonitors: account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) - assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -451,7 +448,7 @@ class TestAsyncMonitors: load_balancer_monitor_timeout=0, type="https", ) - assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -464,7 +461,7 @@ class TestAsyncMonitors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -477,7 +474,7 @@ class TestAsyncMonitors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) assert cast(Any, response.is_closed) is True @@ -498,7 +495,7 @@ class TestAsyncMonitors: account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) - assert_matches_type(MonitorUpdateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -526,7 +523,7 @@ class TestAsyncMonitors: load_balancer_monitor_timeout=0, type="https", ) - assert_matches_type(MonitorUpdateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -540,7 +537,7 @@ class TestAsyncMonitors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(MonitorUpdateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -554,7 +551,7 @@ class TestAsyncMonitors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(MonitorUpdateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) assert cast(Any, response.is_closed) is True @@ -677,7 +674,7 @@ class TestAsyncMonitors: account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) - assert_matches_type(MonitorEditResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -705,7 +702,7 @@ class TestAsyncMonitors: load_balancer_monitor_timeout=0, type="https", ) - assert_matches_type(MonitorEditResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -719,7 +716,7 @@ class TestAsyncMonitors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(MonitorEditResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -733,7 +730,7 @@ class TestAsyncMonitors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(MonitorEditResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) assert cast(Any, response.is_closed) is True @@ -761,7 +758,7 @@ class TestAsyncMonitors: "f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(MonitorGetResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -774,7 +771,7 @@ class TestAsyncMonitors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(MonitorGetResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -787,7 +784,7 @@ class TestAsyncMonitors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(MonitorGetResponse, monitor, path=["response"]) + assert_matches_type(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 618773c79..498a6f635 100644 --- a/tests/api_resources/load_balancers/test_pools.py +++ b/tests/api_resources/load_balancers/test_pools.py @@ -10,13 +10,10 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.load_balancers import ( - PoolGetResponse, - PoolEditResponse, PoolListResponse, - PoolCreateResponse, PoolDeleteResponse, - PoolUpdateResponse, ) +from cloudflare.types.user.load_balancers import LoadBalancingPool base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -32,7 +29,7 @@ class TestPools: name="primary-dc-1", origins=[{}, {}, {}], ) - assert_matches_type(PoolCreateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -91,7 +88,7 @@ class TestPools: }, origin_steering={"policy": "random"}, ) - assert_matches_type(PoolCreateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +102,7 @@ class TestPools: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(PoolCreateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -119,7 +116,7 @@ class TestPools: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(PoolCreateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) assert cast(Any, response.is_closed) is True @@ -142,7 +139,7 @@ class TestPools: name="primary-dc-1", origins=[{}, {}, {}], ) - assert_matches_type(PoolUpdateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -203,7 +200,7 @@ class TestPools: }, origin_steering={"policy": "random"}, ) - assert_matches_type(PoolUpdateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -218,7 +215,7 @@ class TestPools: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(PoolUpdateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -233,7 +230,7 @@ class TestPools: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(PoolUpdateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) assert cast(Any, response.is_closed) is True @@ -366,7 +363,7 @@ class TestPools: "17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PoolEditResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -427,7 +424,7 @@ class TestPools: }, ], ) - assert_matches_type(PoolEditResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -440,7 +437,7 @@ class TestPools: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(PoolEditResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -453,7 +450,7 @@ class TestPools: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(PoolEditResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) assert cast(Any, response.is_closed) is True @@ -479,7 +476,7 @@ class TestPools: "17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PoolGetResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -492,7 +489,7 @@ class TestPools: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(PoolGetResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -505,7 +502,7 @@ class TestPools: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(PoolGetResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) assert cast(Any, response.is_closed) is True @@ -536,7 +533,7 @@ class TestAsyncPools: name="primary-dc-1", origins=[{}, {}, {}], ) - assert_matches_type(PoolCreateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -595,7 +592,7 @@ class TestAsyncPools: }, origin_steering={"policy": "random"}, ) - assert_matches_type(PoolCreateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -609,7 +606,7 @@ class TestAsyncPools: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(PoolCreateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -623,7 +620,7 @@ class TestAsyncPools: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(PoolCreateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) assert cast(Any, response.is_closed) is True @@ -646,7 +643,7 @@ class TestAsyncPools: name="primary-dc-1", origins=[{}, {}, {}], ) - assert_matches_type(PoolUpdateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -707,7 +704,7 @@ class TestAsyncPools: }, origin_steering={"policy": "random"}, ) - assert_matches_type(PoolUpdateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -722,7 +719,7 @@ class TestAsyncPools: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(PoolUpdateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -737,7 +734,7 @@ class TestAsyncPools: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(PoolUpdateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) assert cast(Any, response.is_closed) is True @@ -870,7 +867,7 @@ class TestAsyncPools: "17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PoolEditResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -931,7 +928,7 @@ class TestAsyncPools: }, ], ) - assert_matches_type(PoolEditResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -944,7 +941,7 @@ class TestAsyncPools: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(PoolEditResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -957,7 +954,7 @@ class TestAsyncPools: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(PoolEditResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) assert cast(Any, response.is_closed) is True @@ -983,7 +980,7 @@ class TestAsyncPools: "17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PoolGetResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -996,7 +993,7 @@ class TestAsyncPools: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(PoolGetResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -1009,7 +1006,7 @@ class TestAsyncPools: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(PoolGetResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, 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 6c82df3d9..76fc3dce0 100644 --- a/tests/api_resources/load_balancers/test_previews.py +++ b/tests/api_resources/load_balancers/test_previews.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.load_balancers import PreviewGetResponse +from cloudflare.types.user.load_balancers import LoadBalancingPreviewResult base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestPreviews: "p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestPreviews: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = response.parse() - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestPreviews: assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = response.parse() - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) assert cast(Any, response.is_closed) is True @@ -74,7 +74,7 @@ class TestAsyncPreviews: "p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -87,7 +87,7 @@ class TestAsyncPreviews: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = await response.parse() - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -100,7 +100,7 @@ class TestAsyncPreviews: assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = await response.parse() - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(LoadBalancingPreviewResult, 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 e0064328a..631b3bd0c 100644 --- a/tests/api_resources/logpush/test_edge.py +++ b/tests/api_resources/logpush/test_edge.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.logpush import EdgeGetResponse, EdgeCreateResponse +from cloudflare.types.logpush import EdgeGetResponse, LogpushInstantLogsJob base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestEdge: edge = client.logpush.edge.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[EdgeCreateResponse], edge, path=["response"]) + assert_matches_type(Optional[LogpushInstantLogsJob], edge, path=["response"]) @pytest.mark.skip() @parametrize @@ -34,7 +34,7 @@ class TestEdge: filter='{"where":{"and":[{"key":"ClientCountry","operator":"neq","value":"ca"}]}}', sample=1, ) - assert_matches_type(Optional[EdgeCreateResponse], edge, path=["response"]) + assert_matches_type(Optional[LogpushInstantLogsJob], edge, path=["response"]) @pytest.mark.skip() @parametrize @@ -46,7 +46,7 @@ class TestEdge: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" edge = response.parse() - assert_matches_type(Optional[EdgeCreateResponse], edge, path=["response"]) + assert_matches_type(Optional[LogpushInstantLogsJob], edge, path=["response"]) @pytest.mark.skip() @parametrize @@ -58,7 +58,7 @@ class TestEdge: assert response.http_request.headers.get("X-Stainless-Lang") == "python" edge = response.parse() - assert_matches_type(Optional[EdgeCreateResponse], edge, path=["response"]) + assert_matches_type(Optional[LogpushInstantLogsJob], edge, path=["response"]) assert cast(Any, response.is_closed) is True @@ -122,7 +122,7 @@ class TestAsyncEdge: edge = await async_client.logpush.edge.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[EdgeCreateResponse], edge, path=["response"]) + assert_matches_type(Optional[LogpushInstantLogsJob], edge, path=["response"]) @pytest.mark.skip() @parametrize @@ -133,7 +133,7 @@ class TestAsyncEdge: filter='{"where":{"and":[{"key":"ClientCountry","operator":"neq","value":"ca"}]}}', sample=1, ) - assert_matches_type(Optional[EdgeCreateResponse], edge, path=["response"]) + assert_matches_type(Optional[LogpushInstantLogsJob], edge, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +145,7 @@ class TestAsyncEdge: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" edge = await response.parse() - assert_matches_type(Optional[EdgeCreateResponse], edge, path=["response"]) + assert_matches_type(Optional[LogpushInstantLogsJob], edge, path=["response"]) @pytest.mark.skip() @parametrize @@ -157,7 +157,7 @@ class TestAsyncEdge: assert response.http_request.headers.get("X-Stainless-Lang") == "python" edge = await response.parse() - assert_matches_type(Optional[EdgeCreateResponse], edge, path=["response"]) + assert_matches_type(Optional[LogpushInstantLogsJob], 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 e8c7252f2..f435c0e4f 100644 --- a/tests/api_resources/logpush/test_jobs.py +++ b/tests/api_resources/logpush/test_jobs.py @@ -9,13 +9,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.logpush import ( - JobGetResponse, - JobListResponse, - JobCreateResponse, - JobDeleteResponse, - JobUpdateResponse, -) +from cloudflare.types.logpush import JobListResponse, JobDeleteResponse +from cloudflare.types.logpush.datasets import LogpushLogpushJob base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -31,7 +26,7 @@ class TestJobs: account_id="string", zone_id="string", ) - assert_matches_type(Optional[JobCreateResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -61,7 +56,7 @@ class TestJobs: }, ownership_challenge="00000000000000000000", ) - assert_matches_type(Optional[JobCreateResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -75,7 +70,7 @@ class TestJobs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = response.parse() - assert_matches_type(Optional[JobCreateResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -89,7 +84,7 @@ class TestJobs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = response.parse() - assert_matches_type(Optional[JobCreateResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) assert cast(Any, response.is_closed) is True @@ -118,7 +113,7 @@ class TestJobs: account_id="string", zone_id="string", ) - assert_matches_type(Optional[JobUpdateResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -147,7 +142,7 @@ class TestJobs: }, ownership_challenge="00000000000000000000", ) - assert_matches_type(Optional[JobUpdateResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -161,7 +156,7 @@ class TestJobs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = response.parse() - assert_matches_type(Optional[JobUpdateResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -175,7 +170,7 @@ class TestJobs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = response.parse() - assert_matches_type(Optional[JobUpdateResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) assert cast(Any, response.is_closed) is True @@ -332,7 +327,7 @@ class TestJobs: account_id="string", zone_id="string", ) - assert_matches_type(Optional[JobGetResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -342,7 +337,7 @@ class TestJobs: account_id="string", zone_id="string", ) - assert_matches_type(Optional[JobGetResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -356,7 +351,7 @@ class TestJobs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = response.parse() - assert_matches_type(Optional[JobGetResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -370,7 +365,7 @@ class TestJobs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = response.parse() - assert_matches_type(Optional[JobGetResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) assert cast(Any, response.is_closed) is True @@ -403,7 +398,7 @@ class TestAsyncJobs: account_id="string", zone_id="string", ) - assert_matches_type(Optional[JobCreateResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -433,7 +428,7 @@ class TestAsyncJobs: }, ownership_challenge="00000000000000000000", ) - assert_matches_type(Optional[JobCreateResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -447,7 +442,7 @@ class TestAsyncJobs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = await response.parse() - assert_matches_type(Optional[JobCreateResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -461,7 +456,7 @@ class TestAsyncJobs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = await response.parse() - assert_matches_type(Optional[JobCreateResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) assert cast(Any, response.is_closed) is True @@ -490,7 +485,7 @@ class TestAsyncJobs: account_id="string", zone_id="string", ) - assert_matches_type(Optional[JobUpdateResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -519,7 +514,7 @@ class TestAsyncJobs: }, ownership_challenge="00000000000000000000", ) - assert_matches_type(Optional[JobUpdateResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -533,7 +528,7 @@ class TestAsyncJobs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = await response.parse() - assert_matches_type(Optional[JobUpdateResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -547,7 +542,7 @@ class TestAsyncJobs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = await response.parse() - assert_matches_type(Optional[JobUpdateResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) assert cast(Any, response.is_closed) is True @@ -704,7 +699,7 @@ class TestAsyncJobs: account_id="string", zone_id="string", ) - assert_matches_type(Optional[JobGetResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -714,7 +709,7 @@ class TestAsyncJobs: account_id="string", zone_id="string", ) - assert_matches_type(Optional[JobGetResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -728,7 +723,7 @@ class TestAsyncJobs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = await response.parse() - assert_matches_type(Optional[JobGetResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -742,7 +737,7 @@ class TestAsyncJobs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = await response.parse() - assert_matches_type(Optional[JobGetResponse], job, path=["response"]) + assert_matches_type(Optional[LogpushLogpushJob], 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 10198f8ae..b19c0e700 100644 --- a/tests/api_resources/logs/control/cmb/test_config.py +++ b/tests/api_resources/logs/control/cmb/test_config.py @@ -9,11 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.logs.control.cmb import ( - ConfigGetResponse, - ConfigCreateResponse, - ConfigDeleteResponse, -) +from cloudflare.types.logs.control.cmb import LogcontrolCmbConfig, ConfigDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +23,7 @@ class TestConfig: config = client.logs.control.cmb.config.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ConfigCreateResponse], config, path=["response"]) + assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -36,7 +32,7 @@ class TestConfig: account_id="023e105f4ecef8ad9ca31a8372d0c353", regions="eu", ) - assert_matches_type(Optional[ConfigCreateResponse], config, path=["response"]) + assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -48,7 +44,7 @@ class TestConfig: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(Optional[ConfigCreateResponse], config, path=["response"]) + assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -60,7 +56,7 @@ class TestConfig: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(Optional[ConfigCreateResponse], config, path=["response"]) + assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -120,7 +116,7 @@ class TestConfig: config = client.logs.control.cmb.config.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ConfigGetResponse], config, path=["response"]) + assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +128,7 @@ class TestConfig: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(Optional[ConfigGetResponse], config, path=["response"]) + assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -144,7 +140,7 @@ class TestConfig: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(Optional[ConfigGetResponse], config, path=["response"]) + assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -166,7 +162,7 @@ class TestAsyncConfig: config = await async_client.logs.control.cmb.config.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ConfigCreateResponse], config, path=["response"]) + assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -175,7 +171,7 @@ class TestAsyncConfig: account_id="023e105f4ecef8ad9ca31a8372d0c353", regions="eu", ) - assert_matches_type(Optional[ConfigCreateResponse], config, path=["response"]) + assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +183,7 @@ class TestAsyncConfig: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(Optional[ConfigCreateResponse], config, path=["response"]) + assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -199,7 +195,7 @@ class TestAsyncConfig: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(Optional[ConfigCreateResponse], config, path=["response"]) + assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -259,7 +255,7 @@ class TestAsyncConfig: config = await async_client.logs.control.cmb.config.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ConfigGetResponse], config, path=["response"]) + assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -271,7 +267,7 @@ class TestAsyncConfig: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(Optional[ConfigGetResponse], config, path=["response"]) + assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -283,7 +279,7 @@ class TestAsyncConfig: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(Optional[ConfigGetResponse], config, path=["response"]) + assert_matches_type(Optional[LogcontrolCmbConfig], 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 e97f5a097..a4b4b4677 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_network_monitoring.configs import FullGetResponse +from cloudflare.types.magic_network_monitoring import MagicVisibilityMNMConfig base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestFull: full = client.magic_network_monitoring.configs.full.get( "6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(FullGetResponse, full, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, full, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,7 @@ class TestFull: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" full = response.parse() - assert_matches_type(FullGetResponse, full, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, full, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ class TestFull: assert response.http_request.headers.get("X-Stainless-Lang") == "python" full = response.parse() - assert_matches_type(FullGetResponse, full, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, full, path=["response"]) assert cast(Any, response.is_closed) is True @@ -61,7 +61,7 @@ class TestAsyncFull: full = await async_client.magic_network_monitoring.configs.full.get( "6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(FullGetResponse, full, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, full, path=["response"]) @pytest.mark.skip() @parametrize @@ -73,7 +73,7 @@ class TestAsyncFull: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" full = await response.parse() - assert_matches_type(FullGetResponse, full, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, full, path=["response"]) @pytest.mark.skip() @parametrize @@ -85,6 +85,6 @@ class TestAsyncFull: assert response.http_request.headers.get("X-Stainless-Lang") == "python" full = await response.parse() - assert_matches_type(FullGetResponse, full, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, 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 8d558bf84..6c798b2b5 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_network_monitoring.rules import AdvertisementEditResponse +from cloudflare.types.magic_network_monitoring.rules import MagicVisibilityMNMRuleAdvertisable base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestAdvertisements: "2890e6fa406311ed9b5a23f70f6fb8cf", account_identifier="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[AdvertisementEditResponse], advertisement, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRuleAdvertisable], advertisement, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestAdvertisements: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" advertisement = response.parse() - assert_matches_type(Optional[AdvertisementEditResponse], advertisement, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRuleAdvertisable], advertisement, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestAdvertisements: assert response.http_request.headers.get("X-Stainless-Lang") == "python" advertisement = response.parse() - assert_matches_type(Optional[AdvertisementEditResponse], advertisement, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRuleAdvertisable], advertisement, path=["response"]) assert cast(Any, response.is_closed) is True @@ -65,7 +65,7 @@ class TestAsyncAdvertisements: "2890e6fa406311ed9b5a23f70f6fb8cf", account_identifier="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[AdvertisementEditResponse], advertisement, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRuleAdvertisable], advertisement, path=["response"]) @pytest.mark.skip() @parametrize @@ -78,7 +78,7 @@ class TestAsyncAdvertisements: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" advertisement = await response.parse() - assert_matches_type(Optional[AdvertisementEditResponse], advertisement, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRuleAdvertisable], advertisement, path=["response"]) @pytest.mark.skip() @parametrize @@ -91,6 +91,6 @@ class TestAsyncAdvertisements: assert response.http_request.headers.get("X-Stainless-Lang") == "python" advertisement = await response.parse() - assert_matches_type(Optional[AdvertisementEditResponse], advertisement, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRuleAdvertisable], 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 f11aa1294..fcfbe4160 100644 --- a/tests/api_resources/magic_network_monitoring/test_configs.py +++ b/tests/api_resources/magic_network_monitoring/test_configs.py @@ -9,13 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_network_monitoring import ( - ConfigGetResponse, - ConfigEditResponse, - ConfigCreateResponse, - ConfigDeleteResponse, - ConfigUpdateResponse, -) +from cloudflare.types.magic_network_monitoring import MagicVisibilityMNMConfig base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -29,7 +23,7 @@ class TestConfigs: config = client.magic_network_monitoring.configs.create( "6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(ConfigCreateResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +35,7 @@ class TestConfigs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(ConfigCreateResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +47,7 @@ class TestConfigs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(ConfigCreateResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -63,7 +57,7 @@ class TestConfigs: config = client.magic_network_monitoring.configs.update( "6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(ConfigUpdateResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -75,7 +69,7 @@ class TestConfigs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(ConfigUpdateResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -87,7 +81,7 @@ class TestConfigs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(ConfigUpdateResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -97,7 +91,7 @@ class TestConfigs: config = client.magic_network_monitoring.configs.delete( "6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(ConfigDeleteResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -109,7 +103,7 @@ class TestConfigs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(ConfigDeleteResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -121,7 +115,7 @@ class TestConfigs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(ConfigDeleteResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -131,7 +125,7 @@ class TestConfigs: config = client.magic_network_monitoring.configs.edit( "6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(ConfigEditResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -143,7 +137,7 @@ class TestConfigs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(ConfigEditResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +149,7 @@ class TestConfigs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(ConfigEditResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -165,7 +159,7 @@ class TestConfigs: config = client.magic_network_monitoring.configs.get( "6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(ConfigGetResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -177,7 +171,7 @@ class TestConfigs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(ConfigGetResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -189,7 +183,7 @@ class TestConfigs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(ConfigGetResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -203,7 +197,7 @@ class TestAsyncConfigs: config = await async_client.magic_network_monitoring.configs.create( "6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(ConfigCreateResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -215,7 +209,7 @@ class TestAsyncConfigs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(ConfigCreateResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -227,7 +221,7 @@ class TestAsyncConfigs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(ConfigCreateResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -237,7 +231,7 @@ class TestAsyncConfigs: config = await async_client.magic_network_monitoring.configs.update( "6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(ConfigUpdateResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -249,7 +243,7 @@ class TestAsyncConfigs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(ConfigUpdateResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -261,7 +255,7 @@ class TestAsyncConfigs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(ConfigUpdateResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -271,7 +265,7 @@ class TestAsyncConfigs: config = await async_client.magic_network_monitoring.configs.delete( "6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(ConfigDeleteResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -283,7 +277,7 @@ class TestAsyncConfigs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(ConfigDeleteResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -295,7 +289,7 @@ class TestAsyncConfigs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(ConfigDeleteResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -305,7 +299,7 @@ class TestAsyncConfigs: config = await async_client.magic_network_monitoring.configs.edit( "6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(ConfigEditResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -317,7 +311,7 @@ class TestAsyncConfigs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(ConfigEditResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -329,7 +323,7 @@ class TestAsyncConfigs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(ConfigEditResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -339,7 +333,7 @@ class TestAsyncConfigs: config = await async_client.magic_network_monitoring.configs.get( "6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(ConfigGetResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -351,7 +345,7 @@ class TestAsyncConfigs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(ConfigGetResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -363,6 +357,6 @@ class TestAsyncConfigs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(ConfigGetResponse, config, path=["response"]) + assert_matches_type(MagicVisibilityMNMConfig, 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 9bac2701b..dbb07625d 100644 --- a/tests/api_resources/magic_network_monitoring/test_rules.py +++ b/tests/api_resources/magic_network_monitoring/test_rules.py @@ -9,14 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_network_monitoring import ( - RuleGetResponse, - RuleEditResponse, - RuleListResponse, - RuleCreateResponse, - RuleDeleteResponse, - RuleUpdateResponse, -) +from cloudflare.types.magic_network_monitoring import RuleListResponse, MagicVisibilityMNMRule base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +23,7 @@ class TestRules: rule = client.magic_network_monitoring.rules.create( "6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +35,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -54,7 +47,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -64,7 +57,7 @@ class TestRules: rule = client.magic_network_monitoring.rules.update( "6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -76,7 +69,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -88,7 +81,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -133,7 +126,7 @@ class TestRules: "2890e6fa406311ed9b5a23f70f6fb8cf", account_identifier="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -146,7 +139,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -159,7 +152,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -170,7 +163,7 @@ class TestRules: "2890e6fa406311ed9b5a23f70f6fb8cf", account_identifier="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[RuleEditResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -183,7 +176,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleEditResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -196,7 +189,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleEditResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -207,7 +200,7 @@ class TestRules: "2890e6fa406311ed9b5a23f70f6fb8cf", account_identifier="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[RuleGetResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -220,7 +213,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleGetResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -233,7 +226,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleGetResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -247,7 +240,7 @@ class TestAsyncRules: rule = await async_client.magic_network_monitoring.rules.create( "6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -259,7 +252,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -271,7 +264,7 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -281,7 +274,7 @@ class TestAsyncRules: rule = await async_client.magic_network_monitoring.rules.update( "6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -293,7 +286,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -305,7 +298,7 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -350,7 +343,7 @@ class TestAsyncRules: "2890e6fa406311ed9b5a23f70f6fb8cf", account_identifier="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -363,7 +356,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -376,7 +369,7 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -387,7 +380,7 @@ class TestAsyncRules: "2890e6fa406311ed9b5a23f70f6fb8cf", account_identifier="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[RuleEditResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -400,7 +393,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleEditResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -413,7 +406,7 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleEditResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -424,7 +417,7 @@ class TestAsyncRules: "2890e6fa406311ed9b5a23f70f6fb8cf", account_identifier="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[RuleGetResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -437,7 +430,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleGetResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -450,6 +443,6 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleGetResponse], rule, path=["response"]) + assert_matches_type(Optional[MagicVisibilityMNMRule], 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 7e5c5e6d2..64e7ad3de 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 @@ -10,10 +10,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.origin_tls_client_auth.hostnames import ( - CertificateGetResponse, CertificateListResponse, - CertificateCreateResponse, - CertificateDeleteResponse, + TLSCertificatesAndHostnamesSchemasCertificateObject, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +28,7 @@ class TestCertificates: 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(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +42,7 @@ class TestCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -58,7 +56,7 @@ class TestCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -121,7 +119,7 @@ class TestCertificates: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CertificateDeleteResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -134,7 +132,7 @@ class TestCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateDeleteResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -147,7 +145,7 @@ class TestCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateDeleteResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -173,7 +171,7 @@ class TestCertificates: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -186,7 +184,7 @@ class TestCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -199,7 +197,7 @@ class TestCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -230,7 +228,7 @@ class TestAsyncCertificates: 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(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -244,7 +242,7 @@ class TestAsyncCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -258,7 +256,7 @@ class TestAsyncCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -321,7 +319,7 @@ class TestAsyncCertificates: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CertificateDeleteResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -334,7 +332,7 @@ class TestAsyncCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateDeleteResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -347,7 +345,7 @@ class TestAsyncCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateDeleteResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -373,7 +371,7 @@ class TestAsyncCertificates: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -386,7 +384,7 @@ class TestAsyncCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -399,7 +397,7 @@ class TestAsyncCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, 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 53a331e04..64180a76f 100644 --- a/tests/api_resources/origin_tls_client_auth/test_hostnames.py +++ b/tests/api_resources/origin_tls_client_auth/test_hostnames.py @@ -9,7 +9,10 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.origin_tls_client_auth import HostnameGetResponse, HostnameUpdateResponse +from cloudflare.types.origin_tls_client_auth import ( + HostnameUpdateResponse, + TLSCertificatesAndHostnamesHostnameCertidObject, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -70,7 +73,7 @@ class TestHostnames: "app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HostnameGetResponse, hostname, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameCertidObject, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -83,7 +86,7 @@ class TestHostnames: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = response.parse() - assert_matches_type(HostnameGetResponse, hostname, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameCertidObject, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +99,7 @@ class TestHostnames: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = response.parse() - assert_matches_type(HostnameGetResponse, hostname, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameCertidObject, hostname, path=["response"]) assert cast(Any, response.is_closed) is True @@ -172,7 +175,7 @@ class TestAsyncHostnames: "app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HostnameGetResponse, hostname, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameCertidObject, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +188,7 @@ class TestAsyncHostnames: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = await response.parse() - assert_matches_type(HostnameGetResponse, hostname, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameCertidObject, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -198,7 +201,7 @@ class TestAsyncHostnames: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = await response.parse() - assert_matches_type(HostnameGetResponse, hostname, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesHostnameCertidObject, hostname, 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 ef130b0f2..e26924b20 100644 --- a/tests/api_resources/page_shield/test_connections.py +++ b/tests/api_resources/page_shield/test_connections.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.page_shield import ConnectionGetResponse, ConnectionListResponse +from cloudflare.types.page_shield import PageShieldConnection, ConnectionListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -86,7 +86,7 @@ class TestConnections: "c9ef84a6bf5e47138c75d95e2f933e8f", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ConnectionGetResponse, connection, path=["response"]) + assert_matches_type(PageShieldConnection, connection, path=["response"]) @pytest.mark.skip() @parametrize @@ -99,7 +99,7 @@ class TestConnections: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" connection = response.parse() - assert_matches_type(ConnectionGetResponse, connection, path=["response"]) + assert_matches_type(PageShieldConnection, connection, path=["response"]) @pytest.mark.skip() @parametrize @@ -112,7 +112,7 @@ class TestConnections: assert response.http_request.headers.get("X-Stainless-Lang") == "python" connection = response.parse() - assert_matches_type(ConnectionGetResponse, connection, path=["response"]) + assert_matches_type(PageShieldConnection, connection, path=["response"]) assert cast(Any, response.is_closed) is True @@ -204,7 +204,7 @@ class TestAsyncConnections: "c9ef84a6bf5e47138c75d95e2f933e8f", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ConnectionGetResponse, connection, path=["response"]) + assert_matches_type(PageShieldConnection, connection, path=["response"]) @pytest.mark.skip() @parametrize @@ -217,7 +217,7 @@ class TestAsyncConnections: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" connection = await response.parse() - assert_matches_type(ConnectionGetResponse, connection, path=["response"]) + assert_matches_type(PageShieldConnection, connection, path=["response"]) @pytest.mark.skip() @parametrize @@ -230,7 +230,7 @@ class TestAsyncConnections: assert response.http_request.headers.get("X-Stainless-Lang") == "python" connection = await response.parse() - assert_matches_type(ConnectionGetResponse, connection, path=["response"]) + assert_matches_type(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 1d9b7c996..f8a136b21 100644 --- a/tests/api_resources/page_shield/test_policies.py +++ b/tests/api_resources/page_shield/test_policies.py @@ -10,10 +10,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.page_shield import ( - PolicyGetResponse, PolicyListResponse, - PolicyCreateResponse, - PolicyUpdateResponse, + PageShieldPageshieldPolicy, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -28,7 +26,7 @@ class TestPolicies: policy = client.page_shield.policies.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PolicyCreateResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +39,7 @@ class TestPolicies: expression='ends_with(http.request.uri.path, "/checkout")', value="script-src 'none';", ) - assert_matches_type(PolicyCreateResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +51,7 @@ class TestPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(PolicyCreateResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -65,7 +63,7 @@ class TestPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(PolicyCreateResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -84,7 +82,7 @@ class TestPolicies: "c9ef84a6bf5e47138c75d95e2f933e8f", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -98,7 +96,7 @@ class TestPolicies: expression='ends_with(http.request.uri.path, "/checkout")', value="script-src 'none';", ) - assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -111,7 +109,7 @@ class TestPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -124,7 +122,7 @@ class TestPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -244,7 +242,7 @@ class TestPolicies: "c9ef84a6bf5e47138c75d95e2f933e8f", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -257,7 +255,7 @@ class TestPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -270,7 +268,7 @@ class TestPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -299,7 +297,7 @@ class TestAsyncPolicies: policy = await async_client.page_shield.policies.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PolicyCreateResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -312,7 +310,7 @@ class TestAsyncPolicies: expression='ends_with(http.request.uri.path, "/checkout")', value="script-src 'none';", ) - assert_matches_type(PolicyCreateResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -324,7 +322,7 @@ class TestAsyncPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(PolicyCreateResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -336,7 +334,7 @@ class TestAsyncPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(PolicyCreateResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -355,7 +353,7 @@ class TestAsyncPolicies: "c9ef84a6bf5e47138c75d95e2f933e8f", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -369,7 +367,7 @@ class TestAsyncPolicies: expression='ends_with(http.request.uri.path, "/checkout")', value="script-src 'none';", ) - assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -382,7 +380,7 @@ class TestAsyncPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -395,7 +393,7 @@ class TestAsyncPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -515,7 +513,7 @@ class TestAsyncPolicies: "c9ef84a6bf5e47138c75d95e2f933e8f", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -528,7 +526,7 @@ class TestAsyncPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -541,7 +539,7 @@ class TestAsyncPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(PageShieldPageshieldPolicy, 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 435a3625e..af4ec43b3 100644 --- a/tests/api_resources/pagerules/test_settings.py +++ b/tests/api_resources/pagerules/test_settings.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.pagerules import SettingListResponse +from cloudflare.types.pagerules import ZonesSettings base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestSettings: setting = client.pagerules.settings.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SettingListResponse, setting, path=["response"]) + assert_matches_type(ZonesSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,7 @@ class TestSettings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(SettingListResponse, setting, path=["response"]) + assert_matches_type(ZonesSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ class TestSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(SettingListResponse, setting, path=["response"]) + assert_matches_type(ZonesSettings, setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestAsyncSettings: setting = await async_client.pagerules.settings.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SettingListResponse, setting, path=["response"]) + assert_matches_type(ZonesSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestAsyncSettings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(SettingListResponse, setting, path=["response"]) + assert_matches_type(ZonesSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestAsyncSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(SettingListResponse, setting, path=["response"]) + assert_matches_type(ZonesSettings, setting, 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 006a82806..258d9af1a 100644 --- a/tests/api_resources/pages/projects/test_deployments.py +++ b/tests/api_resources/pages/projects/test_deployments.py @@ -9,13 +9,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.pages.projects import ( - DeploymentGetResponse, - DeploymentListResponse, - DeploymentRetryResponse, - DeploymentCreateResponse, - DeploymentRollbackResponse, -) +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") @@ -30,7 +25,7 @@ class TestDeployments: "this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DeploymentCreateResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +35,7 @@ class TestDeployments: account_id="023e105f4ecef8ad9ca31a8372d0c353", branch="staging", ) - assert_matches_type(DeploymentCreateResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +48,7 @@ class TestDeployments: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = response.parse() - assert_matches_type(DeploymentCreateResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -66,7 +61,7 @@ class TestDeployments: assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = response.parse() - assert_matches_type(DeploymentCreateResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -209,7 +204,7 @@ class TestDeployments: account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) - assert_matches_type(DeploymentGetResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -223,7 +218,7 @@ class TestDeployments: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = response.parse() - assert_matches_type(DeploymentGetResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -237,7 +232,7 @@ class TestDeployments: assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = response.parse() - assert_matches_type(DeploymentGetResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -273,7 +268,7 @@ class TestDeployments: account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) - assert_matches_type(DeploymentRetryResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -287,7 +282,7 @@ class TestDeployments: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = response.parse() - assert_matches_type(DeploymentRetryResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -301,7 +296,7 @@ class TestDeployments: assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = response.parse() - assert_matches_type(DeploymentRetryResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -337,7 +332,7 @@ class TestDeployments: account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) - assert_matches_type(DeploymentRollbackResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -351,7 +346,7 @@ class TestDeployments: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = response.parse() - assert_matches_type(DeploymentRollbackResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -365,7 +360,7 @@ class TestDeployments: assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = response.parse() - assert_matches_type(DeploymentRollbackResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -404,7 +399,7 @@ class TestAsyncDeployments: "this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DeploymentCreateResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -414,7 +409,7 @@ class TestAsyncDeployments: account_id="023e105f4ecef8ad9ca31a8372d0c353", branch="staging", ) - assert_matches_type(DeploymentCreateResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -427,7 +422,7 @@ class TestAsyncDeployments: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = await response.parse() - assert_matches_type(DeploymentCreateResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -440,7 +435,7 @@ class TestAsyncDeployments: assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = await response.parse() - assert_matches_type(DeploymentCreateResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -583,7 +578,7 @@ class TestAsyncDeployments: account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) - assert_matches_type(DeploymentGetResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -597,7 +592,7 @@ class TestAsyncDeployments: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = await response.parse() - assert_matches_type(DeploymentGetResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -611,7 +606,7 @@ class TestAsyncDeployments: assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = await response.parse() - assert_matches_type(DeploymentGetResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -647,7 +642,7 @@ class TestAsyncDeployments: account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) - assert_matches_type(DeploymentRetryResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -661,7 +656,7 @@ class TestAsyncDeployments: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = await response.parse() - assert_matches_type(DeploymentRetryResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -675,7 +670,7 @@ class TestAsyncDeployments: assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = await response.parse() - assert_matches_type(DeploymentRetryResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -711,7 +706,7 @@ class TestAsyncDeployments: account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) - assert_matches_type(DeploymentRollbackResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -725,7 +720,7 @@ class TestAsyncDeployments: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = await response.parse() - assert_matches_type(DeploymentRollbackResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -739,7 +734,7 @@ class TestAsyncDeployments: assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = await response.parse() - assert_matches_type(DeploymentRollbackResponse, deployment, path=["response"]) + assert_matches_type(PagesDeployments, deployment, 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 266d6e38e..9f5bdc0ee 100644 --- a/tests/api_resources/pages/test_projects.py +++ b/tests/api_resources/pages/test_projects.py @@ -10,7 +10,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.pages import ( - ProjectGetResponse, + PagesProjects, ProjectEditResponse, ProjectListResponse, ProjectCreateResponse, @@ -367,7 +367,7 @@ class TestProjects: "this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ProjectGetResponse, project, path=["response"]) + assert_matches_type(PagesProjects, project, path=["response"]) @pytest.mark.skip() @parametrize @@ -380,7 +380,7 @@ class TestProjects: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" project = response.parse() - assert_matches_type(ProjectGetResponse, project, path=["response"]) + assert_matches_type(PagesProjects, project, path=["response"]) @pytest.mark.skip() @parametrize @@ -393,7 +393,7 @@ class TestProjects: assert response.http_request.headers.get("X-Stainless-Lang") == "python" project = response.parse() - assert_matches_type(ProjectGetResponse, project, path=["response"]) + assert_matches_type(PagesProjects, project, path=["response"]) assert cast(Any, response.is_closed) is True @@ -813,7 +813,7 @@ class TestAsyncProjects: "this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ProjectGetResponse, project, path=["response"]) + assert_matches_type(PagesProjects, project, path=["response"]) @pytest.mark.skip() @parametrize @@ -826,7 +826,7 @@ class TestAsyncProjects: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" project = await response.parse() - assert_matches_type(ProjectGetResponse, project, path=["response"]) + assert_matches_type(PagesProjects, project, path=["response"]) @pytest.mark.skip() @parametrize @@ -839,7 +839,7 @@ class TestAsyncProjects: assert response.http_request.headers.get("X-Stainless-Lang") == "python" project = await response.parse() - assert_matches_type(ProjectGetResponse, project, path=["response"]) + assert_matches_type(PagesProjects, project, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/pcaps/test_ownerships.py b/tests/api_resources/pcaps/test_ownerships.py index cde8361b2..3b5b719fa 100644 --- a/tests/api_resources/pcaps/test_ownerships.py +++ b/tests/api_resources/pcaps/test_ownerships.py @@ -11,8 +11,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.pcaps import ( OwnershipGetResponse, - OwnershipCreateResponse, - OwnershipValidateResponse, + MagicVisibilityPCAPsOwnership, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -28,7 +27,7 @@ class TestOwnerships: account_id="023e105f4ecef8ad9ca31a8372d0c353", destination_conf="s3://pcaps-bucket?region=us-east-1", ) - assert_matches_type(OwnershipCreateResponse, ownership, path=["response"]) + assert_matches_type(MagicVisibilityPCAPsOwnership, ownership, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +40,7 @@ class TestOwnerships: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ownership = response.parse() - assert_matches_type(OwnershipCreateResponse, ownership, path=["response"]) + assert_matches_type(MagicVisibilityPCAPsOwnership, ownership, path=["response"]) @pytest.mark.skip() @parametrize @@ -54,7 +53,7 @@ class TestOwnerships: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ownership = response.parse() - assert_matches_type(OwnershipCreateResponse, ownership, path=["response"]) + assert_matches_type(MagicVisibilityPCAPsOwnership, ownership, path=["response"]) assert cast(Any, response.is_closed) is True @@ -169,7 +168,7 @@ class TestOwnerships: destination_conf="s3://pcaps-bucket?region=us-east-1", ownership_challenge="ownership-challenge-9883874ecac311ec8475433579a6bf5f.txt", ) - assert_matches_type(OwnershipValidateResponse, ownership, path=["response"]) + assert_matches_type(MagicVisibilityPCAPsOwnership, ownership, path=["response"]) @pytest.mark.skip() @parametrize @@ -183,7 +182,7 @@ class TestOwnerships: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ownership = response.parse() - assert_matches_type(OwnershipValidateResponse, ownership, path=["response"]) + assert_matches_type(MagicVisibilityPCAPsOwnership, ownership, path=["response"]) @pytest.mark.skip() @parametrize @@ -197,7 +196,7 @@ class TestOwnerships: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ownership = response.parse() - assert_matches_type(OwnershipValidateResponse, ownership, path=["response"]) + assert_matches_type(MagicVisibilityPCAPsOwnership, ownership, path=["response"]) assert cast(Any, response.is_closed) is True @@ -222,7 +221,7 @@ class TestAsyncOwnerships: account_id="023e105f4ecef8ad9ca31a8372d0c353", destination_conf="s3://pcaps-bucket?region=us-east-1", ) - assert_matches_type(OwnershipCreateResponse, ownership, path=["response"]) + assert_matches_type(MagicVisibilityPCAPsOwnership, ownership, path=["response"]) @pytest.mark.skip() @parametrize @@ -235,7 +234,7 @@ class TestAsyncOwnerships: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ownership = await response.parse() - assert_matches_type(OwnershipCreateResponse, ownership, path=["response"]) + assert_matches_type(MagicVisibilityPCAPsOwnership, ownership, path=["response"]) @pytest.mark.skip() @parametrize @@ -248,7 +247,7 @@ class TestAsyncOwnerships: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ownership = await response.parse() - assert_matches_type(OwnershipCreateResponse, ownership, path=["response"]) + assert_matches_type(MagicVisibilityPCAPsOwnership, ownership, path=["response"]) assert cast(Any, response.is_closed) is True @@ -363,7 +362,7 @@ class TestAsyncOwnerships: destination_conf="s3://pcaps-bucket?region=us-east-1", ownership_challenge="ownership-challenge-9883874ecac311ec8475433579a6bf5f.txt", ) - assert_matches_type(OwnershipValidateResponse, ownership, path=["response"]) + assert_matches_type(MagicVisibilityPCAPsOwnership, ownership, path=["response"]) @pytest.mark.skip() @parametrize @@ -377,7 +376,7 @@ class TestAsyncOwnerships: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ownership = await response.parse() - assert_matches_type(OwnershipValidateResponse, ownership, path=["response"]) + assert_matches_type(MagicVisibilityPCAPsOwnership, ownership, path=["response"]) @pytest.mark.skip() @parametrize @@ -391,7 +390,7 @@ class TestAsyncOwnerships: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ownership = await response.parse() - assert_matches_type(OwnershipValidateResponse, ownership, path=["response"]) + assert_matches_type(MagicVisibilityPCAPsOwnership, ownership, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/queues/test_consumers.py b/tests/api_resources/queues/test_consumers.py index 719fe9a27..05b8cc42e 100644 --- a/tests/api_resources/queues/test_consumers.py +++ b/tests/api_resources/queues/test_consumers.py @@ -11,9 +11,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.queues import ( ConsumerGetResponse, - ConsumerCreateResponse, ConsumerDeleteResponse, - ConsumerUpdateResponse, + WorkersConsumerCreated, + WorkersConsumerUpdated, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -39,7 +39,7 @@ class TestConsumers: }, }, ) - assert_matches_type(Optional[ConsumerCreateResponse], consumer, path=["response"]) + assert_matches_type(Optional[WorkersConsumerCreated], consumer, path=["response"]) @pytest.mark.skip() @parametrize @@ -62,7 +62,7 @@ class TestConsumers: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" consumer = response.parse() - assert_matches_type(Optional[ConsumerCreateResponse], consumer, path=["response"]) + assert_matches_type(Optional[WorkersConsumerCreated], consumer, path=["response"]) @pytest.mark.skip() @parametrize @@ -85,7 +85,7 @@ class TestConsumers: assert response.http_request.headers.get("X-Stainless-Lang") == "python" consumer = response.parse() - assert_matches_type(Optional[ConsumerCreateResponse], consumer, path=["response"]) + assert_matches_type(Optional[WorkersConsumerCreated], consumer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -138,7 +138,7 @@ class TestConsumers: "settings": {"batch_size": 100}, }, ) - assert_matches_type(Optional[ConsumerUpdateResponse], consumer, path=["response"]) + assert_matches_type(Optional[WorkersConsumerUpdated], consumer, path=["response"]) @pytest.mark.skip() @parametrize @@ -158,7 +158,7 @@ class TestConsumers: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" consumer = response.parse() - assert_matches_type(Optional[ConsumerUpdateResponse], consumer, path=["response"]) + assert_matches_type(Optional[WorkersConsumerUpdated], consumer, path=["response"]) @pytest.mark.skip() @parametrize @@ -178,7 +178,7 @@ class TestConsumers: assert response.http_request.headers.get("X-Stainless-Lang") == "python" consumer = response.parse() - assert_matches_type(Optional[ConsumerUpdateResponse], consumer, path=["response"]) + assert_matches_type(Optional[WorkersConsumerUpdated], consumer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -361,7 +361,7 @@ class TestAsyncConsumers: }, }, ) - assert_matches_type(Optional[ConsumerCreateResponse], consumer, path=["response"]) + assert_matches_type(Optional[WorkersConsumerCreated], consumer, path=["response"]) @pytest.mark.skip() @parametrize @@ -384,7 +384,7 @@ class TestAsyncConsumers: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" consumer = await response.parse() - assert_matches_type(Optional[ConsumerCreateResponse], consumer, path=["response"]) + assert_matches_type(Optional[WorkersConsumerCreated], consumer, path=["response"]) @pytest.mark.skip() @parametrize @@ -407,7 +407,7 @@ class TestAsyncConsumers: assert response.http_request.headers.get("X-Stainless-Lang") == "python" consumer = await response.parse() - assert_matches_type(Optional[ConsumerCreateResponse], consumer, path=["response"]) + assert_matches_type(Optional[WorkersConsumerCreated], consumer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -460,7 +460,7 @@ class TestAsyncConsumers: "settings": {"batch_size": 100}, }, ) - assert_matches_type(Optional[ConsumerUpdateResponse], consumer, path=["response"]) + assert_matches_type(Optional[WorkersConsumerUpdated], consumer, path=["response"]) @pytest.mark.skip() @parametrize @@ -480,7 +480,7 @@ class TestAsyncConsumers: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" consumer = await response.parse() - assert_matches_type(Optional[ConsumerUpdateResponse], consumer, path=["response"]) + assert_matches_type(Optional[WorkersConsumerUpdated], consumer, path=["response"]) @pytest.mark.skip() @parametrize @@ -500,7 +500,7 @@ class TestAsyncConsumers: assert response.http_request.headers.get("X-Stainless-Lang") == "python" consumer = await response.parse() - assert_matches_type(Optional[ConsumerUpdateResponse], consumer, path=["response"]) + assert_matches_type(Optional[WorkersConsumerUpdated], consumer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/r2/test_buckets.py b/tests/api_resources/r2/test_buckets.py index 263241147..2952f2618 100644 --- a/tests/api_resources/r2/test_buckets.py +++ b/tests/api_resources/r2/test_buckets.py @@ -9,11 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.r2 import ( - BucketGetResponse, - BucketListResponse, - BucketCreateResponse, -) +from cloudflare.types.r2 import R2Bucket, BucketListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -28,7 +24,7 @@ class TestBuckets: account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-bucket", ) - assert_matches_type(BucketCreateResponse, bucket, path=["response"]) + assert_matches_type(R2Bucket, bucket, path=["response"]) @pytest.mark.skip() @parametrize @@ -38,7 +34,7 @@ class TestBuckets: name="example-bucket", location_hint="apac", ) - assert_matches_type(BucketCreateResponse, bucket, path=["response"]) + assert_matches_type(R2Bucket, bucket, path=["response"]) @pytest.mark.skip() @parametrize @@ -51,7 +47,7 @@ class TestBuckets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bucket = response.parse() - assert_matches_type(BucketCreateResponse, bucket, path=["response"]) + assert_matches_type(R2Bucket, bucket, path=["response"]) @pytest.mark.skip() @parametrize @@ -64,7 +60,7 @@ class TestBuckets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bucket = response.parse() - assert_matches_type(BucketCreateResponse, bucket, path=["response"]) + assert_matches_type(R2Bucket, bucket, path=["response"]) assert cast(Any, response.is_closed) is True @@ -192,7 +188,7 @@ class TestBuckets: "example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BucketGetResponse, bucket, path=["response"]) + assert_matches_type(R2Bucket, bucket, path=["response"]) @pytest.mark.skip() @parametrize @@ -205,7 +201,7 @@ class TestBuckets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bucket = response.parse() - assert_matches_type(BucketGetResponse, bucket, path=["response"]) + assert_matches_type(R2Bucket, bucket, path=["response"]) @pytest.mark.skip() @parametrize @@ -218,7 +214,7 @@ class TestBuckets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bucket = response.parse() - assert_matches_type(BucketGetResponse, bucket, path=["response"]) + assert_matches_type(R2Bucket, bucket, path=["response"]) assert cast(Any, response.is_closed) is True @@ -248,7 +244,7 @@ class TestAsyncBuckets: account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-bucket", ) - assert_matches_type(BucketCreateResponse, bucket, path=["response"]) + assert_matches_type(R2Bucket, bucket, path=["response"]) @pytest.mark.skip() @parametrize @@ -258,7 +254,7 @@ class TestAsyncBuckets: name="example-bucket", location_hint="apac", ) - assert_matches_type(BucketCreateResponse, bucket, path=["response"]) + assert_matches_type(R2Bucket, bucket, path=["response"]) @pytest.mark.skip() @parametrize @@ -271,7 +267,7 @@ class TestAsyncBuckets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bucket = await response.parse() - assert_matches_type(BucketCreateResponse, bucket, path=["response"]) + assert_matches_type(R2Bucket, bucket, path=["response"]) @pytest.mark.skip() @parametrize @@ -284,7 +280,7 @@ class TestAsyncBuckets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bucket = await response.parse() - assert_matches_type(BucketCreateResponse, bucket, path=["response"]) + assert_matches_type(R2Bucket, bucket, path=["response"]) assert cast(Any, response.is_closed) is True @@ -412,7 +408,7 @@ class TestAsyncBuckets: "example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BucketGetResponse, bucket, path=["response"]) + assert_matches_type(R2Bucket, bucket, path=["response"]) @pytest.mark.skip() @parametrize @@ -425,7 +421,7 @@ class TestAsyncBuckets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bucket = await response.parse() - assert_matches_type(BucketGetResponse, bucket, path=["response"]) + assert_matches_type(R2Bucket, bucket, path=["response"]) @pytest.mark.skip() @parametrize @@ -438,7 +434,7 @@ class TestAsyncBuckets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bucket = await response.parse() - assert_matches_type(BucketGetResponse, bucket, path=["response"]) + assert_matches_type(R2Bucket, bucket, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/r2/test_sippy.py b/tests/api_resources/r2/test_sippy.py index 9d14339b7..70711753a 100644 --- a/tests/api_resources/r2/test_sippy.py +++ b/tests/api_resources/r2/test_sippy.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.r2 import SippyGetResponse, SippyDeleteResponse, SippyUpdateResponse +from cloudflare.types.r2 import R2Sippy, SippyDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestSippy: "example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SippyUpdateResponse, sippy, path=["response"]) + assert_matches_type(R2Sippy, sippy, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ class TestSippy: "private_key": "string", }, ) - assert_matches_type(SippyUpdateResponse, sippy, path=["response"]) + assert_matches_type(R2Sippy, sippy, path=["response"]) @pytest.mark.skip() @parametrize @@ -60,7 +60,7 @@ class TestSippy: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" sippy = response.parse() - assert_matches_type(SippyUpdateResponse, sippy, path=["response"]) + assert_matches_type(R2Sippy, sippy, path=["response"]) @pytest.mark.skip() @parametrize @@ -73,7 +73,7 @@ class TestSippy: assert response.http_request.headers.get("X-Stainless-Lang") == "python" sippy = response.parse() - assert_matches_type(SippyUpdateResponse, sippy, path=["response"]) + assert_matches_type(R2Sippy, sippy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -151,7 +151,7 @@ class TestSippy: "example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SippyGetResponse, sippy, path=["response"]) + assert_matches_type(R2Sippy, sippy, path=["response"]) @pytest.mark.skip() @parametrize @@ -164,7 +164,7 @@ class TestSippy: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" sippy = response.parse() - assert_matches_type(SippyGetResponse, sippy, path=["response"]) + assert_matches_type(R2Sippy, sippy, path=["response"]) @pytest.mark.skip() @parametrize @@ -177,7 +177,7 @@ class TestSippy: assert response.http_request.headers.get("X-Stainless-Lang") == "python" sippy = response.parse() - assert_matches_type(SippyGetResponse, sippy, path=["response"]) + assert_matches_type(R2Sippy, sippy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -207,7 +207,7 @@ class TestAsyncSippy: "example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SippyUpdateResponse, sippy, path=["response"]) + assert_matches_type(R2Sippy, sippy, path=["response"]) @pytest.mark.skip() @parametrize @@ -230,7 +230,7 @@ class TestAsyncSippy: "private_key": "string", }, ) - assert_matches_type(SippyUpdateResponse, sippy, path=["response"]) + assert_matches_type(R2Sippy, sippy, path=["response"]) @pytest.mark.skip() @parametrize @@ -243,7 +243,7 @@ class TestAsyncSippy: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" sippy = await response.parse() - assert_matches_type(SippyUpdateResponse, sippy, path=["response"]) + assert_matches_type(R2Sippy, sippy, path=["response"]) @pytest.mark.skip() @parametrize @@ -256,7 +256,7 @@ class TestAsyncSippy: assert response.http_request.headers.get("X-Stainless-Lang") == "python" sippy = await response.parse() - assert_matches_type(SippyUpdateResponse, sippy, path=["response"]) + assert_matches_type(R2Sippy, sippy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -334,7 +334,7 @@ class TestAsyncSippy: "example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SippyGetResponse, sippy, path=["response"]) + assert_matches_type(R2Sippy, sippy, path=["response"]) @pytest.mark.skip() @parametrize @@ -347,7 +347,7 @@ class TestAsyncSippy: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" sippy = await response.parse() - assert_matches_type(SippyGetResponse, sippy, path=["response"]) + assert_matches_type(R2Sippy, sippy, path=["response"]) @pytest.mark.skip() @parametrize @@ -360,7 +360,7 @@ class TestAsyncSippy: assert response.http_request.headers.get("X-Stainless-Lang") == "python" sippy = await response.parse() - assert_matches_type(SippyGetResponse, sippy, path=["response"]) + assert_matches_type(R2Sippy, sippy, 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 900e8061d..ab6130a34 100644 --- a/tests/api_resources/rules/test_lists.py +++ b/tests/api_resources/rules/test_lists.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.rules import ( - ListGetResponse, + ListsList, ListListResponse, - ListCreateResponse, ListDeleteResponse, - ListUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -31,7 +29,7 @@ class TestLists: kind="ip", name="list1", ) - assert_matches_type(Optional[ListCreateResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +40,7 @@ class TestLists: name="list1", description="This is a note", ) - assert_matches_type(Optional[ListCreateResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +54,7 @@ class TestLists: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = response.parse() - assert_matches_type(Optional[ListCreateResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -70,7 +68,7 @@ class TestLists: assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = response.parse() - assert_matches_type(Optional[ListCreateResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -91,7 +89,7 @@ class TestLists: "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ListUpdateResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -101,7 +99,7 @@ class TestLists: account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is a note", ) - assert_matches_type(Optional[ListUpdateResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -114,7 +112,7 @@ class TestLists: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = response.parse() - assert_matches_type(Optional[ListUpdateResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -127,7 +125,7 @@ class TestLists: assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = response.parse() - assert_matches_type(Optional[ListUpdateResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -247,7 +245,7 @@ class TestLists: "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ListGetResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -260,7 +258,7 @@ class TestLists: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = response.parse() - assert_matches_type(Optional[ListGetResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -273,7 +271,7 @@ class TestLists: assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = response.parse() - assert_matches_type(Optional[ListGetResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -304,7 +302,7 @@ class TestAsyncLists: kind="ip", name="list1", ) - assert_matches_type(Optional[ListCreateResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -315,7 +313,7 @@ class TestAsyncLists: name="list1", description="This is a note", ) - assert_matches_type(Optional[ListCreateResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -329,7 +327,7 @@ class TestAsyncLists: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = await response.parse() - assert_matches_type(Optional[ListCreateResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -343,7 +341,7 @@ class TestAsyncLists: assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = await response.parse() - assert_matches_type(Optional[ListCreateResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -364,7 +362,7 @@ class TestAsyncLists: "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ListUpdateResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -374,7 +372,7 @@ class TestAsyncLists: account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is a note", ) - assert_matches_type(Optional[ListUpdateResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -387,7 +385,7 @@ class TestAsyncLists: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = await response.parse() - assert_matches_type(Optional[ListUpdateResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -400,7 +398,7 @@ class TestAsyncLists: assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = await response.parse() - assert_matches_type(Optional[ListUpdateResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -520,7 +518,7 @@ class TestAsyncLists: "2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ListGetResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -533,7 +531,7 @@ class TestAsyncLists: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = await response.parse() - assert_matches_type(Optional[ListGetResponse], list, path=["response"]) + assert_matches_type(Optional[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -546,7 +544,7 @@ class TestAsyncLists: assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = await response.parse() - assert_matches_type(Optional[ListGetResponse], list, path=["response"]) + assert_matches_type(Optional[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 110613646..150bb8eb0 100644 --- a/tests/api_resources/rulesets/phases/test_versions.py +++ b/tests/api_resources/rulesets/phases/test_versions.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.rulesets.phases import VersionGetResponse, VersionListResponse +from cloudflare.types import RulesetsRulesetResponse, RulesetsRulesetsResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ class TestVersions: account_id="string", zone_id="string", ) - assert_matches_type(VersionListResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,7 @@ class TestVersions: account_id="string", zone_id="string", ) - assert_matches_type(VersionListResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -49,7 +49,7 @@ class TestVersions: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = response.parse() - assert_matches_type(VersionListResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -63,7 +63,7 @@ class TestVersions: assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = response.parse() - assert_matches_type(VersionListResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) assert cast(Any, response.is_closed) is True @@ -93,7 +93,7 @@ class TestVersions: account_id="string", zone_id="string", ) - assert_matches_type(VersionGetResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -104,7 +104,7 @@ class TestVersions: account_id="string", zone_id="string", ) - assert_matches_type(VersionGetResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -119,7 +119,7 @@ class TestVersions: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = response.parse() - assert_matches_type(VersionGetResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -134,7 +134,7 @@ class TestVersions: assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = response.parse() - assert_matches_type(VersionGetResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) assert cast(Any, response.is_closed) is True @@ -177,7 +177,7 @@ class TestAsyncVersions: account_id="string", zone_id="string", ) - assert_matches_type(VersionListResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +187,7 @@ class TestAsyncVersions: account_id="string", zone_id="string", ) - assert_matches_type(VersionListResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -201,7 +201,7 @@ class TestAsyncVersions: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = await response.parse() - assert_matches_type(VersionListResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -215,7 +215,7 @@ class TestAsyncVersions: assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = await response.parse() - assert_matches_type(VersionListResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) assert cast(Any, response.is_closed) is True @@ -245,7 +245,7 @@ class TestAsyncVersions: account_id="string", zone_id="string", ) - assert_matches_type(VersionGetResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -256,7 +256,7 @@ class TestAsyncVersions: account_id="string", zone_id="string", ) - assert_matches_type(VersionGetResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -271,7 +271,7 @@ class TestAsyncVersions: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = await response.parse() - assert_matches_type(VersionGetResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -286,7 +286,7 @@ class TestAsyncVersions: assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = await response.parse() - assert_matches_type(VersionGetResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, 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 0a213c446..33d372eff 100644 --- a/tests/api_resources/rulesets/test_phases.py +++ b/tests/api_resources/rulesets/test_phases.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.rulesets import PhaseGetResponse, PhaseUpdateResponse +from cloudflare.types import RulesetsRulesetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +27,7 @@ class TestPhases: account_id="string", zone_id="string", ) - assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -92,7 +92,7 @@ class TestPhases: name="My ruleset", phase="http_request_firewall_custom", ) - assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -108,7 +108,7 @@ class TestPhases: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" phase = response.parse() - assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -124,7 +124,7 @@ class TestPhases: assert response.http_request.headers.get("X-Stainless-Lang") == "python" phase = response.parse() - assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) assert cast(Any, response.is_closed) is True @@ -157,7 +157,7 @@ class TestPhases: account_id="string", zone_id="string", ) - assert_matches_type(PhaseGetResponse, phase, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -167,7 +167,7 @@ class TestPhases: account_id="string", zone_id="string", ) - assert_matches_type(PhaseGetResponse, phase, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -181,7 +181,7 @@ class TestPhases: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" phase = response.parse() - assert_matches_type(PhaseGetResponse, phase, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -195,7 +195,7 @@ class TestPhases: assert response.http_request.headers.get("X-Stainless-Lang") == "python" phase = response.parse() - assert_matches_type(PhaseGetResponse, phase, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) assert cast(Any, response.is_closed) is True @@ -230,7 +230,7 @@ class TestAsyncPhases: account_id="string", zone_id="string", ) - assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -295,7 +295,7 @@ class TestAsyncPhases: name="My ruleset", phase="http_request_firewall_custom", ) - assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -311,7 +311,7 @@ class TestAsyncPhases: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" phase = await response.parse() - assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -327,7 +327,7 @@ class TestAsyncPhases: assert response.http_request.headers.get("X-Stainless-Lang") == "python" phase = await response.parse() - assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) assert cast(Any, response.is_closed) is True @@ -360,7 +360,7 @@ class TestAsyncPhases: account_id="string", zone_id="string", ) - assert_matches_type(PhaseGetResponse, phase, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -370,7 +370,7 @@ class TestAsyncPhases: account_id="string", zone_id="string", ) - assert_matches_type(PhaseGetResponse, phase, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -384,7 +384,7 @@ class TestAsyncPhases: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" phase = await response.parse() - assert_matches_type(PhaseGetResponse, phase, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -398,7 +398,7 @@ class TestAsyncPhases: assert response.http_request.headers.get("X-Stainless-Lang") == "python" phase = await response.parse() - assert_matches_type(PhaseGetResponse, phase, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, 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 e9c82296d..c6267be94 100644 --- a/tests/api_resources/rulesets/test_rules.py +++ b/tests/api_resources/rulesets/test_rules.py @@ -9,11 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.rulesets import ( - RuleEditResponse, - RuleCreateResponse, - RuleDeleteResponse, -) +from cloudflare.types import RulesetsRulesetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -29,7 +25,7 @@ class TestRules: account_id="string", zone_id="string", ) - assert_matches_type(RuleCreateResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +36,7 @@ class TestRules: zone_id="string", position={"before": "da5e8e506c8e7877fe06cdf4c41add54"}, ) - assert_matches_type(RuleCreateResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -54,7 +50,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleCreateResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -68,7 +64,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleCreateResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -105,7 +101,7 @@ class TestRules: account_id="string", zone_id="string", ) - assert_matches_type(RuleDeleteResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -116,7 +112,7 @@ class TestRules: account_id="string", zone_id="string", ) - assert_matches_type(RuleDeleteResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -131,7 +127,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleDeleteResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -146,7 +142,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleDeleteResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -194,7 +190,7 @@ class TestRules: account_id="string", zone_id="string", ) - assert_matches_type(RuleEditResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -206,7 +202,7 @@ class TestRules: zone_id="string", position={"before": "da5e8e506c8e7877fe06cdf4c41add54"}, ) - assert_matches_type(RuleEditResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -221,7 +217,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleEditResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -236,7 +232,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleEditResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -287,7 +283,7 @@ class TestAsyncRules: account_id="string", zone_id="string", ) - assert_matches_type(RuleCreateResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -298,7 +294,7 @@ class TestAsyncRules: zone_id="string", position={"before": "da5e8e506c8e7877fe06cdf4c41add54"}, ) - assert_matches_type(RuleCreateResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -312,7 +308,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleCreateResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -326,7 +322,7 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleCreateResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -363,7 +359,7 @@ class TestAsyncRules: account_id="string", zone_id="string", ) - assert_matches_type(RuleDeleteResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -374,7 +370,7 @@ class TestAsyncRules: account_id="string", zone_id="string", ) - assert_matches_type(RuleDeleteResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -389,7 +385,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleDeleteResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -404,7 +400,7 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleDeleteResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -452,7 +448,7 @@ class TestAsyncRules: account_id="string", zone_id="string", ) - assert_matches_type(RuleEditResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -464,7 +460,7 @@ class TestAsyncRules: zone_id="string", position={"before": "da5e8e506c8e7877fe06cdf4c41add54"}, ) - assert_matches_type(RuleEditResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -479,7 +475,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleEditResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -494,7 +490,7 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleEditResponse, rule, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, 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 c925cb1ed..1313e4152 100644 --- a/tests/api_resources/rulesets/test_versions.py +++ b/tests/api_resources/rulesets/test_versions.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.rulesets import VersionGetResponse, VersionListResponse +from cloudflare.types import RulesetsRulesetResponse, RulesetsRulesetsResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ class TestVersions: account_id="string", zone_id="string", ) - assert_matches_type(VersionListResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,7 @@ class TestVersions: account_id="string", zone_id="string", ) - assert_matches_type(VersionListResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -49,7 +49,7 @@ class TestVersions: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = response.parse() - assert_matches_type(VersionListResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -63,7 +63,7 @@ class TestVersions: assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = response.parse() - assert_matches_type(VersionListResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) assert cast(Any, response.is_closed) is True @@ -189,7 +189,7 @@ class TestVersions: account_id="string", zone_id="string", ) - assert_matches_type(VersionGetResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -200,7 +200,7 @@ class TestVersions: account_id="string", zone_id="string", ) - assert_matches_type(VersionGetResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -215,7 +215,7 @@ class TestVersions: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = response.parse() - assert_matches_type(VersionGetResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -230,7 +230,7 @@ class TestVersions: assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = response.parse() - assert_matches_type(VersionGetResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) assert cast(Any, response.is_closed) is True @@ -281,7 +281,7 @@ class TestAsyncVersions: account_id="string", zone_id="string", ) - assert_matches_type(VersionListResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -291,7 +291,7 @@ class TestAsyncVersions: account_id="string", zone_id="string", ) - assert_matches_type(VersionListResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -305,7 +305,7 @@ class TestAsyncVersions: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = await response.parse() - assert_matches_type(VersionListResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -319,7 +319,7 @@ class TestAsyncVersions: assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = await response.parse() - assert_matches_type(VersionListResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) assert cast(Any, response.is_closed) is True @@ -445,7 +445,7 @@ class TestAsyncVersions: account_id="string", zone_id="string", ) - assert_matches_type(VersionGetResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -456,7 +456,7 @@ class TestAsyncVersions: account_id="string", zone_id="string", ) - assert_matches_type(VersionGetResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -471,7 +471,7 @@ class TestAsyncVersions: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = await response.parse() - assert_matches_type(VersionGetResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -486,7 +486,7 @@ class TestAsyncVersions: assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = await response.parse() - assert_matches_type(VersionGetResponse, version, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/rulesets/versions/test_by_tags.py b/tests/api_resources/rulesets/versions/test_by_tags.py index f1f90afcc..ca1a83485 100644 --- a/tests/api_resources/rulesets/versions/test_by_tags.py +++ b/tests/api_resources/rulesets/versions/test_by_tags.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.rulesets.versions import ByTagGetResponse +from cloudflare.types import RulesetsRulesetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -26,7 +26,7 @@ class TestByTags: ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", ) - assert_matches_type(ByTagGetResponse, by_tag, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, by_tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +41,7 @@ class TestByTags: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" by_tag = response.parse() - assert_matches_type(ByTagGetResponse, by_tag, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, by_tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +56,7 @@ class TestByTags: assert response.http_request.headers.get("X-Stainless-Lang") == "python" by_tag = response.parse() - assert_matches_type(ByTagGetResponse, by_tag, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, by_tag, path=["response"]) assert cast(Any, response.is_closed) is True @@ -108,7 +108,7 @@ class TestAsyncByTags: ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", ) - assert_matches_type(ByTagGetResponse, by_tag, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, by_tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -123,7 +123,7 @@ class TestAsyncByTags: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" by_tag = await response.parse() - assert_matches_type(ByTagGetResponse, by_tag, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, by_tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -138,7 +138,7 @@ class TestAsyncByTags: assert response.http_request.headers.get("X-Stainless-Lang") == "python" by_tag = await response.parse() - assert_matches_type(ByTagGetResponse, by_tag, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, by_tag, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/rum/test_rules.py b/tests/api_resources/rum/test_rules.py index 6c2378c48..74cd41c8f 100644 --- a/tests/api_resources/rum/test_rules.py +++ b/tests/api_resources/rum/test_rules.py @@ -9,12 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.rum import ( - RuleListResponse, - RuleCreateResponse, - RuleDeleteResponse, - RuleUpdateResponse, -) +from cloudflare.types.rum import RUMRule, RuleListResponse, RuleDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -29,7 +24,7 @@ class TestRules: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) + assert_matches_type(Optional[RUMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +37,7 @@ class TestRules: is_paused=False, paths=["*"], ) - assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) + assert_matches_type(Optional[RUMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +50,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) + assert_matches_type(Optional[RUMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -68,7 +63,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) + assert_matches_type(Optional[RUMRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -95,7 +90,7 @@ class TestRules: account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[RUMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -109,7 +104,7 @@ class TestRules: is_paused=False, paths=["*"], ) - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[RUMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -123,7 +118,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[RUMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -137,7 +132,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[RUMRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -292,7 +287,7 @@ class TestAsyncRules: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) + assert_matches_type(Optional[RUMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -305,7 +300,7 @@ class TestAsyncRules: is_paused=False, paths=["*"], ) - assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) + assert_matches_type(Optional[RUMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -318,7 +313,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) + assert_matches_type(Optional[RUMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -331,7 +326,7 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleCreateResponse], rule, path=["response"]) + assert_matches_type(Optional[RUMRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -358,7 +353,7 @@ class TestAsyncRules: account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[RUMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -372,7 +367,7 @@ class TestAsyncRules: is_paused=False, paths=["*"], ) - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[RUMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -386,7 +381,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[RUMRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -400,7 +395,7 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleUpdateResponse], rule, path=["response"]) + assert_matches_type(Optional[RUMRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/rum/test_site_infos.py b/tests/api_resources/rum/test_site_infos.py index 07a9264bc..17cbbdf3d 100644 --- a/tests/api_resources/rum/test_site_infos.py +++ b/tests/api_resources/rum/test_site_infos.py @@ -10,11 +10,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.rum import ( - SiteInfoGetResponse, - SiteInfoListResponse, - SiteInfoCreateResponse, + RUMSite, SiteInfoDeleteResponse, - SiteInfoUpdateResponse, ) from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray @@ -30,7 +27,7 @@ class TestSiteInfos: site_info = client.rum.site_infos.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SiteInfoCreateResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +38,7 @@ class TestSiteInfos: host="example.com", zone_tag="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SiteInfoCreateResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +50,7 @@ class TestSiteInfos: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" site_info = response.parse() - assert_matches_type(Optional[SiteInfoCreateResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -65,7 +62,7 @@ class TestSiteInfos: assert response.http_request.headers.get("X-Stainless-Lang") == "python" site_info = response.parse() - assert_matches_type(Optional[SiteInfoCreateResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) assert cast(Any, response.is_closed) is True @@ -84,7 +81,7 @@ class TestSiteInfos: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SiteInfoUpdateResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestSiteInfos: host="example.com", zone_tag="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SiteInfoUpdateResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -109,7 +106,7 @@ class TestSiteInfos: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" site_info = response.parse() - assert_matches_type(Optional[SiteInfoUpdateResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -122,7 +119,7 @@ class TestSiteInfos: assert response.http_request.headers.get("X-Stainless-Lang") == "python" site_info = response.parse() - assert_matches_type(Optional[SiteInfoUpdateResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) assert cast(Any, response.is_closed) is True @@ -147,7 +144,7 @@ class TestSiteInfos: site_info = client.rum.site_infos.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[SiteInfoListResponse], site_info, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -158,7 +155,7 @@ class TestSiteInfos: page=1, per_page=10, ) - assert_matches_type(SyncV4PagePaginationArray[SiteInfoListResponse], site_info, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -170,7 +167,7 @@ class TestSiteInfos: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" site_info = response.parse() - assert_matches_type(SyncV4PagePaginationArray[SiteInfoListResponse], site_info, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -182,7 +179,7 @@ class TestSiteInfos: assert response.http_request.headers.get("X-Stainless-Lang") == "python" site_info = response.parse() - assert_matches_type(SyncV4PagePaginationArray[SiteInfoListResponse], site_info, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[RUMSite], site_info, path=["response"]) assert cast(Any, response.is_closed) is True @@ -253,7 +250,7 @@ class TestSiteInfos: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SiteInfoGetResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -266,7 +263,7 @@ class TestSiteInfos: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" site_info = response.parse() - assert_matches_type(Optional[SiteInfoGetResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -279,7 +276,7 @@ class TestSiteInfos: assert response.http_request.headers.get("X-Stainless-Lang") == "python" site_info = response.parse() - assert_matches_type(Optional[SiteInfoGetResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) assert cast(Any, response.is_closed) is True @@ -308,7 +305,7 @@ class TestAsyncSiteInfos: site_info = await async_client.rum.site_infos.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SiteInfoCreateResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -319,7 +316,7 @@ class TestAsyncSiteInfos: host="example.com", zone_tag="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SiteInfoCreateResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -331,7 +328,7 @@ class TestAsyncSiteInfos: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" site_info = await response.parse() - assert_matches_type(Optional[SiteInfoCreateResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -343,7 +340,7 @@ class TestAsyncSiteInfos: assert response.http_request.headers.get("X-Stainless-Lang") == "python" site_info = await response.parse() - assert_matches_type(Optional[SiteInfoCreateResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) assert cast(Any, response.is_closed) is True @@ -362,7 +359,7 @@ class TestAsyncSiteInfos: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SiteInfoUpdateResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -374,7 +371,7 @@ class TestAsyncSiteInfos: host="example.com", zone_tag="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SiteInfoUpdateResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -387,7 +384,7 @@ class TestAsyncSiteInfos: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" site_info = await response.parse() - assert_matches_type(Optional[SiteInfoUpdateResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -400,7 +397,7 @@ class TestAsyncSiteInfos: assert response.http_request.headers.get("X-Stainless-Lang") == "python" site_info = await response.parse() - assert_matches_type(Optional[SiteInfoUpdateResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) assert cast(Any, response.is_closed) is True @@ -425,7 +422,7 @@ class TestAsyncSiteInfos: site_info = await async_client.rum.site_infos.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[SiteInfoListResponse], site_info, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -436,7 +433,7 @@ class TestAsyncSiteInfos: page=1, per_page=10, ) - assert_matches_type(AsyncV4PagePaginationArray[SiteInfoListResponse], site_info, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -448,7 +445,7 @@ class TestAsyncSiteInfos: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" site_info = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[SiteInfoListResponse], site_info, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -460,7 +457,7 @@ class TestAsyncSiteInfos: assert response.http_request.headers.get("X-Stainless-Lang") == "python" site_info = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[SiteInfoListResponse], site_info, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[RUMSite], site_info, path=["response"]) assert cast(Any, response.is_closed) is True @@ -531,7 +528,7 @@ class TestAsyncSiteInfos: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SiteInfoGetResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -544,7 +541,7 @@ class TestAsyncSiteInfos: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" site_info = await response.parse() - assert_matches_type(Optional[SiteInfoGetResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, path=["response"]) @pytest.mark.skip() @parametrize @@ -557,7 +554,7 @@ class TestAsyncSiteInfos: assert response.http_request.headers.get("X-Stainless-Lang") == "python" site_info = await response.parse() - assert_matches_type(Optional[SiteInfoGetResponse], site_info, path=["response"]) + assert_matches_type(Optional[RUMSite], site_info, 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 12ba92be1..d6960440d 100644 --- a/tests/api_resources/secondary_dns/test_acls.py +++ b/tests/api_resources/secondary_dns/test_acls.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.secondary_dns import ( - ACLGetResponse, ACLListResponse, - ACLCreateResponse, + SecondaryDNSACL, ACLDeleteResponse, - ACLUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +28,7 @@ class TestACLs: account_id="01a7362d577a6c3019a474fd6f485823", body={}, ) - assert_matches_type(ACLCreateResponse, acl, path=["response"]) + assert_matches_type(SecondaryDNSACL, acl, path=["response"]) @pytest.mark.skip() @parametrize @@ -43,7 +41,7 @@ class TestACLs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" acl = response.parse() - assert_matches_type(ACLCreateResponse, acl, path=["response"]) + assert_matches_type(SecondaryDNSACL, acl, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +54,7 @@ class TestACLs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" acl = response.parse() - assert_matches_type(ACLCreateResponse, acl, path=["response"]) + assert_matches_type(SecondaryDNSACL, acl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +67,7 @@ class TestACLs: ip_range="192.0.2.53/28", name="my-acl-1", ) - assert_matches_type(ACLUpdateResponse, acl, path=["response"]) + assert_matches_type(SecondaryDNSACL, acl, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +82,7 @@ class TestACLs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" acl = response.parse() - assert_matches_type(ACLUpdateResponse, acl, path=["response"]) + assert_matches_type(SecondaryDNSACL, acl, path=["response"]) @pytest.mark.skip() @parametrize @@ -99,7 +97,7 @@ class TestACLs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" acl = response.parse() - assert_matches_type(ACLUpdateResponse, acl, path=["response"]) + assert_matches_type(SecondaryDNSACL, acl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -181,7 +179,7 @@ class TestACLs: "23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) - assert_matches_type(ACLGetResponse, acl, path=["response"]) + assert_matches_type(SecondaryDNSACL, acl, path=["response"]) @pytest.mark.skip() @parametrize @@ -194,7 +192,7 @@ class TestACLs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" acl = response.parse() - assert_matches_type(ACLGetResponse, acl, path=["response"]) + assert_matches_type(SecondaryDNSACL, acl, path=["response"]) @pytest.mark.skip() @parametrize @@ -207,7 +205,7 @@ class TestACLs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" acl = response.parse() - assert_matches_type(ACLGetResponse, acl, path=["response"]) + assert_matches_type(SecondaryDNSACL, acl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -222,7 +220,7 @@ class TestAsyncACLs: account_id="01a7362d577a6c3019a474fd6f485823", body={}, ) - assert_matches_type(ACLCreateResponse, acl, path=["response"]) + assert_matches_type(SecondaryDNSACL, acl, path=["response"]) @pytest.mark.skip() @parametrize @@ -235,7 +233,7 @@ class TestAsyncACLs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" acl = await response.parse() - assert_matches_type(ACLCreateResponse, acl, path=["response"]) + assert_matches_type(SecondaryDNSACL, acl, path=["response"]) @pytest.mark.skip() @parametrize @@ -248,7 +246,7 @@ class TestAsyncACLs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" acl = await response.parse() - assert_matches_type(ACLCreateResponse, acl, path=["response"]) + assert_matches_type(SecondaryDNSACL, acl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -261,7 +259,7 @@ class TestAsyncACLs: ip_range="192.0.2.53/28", name="my-acl-1", ) - assert_matches_type(ACLUpdateResponse, acl, path=["response"]) + assert_matches_type(SecondaryDNSACL, acl, path=["response"]) @pytest.mark.skip() @parametrize @@ -276,7 +274,7 @@ class TestAsyncACLs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" acl = await response.parse() - assert_matches_type(ACLUpdateResponse, acl, path=["response"]) + assert_matches_type(SecondaryDNSACL, acl, path=["response"]) @pytest.mark.skip() @parametrize @@ -291,7 +289,7 @@ class TestAsyncACLs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" acl = await response.parse() - assert_matches_type(ACLUpdateResponse, acl, path=["response"]) + assert_matches_type(SecondaryDNSACL, acl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -373,7 +371,7 @@ class TestAsyncACLs: "23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) - assert_matches_type(ACLGetResponse, acl, path=["response"]) + assert_matches_type(SecondaryDNSACL, acl, path=["response"]) @pytest.mark.skip() @parametrize @@ -386,7 +384,7 @@ class TestAsyncACLs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" acl = await response.parse() - assert_matches_type(ACLGetResponse, acl, path=["response"]) + assert_matches_type(SecondaryDNSACL, acl, path=["response"]) @pytest.mark.skip() @parametrize @@ -399,6 +397,6 @@ class TestAsyncACLs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" acl = await response.parse() - assert_matches_type(ACLGetResponse, acl, path=["response"]) + assert_matches_type(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 a105be996..1d95bbb98 100644 --- a/tests/api_resources/secondary_dns/test_peers.py +++ b/tests/api_resources/secondary_dns/test_peers.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.secondary_dns import ( - PeerGetResponse, PeerListResponse, - PeerCreateResponse, + SecondaryDNSPeer, PeerDeleteResponse, - PeerUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +28,7 @@ class TestPeers: account_id="01a7362d577a6c3019a474fd6f485823", body={}, ) - assert_matches_type(PeerCreateResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -43,7 +41,7 @@ class TestPeers: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" peer = response.parse() - assert_matches_type(PeerCreateResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +54,7 @@ class TestPeers: assert response.http_request.headers.get("X-Stainless-Lang") == "python" peer = response.parse() - assert_matches_type(PeerCreateResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -68,7 +66,7 @@ class TestPeers: account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) - assert_matches_type(PeerUpdateResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -82,7 +80,7 @@ class TestPeers: port=53, tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", ) - assert_matches_type(PeerUpdateResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +94,7 @@ class TestPeers: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" peer = response.parse() - assert_matches_type(PeerUpdateResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -110,7 +108,7 @@ class TestPeers: assert response.http_request.headers.get("X-Stainless-Lang") == "python" peer = response.parse() - assert_matches_type(PeerUpdateResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -192,7 +190,7 @@ class TestPeers: "23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) - assert_matches_type(PeerGetResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -205,7 +203,7 @@ class TestPeers: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" peer = response.parse() - assert_matches_type(PeerGetResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -218,7 +216,7 @@ class TestPeers: assert response.http_request.headers.get("X-Stainless-Lang") == "python" peer = response.parse() - assert_matches_type(PeerGetResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -233,7 +231,7 @@ class TestAsyncPeers: account_id="01a7362d577a6c3019a474fd6f485823", body={}, ) - assert_matches_type(PeerCreateResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -246,7 +244,7 @@ class TestAsyncPeers: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" peer = await response.parse() - assert_matches_type(PeerCreateResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -259,7 +257,7 @@ class TestAsyncPeers: assert response.http_request.headers.get("X-Stainless-Lang") == "python" peer = await response.parse() - assert_matches_type(PeerCreateResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -271,7 +269,7 @@ class TestAsyncPeers: account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) - assert_matches_type(PeerUpdateResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -285,7 +283,7 @@ class TestAsyncPeers: port=53, tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", ) - assert_matches_type(PeerUpdateResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -299,7 +297,7 @@ class TestAsyncPeers: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" peer = await response.parse() - assert_matches_type(PeerUpdateResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -313,7 +311,7 @@ class TestAsyncPeers: assert response.http_request.headers.get("X-Stainless-Lang") == "python" peer = await response.parse() - assert_matches_type(PeerUpdateResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -395,7 +393,7 @@ class TestAsyncPeers: "23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) - assert_matches_type(PeerGetResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -408,7 +406,7 @@ class TestAsyncPeers: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" peer = await response.parse() - assert_matches_type(PeerGetResponse, peer, path=["response"]) + assert_matches_type(SecondaryDNSPeer, peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -421,6 +419,6 @@ class TestAsyncPeers: assert response.http_request.headers.get("X-Stainless-Lang") == "python" peer = await response.parse() - assert_matches_type(PeerGetResponse, peer, path=["response"]) + assert_matches_type(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 cdf5eb1a5..4dd2b616c 100644 --- a/tests/api_resources/secondary_dns/test_tsigs.py +++ b/tests/api_resources/secondary_dns/test_tsigs.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.secondary_dns import ( - TSIGGetResponse, + SecondaryDNSTSIG, TSIGListResponse, - TSIGCreateResponse, TSIGDeleteResponse, - TSIGUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -32,7 +30,7 @@ class TestTSIGs: name="tsig.customer.cf.", secret="caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c", ) - assert_matches_type(TSIGCreateResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +45,7 @@ class TestTSIGs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tsig = response.parse() - assert_matches_type(TSIGCreateResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) @pytest.mark.skip() @parametrize @@ -62,7 +60,7 @@ class TestTSIGs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tsig = response.parse() - assert_matches_type(TSIGCreateResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) assert cast(Any, response.is_closed) is True @@ -76,7 +74,7 @@ class TestTSIGs: name="tsig.customer.cf.", secret="caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c", ) - assert_matches_type(TSIGUpdateResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) @pytest.mark.skip() @parametrize @@ -92,7 +90,7 @@ class TestTSIGs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tsig = response.parse() - assert_matches_type(TSIGUpdateResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) @pytest.mark.skip() @parametrize @@ -108,7 +106,7 @@ class TestTSIGs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tsig = response.parse() - assert_matches_type(TSIGUpdateResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) assert cast(Any, response.is_closed) is True @@ -190,7 +188,7 @@ class TestTSIGs: "69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) - assert_matches_type(TSIGGetResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) @pytest.mark.skip() @parametrize @@ -203,7 +201,7 @@ class TestTSIGs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tsig = response.parse() - assert_matches_type(TSIGGetResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) @pytest.mark.skip() @parametrize @@ -216,7 +214,7 @@ class TestTSIGs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tsig = response.parse() - assert_matches_type(TSIGGetResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) assert cast(Any, response.is_closed) is True @@ -233,7 +231,7 @@ class TestAsyncTSIGs: name="tsig.customer.cf.", secret="caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c", ) - assert_matches_type(TSIGCreateResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) @pytest.mark.skip() @parametrize @@ -248,7 +246,7 @@ class TestAsyncTSIGs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tsig = await response.parse() - assert_matches_type(TSIGCreateResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) @pytest.mark.skip() @parametrize @@ -263,7 +261,7 @@ class TestAsyncTSIGs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tsig = await response.parse() - assert_matches_type(TSIGCreateResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) assert cast(Any, response.is_closed) is True @@ -277,7 +275,7 @@ class TestAsyncTSIGs: name="tsig.customer.cf.", secret="caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c", ) - assert_matches_type(TSIGUpdateResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) @pytest.mark.skip() @parametrize @@ -293,7 +291,7 @@ class TestAsyncTSIGs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tsig = await response.parse() - assert_matches_type(TSIGUpdateResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) @pytest.mark.skip() @parametrize @@ -309,7 +307,7 @@ class TestAsyncTSIGs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tsig = await response.parse() - assert_matches_type(TSIGUpdateResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) assert cast(Any, response.is_closed) is True @@ -391,7 +389,7 @@ class TestAsyncTSIGs: "69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) - assert_matches_type(TSIGGetResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) @pytest.mark.skip() @parametrize @@ -404,7 +402,7 @@ class TestAsyncTSIGs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tsig = await response.parse() - assert_matches_type(TSIGGetResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) @pytest.mark.skip() @parametrize @@ -417,6 +415,6 @@ class TestAsyncTSIGs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tsig = await response.parse() - assert_matches_type(TSIGGetResponse, tsig, path=["response"]) + assert_matches_type(SecondaryDNSTSIG, tsig, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/speed/test_availabilities.py b/tests/api_resources/speed/test_availabilities.py index 3bbf66993..e2fd948da 100644 --- a/tests/api_resources/speed/test_availabilities.py +++ b/tests/api_resources/speed/test_availabilities.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.speed import AvailabilityListResponse +from cloudflare.types.speed import ObservatoryAvailabilities base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestAvailabilities: availability = client.speed.availabilities.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[AvailabilityListResponse], availability, path=["response"]) + assert_matches_type(Optional[ObservatoryAvailabilities], availability, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,7 @@ class TestAvailabilities: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" availability = response.parse() - assert_matches_type(Optional[AvailabilityListResponse], availability, path=["response"]) + assert_matches_type(Optional[ObservatoryAvailabilities], availability, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ class TestAvailabilities: assert response.http_request.headers.get("X-Stainless-Lang") == "python" availability = response.parse() - assert_matches_type(Optional[AvailabilityListResponse], availability, path=["response"]) + assert_matches_type(Optional[ObservatoryAvailabilities], availability, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestAsyncAvailabilities: availability = await async_client.speed.availabilities.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[AvailabilityListResponse], availability, path=["response"]) + assert_matches_type(Optional[ObservatoryAvailabilities], availability, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestAsyncAvailabilities: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" availability = await response.parse() - assert_matches_type(Optional[AvailabilityListResponse], availability, path=["response"]) + assert_matches_type(Optional[ObservatoryAvailabilities], availability, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestAsyncAvailabilities: assert response.http_request.headers.get("X-Stainless-Lang") == "python" availability = await response.parse() - assert_matches_type(Optional[AvailabilityListResponse], availability, path=["response"]) + assert_matches_type(Optional[ObservatoryAvailabilities], availability, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/speed/test_tests.py b/tests/api_resources/speed/test_tests.py index 1d03884a1..28a085afa 100644 --- a/tests/api_resources/speed/test_tests.py +++ b/tests/api_resources/speed/test_tests.py @@ -10,10 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.speed import ( - TestGetResponse, TestListResponse, - TestCreateResponse, TestDeleteResponse, + ObservatoryPageTest, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -29,7 +28,7 @@ class TestTests: "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[TestCreateResponse], test, path=["response"]) + assert_matches_type(Optional[ObservatoryPageTest], test, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +38,7 @@ class TestTests: zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) - assert_matches_type(Optional[TestCreateResponse], test, path=["response"]) + assert_matches_type(Optional[ObservatoryPageTest], test, path=["response"]) @pytest.mark.skip() @parametrize @@ -52,7 +51,7 @@ class TestTests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" test = response.parse() - assert_matches_type(Optional[TestCreateResponse], test, path=["response"]) + assert_matches_type(Optional[ObservatoryPageTest], test, path=["response"]) @pytest.mark.skip() @parametrize @@ -65,7 +64,7 @@ class TestTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" test = response.parse() - assert_matches_type(Optional[TestCreateResponse], test, path=["response"]) + assert_matches_type(Optional[ObservatoryPageTest], test, path=["response"]) assert cast(Any, response.is_closed) is True @@ -218,7 +217,7 @@ class TestTests: zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) - assert_matches_type(Optional[TestGetResponse], test, path=["response"]) + assert_matches_type(Optional[ObservatoryPageTest], test, path=["response"]) @pytest.mark.skip() @parametrize @@ -232,7 +231,7 @@ class TestTests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" test = response.parse() - assert_matches_type(Optional[TestGetResponse], test, path=["response"]) + assert_matches_type(Optional[ObservatoryPageTest], test, path=["response"]) @pytest.mark.skip() @parametrize @@ -246,7 +245,7 @@ class TestTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" test = response.parse() - assert_matches_type(Optional[TestGetResponse], test, path=["response"]) + assert_matches_type(Optional[ObservatoryPageTest], test, path=["response"]) assert cast(Any, response.is_closed) is True @@ -285,7 +284,7 @@ class TestAsyncTests: "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[TestCreateResponse], test, path=["response"]) + assert_matches_type(Optional[ObservatoryPageTest], test, path=["response"]) @pytest.mark.skip() @parametrize @@ -295,7 +294,7 @@ class TestAsyncTests: zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) - assert_matches_type(Optional[TestCreateResponse], test, path=["response"]) + assert_matches_type(Optional[ObservatoryPageTest], test, path=["response"]) @pytest.mark.skip() @parametrize @@ -308,7 +307,7 @@ class TestAsyncTests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" test = await response.parse() - assert_matches_type(Optional[TestCreateResponse], test, path=["response"]) + assert_matches_type(Optional[ObservatoryPageTest], test, path=["response"]) @pytest.mark.skip() @parametrize @@ -321,7 +320,7 @@ class TestAsyncTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" test = await response.parse() - assert_matches_type(Optional[TestCreateResponse], test, path=["response"]) + assert_matches_type(Optional[ObservatoryPageTest], test, path=["response"]) assert cast(Any, response.is_closed) is True @@ -474,7 +473,7 @@ class TestAsyncTests: zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) - assert_matches_type(Optional[TestGetResponse], test, path=["response"]) + assert_matches_type(Optional[ObservatoryPageTest], test, path=["response"]) @pytest.mark.skip() @parametrize @@ -488,7 +487,7 @@ class TestAsyncTests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" test = await response.parse() - assert_matches_type(Optional[TestGetResponse], test, path=["response"]) + assert_matches_type(Optional[ObservatoryPageTest], test, path=["response"]) @pytest.mark.skip() @parametrize @@ -502,7 +501,7 @@ class TestAsyncTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" test = await response.parse() - assert_matches_type(Optional[TestGetResponse], test, path=["response"]) + assert_matches_type(Optional[ObservatoryPageTest], test, 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 895c8cc64..0fe5a9670 100644 --- a/tests/api_resources/ssl/universal/test_settings.py +++ b/tests/api_resources/ssl/universal/test_settings.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.ssl.universal import SettingGetResponse, SettingEditResponse +from cloudflare.types.ssl.universal import TLSCertificatesAndHostnamesUniversal base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestSettings: setting = client.ssl.universal.settings.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SettingEditResponse, setting, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -32,7 +32,7 @@ class TestSettings: zone_id="023e105f4ecef8ad9ca31a8372d0c353", enabled=True, ) - assert_matches_type(SettingEditResponse, setting, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +44,7 @@ class TestSettings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(SettingEditResponse, setting, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +56,7 @@ class TestSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(SettingEditResponse, setting, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -74,7 +74,7 @@ class TestSettings: setting = client.ssl.universal.settings.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SettingGetResponse, setting, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -86,7 +86,7 @@ class TestSettings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(SettingGetResponse, setting, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -98,7 +98,7 @@ class TestSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(SettingGetResponse, setting, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -120,7 +120,7 @@ class TestAsyncSettings: setting = await async_client.ssl.universal.settings.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SettingEditResponse, setting, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncSettings: zone_id="023e105f4ecef8ad9ca31a8372d0c353", enabled=True, ) - assert_matches_type(SettingEditResponse, setting, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -141,7 +141,7 @@ class TestAsyncSettings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(SettingEditResponse, setting, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -153,7 +153,7 @@ class TestAsyncSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(SettingEditResponse, setting, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -171,7 +171,7 @@ class TestAsyncSettings: setting = await async_client.ssl.universal.settings.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SettingGetResponse, setting, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -183,7 +183,7 @@ class TestAsyncSettings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(SettingGetResponse, setting, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -195,7 +195,7 @@ class TestAsyncSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(SettingGetResponse, setting, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/storage/test_analytics.py b/tests/api_resources/storage/test_analytics.py index 72463843e..5f31003d6 100644 --- a/tests/api_resources/storage/test_analytics.py +++ b/tests/api_resources/storage/test_analytics.py @@ -11,8 +11,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.types.storage import ( - AnalyticsListResponse, - AnalyticsStoredResponse, + WorkersKVSchemasResult, + WorkersKVComponentsSchemasResult, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +27,7 @@ class TestAnalytics: analytics = client.storage.analytics.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AnalyticsListResponse, analytics, path=["response"]) + assert_matches_type(WorkersKVSchemasResult, analytics, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +44,7 @@ class TestAnalytics: "until": parse_datetime("2019-01-02T03:20:00Z"), }, ) - assert_matches_type(AnalyticsListResponse, analytics, path=["response"]) + assert_matches_type(WorkersKVSchemasResult, analytics, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +56,7 @@ class TestAnalytics: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" analytics = response.parse() - assert_matches_type(AnalyticsListResponse, analytics, path=["response"]) + assert_matches_type(WorkersKVSchemasResult, analytics, path=["response"]) @pytest.mark.skip() @parametrize @@ -68,7 +68,7 @@ class TestAnalytics: assert response.http_request.headers.get("X-Stainless-Lang") == "python" analytics = response.parse() - assert_matches_type(AnalyticsListResponse, analytics, path=["response"]) + assert_matches_type(WorkersKVSchemasResult, analytics, path=["response"]) assert cast(Any, response.is_closed) is True @@ -86,7 +86,7 @@ class TestAnalytics: analytics = client.storage.analytics.stored( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AnalyticsStoredResponse, analytics, path=["response"]) + assert_matches_type(WorkersKVComponentsSchemasResult, analytics, path=["response"]) @pytest.mark.skip() @parametrize @@ -103,7 +103,7 @@ class TestAnalytics: "until": parse_datetime("2019-01-02T03:20:00Z"), }, ) - assert_matches_type(AnalyticsStoredResponse, analytics, path=["response"]) + assert_matches_type(WorkersKVComponentsSchemasResult, analytics, path=["response"]) @pytest.mark.skip() @parametrize @@ -115,7 +115,7 @@ class TestAnalytics: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" analytics = response.parse() - assert_matches_type(AnalyticsStoredResponse, analytics, path=["response"]) + assert_matches_type(WorkersKVComponentsSchemasResult, analytics, path=["response"]) @pytest.mark.skip() @parametrize @@ -127,7 +127,7 @@ class TestAnalytics: assert response.http_request.headers.get("X-Stainless-Lang") == "python" analytics = response.parse() - assert_matches_type(AnalyticsStoredResponse, analytics, path=["response"]) + assert_matches_type(WorkersKVComponentsSchemasResult, analytics, path=["response"]) assert cast(Any, response.is_closed) is True @@ -149,7 +149,7 @@ class TestAsyncAnalytics: analytics = await async_client.storage.analytics.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AnalyticsListResponse, analytics, path=["response"]) + assert_matches_type(WorkersKVSchemasResult, analytics, path=["response"]) @pytest.mark.skip() @parametrize @@ -166,7 +166,7 @@ class TestAsyncAnalytics: "until": parse_datetime("2019-01-02T03:20:00Z"), }, ) - assert_matches_type(AnalyticsListResponse, analytics, path=["response"]) + assert_matches_type(WorkersKVSchemasResult, analytics, path=["response"]) @pytest.mark.skip() @parametrize @@ -178,7 +178,7 @@ class TestAsyncAnalytics: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" analytics = await response.parse() - assert_matches_type(AnalyticsListResponse, analytics, path=["response"]) + assert_matches_type(WorkersKVSchemasResult, analytics, path=["response"]) @pytest.mark.skip() @parametrize @@ -190,7 +190,7 @@ class TestAsyncAnalytics: assert response.http_request.headers.get("X-Stainless-Lang") == "python" analytics = await response.parse() - assert_matches_type(AnalyticsListResponse, analytics, path=["response"]) + assert_matches_type(WorkersKVSchemasResult, analytics, path=["response"]) assert cast(Any, response.is_closed) is True @@ -208,7 +208,7 @@ class TestAsyncAnalytics: analytics = await async_client.storage.analytics.stored( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AnalyticsStoredResponse, analytics, path=["response"]) + assert_matches_type(WorkersKVComponentsSchemasResult, analytics, path=["response"]) @pytest.mark.skip() @parametrize @@ -225,7 +225,7 @@ class TestAsyncAnalytics: "until": parse_datetime("2019-01-02T03:20:00Z"), }, ) - assert_matches_type(AnalyticsStoredResponse, analytics, path=["response"]) + assert_matches_type(WorkersKVComponentsSchemasResult, analytics, path=["response"]) @pytest.mark.skip() @parametrize @@ -237,7 +237,7 @@ class TestAsyncAnalytics: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" analytics = await response.parse() - assert_matches_type(AnalyticsStoredResponse, analytics, path=["response"]) + assert_matches_type(WorkersKVComponentsSchemasResult, analytics, path=["response"]) @pytest.mark.skip() @parametrize @@ -249,7 +249,7 @@ class TestAsyncAnalytics: assert response.http_request.headers.get("X-Stainless-Lang") == "python" analytics = await response.parse() - assert_matches_type(AnalyticsStoredResponse, analytics, path=["response"]) + assert_matches_type(WorkersKVComponentsSchemasResult, analytics, 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 cac4df977..6bc8724e7 100644 --- a/tests/api_resources/stream/live_inputs/test_outputs.py +++ b/tests/api_resources/stream/live_inputs/test_outputs.py @@ -10,9 +10,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.stream.live_inputs import ( + StreamOutput, OutputListResponse, - OutputCreateResponse, - OutputUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +29,7 @@ class TestOutputs: stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", ) - assert_matches_type(OutputCreateResponse, output, path=["response"]) + assert_matches_type(StreamOutput, output, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +41,7 @@ class TestOutputs: url="rtmp://a.rtmp.youtube.com/live2", enabled=True, ) - assert_matches_type(OutputCreateResponse, output, path=["response"]) + assert_matches_type(StreamOutput, output, path=["response"]) @pytest.mark.skip() @parametrize @@ -57,7 +56,7 @@ class TestOutputs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" output = response.parse() - assert_matches_type(OutputCreateResponse, output, path=["response"]) + assert_matches_type(StreamOutput, output, path=["response"]) @pytest.mark.skip() @parametrize @@ -72,7 +71,7 @@ class TestOutputs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" output = response.parse() - assert_matches_type(OutputCreateResponse, output, path=["response"]) + assert_matches_type(StreamOutput, output, path=["response"]) assert cast(Any, response.is_closed) is True @@ -104,7 +103,7 @@ class TestOutputs: live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, ) - assert_matches_type(OutputUpdateResponse, output, path=["response"]) + assert_matches_type(StreamOutput, output, path=["response"]) @pytest.mark.skip() @parametrize @@ -119,7 +118,7 @@ class TestOutputs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" output = response.parse() - assert_matches_type(OutputUpdateResponse, output, path=["response"]) + assert_matches_type(StreamOutput, output, path=["response"]) @pytest.mark.skip() @parametrize @@ -134,7 +133,7 @@ class TestOutputs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" output = response.parse() - assert_matches_type(OutputUpdateResponse, output, path=["response"]) + assert_matches_type(StreamOutput, output, path=["response"]) assert cast(Any, response.is_closed) is True @@ -294,7 +293,7 @@ class TestAsyncOutputs: stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", ) - assert_matches_type(OutputCreateResponse, output, path=["response"]) + assert_matches_type(StreamOutput, output, path=["response"]) @pytest.mark.skip() @parametrize @@ -306,7 +305,7 @@ class TestAsyncOutputs: url="rtmp://a.rtmp.youtube.com/live2", enabled=True, ) - assert_matches_type(OutputCreateResponse, output, path=["response"]) + assert_matches_type(StreamOutput, output, path=["response"]) @pytest.mark.skip() @parametrize @@ -321,7 +320,7 @@ class TestAsyncOutputs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" output = await response.parse() - assert_matches_type(OutputCreateResponse, output, path=["response"]) + assert_matches_type(StreamOutput, output, path=["response"]) @pytest.mark.skip() @parametrize @@ -336,7 +335,7 @@ class TestAsyncOutputs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" output = await response.parse() - assert_matches_type(OutputCreateResponse, output, path=["response"]) + assert_matches_type(StreamOutput, output, path=["response"]) assert cast(Any, response.is_closed) is True @@ -368,7 +367,7 @@ class TestAsyncOutputs: live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, ) - assert_matches_type(OutputUpdateResponse, output, path=["response"]) + assert_matches_type(StreamOutput, output, path=["response"]) @pytest.mark.skip() @parametrize @@ -383,7 +382,7 @@ class TestAsyncOutputs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" output = await response.parse() - assert_matches_type(OutputUpdateResponse, output, path=["response"]) + assert_matches_type(StreamOutput, output, path=["response"]) @pytest.mark.skip() @parametrize @@ -398,7 +397,7 @@ class TestAsyncOutputs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" output = await response.parse() - assert_matches_type(OutputUpdateResponse, output, path=["response"]) + assert_matches_type(StreamOutput, output, 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 8d2a338ab..d762c4e63 100644 --- a/tests/api_resources/stream/test_audio_tracks.py +++ b/tests/api_resources/stream/test_audio_tracks.py @@ -11,8 +11,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.stream import ( AudioTrackGetResponse, - AudioTrackCopyResponse, - AudioTrackEditResponse, + StreamAdditionalAudio, AudioTrackDeleteResponse, ) @@ -94,7 +93,7 @@ class TestAudioTracks: account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) - assert_matches_type(AudioTrackCopyResponse, audio_track, path=["response"]) + assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +104,7 @@ class TestAudioTracks: label="director commentary", url="https://www.examplestorage.com/audio_file.mp3", ) - assert_matches_type(AudioTrackCopyResponse, audio_track, path=["response"]) + assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -119,7 +118,7 @@ class TestAudioTracks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" audio_track = response.parse() - assert_matches_type(AudioTrackCopyResponse, audio_track, path=["response"]) + assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -133,7 +132,7 @@ class TestAudioTracks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" audio_track = response.parse() - assert_matches_type(AudioTrackCopyResponse, audio_track, path=["response"]) + assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) assert cast(Any, response.is_closed) is True @@ -162,7 +161,7 @@ class TestAudioTracks: account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) - assert_matches_type(AudioTrackEditResponse, audio_track, path=["response"]) + assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -174,7 +173,7 @@ class TestAudioTracks: default=True, label="director commentary", ) - assert_matches_type(AudioTrackEditResponse, audio_track, path=["response"]) + assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +187,7 @@ class TestAudioTracks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" audio_track = response.parse() - assert_matches_type(AudioTrackEditResponse, audio_track, path=["response"]) + assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -202,7 +201,7 @@ class TestAudioTracks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" audio_track = response.parse() - assert_matches_type(AudioTrackEditResponse, audio_track, path=["response"]) + assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) assert cast(Any, response.is_closed) is True @@ -358,7 +357,7 @@ class TestAsyncAudioTracks: account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) - assert_matches_type(AudioTrackCopyResponse, audio_track, path=["response"]) + assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -369,7 +368,7 @@ class TestAsyncAudioTracks: label="director commentary", url="https://www.examplestorage.com/audio_file.mp3", ) - assert_matches_type(AudioTrackCopyResponse, audio_track, path=["response"]) + assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -383,7 +382,7 @@ class TestAsyncAudioTracks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" audio_track = await response.parse() - assert_matches_type(AudioTrackCopyResponse, audio_track, path=["response"]) + assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -397,7 +396,7 @@ class TestAsyncAudioTracks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" audio_track = await response.parse() - assert_matches_type(AudioTrackCopyResponse, audio_track, path=["response"]) + assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) assert cast(Any, response.is_closed) is True @@ -426,7 +425,7 @@ class TestAsyncAudioTracks: account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) - assert_matches_type(AudioTrackEditResponse, audio_track, path=["response"]) + assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -438,7 +437,7 @@ class TestAsyncAudioTracks: default=True, label="director commentary", ) - assert_matches_type(AudioTrackEditResponse, audio_track, path=["response"]) + assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -452,7 +451,7 @@ class TestAsyncAudioTracks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" audio_track = await response.parse() - assert_matches_type(AudioTrackEditResponse, audio_track, path=["response"]) + assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -466,7 +465,7 @@ class TestAsyncAudioTracks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" audio_track = await response.parse() - assert_matches_type(AudioTrackEditResponse, audio_track, path=["response"]) + assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/stream/test_clips.py b/tests/api_resources/stream/test_clips.py index 8260d4446..1b5a16fbb 100644 --- a/tests/api_resources/stream/test_clips.py +++ b/tests/api_resources/stream/test_clips.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.stream import ClipCreateResponse +from cloudflare.types.stream import StreamClipping base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -26,7 +26,7 @@ class TestClips: end_time_seconds=0, start_time_seconds=0, ) - assert_matches_type(ClipCreateResponse, clip, path=["response"]) + assert_matches_type(StreamClipping, clip, path=["response"]) @pytest.mark.skip() @parametrize @@ -43,7 +43,7 @@ class TestClips: thumbnail_timestamp_pct=0.529241, watermark={"uid": "ea95132c15732412d22c1476fa83f27a"}, ) - assert_matches_type(ClipCreateResponse, clip, path=["response"]) + assert_matches_type(StreamClipping, clip, path=["response"]) @pytest.mark.skip() @parametrize @@ -58,7 +58,7 @@ class TestClips: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" clip = response.parse() - assert_matches_type(ClipCreateResponse, clip, path=["response"]) + assert_matches_type(StreamClipping, clip, path=["response"]) @pytest.mark.skip() @parametrize @@ -73,7 +73,7 @@ class TestClips: assert response.http_request.headers.get("X-Stainless-Lang") == "python" clip = response.parse() - assert_matches_type(ClipCreateResponse, clip, path=["response"]) + assert_matches_type(StreamClipping, clip, path=["response"]) assert cast(Any, response.is_closed) is True @@ -101,7 +101,7 @@ class TestAsyncClips: end_time_seconds=0, start_time_seconds=0, ) - assert_matches_type(ClipCreateResponse, clip, path=["response"]) + assert_matches_type(StreamClipping, clip, path=["response"]) @pytest.mark.skip() @parametrize @@ -118,7 +118,7 @@ class TestAsyncClips: thumbnail_timestamp_pct=0.529241, watermark={"uid": "ea95132c15732412d22c1476fa83f27a"}, ) - assert_matches_type(ClipCreateResponse, clip, path=["response"]) + assert_matches_type(StreamClipping, clip, path=["response"]) @pytest.mark.skip() @parametrize @@ -133,7 +133,7 @@ class TestAsyncClips: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" clip = await response.parse() - assert_matches_type(ClipCreateResponse, clip, path=["response"]) + assert_matches_type(StreamClipping, clip, path=["response"]) @pytest.mark.skip() @parametrize @@ -148,7 +148,7 @@ class TestAsyncClips: assert response.http_request.headers.get("X-Stainless-Lang") == "python" clip = await response.parse() - assert_matches_type(ClipCreateResponse, clip, path=["response"]) + assert_matches_type(StreamClipping, clip, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/stream/test_copies.py b/tests/api_resources/stream/test_copies.py index 688307608..546755806 100644 --- a/tests/api_resources/stream/test_copies.py +++ b/tests/api_resources/stream/test_copies.py @@ -9,8 +9,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.types import StreamVideos from cloudflare._utils import parse_datetime -from cloudflare.types.stream import CopyCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ class TestCopies: account_id="023e105f4ecef8ad9ca31a8372d0c353", url="https://example.com/myvideo.mp4", ) - assert_matches_type(CopyCreateResponse, copy, path=["response"]) + assert_matches_type(StreamVideos, copy, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +41,7 @@ class TestCopies: thumbnail_timestamp_pct=0.529241, watermark={"uid": "ea95132c15732412d22c1476fa83f27a"}, ) - assert_matches_type(CopyCreateResponse, copy, path=["response"]) + assert_matches_type(StreamVideos, copy, path=["response"]) @pytest.mark.skip() @parametrize @@ -54,7 +54,7 @@ class TestCopies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" copy = response.parse() - assert_matches_type(CopyCreateResponse, copy, path=["response"]) + assert_matches_type(StreamVideos, copy, path=["response"]) @pytest.mark.skip() @parametrize @@ -67,7 +67,7 @@ class TestCopies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" copy = response.parse() - assert_matches_type(CopyCreateResponse, copy, path=["response"]) + assert_matches_type(StreamVideos, copy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -91,7 +91,7 @@ class TestAsyncCopies: account_id="023e105f4ecef8ad9ca31a8372d0c353", url="https://example.com/myvideo.mp4", ) - assert_matches_type(CopyCreateResponse, copy, path=["response"]) + assert_matches_type(StreamVideos, copy, path=["response"]) @pytest.mark.skip() @parametrize @@ -107,7 +107,7 @@ class TestAsyncCopies: thumbnail_timestamp_pct=0.529241, watermark={"uid": "ea95132c15732412d22c1476fa83f27a"}, ) - assert_matches_type(CopyCreateResponse, copy, path=["response"]) + assert_matches_type(StreamVideos, copy, path=["response"]) @pytest.mark.skip() @parametrize @@ -120,7 +120,7 @@ class TestAsyncCopies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" copy = await response.parse() - assert_matches_type(CopyCreateResponse, copy, path=["response"]) + assert_matches_type(StreamVideos, copy, path=["response"]) @pytest.mark.skip() @parametrize @@ -133,7 +133,7 @@ class TestAsyncCopies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" copy = await response.parse() - assert_matches_type(CopyCreateResponse, copy, path=["response"]) + assert_matches_type(StreamVideos, copy, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/stream/test_keys.py b/tests/api_resources/stream/test_keys.py index 7d1663e31..a4f49cbdc 100644 --- a/tests/api_resources/stream/test_keys.py +++ b/tests/api_resources/stream/test_keys.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.stream import KeyGetResponse, KeyCreateResponse, KeyDeleteResponse +from cloudflare.types.stream import StreamKeys, KeyGetResponse, KeyDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestKeys: key = client.stream.keys.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(KeyCreateResponse, key, path=["response"]) + assert_matches_type(StreamKeys, key, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,7 @@ class TestKeys: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" key = response.parse() - assert_matches_type(KeyCreateResponse, key, path=["response"]) + assert_matches_type(StreamKeys, key, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ class TestKeys: assert response.http_request.headers.get("X-Stainless-Lang") == "python" key = response.parse() - assert_matches_type(KeyCreateResponse, key, path=["response"]) + assert_matches_type(StreamKeys, key, path=["response"]) assert cast(Any, response.is_closed) is True @@ -163,7 +163,7 @@ class TestAsyncKeys: key = await async_client.stream.keys.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(KeyCreateResponse, key, path=["response"]) + assert_matches_type(StreamKeys, key, path=["response"]) @pytest.mark.skip() @parametrize @@ -175,7 +175,7 @@ class TestAsyncKeys: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" key = await response.parse() - assert_matches_type(KeyCreateResponse, key, path=["response"]) + assert_matches_type(StreamKeys, key, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +187,7 @@ class TestAsyncKeys: assert response.http_request.headers.get("X-Stainless-Lang") == "python" key = await response.parse() - assert_matches_type(KeyCreateResponse, key, path=["response"]) + assert_matches_type(StreamKeys, key, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/stream/test_live_inputs.py b/tests/api_resources/stream/test_live_inputs.py index c3c73c47c..01cd4c366 100644 --- a/tests/api_resources/stream/test_live_inputs.py +++ b/tests/api_resources/stream/test_live_inputs.py @@ -10,10 +10,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.stream import ( - LiveInputGetResponse, + StreamLiveInput, LiveInputListResponse, - LiveInputCreateResponse, - LiveInputUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -28,7 +26,7 @@ class TestLiveInputs: live_input = client.stream.live_inputs.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(LiveInputCreateResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) @pytest.mark.skip() @parametrize @@ -45,7 +43,7 @@ class TestLiveInputs: "timeout_seconds": 0, }, ) - assert_matches_type(LiveInputCreateResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) @pytest.mark.skip() @parametrize @@ -57,7 +55,7 @@ class TestLiveInputs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" live_input = response.parse() - assert_matches_type(LiveInputCreateResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) @pytest.mark.skip() @parametrize @@ -69,7 +67,7 @@ class TestLiveInputs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" live_input = response.parse() - assert_matches_type(LiveInputCreateResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) assert cast(Any, response.is_closed) is True @@ -88,7 +86,7 @@ class TestLiveInputs: "66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(LiveInputUpdateResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +104,7 @@ class TestLiveInputs: "timeout_seconds": 0, }, ) - assert_matches_type(LiveInputUpdateResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) @pytest.mark.skip() @parametrize @@ -119,7 +117,7 @@ class TestLiveInputs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" live_input = response.parse() - assert_matches_type(LiveInputUpdateResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +130,7 @@ class TestLiveInputs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" live_input = response.parse() - assert_matches_type(LiveInputUpdateResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) assert cast(Any, response.is_closed) is True @@ -261,7 +259,7 @@ class TestLiveInputs: "66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(LiveInputGetResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) @pytest.mark.skip() @parametrize @@ -274,7 +272,7 @@ class TestLiveInputs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" live_input = response.parse() - assert_matches_type(LiveInputGetResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) @pytest.mark.skip() @parametrize @@ -287,7 +285,7 @@ class TestLiveInputs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" live_input = response.parse() - assert_matches_type(LiveInputGetResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) assert cast(Any, response.is_closed) is True @@ -316,7 +314,7 @@ class TestAsyncLiveInputs: live_input = await async_client.stream.live_inputs.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(LiveInputCreateResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) @pytest.mark.skip() @parametrize @@ -333,7 +331,7 @@ class TestAsyncLiveInputs: "timeout_seconds": 0, }, ) - assert_matches_type(LiveInputCreateResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) @pytest.mark.skip() @parametrize @@ -345,7 +343,7 @@ class TestAsyncLiveInputs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" live_input = await response.parse() - assert_matches_type(LiveInputCreateResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) @pytest.mark.skip() @parametrize @@ -357,7 +355,7 @@ class TestAsyncLiveInputs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" live_input = await response.parse() - assert_matches_type(LiveInputCreateResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) assert cast(Any, response.is_closed) is True @@ -376,7 +374,7 @@ class TestAsyncLiveInputs: "66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(LiveInputUpdateResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) @pytest.mark.skip() @parametrize @@ -394,7 +392,7 @@ class TestAsyncLiveInputs: "timeout_seconds": 0, }, ) - assert_matches_type(LiveInputUpdateResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) @pytest.mark.skip() @parametrize @@ -407,7 +405,7 @@ class TestAsyncLiveInputs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" live_input = await response.parse() - assert_matches_type(LiveInputUpdateResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) @pytest.mark.skip() @parametrize @@ -420,7 +418,7 @@ class TestAsyncLiveInputs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" live_input = await response.parse() - assert_matches_type(LiveInputUpdateResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) assert cast(Any, response.is_closed) is True @@ -549,7 +547,7 @@ class TestAsyncLiveInputs: "66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(LiveInputGetResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) @pytest.mark.skip() @parametrize @@ -562,7 +560,7 @@ class TestAsyncLiveInputs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" live_input = await response.parse() - assert_matches_type(LiveInputGetResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) @pytest.mark.skip() @parametrize @@ -575,7 +573,7 @@ class TestAsyncLiveInputs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" live_input = await response.parse() - assert_matches_type(LiveInputGetResponse, live_input, path=["response"]) + assert_matches_type(StreamLiveInput, live_input, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_available_plans.py b/tests/api_resources/test_available_plans.py index b9d4d794d..52e783905 100644 --- a/tests/api_resources/test_available_plans.py +++ b/tests/api_resources/test_available_plans.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import AvailablePlanGetResponse, AvailablePlanListResponse +from cloudflare.types import AvailablePlanListResponse, BillSubsAPIAvailableRatePlan base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -66,7 +66,7 @@ class TestAvailablePlans: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AvailablePlanGetResponse, available_plan, path=["response"]) + assert_matches_type(BillSubsAPIAvailableRatePlan, available_plan, path=["response"]) @pytest.mark.skip() @parametrize @@ -79,7 +79,7 @@ class TestAvailablePlans: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" available_plan = response.parse() - assert_matches_type(AvailablePlanGetResponse, available_plan, path=["response"]) + assert_matches_type(BillSubsAPIAvailableRatePlan, available_plan, path=["response"]) @pytest.mark.skip() @parametrize @@ -92,7 +92,7 @@ class TestAvailablePlans: assert response.http_request.headers.get("X-Stainless-Lang") == "python" available_plan = response.parse() - assert_matches_type(AvailablePlanGetResponse, available_plan, path=["response"]) + assert_matches_type(BillSubsAPIAvailableRatePlan, available_plan, path=["response"]) assert cast(Any, response.is_closed) is True @@ -164,7 +164,7 @@ class TestAsyncAvailablePlans: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AvailablePlanGetResponse, available_plan, path=["response"]) + assert_matches_type(BillSubsAPIAvailableRatePlan, available_plan, path=["response"]) @pytest.mark.skip() @parametrize @@ -177,7 +177,7 @@ class TestAsyncAvailablePlans: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" available_plan = await response.parse() - assert_matches_type(AvailablePlanGetResponse, available_plan, path=["response"]) + assert_matches_type(BillSubsAPIAvailableRatePlan, available_plan, path=["response"]) @pytest.mark.skip() @parametrize @@ -190,7 +190,7 @@ class TestAsyncAvailablePlans: assert response.http_request.headers.get("X-Stainless-Lang") == "python" available_plan = await response.parse() - assert_matches_type(AvailablePlanGetResponse, available_plan, path=["response"]) + assert_matches_type(BillSubsAPIAvailableRatePlan, available_plan, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_brand_protection.py b/tests/api_resources/test_brand_protection.py index 4caea63ce..1064e017f 100644 --- a/tests/api_resources/test_brand_protection.py +++ b/tests/api_resources/test_brand_protection.py @@ -10,8 +10,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( - BrandProtectionSubmitResponse, - BrandProtectionURLInfoResponse, + IntelPhishingURLInfo, + IntelPhishingURLSubmit, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -26,7 +26,7 @@ class TestBrandProtection: brand_protection = client.brand_protection.submit( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"]) + assert_matches_type(IntelPhishingURLSubmit, brand_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,7 @@ class TestBrandProtection: account_id="023e105f4ecef8ad9ca31a8372d0c353", url="https://www.cloudflare.com", ) - assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"]) + assert_matches_type(IntelPhishingURLSubmit, brand_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ class TestBrandProtection: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = response.parse() - assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"]) + assert_matches_type(IntelPhishingURLSubmit, brand_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -59,7 +59,7 @@ class TestBrandProtection: assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = response.parse() - assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"]) + assert_matches_type(IntelPhishingURLSubmit, brand_protection, path=["response"]) assert cast(Any, response.is_closed) is True @@ -77,7 +77,7 @@ class TestBrandProtection: brand_protection = client.brand_protection.url_info( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) + assert_matches_type(IntelPhishingURLInfo, brand_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -87,7 +87,7 @@ class TestBrandProtection: url="string", url_id_param={"url_id": 0}, ) - assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) + assert_matches_type(IntelPhishingURLInfo, brand_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -99,7 +99,7 @@ class TestBrandProtection: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = response.parse() - assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) + assert_matches_type(IntelPhishingURLInfo, brand_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -111,7 +111,7 @@ class TestBrandProtection: assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = response.parse() - assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) + assert_matches_type(IntelPhishingURLInfo, brand_protection, path=["response"]) assert cast(Any, response.is_closed) is True @@ -133,7 +133,7 @@ class TestAsyncBrandProtection: brand_protection = await async_client.brand_protection.submit( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"]) + assert_matches_type(IntelPhishingURLSubmit, brand_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncBrandProtection: account_id="023e105f4ecef8ad9ca31a8372d0c353", url="https://www.cloudflare.com", ) - assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"]) + assert_matches_type(IntelPhishingURLSubmit, brand_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -154,7 +154,7 @@ class TestAsyncBrandProtection: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = await response.parse() - assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"]) + assert_matches_type(IntelPhishingURLSubmit, brand_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -166,7 +166,7 @@ class TestAsyncBrandProtection: assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = await response.parse() - assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"]) + assert_matches_type(IntelPhishingURLSubmit, brand_protection, path=["response"]) assert cast(Any, response.is_closed) is True @@ -184,7 +184,7 @@ class TestAsyncBrandProtection: brand_protection = await async_client.brand_protection.url_info( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) + assert_matches_type(IntelPhishingURLInfo, brand_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -194,7 +194,7 @@ class TestAsyncBrandProtection: url="string", url_id_param={"url_id": 0}, ) - assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) + assert_matches_type(IntelPhishingURLInfo, brand_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -206,7 +206,7 @@ class TestAsyncBrandProtection: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = await response.parse() - assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) + assert_matches_type(IntelPhishingURLInfo, brand_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -218,7 +218,7 @@ class TestAsyncBrandProtection: assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = await response.parse() - assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) + assert_matches_type(IntelPhishingURLInfo, brand_protection, 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 59ca02640..07e9ab6a8 100644 --- a/tests/api_resources/test_calls.py +++ b/tests/api_resources/test_calls.py @@ -9,13 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import ( - CallGetResponse, - CallListResponse, - CallCreateResponse, - CallDeleteResponse, - CallUpdateResponse, -) +from cloudflare.types import CallsApp, CallListResponse, CallsAppWithSecret base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -29,7 +23,7 @@ class TestCalls: call = client.calls.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CallCreateResponse, call, path=["response"]) + assert_matches_type(CallsAppWithSecret, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -38,7 +32,7 @@ class TestCalls: account_id="023e105f4ecef8ad9ca31a8372d0c353", name="production-realtime-app", ) - assert_matches_type(CallCreateResponse, call, path=["response"]) + assert_matches_type(CallsAppWithSecret, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +44,7 @@ class TestCalls: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = response.parse() - assert_matches_type(CallCreateResponse, call, path=["response"]) + assert_matches_type(CallsAppWithSecret, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -62,7 +56,7 @@ class TestCalls: assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = response.parse() - assert_matches_type(CallCreateResponse, call, path=["response"]) + assert_matches_type(CallsAppWithSecret, call, path=["response"]) assert cast(Any, response.is_closed) is True @@ -81,7 +75,7 @@ class TestCalls: "2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CallUpdateResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -91,7 +85,7 @@ class TestCalls: account_id="023e105f4ecef8ad9ca31a8372d0c353", name="production-realtime-app", ) - assert_matches_type(CallUpdateResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -104,7 +98,7 @@ class TestCalls: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = response.parse() - assert_matches_type(CallUpdateResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -117,7 +111,7 @@ class TestCalls: assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = response.parse() - assert_matches_type(CallUpdateResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) assert cast(Any, response.is_closed) is True @@ -185,7 +179,7 @@ class TestCalls: "2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CallDeleteResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -198,7 +192,7 @@ class TestCalls: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = response.parse() - assert_matches_type(CallDeleteResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -211,7 +205,7 @@ class TestCalls: assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = response.parse() - assert_matches_type(CallDeleteResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) assert cast(Any, response.is_closed) is True @@ -237,7 +231,7 @@ class TestCalls: "2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CallGetResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -250,7 +244,7 @@ class TestCalls: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = response.parse() - assert_matches_type(CallGetResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -263,7 +257,7 @@ class TestCalls: assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = response.parse() - assert_matches_type(CallGetResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) assert cast(Any, response.is_closed) is True @@ -292,7 +286,7 @@ class TestAsyncCalls: call = await async_client.calls.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CallCreateResponse, call, path=["response"]) + assert_matches_type(CallsAppWithSecret, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -301,7 +295,7 @@ class TestAsyncCalls: account_id="023e105f4ecef8ad9ca31a8372d0c353", name="production-realtime-app", ) - assert_matches_type(CallCreateResponse, call, path=["response"]) + assert_matches_type(CallsAppWithSecret, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -313,7 +307,7 @@ class TestAsyncCalls: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = await response.parse() - assert_matches_type(CallCreateResponse, call, path=["response"]) + assert_matches_type(CallsAppWithSecret, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -325,7 +319,7 @@ class TestAsyncCalls: assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = await response.parse() - assert_matches_type(CallCreateResponse, call, path=["response"]) + assert_matches_type(CallsAppWithSecret, call, path=["response"]) assert cast(Any, response.is_closed) is True @@ -344,7 +338,7 @@ class TestAsyncCalls: "2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CallUpdateResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -354,7 +348,7 @@ class TestAsyncCalls: account_id="023e105f4ecef8ad9ca31a8372d0c353", name="production-realtime-app", ) - assert_matches_type(CallUpdateResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -367,7 +361,7 @@ class TestAsyncCalls: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = await response.parse() - assert_matches_type(CallUpdateResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -380,7 +374,7 @@ class TestAsyncCalls: assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = await response.parse() - assert_matches_type(CallUpdateResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) assert cast(Any, response.is_closed) is True @@ -448,7 +442,7 @@ class TestAsyncCalls: "2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CallDeleteResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -461,7 +455,7 @@ class TestAsyncCalls: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = await response.parse() - assert_matches_type(CallDeleteResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -474,7 +468,7 @@ class TestAsyncCalls: assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = await response.parse() - assert_matches_type(CallDeleteResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) assert cast(Any, response.is_closed) is True @@ -500,7 +494,7 @@ class TestAsyncCalls: "2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CallGetResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -513,7 +507,7 @@ class TestAsyncCalls: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = await response.parse() - assert_matches_type(CallGetResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, path=["response"]) @pytest.mark.skip() @parametrize @@ -526,7 +520,7 @@ class TestAsyncCalls: assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = await response.parse() - assert_matches_type(CallGetResponse, call, path=["response"]) + assert_matches_type(CallsApp, call, 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 b7eed2214..b5858ae09 100644 --- a/tests/api_resources/test_client_certificates.py +++ b/tests/api_resources/test_client_certificates.py @@ -10,11 +10,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( - ClientCertificateGetResponse, - ClientCertificateEditResponse, - ClientCertificateListResponse, - ClientCertificateCreateResponse, - ClientCertificateDeleteResponse, + TLSCertificatesAndHostnamesClientCertificate, ) from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray @@ -32,7 +28,7 @@ class TestClientCertificates: csr="-----BEGIN CERTIFICATE REQUEST-----\nMIICY....\n-----END CERTIFICATE REQUEST-----\n", validity_days=3650, ) - assert_matches_type(ClientCertificateCreateResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -46,7 +42,7 @@ class TestClientCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(ClientCertificateCreateResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -60,7 +56,7 @@ class TestClientCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(ClientCertificateCreateResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -81,7 +77,9 @@ class TestClientCertificates: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type( - SyncV4PagePaginationArray[ClientCertificateListResponse], client_certificate, path=["response"] + SyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], + client_certificate, + path=["response"], ) @pytest.mark.skip() @@ -96,7 +94,9 @@ class TestClientCertificates: status="all", ) assert_matches_type( - SyncV4PagePaginationArray[ClientCertificateListResponse], client_certificate, path=["response"] + SyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], + client_certificate, + path=["response"], ) @pytest.mark.skip() @@ -110,7 +110,9 @@ class TestClientCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() assert_matches_type( - SyncV4PagePaginationArray[ClientCertificateListResponse], client_certificate, path=["response"] + SyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], + client_certificate, + path=["response"], ) @pytest.mark.skip() @@ -124,7 +126,9 @@ class TestClientCertificates: client_certificate = response.parse() assert_matches_type( - SyncV4PagePaginationArray[ClientCertificateListResponse], client_certificate, path=["response"] + SyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], + client_certificate, + path=["response"], ) assert cast(Any, response.is_closed) is True @@ -144,7 +148,7 @@ class TestClientCertificates: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ClientCertificateDeleteResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -157,7 +161,7 @@ class TestClientCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(ClientCertificateDeleteResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -170,7 +174,7 @@ class TestClientCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(ClientCertificateDeleteResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -196,7 +200,7 @@ class TestClientCertificates: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ClientCertificateEditResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -209,7 +213,7 @@ class TestClientCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(ClientCertificateEditResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -222,7 +226,7 @@ class TestClientCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(ClientCertificateEditResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -248,7 +252,7 @@ class TestClientCertificates: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ClientCertificateGetResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -261,7 +265,7 @@ class TestClientCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(ClientCertificateGetResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -274,7 +278,7 @@ class TestClientCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(ClientCertificateGetResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -305,7 +309,7 @@ class TestAsyncClientCertificates: csr="-----BEGIN CERTIFICATE REQUEST-----\nMIICY....\n-----END CERTIFICATE REQUEST-----\n", validity_days=3650, ) - assert_matches_type(ClientCertificateCreateResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -319,7 +323,7 @@ class TestAsyncClientCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(ClientCertificateCreateResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -333,7 +337,7 @@ class TestAsyncClientCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(ClientCertificateCreateResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -354,7 +358,9 @@ class TestAsyncClientCertificates: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type( - AsyncV4PagePaginationArray[ClientCertificateListResponse], client_certificate, path=["response"] + AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], + client_certificate, + path=["response"], ) @pytest.mark.skip() @@ -369,7 +375,9 @@ class TestAsyncClientCertificates: status="all", ) assert_matches_type( - AsyncV4PagePaginationArray[ClientCertificateListResponse], client_certificate, path=["response"] + AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], + client_certificate, + path=["response"], ) @pytest.mark.skip() @@ -383,7 +391,9 @@ class TestAsyncClientCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() assert_matches_type( - AsyncV4PagePaginationArray[ClientCertificateListResponse], client_certificate, path=["response"] + AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], + client_certificate, + path=["response"], ) @pytest.mark.skip() @@ -397,7 +407,9 @@ class TestAsyncClientCertificates: client_certificate = await response.parse() assert_matches_type( - AsyncV4PagePaginationArray[ClientCertificateListResponse], client_certificate, path=["response"] + AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], + client_certificate, + path=["response"], ) assert cast(Any, response.is_closed) is True @@ -417,7 +429,7 @@ class TestAsyncClientCertificates: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ClientCertificateDeleteResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -430,7 +442,7 @@ class TestAsyncClientCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(ClientCertificateDeleteResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -443,7 +455,7 @@ class TestAsyncClientCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(ClientCertificateDeleteResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -469,7 +481,7 @@ class TestAsyncClientCertificates: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ClientCertificateEditResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -482,7 +494,7 @@ class TestAsyncClientCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(ClientCertificateEditResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -495,7 +507,7 @@ class TestAsyncClientCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(ClientCertificateEditResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -521,7 +533,7 @@ class TestAsyncClientCertificates: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ClientCertificateGetResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -534,7 +546,7 @@ class TestAsyncClientCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(ClientCertificateGetResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -547,7 +559,7 @@ class TestAsyncClientCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(ClientCertificateGetResponse, client_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, 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 45b1d1105..133bdd6a2 100644 --- a/tests/api_resources/test_custom_certificates.py +++ b/tests/api_resources/test_custom_certificates.py @@ -12,9 +12,9 @@ from tests.utils import assert_matches_type from cloudflare.types import ( CustomCertificateGetResponse, CustomCertificateEditResponse, - CustomCertificateListResponse, CustomCertificateCreateResponse, CustomCertificateDeleteResponse, + TLSCertificatesAndHostnamesCustomCertificate, ) from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray @@ -95,7 +95,9 @@ class TestCustomCertificates: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type( - SyncV4PagePaginationArray[CustomCertificateListResponse], custom_certificate, path=["response"] + SyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], + custom_certificate, + path=["response"], ) @pytest.mark.skip() @@ -108,7 +110,9 @@ class TestCustomCertificates: per_page=5, ) assert_matches_type( - SyncV4PagePaginationArray[CustomCertificateListResponse], custom_certificate, path=["response"] + SyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], + custom_certificate, + path=["response"], ) @pytest.mark.skip() @@ -122,7 +126,9 @@ class TestCustomCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = response.parse() assert_matches_type( - SyncV4PagePaginationArray[CustomCertificateListResponse], custom_certificate, path=["response"] + SyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], + custom_certificate, + path=["response"], ) @pytest.mark.skip() @@ -136,7 +142,9 @@ class TestCustomCertificates: custom_certificate = response.parse() assert_matches_type( - SyncV4PagePaginationArray[CustomCertificateListResponse], custom_certificate, path=["response"] + SyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], + custom_certificate, + path=["response"], ) assert cast(Any, response.is_closed) is True @@ -394,7 +402,9 @@ class TestAsyncCustomCertificates: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type( - AsyncV4PagePaginationArray[CustomCertificateListResponse], custom_certificate, path=["response"] + AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], + custom_certificate, + path=["response"], ) @pytest.mark.skip() @@ -407,7 +417,9 @@ class TestAsyncCustomCertificates: per_page=5, ) assert_matches_type( - AsyncV4PagePaginationArray[CustomCertificateListResponse], custom_certificate, path=["response"] + AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], + custom_certificate, + path=["response"], ) @pytest.mark.skip() @@ -421,7 +433,9 @@ class TestAsyncCustomCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = await response.parse() assert_matches_type( - AsyncV4PagePaginationArray[CustomCertificateListResponse], custom_certificate, path=["response"] + AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], + custom_certificate, + path=["response"], ) @pytest.mark.skip() @@ -435,7 +449,9 @@ class TestAsyncCustomCertificates: custom_certificate = await response.parse() assert_matches_type( - AsyncV4PagePaginationArray[CustomCertificateListResponse], custom_certificate, path=["response"] + AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], + 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 4a75f9026..5a0d65b82 100644 --- a/tests/api_resources/test_custom_nameservers.py +++ b/tests/api_resources/test_custom_nameservers.py @@ -11,7 +11,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( CustomNameserverGetResponse, - CustomNameserverCreateResponse, + DNSCustomNameserversCustomNS, CustomNameserverDeleteResponse, CustomNameserverVerifyResponse, CustomNameserverAvailabiltyResponse, @@ -30,7 +30,7 @@ class TestCustomNameservers: account_id="372e67954025e0ba6aaa6d586b9e0b59", ns_name="ns1.example.com", ) - assert_matches_type(CustomNameserverCreateResponse, custom_nameserver, path=["response"]) + assert_matches_type(DNSCustomNameserversCustomNS, custom_nameserver, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +40,7 @@ class TestCustomNameservers: ns_name="ns1.example.com", ns_set=1, ) - assert_matches_type(CustomNameserverCreateResponse, custom_nameserver, path=["response"]) + assert_matches_type(DNSCustomNameserversCustomNS, custom_nameserver, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +53,7 @@ class TestCustomNameservers: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_nameserver = response.parse() - assert_matches_type(CustomNameserverCreateResponse, custom_nameserver, path=["response"]) + assert_matches_type(DNSCustomNameserversCustomNS, custom_nameserver, path=["response"]) @pytest.mark.skip() @parametrize @@ -66,7 +66,7 @@ class TestCustomNameservers: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_nameserver = response.parse() - assert_matches_type(CustomNameserverCreateResponse, custom_nameserver, path=["response"]) + assert_matches_type(DNSCustomNameserversCustomNS, custom_nameserver, path=["response"]) assert cast(Any, response.is_closed) is True @@ -268,7 +268,7 @@ class TestAsyncCustomNameservers: account_id="372e67954025e0ba6aaa6d586b9e0b59", ns_name="ns1.example.com", ) - assert_matches_type(CustomNameserverCreateResponse, custom_nameserver, path=["response"]) + assert_matches_type(DNSCustomNameserversCustomNS, custom_nameserver, path=["response"]) @pytest.mark.skip() @parametrize @@ -278,7 +278,7 @@ class TestAsyncCustomNameservers: ns_name="ns1.example.com", ns_set=1, ) - assert_matches_type(CustomNameserverCreateResponse, custom_nameserver, path=["response"]) + assert_matches_type(DNSCustomNameserversCustomNS, custom_nameserver, path=["response"]) @pytest.mark.skip() @parametrize @@ -291,7 +291,7 @@ class TestAsyncCustomNameservers: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_nameserver = await response.parse() - assert_matches_type(CustomNameserverCreateResponse, custom_nameserver, path=["response"]) + assert_matches_type(DNSCustomNameserversCustomNS, custom_nameserver, path=["response"]) @pytest.mark.skip() @parametrize @@ -304,7 +304,7 @@ class TestAsyncCustomNameservers: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_nameserver = await response.parse() - assert_matches_type(CustomNameserverCreateResponse, custom_nameserver, path=["response"]) + assert_matches_type(DNSCustomNameserversCustomNS, 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 b35717213..a43a18c6b 100644 --- a/tests/api_resources/test_dnssec.py +++ b/tests/api_resources/test_dnssec.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import DNSSECGetResponse, DNSSECEditResponse, DNSSECDeleteResponse +from cloudflare.types import DNSSECDNSSEC, DNSSECDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -65,7 +65,7 @@ class TestDNSSEC: dnssec = client.dnssec.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSSECEditResponse, dnssec, path=["response"]) + assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -76,7 +76,7 @@ class TestDNSSEC: dnssec_presigned=True, status="active", ) - assert_matches_type(DNSSECEditResponse, dnssec, path=["response"]) + assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -88,7 +88,7 @@ class TestDNSSEC: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" dnssec = response.parse() - assert_matches_type(DNSSECEditResponse, dnssec, path=["response"]) + assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -100,7 +100,7 @@ class TestDNSSEC: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dnssec = response.parse() - assert_matches_type(DNSSECEditResponse, dnssec, path=["response"]) + assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) assert cast(Any, response.is_closed) is True @@ -118,7 +118,7 @@ class TestDNSSEC: dnssec = client.dnssec.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSSECGetResponse, dnssec, path=["response"]) + assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -130,7 +130,7 @@ class TestDNSSEC: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" dnssec = response.parse() - assert_matches_type(DNSSECGetResponse, dnssec, path=["response"]) + assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestDNSSEC: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dnssec = response.parse() - assert_matches_type(DNSSECGetResponse, dnssec, path=["response"]) + assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) assert cast(Any, response.is_closed) is True @@ -206,7 +206,7 @@ class TestAsyncDNSSEC: dnssec = await async_client.dnssec.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSSECEditResponse, dnssec, path=["response"]) + assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -217,7 +217,7 @@ class TestAsyncDNSSEC: dnssec_presigned=True, status="active", ) - assert_matches_type(DNSSECEditResponse, dnssec, path=["response"]) + assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -229,7 +229,7 @@ class TestAsyncDNSSEC: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" dnssec = await response.parse() - assert_matches_type(DNSSECEditResponse, dnssec, path=["response"]) + assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -241,7 +241,7 @@ class TestAsyncDNSSEC: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dnssec = await response.parse() - assert_matches_type(DNSSECEditResponse, dnssec, path=["response"]) + assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) assert cast(Any, response.is_closed) is True @@ -259,7 +259,7 @@ class TestAsyncDNSSEC: dnssec = await async_client.dnssec.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSSECGetResponse, dnssec, path=["response"]) + assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -271,7 +271,7 @@ class TestAsyncDNSSEC: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" dnssec = await response.parse() - assert_matches_type(DNSSECGetResponse, dnssec, path=["response"]) + assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -283,7 +283,7 @@ class TestAsyncDNSSEC: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dnssec = await response.parse() - assert_matches_type(DNSSECGetResponse, dnssec, path=["response"]) + assert_matches_type(DNSSECDNSSEC, 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 c2dc7d66a..987844926 100644 --- a/tests/api_resources/test_filters.py +++ b/tests/api_resources/test_filters.py @@ -10,11 +10,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( - FilterGetResponse, - FilterListResponse, + LegacyJhsFilter, FilterCreateResponse, - FilterDeleteResponse, - FilterUpdateResponse, ) from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray @@ -78,7 +75,7 @@ class TestFilters: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[FilterUpdateResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -92,7 +89,7 @@ class TestFilters: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(Optional[FilterUpdateResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +103,7 @@ class TestFilters: assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(Optional[FilterUpdateResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) assert cast(Any, response.is_closed) is True @@ -133,7 +130,7 @@ class TestFilters: filter = client.filters.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[FilterListResponse], filter, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -147,7 +144,7 @@ class TestFilters: per_page=5, ref="FIL-100", ) - assert_matches_type(SyncV4PagePaginationArray[FilterListResponse], filter, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -159,7 +156,7 @@ class TestFilters: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(SyncV4PagePaginationArray[FilterListResponse], filter, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +168,7 @@ class TestFilters: assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(SyncV4PagePaginationArray[FilterListResponse], filter, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsFilter], filter, path=["response"]) assert cast(Any, response.is_closed) is True @@ -190,7 +187,7 @@ class TestFilters: "372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[FilterDeleteResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -203,7 +200,7 @@ class TestFilters: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(Optional[FilterDeleteResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -216,7 +213,7 @@ class TestFilters: assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(Optional[FilterDeleteResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) assert cast(Any, response.is_closed) is True @@ -242,7 +239,7 @@ class TestFilters: "372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[FilterGetResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -255,7 +252,7 @@ class TestFilters: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(Optional[FilterGetResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -268,7 +265,7 @@ class TestFilters: assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(Optional[FilterGetResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) assert cast(Any, response.is_closed) is True @@ -345,7 +342,7 @@ class TestAsyncFilters: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[FilterUpdateResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -359,7 +356,7 @@ class TestAsyncFilters: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(Optional[FilterUpdateResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -373,7 +370,7 @@ class TestAsyncFilters: assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(Optional[FilterUpdateResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) assert cast(Any, response.is_closed) is True @@ -400,7 +397,7 @@ class TestAsyncFilters: filter = await async_client.filters.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[FilterListResponse], filter, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -414,7 +411,7 @@ class TestAsyncFilters: per_page=5, ref="FIL-100", ) - assert_matches_type(AsyncV4PagePaginationArray[FilterListResponse], filter, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -426,7 +423,7 @@ class TestAsyncFilters: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[FilterListResponse], filter, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -438,7 +435,7 @@ class TestAsyncFilters: assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[FilterListResponse], filter, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsFilter], filter, path=["response"]) assert cast(Any, response.is_closed) is True @@ -457,7 +454,7 @@ class TestAsyncFilters: "372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[FilterDeleteResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -470,7 +467,7 @@ class TestAsyncFilters: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(Optional[FilterDeleteResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -483,7 +480,7 @@ class TestAsyncFilters: assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(Optional[FilterDeleteResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) assert cast(Any, response.is_closed) is True @@ -509,7 +506,7 @@ class TestAsyncFilters: "372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[FilterGetResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -522,7 +519,7 @@ class TestAsyncFilters: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(Optional[FilterGetResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -535,7 +532,7 @@ class TestAsyncFilters: assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(Optional[FilterGetResponse], filter, path=["response"]) + assert_matches_type(Optional[LegacyJhsFilter], 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 186c538cd..94c46db2c 100644 --- a/tests/api_resources/test_healthchecks.py +++ b/tests/api_resources/test_healthchecks.py @@ -10,12 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( - HealthcheckGetResponse, - HealthcheckEditResponse, HealthcheckListResponse, - HealthcheckCreateResponse, + HealthchecksHealthchecks, HealthcheckDeleteResponse, - HealthcheckUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -32,7 +29,7 @@ class TestHealthchecks: address="www.example.com", name="server-1", ) - assert_matches_type(HealthcheckCreateResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -68,7 +65,7 @@ class TestHealthchecks: healthcheck_timeout=0, type="HTTPS", ) - assert_matches_type(HealthcheckCreateResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -82,7 +79,7 @@ class TestHealthchecks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = response.parse() - assert_matches_type(HealthcheckCreateResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestHealthchecks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = response.parse() - assert_matches_type(HealthcheckCreateResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) assert cast(Any, response.is_closed) is True @@ -119,7 +116,7 @@ class TestHealthchecks: address="www.example.com", name="server-1", ) - assert_matches_type(HealthcheckUpdateResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -156,7 +153,7 @@ class TestHealthchecks: healthcheck_timeout=0, type="HTTPS", ) - assert_matches_type(HealthcheckUpdateResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +168,7 @@ class TestHealthchecks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = response.parse() - assert_matches_type(HealthcheckUpdateResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -186,7 +183,7 @@ class TestHealthchecks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = response.parse() - assert_matches_type(HealthcheckUpdateResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) assert cast(Any, response.is_closed) is True @@ -312,7 +309,7 @@ class TestHealthchecks: address="www.example.com", name="server-1", ) - assert_matches_type(HealthcheckEditResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -349,7 +346,7 @@ class TestHealthchecks: healthcheck_timeout=0, type="HTTPS", ) - assert_matches_type(HealthcheckEditResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -364,7 +361,7 @@ class TestHealthchecks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = response.parse() - assert_matches_type(HealthcheckEditResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -379,7 +376,7 @@ class TestHealthchecks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = response.parse() - assert_matches_type(HealthcheckEditResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) assert cast(Any, response.is_closed) is True @@ -409,7 +406,7 @@ class TestHealthchecks: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HealthcheckGetResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -422,7 +419,7 @@ class TestHealthchecks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = response.parse() - assert_matches_type(HealthcheckGetResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -435,7 +432,7 @@ class TestHealthchecks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = response.parse() - assert_matches_type(HealthcheckGetResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) assert cast(Any, response.is_closed) is True @@ -466,7 +463,7 @@ class TestAsyncHealthchecks: address="www.example.com", name="server-1", ) - assert_matches_type(HealthcheckCreateResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -502,7 +499,7 @@ class TestAsyncHealthchecks: healthcheck_timeout=0, type="HTTPS", ) - assert_matches_type(HealthcheckCreateResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -516,7 +513,7 @@ class TestAsyncHealthchecks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = await response.parse() - assert_matches_type(HealthcheckCreateResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -530,7 +527,7 @@ class TestAsyncHealthchecks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = await response.parse() - assert_matches_type(HealthcheckCreateResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) assert cast(Any, response.is_closed) is True @@ -553,7 +550,7 @@ class TestAsyncHealthchecks: address="www.example.com", name="server-1", ) - assert_matches_type(HealthcheckUpdateResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -590,7 +587,7 @@ class TestAsyncHealthchecks: healthcheck_timeout=0, type="HTTPS", ) - assert_matches_type(HealthcheckUpdateResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -605,7 +602,7 @@ class TestAsyncHealthchecks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = await response.parse() - assert_matches_type(HealthcheckUpdateResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -620,7 +617,7 @@ class TestAsyncHealthchecks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = await response.parse() - assert_matches_type(HealthcheckUpdateResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) assert cast(Any, response.is_closed) is True @@ -746,7 +743,7 @@ class TestAsyncHealthchecks: address="www.example.com", name="server-1", ) - assert_matches_type(HealthcheckEditResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -783,7 +780,7 @@ class TestAsyncHealthchecks: healthcheck_timeout=0, type="HTTPS", ) - assert_matches_type(HealthcheckEditResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -798,7 +795,7 @@ class TestAsyncHealthchecks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = await response.parse() - assert_matches_type(HealthcheckEditResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -813,7 +810,7 @@ class TestAsyncHealthchecks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = await response.parse() - assert_matches_type(HealthcheckEditResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) assert cast(Any, response.is_closed) is True @@ -843,7 +840,7 @@ class TestAsyncHealthchecks: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HealthcheckGetResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -856,7 +853,7 @@ class TestAsyncHealthchecks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = await response.parse() - assert_matches_type(HealthcheckGetResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -869,7 +866,7 @@ class TestAsyncHealthchecks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = await response.parse() - assert_matches_type(HealthcheckGetResponse, healthcheck, path=["response"]) + assert_matches_type(HealthchecksHealthchecks, 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 36fc31891..031ece0a0 100644 --- a/tests/api_resources/test_keyless_certificates.py +++ b/tests/api_resources/test_keyless_certificates.py @@ -10,10 +10,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( - KeylessCertificateGetResponse, - KeylessCertificateEditResponse, KeylessCertificateListResponse, - KeylessCertificateCreateResponse, + TLSCertificatesAndHostnamesBase, KeylessCertificateDeleteResponse, ) @@ -32,7 +30,7 @@ class TestKeylessCertificates: host="example.com", port=24008, ) - assert_matches_type(KeylessCertificateCreateResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -49,7 +47,7 @@ class TestKeylessCertificates: "vnet_id": "7365377a-85a4-4390-9480-531ef7dc7a3c", }, ) - assert_matches_type(KeylessCertificateCreateResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -64,7 +62,7 @@ class TestKeylessCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(KeylessCertificateCreateResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -79,7 +77,7 @@ class TestKeylessCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(KeylessCertificateCreateResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -197,7 +195,7 @@ class TestKeylessCertificates: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(KeylessCertificateEditResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -214,7 +212,7 @@ class TestKeylessCertificates: "vnet_id": "7365377a-85a4-4390-9480-531ef7dc7a3c", }, ) - assert_matches_type(KeylessCertificateEditResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -227,7 +225,7 @@ class TestKeylessCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(KeylessCertificateEditResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -240,7 +238,7 @@ class TestKeylessCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(KeylessCertificateEditResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -268,7 +266,7 @@ class TestKeylessCertificates: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(KeylessCertificateGetResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -281,7 +279,7 @@ class TestKeylessCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(KeylessCertificateGetResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -294,7 +292,7 @@ class TestKeylessCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(KeylessCertificateGetResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -328,7 +326,7 @@ class TestAsyncKeylessCertificates: host="example.com", port=24008, ) - assert_matches_type(KeylessCertificateCreateResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -345,7 +343,7 @@ class TestAsyncKeylessCertificates: "vnet_id": "7365377a-85a4-4390-9480-531ef7dc7a3c", }, ) - assert_matches_type(KeylessCertificateCreateResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -360,7 +358,7 @@ class TestAsyncKeylessCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(KeylessCertificateCreateResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -375,7 +373,7 @@ class TestAsyncKeylessCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(KeylessCertificateCreateResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -493,7 +491,7 @@ class TestAsyncKeylessCertificates: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(KeylessCertificateEditResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -510,7 +508,7 @@ class TestAsyncKeylessCertificates: "vnet_id": "7365377a-85a4-4390-9480-531ef7dc7a3c", }, ) - assert_matches_type(KeylessCertificateEditResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -523,7 +521,7 @@ class TestAsyncKeylessCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(KeylessCertificateEditResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -536,7 +534,7 @@ class TestAsyncKeylessCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(KeylessCertificateEditResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -564,7 +562,7 @@ class TestAsyncKeylessCertificates: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(KeylessCertificateGetResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -577,7 +575,7 @@ class TestAsyncKeylessCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(KeylessCertificateGetResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -590,7 +588,7 @@ class TestAsyncKeylessCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(KeylessCertificateGetResponse, keyless_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesBase, 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 18df3a60e..45650c63e 100644 --- a/tests/api_resources/test_mtls_certificates.py +++ b/tests/api_resources/test_mtls_certificates.py @@ -10,10 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( - MTLSCertificateGetResponse, MTLSCertificateListResponse, - MTLSCertificateCreateResponse, - MTLSCertificateDeleteResponse, + TLSCertificatesAndHostnamesCertificateObjectPost, + TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +29,7 @@ class TestMTLSCertificates: 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(MTLSCertificateCreateResponse, mtls_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesCertificateObjectPost, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +41,7 @@ class TestMTLSCertificates: 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(MTLSCertificateCreateResponse, mtls_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesCertificateObjectPost, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +55,7 @@ class TestMTLSCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = response.parse() - assert_matches_type(MTLSCertificateCreateResponse, mtls_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesCertificateObjectPost, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -70,7 +69,7 @@ class TestMTLSCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = response.parse() - assert_matches_type(MTLSCertificateCreateResponse, mtls_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesCertificateObjectPost, mtls_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -133,7 +132,9 @@ class TestMTLSCertificates: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(MTLSCertificateDeleteResponse, mtls_certificate, path=["response"]) + assert_matches_type( + TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -146,7 +147,9 @@ class TestMTLSCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = response.parse() - assert_matches_type(MTLSCertificateDeleteResponse, mtls_certificate, path=["response"]) + assert_matches_type( + TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -159,7 +162,9 @@ class TestMTLSCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = response.parse() - assert_matches_type(MTLSCertificateDeleteResponse, mtls_certificate, path=["response"]) + assert_matches_type( + TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -185,7 +190,9 @@ class TestMTLSCertificates: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(MTLSCertificateGetResponse, mtls_certificate, path=["response"]) + assert_matches_type( + TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -198,7 +205,9 @@ class TestMTLSCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = response.parse() - assert_matches_type(MTLSCertificateGetResponse, mtls_certificate, path=["response"]) + assert_matches_type( + TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -211,7 +220,9 @@ class TestMTLSCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = response.parse() - assert_matches_type(MTLSCertificateGetResponse, mtls_certificate, path=["response"]) + assert_matches_type( + TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -242,7 +253,7 @@ class TestAsyncMTLSCertificates: 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(MTLSCertificateCreateResponse, mtls_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesCertificateObjectPost, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -254,7 +265,7 @@ class TestAsyncMTLSCertificates: 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(MTLSCertificateCreateResponse, mtls_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesCertificateObjectPost, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -268,7 +279,7 @@ class TestAsyncMTLSCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = await response.parse() - assert_matches_type(MTLSCertificateCreateResponse, mtls_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesCertificateObjectPost, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -282,7 +293,7 @@ class TestAsyncMTLSCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = await response.parse() - assert_matches_type(MTLSCertificateCreateResponse, mtls_certificate, path=["response"]) + assert_matches_type(TLSCertificatesAndHostnamesCertificateObjectPost, mtls_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -345,7 +356,9 @@ class TestAsyncMTLSCertificates: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(MTLSCertificateDeleteResponse, mtls_certificate, path=["response"]) + assert_matches_type( + TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -358,7 +371,9 @@ class TestAsyncMTLSCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = await response.parse() - assert_matches_type(MTLSCertificateDeleteResponse, mtls_certificate, path=["response"]) + assert_matches_type( + TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -371,7 +386,9 @@ class TestAsyncMTLSCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = await response.parse() - assert_matches_type(MTLSCertificateDeleteResponse, mtls_certificate, path=["response"]) + assert_matches_type( + TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -397,7 +414,9 @@ class TestAsyncMTLSCertificates: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(MTLSCertificateGetResponse, mtls_certificate, path=["response"]) + assert_matches_type( + TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -410,7 +429,9 @@ class TestAsyncMTLSCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = await response.parse() - assert_matches_type(MTLSCertificateGetResponse, mtls_certificate, path=["response"]) + assert_matches_type( + TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -423,7 +444,9 @@ class TestAsyncMTLSCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = await response.parse() - assert_matches_type(MTLSCertificateGetResponse, mtls_certificate, path=["response"]) + assert_matches_type( + TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, 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 b934b7d62..94a3c70a6 100644 --- a/tests/api_resources/test_page_shield.py +++ b/tests/api_resources/test_page_shield.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import PageShieldListResponse, PageShieldUpdateResponse +from cloudflare.types import PageShieldGetZoneSettings, PageShieldUpdateZoneSettings base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestPageShield: page_shield = client.page_shield.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) + assert_matches_type(PageShieldUpdateZoneSettings, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -34,7 +34,7 @@ class TestPageShield: use_cloudflare_reporting_endpoint=True, use_connection_url_path=True, ) - assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) + assert_matches_type(PageShieldUpdateZoneSettings, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -46,7 +46,7 @@ class TestPageShield: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" page_shield = response.parse() - assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) + assert_matches_type(PageShieldUpdateZoneSettings, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -58,7 +58,7 @@ class TestPageShield: assert response.http_request.headers.get("X-Stainless-Lang") == "python" page_shield = response.parse() - assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) + assert_matches_type(PageShieldUpdateZoneSettings, page_shield, path=["response"]) assert cast(Any, response.is_closed) is True @@ -76,7 +76,7 @@ class TestPageShield: page_shield = client.page_shield.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PageShieldListResponse, page_shield, path=["response"]) + assert_matches_type(PageShieldGetZoneSettings, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -88,7 +88,7 @@ class TestPageShield: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" page_shield = response.parse() - assert_matches_type(PageShieldListResponse, page_shield, path=["response"]) + assert_matches_type(PageShieldGetZoneSettings, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -100,7 +100,7 @@ class TestPageShield: assert response.http_request.headers.get("X-Stainless-Lang") == "python" page_shield = response.parse() - assert_matches_type(PageShieldListResponse, page_shield, path=["response"]) + assert_matches_type(PageShieldGetZoneSettings, page_shield, path=["response"]) assert cast(Any, response.is_closed) is True @@ -122,7 +122,7 @@ class TestAsyncPageShield: page_shield = await async_client.page_shield.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) + assert_matches_type(PageShieldUpdateZoneSettings, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -133,7 +133,7 @@ class TestAsyncPageShield: use_cloudflare_reporting_endpoint=True, use_connection_url_path=True, ) - assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) + assert_matches_type(PageShieldUpdateZoneSettings, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +145,7 @@ class TestAsyncPageShield: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" page_shield = await response.parse() - assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) + assert_matches_type(PageShieldUpdateZoneSettings, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -157,7 +157,7 @@ class TestAsyncPageShield: assert response.http_request.headers.get("X-Stainless-Lang") == "python" page_shield = await response.parse() - assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) + assert_matches_type(PageShieldUpdateZoneSettings, page_shield, path=["response"]) assert cast(Any, response.is_closed) is True @@ -175,7 +175,7 @@ class TestAsyncPageShield: page_shield = await async_client.page_shield.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PageShieldListResponse, page_shield, path=["response"]) + assert_matches_type(PageShieldGetZoneSettings, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +187,7 @@ class TestAsyncPageShield: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" page_shield = await response.parse() - assert_matches_type(PageShieldListResponse, page_shield, path=["response"]) + assert_matches_type(PageShieldGetZoneSettings, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -199,7 +199,7 @@ class TestAsyncPageShield: assert response.http_request.headers.get("X-Stainless-Lang") == "python" page_shield = await response.parse() - assert_matches_type(PageShieldListResponse, page_shield, path=["response"]) + assert_matches_type(PageShieldGetZoneSettings, page_shield, 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 fa47fb56e..710f8e2b8 100644 --- a/tests/api_resources/test_queues.py +++ b/tests/api_resources/test_queues.py @@ -10,11 +10,11 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( - QueueGetResponse, + WorkersQueue, QueueListResponse, - QueueCreateResponse, QueueDeleteResponse, - QueueUpdateResponse, + WorkersQueueCreated, + WorkersQueueUpdated, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +30,7 @@ class TestQueues: account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "example-queue"}, ) - assert_matches_type(Optional[QueueCreateResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueueCreated], queue, path=["response"]) @pytest.mark.skip() @parametrize @@ -43,7 +43,7 @@ class TestQueues: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" queue = response.parse() - assert_matches_type(Optional[QueueCreateResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueueCreated], queue, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +56,7 @@ class TestQueues: assert response.http_request.headers.get("X-Stainless-Lang") == "python" queue = response.parse() - assert_matches_type(Optional[QueueCreateResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueueCreated], queue, path=["response"]) assert cast(Any, response.is_closed) is True @@ -77,7 +77,7 @@ class TestQueues: account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) - assert_matches_type(Optional[QueueUpdateResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueueUpdated], queue, path=["response"]) @pytest.mark.skip() @parametrize @@ -91,7 +91,7 @@ class TestQueues: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" queue = response.parse() - assert_matches_type(Optional[QueueUpdateResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueueUpdated], queue, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +105,7 @@ class TestQueues: assert response.http_request.headers.get("X-Stainless-Lang") == "python" queue = response.parse() - assert_matches_type(Optional[QueueUpdateResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueueUpdated], queue, path=["response"]) assert cast(Any, response.is_closed) is True @@ -227,7 +227,7 @@ class TestQueues: "example-queue", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[QueueGetResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueue], queue, path=["response"]) @pytest.mark.skip() @parametrize @@ -240,7 +240,7 @@ class TestQueues: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" queue = response.parse() - assert_matches_type(Optional[QueueGetResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueue], queue, path=["response"]) @pytest.mark.skip() @parametrize @@ -253,7 +253,7 @@ class TestQueues: assert response.http_request.headers.get("X-Stainless-Lang") == "python" queue = response.parse() - assert_matches_type(Optional[QueueGetResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueue], queue, path=["response"]) assert cast(Any, response.is_closed) is True @@ -283,7 +283,7 @@ class TestAsyncQueues: account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "example-queue"}, ) - assert_matches_type(Optional[QueueCreateResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueueCreated], queue, path=["response"]) @pytest.mark.skip() @parametrize @@ -296,7 +296,7 @@ class TestAsyncQueues: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" queue = await response.parse() - assert_matches_type(Optional[QueueCreateResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueueCreated], queue, path=["response"]) @pytest.mark.skip() @parametrize @@ -309,7 +309,7 @@ class TestAsyncQueues: assert response.http_request.headers.get("X-Stainless-Lang") == "python" queue = await response.parse() - assert_matches_type(Optional[QueueCreateResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueueCreated], queue, path=["response"]) assert cast(Any, response.is_closed) is True @@ -330,7 +330,7 @@ class TestAsyncQueues: account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) - assert_matches_type(Optional[QueueUpdateResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueueUpdated], queue, path=["response"]) @pytest.mark.skip() @parametrize @@ -344,7 +344,7 @@ class TestAsyncQueues: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" queue = await response.parse() - assert_matches_type(Optional[QueueUpdateResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueueUpdated], queue, path=["response"]) @pytest.mark.skip() @parametrize @@ -358,7 +358,7 @@ class TestAsyncQueues: assert response.http_request.headers.get("X-Stainless-Lang") == "python" queue = await response.parse() - assert_matches_type(Optional[QueueUpdateResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueueUpdated], queue, path=["response"]) assert cast(Any, response.is_closed) is True @@ -480,7 +480,7 @@ class TestAsyncQueues: "example-queue", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[QueueGetResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueue], queue, path=["response"]) @pytest.mark.skip() @parametrize @@ -493,7 +493,7 @@ class TestAsyncQueues: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" queue = await response.parse() - assert_matches_type(Optional[QueueGetResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueue], queue, path=["response"]) @pytest.mark.skip() @parametrize @@ -506,7 +506,7 @@ class TestAsyncQueues: assert response.http_request.headers.get("X-Stainless-Lang") == "python" queue = await response.parse() - assert_matches_type(Optional[QueueGetResponse], queue, path=["response"]) + assert_matches_type(Optional[WorkersQueue], 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 04b4d061c..3b37c9faa 100644 --- a/tests/api_resources/test_rulesets.py +++ b/tests/api_resources/test_rulesets.py @@ -10,10 +10,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( - RulesetGetResponse, - RulesetListResponse, - RulesetCreateResponse, - RulesetUpdateResponse, + RulesetsRulesetResponse, + RulesetsRulesetsResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -33,7 +31,7 @@ class TestRulesets: account_id="string", zone_id="string", ) - assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +94,7 @@ class TestRulesets: zone_id="string", description="My ruleset to execute managed rulesets", ) - assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -113,7 +111,7 @@ class TestRulesets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = response.parse() - assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -130,7 +128,7 @@ class TestRulesets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = response.parse() - assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -167,7 +165,7 @@ class TestRulesets: account_id="string", zone_id="string", ) - assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -232,7 +230,7 @@ class TestRulesets: name="My ruleset", phase="http_request_firewall_custom", ) - assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -248,7 +246,7 @@ class TestRulesets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = response.parse() - assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -264,7 +262,7 @@ class TestRulesets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = response.parse() - assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -305,7 +303,7 @@ class TestRulesets: account_id="string", zone_id="string", ) - assert_matches_type(RulesetListResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -314,7 +312,7 @@ class TestRulesets: account_id="string", zone_id="string", ) - assert_matches_type(RulesetListResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -327,7 +325,7 @@ class TestRulesets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = response.parse() - assert_matches_type(RulesetListResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -340,7 +338,7 @@ class TestRulesets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = response.parse() - assert_matches_type(RulesetListResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, ruleset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -441,7 +439,7 @@ class TestRulesets: account_id="string", zone_id="string", ) - assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -451,7 +449,7 @@ class TestRulesets: account_id="string", zone_id="string", ) - assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -465,7 +463,7 @@ class TestRulesets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = response.parse() - assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -479,7 +477,7 @@ class TestRulesets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = response.parse() - assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -522,7 +520,7 @@ class TestAsyncRulesets: account_id="string", zone_id="string", ) - assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -585,7 +583,7 @@ class TestAsyncRulesets: zone_id="string", description="My ruleset to execute managed rulesets", ) - assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -602,7 +600,7 @@ class TestAsyncRulesets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = await response.parse() - assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -619,7 +617,7 @@ class TestAsyncRulesets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = await response.parse() - assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -656,7 +654,7 @@ class TestAsyncRulesets: account_id="string", zone_id="string", ) - assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -721,7 +719,7 @@ class TestAsyncRulesets: name="My ruleset", phase="http_request_firewall_custom", ) - assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -737,7 +735,7 @@ class TestAsyncRulesets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = await response.parse() - assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -753,7 +751,7 @@ class TestAsyncRulesets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = await response.parse() - assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -794,7 +792,7 @@ class TestAsyncRulesets: account_id="string", zone_id="string", ) - assert_matches_type(RulesetListResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -803,7 +801,7 @@ class TestAsyncRulesets: account_id="string", zone_id="string", ) - assert_matches_type(RulesetListResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -816,7 +814,7 @@ class TestAsyncRulesets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = await response.parse() - assert_matches_type(RulesetListResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -829,7 +827,7 @@ class TestAsyncRulesets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = await response.parse() - assert_matches_type(RulesetListResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetsResponse, ruleset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -930,7 +928,7 @@ class TestAsyncRulesets: account_id="string", zone_id="string", ) - assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -940,7 +938,7 @@ class TestAsyncRulesets: account_id="string", zone_id="string", ) - assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -954,7 +952,7 @@ class TestAsyncRulesets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = await response.parse() - assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -968,7 +966,7 @@ class TestAsyncRulesets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = await response.parse() - assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) + assert_matches_type(RulesetsRulesetResponse, 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 b6424a587..2116a2537 100644 --- a/tests/api_resources/test_snippets.py +++ b/tests/api_resources/test_snippets.py @@ -9,12 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import ( - SnippetGetResponse, - SnippetListResponse, - SnippetDeleteResponse, - SnippetUpdateResponse, -) +from cloudflare.types import Snippet, SnippetListResponse, SnippetDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -29,7 +24,7 @@ class TestSnippets: "snippet_name_01", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SnippetUpdateResponse, snippet, path=["response"]) + assert_matches_type(Snippet, snippet, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +35,7 @@ class TestSnippets: files="export { async function fetch(request, env) {return new Response('some_response') } }", metadata={"main_module": "main.js"}, ) - assert_matches_type(SnippetUpdateResponse, snippet, path=["response"]) + assert_matches_type(Snippet, snippet, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +48,7 @@ class TestSnippets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = response.parse() - assert_matches_type(SnippetUpdateResponse, snippet, path=["response"]) + assert_matches_type(Snippet, snippet, path=["response"]) @pytest.mark.skip() @parametrize @@ -66,7 +61,7 @@ class TestSnippets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = response.parse() - assert_matches_type(SnippetUpdateResponse, snippet, path=["response"]) + assert_matches_type(Snippet, snippet, path=["response"]) assert cast(Any, response.is_closed) is True @@ -186,7 +181,7 @@ class TestSnippets: "snippet_name_01", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SnippetGetResponse, snippet, path=["response"]) + assert_matches_type(Snippet, snippet, path=["response"]) @pytest.mark.skip() @parametrize @@ -199,7 +194,7 @@ class TestSnippets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = response.parse() - assert_matches_type(SnippetGetResponse, snippet, path=["response"]) + assert_matches_type(Snippet, snippet, path=["response"]) @pytest.mark.skip() @parametrize @@ -212,7 +207,7 @@ class TestSnippets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = response.parse() - assert_matches_type(SnippetGetResponse, snippet, path=["response"]) + assert_matches_type(Snippet, snippet, path=["response"]) assert cast(Any, response.is_closed) is True @@ -242,7 +237,7 @@ class TestAsyncSnippets: "snippet_name_01", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SnippetUpdateResponse, snippet, path=["response"]) + assert_matches_type(Snippet, snippet, path=["response"]) @pytest.mark.skip() @parametrize @@ -253,7 +248,7 @@ class TestAsyncSnippets: files="export { async function fetch(request, env) {return new Response('some_response') } }", metadata={"main_module": "main.js"}, ) - assert_matches_type(SnippetUpdateResponse, snippet, path=["response"]) + assert_matches_type(Snippet, snippet, path=["response"]) @pytest.mark.skip() @parametrize @@ -266,7 +261,7 @@ class TestAsyncSnippets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = await response.parse() - assert_matches_type(SnippetUpdateResponse, snippet, path=["response"]) + assert_matches_type(Snippet, snippet, path=["response"]) @pytest.mark.skip() @parametrize @@ -279,7 +274,7 @@ class TestAsyncSnippets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = await response.parse() - assert_matches_type(SnippetUpdateResponse, snippet, path=["response"]) + assert_matches_type(Snippet, snippet, path=["response"]) assert cast(Any, response.is_closed) is True @@ -399,7 +394,7 @@ class TestAsyncSnippets: "snippet_name_01", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SnippetGetResponse, snippet, path=["response"]) + assert_matches_type(Snippet, snippet, path=["response"]) @pytest.mark.skip() @parametrize @@ -412,7 +407,7 @@ class TestAsyncSnippets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = await response.parse() - assert_matches_type(SnippetGetResponse, snippet, path=["response"]) + assert_matches_type(Snippet, snippet, path=["response"]) @pytest.mark.skip() @parametrize @@ -425,7 +420,7 @@ class TestAsyncSnippets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = await response.parse() - assert_matches_type(SnippetGetResponse, snippet, path=["response"]) + assert_matches_type(Snippet, snippet, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_speed.py b/tests/api_resources/test_speed.py index b2efa94ce..c57940934 100644 --- a/tests/api_resources/test_speed.py +++ b/tests/api_resources/test_speed.py @@ -10,9 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( + ObservatoryTrend, + ObservatorySchedule, SpeedDeleteResponse, - SpeedTrendsListResponse, - SpeedScheduleGetResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -90,7 +90,7 @@ class TestSpeed: "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SpeedScheduleGetResponse], speed, path=["response"]) + assert_matches_type(Optional[ObservatorySchedule], speed, path=["response"]) @pytest.mark.skip() @parametrize @@ -100,7 +100,7 @@ class TestSpeed: zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) - assert_matches_type(Optional[SpeedScheduleGetResponse], speed, path=["response"]) + assert_matches_type(Optional[ObservatorySchedule], speed, path=["response"]) @pytest.mark.skip() @parametrize @@ -113,7 +113,7 @@ class TestSpeed: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" speed = response.parse() - assert_matches_type(Optional[SpeedScheduleGetResponse], speed, path=["response"]) + assert_matches_type(Optional[ObservatorySchedule], speed, path=["response"]) @pytest.mark.skip() @parametrize @@ -126,7 +126,7 @@ class TestSpeed: assert response.http_request.headers.get("X-Stainless-Lang") == "python" speed = response.parse() - assert_matches_type(Optional[SpeedScheduleGetResponse], speed, path=["response"]) + assert_matches_type(Optional[ObservatorySchedule], speed, path=["response"]) assert cast(Any, response.is_closed) is True @@ -156,7 +156,7 @@ class TestSpeed: region="us-central1", tz="string", ) - assert_matches_type(Optional[SpeedTrendsListResponse], speed, path=["response"]) + assert_matches_type(Optional[ObservatoryTrend], speed, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestSpeed: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" speed = response.parse() - assert_matches_type(Optional[SpeedTrendsListResponse], speed, path=["response"]) + assert_matches_type(Optional[ObservatoryTrend], speed, path=["response"]) @pytest.mark.skip() @parametrize @@ -190,7 +190,7 @@ class TestSpeed: assert response.http_request.headers.get("X-Stainless-Lang") == "python" speed = response.parse() - assert_matches_type(Optional[SpeedTrendsListResponse], speed, path=["response"]) + assert_matches_type(Optional[ObservatoryTrend], speed, path=["response"]) assert cast(Any, response.is_closed) is True @@ -290,7 +290,7 @@ class TestAsyncSpeed: "example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SpeedScheduleGetResponse], speed, path=["response"]) + assert_matches_type(Optional[ObservatorySchedule], speed, path=["response"]) @pytest.mark.skip() @parametrize @@ -300,7 +300,7 @@ class TestAsyncSpeed: zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) - assert_matches_type(Optional[SpeedScheduleGetResponse], speed, path=["response"]) + assert_matches_type(Optional[ObservatorySchedule], speed, path=["response"]) @pytest.mark.skip() @parametrize @@ -313,7 +313,7 @@ class TestAsyncSpeed: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" speed = await response.parse() - assert_matches_type(Optional[SpeedScheduleGetResponse], speed, path=["response"]) + assert_matches_type(Optional[ObservatorySchedule], speed, path=["response"]) @pytest.mark.skip() @parametrize @@ -326,7 +326,7 @@ class TestAsyncSpeed: assert response.http_request.headers.get("X-Stainless-Lang") == "python" speed = await response.parse() - assert_matches_type(Optional[SpeedScheduleGetResponse], speed, path=["response"]) + assert_matches_type(Optional[ObservatorySchedule], speed, path=["response"]) assert cast(Any, response.is_closed) is True @@ -356,7 +356,7 @@ class TestAsyncSpeed: region="us-central1", tz="string", ) - assert_matches_type(Optional[SpeedTrendsListResponse], speed, path=["response"]) + assert_matches_type(Optional[ObservatoryTrend], speed, path=["response"]) @pytest.mark.skip() @parametrize @@ -373,7 +373,7 @@ class TestAsyncSpeed: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" speed = await response.parse() - assert_matches_type(Optional[SpeedTrendsListResponse], speed, path=["response"]) + assert_matches_type(Optional[ObservatoryTrend], speed, path=["response"]) @pytest.mark.skip() @parametrize @@ -390,7 +390,7 @@ class TestAsyncSpeed: assert response.http_request.headers.get("X-Stainless-Lang") == "python" speed = await response.parse() - assert_matches_type(Optional[SpeedTrendsListResponse], speed, path=["response"]) + assert_matches_type(Optional[ObservatoryTrend], speed, 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 5af1a82f7..0deab88b6 100644 --- a/tests/api_resources/test_stream.py +++ b/tests/api_resources/test_stream.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import StreamGetResponse, StreamListResponse +from cloudflare.types import StreamVideos, StreamListResponse from cloudflare._utils import parse_datetime base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -177,7 +177,7 @@ class TestStream: "ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(StreamGetResponse, stream, path=["response"]) + assert_matches_type(StreamVideos, stream, path=["response"]) @pytest.mark.skip() @parametrize @@ -190,7 +190,7 @@ class TestStream: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" stream = response.parse() - assert_matches_type(StreamGetResponse, stream, path=["response"]) + assert_matches_type(StreamVideos, stream, path=["response"]) @pytest.mark.skip() @parametrize @@ -203,7 +203,7 @@ class TestStream: assert response.http_request.headers.get("X-Stainless-Lang") == "python" stream = response.parse() - assert_matches_type(StreamGetResponse, stream, path=["response"]) + assert_matches_type(StreamVideos, stream, path=["response"]) assert cast(Any, response.is_closed) is True @@ -385,7 +385,7 @@ class TestAsyncStream: "ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(StreamGetResponse, stream, path=["response"]) + assert_matches_type(StreamVideos, stream, path=["response"]) @pytest.mark.skip() @parametrize @@ -398,7 +398,7 @@ class TestAsyncStream: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" stream = await response.parse() - assert_matches_type(StreamGetResponse, stream, path=["response"]) + assert_matches_type(StreamVideos, stream, path=["response"]) @pytest.mark.skip() @parametrize @@ -411,7 +411,7 @@ class TestAsyncStream: assert response.http_request.headers.get("X-Stainless-Lang") == "python" stream = await response.parse() - assert_matches_type(StreamGetResponse, stream, path=["response"]) + assert_matches_type(StreamVideos, stream, 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 adf7719b2..39313ee95 100644 --- a/tests/api_resources/test_waiting_rooms.py +++ b/tests/api_resources/test_waiting_rooms.py @@ -10,12 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( - WaitingRoomGetResponse, - WaitingRoomEditResponse, + WaitingroomWaitingroom, WaitingRoomListResponse, - WaitingRoomCreateResponse, WaitingRoomDeleteResponse, - WaitingRoomUpdateResponse, WaitingRoomPreviewResponse, ) @@ -35,7 +32,7 @@ class TestWaitingRooms: new_users_per_minute=200, total_active_users=200, ) - assert_matches_type(WaitingRoomCreateResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -77,7 +74,7 @@ class TestWaitingRooms: session_duration=1, suspended=True, ) - assert_matches_type(WaitingRoomCreateResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +90,7 @@ class TestWaitingRooms: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = response.parse() - assert_matches_type(WaitingRoomCreateResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -109,7 +106,7 @@ class TestWaitingRooms: assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = response.parse() - assert_matches_type(WaitingRoomCreateResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) assert cast(Any, response.is_closed) is True @@ -136,7 +133,7 @@ class TestWaitingRooms: new_users_per_minute=200, total_active_users=200, ) - assert_matches_type(WaitingRoomUpdateResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -179,7 +176,7 @@ class TestWaitingRooms: session_duration=1, suspended=True, ) - assert_matches_type(WaitingRoomUpdateResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -196,7 +193,7 @@ class TestWaitingRooms: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = response.parse() - assert_matches_type(WaitingRoomUpdateResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -213,7 +210,7 @@ class TestWaitingRooms: assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = response.parse() - assert_matches_type(WaitingRoomUpdateResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) assert cast(Any, response.is_closed) is True @@ -329,7 +326,7 @@ class TestWaitingRooms: new_users_per_minute=200, total_active_users=200, ) - assert_matches_type(WaitingRoomEditResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -372,7 +369,7 @@ class TestWaitingRooms: session_duration=1, suspended=True, ) - assert_matches_type(WaitingRoomEditResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -389,7 +386,7 @@ class TestWaitingRooms: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = response.parse() - assert_matches_type(WaitingRoomEditResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -406,7 +403,7 @@ class TestWaitingRooms: assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = response.parse() - assert_matches_type(WaitingRoomEditResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) assert cast(Any, response.is_closed) is True @@ -430,7 +427,7 @@ class TestWaitingRooms: "699d98642c564d2e855e9661899b7252", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(WaitingRoomGetResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -443,7 +440,7 @@ class TestWaitingRooms: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = response.parse() - assert_matches_type(WaitingRoomGetResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -456,7 +453,7 @@ class TestWaitingRooms: assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = response.parse() - assert_matches_type(WaitingRoomGetResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) assert cast(Any, response.is_closed) is True @@ -529,7 +526,7 @@ class TestAsyncWaitingRooms: new_users_per_minute=200, total_active_users=200, ) - assert_matches_type(WaitingRoomCreateResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -571,7 +568,7 @@ class TestAsyncWaitingRooms: session_duration=1, suspended=True, ) - assert_matches_type(WaitingRoomCreateResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -587,7 +584,7 @@ class TestAsyncWaitingRooms: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = await response.parse() - assert_matches_type(WaitingRoomCreateResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -603,7 +600,7 @@ class TestAsyncWaitingRooms: assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = await response.parse() - assert_matches_type(WaitingRoomCreateResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) assert cast(Any, response.is_closed) is True @@ -630,7 +627,7 @@ class TestAsyncWaitingRooms: new_users_per_minute=200, total_active_users=200, ) - assert_matches_type(WaitingRoomUpdateResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -673,7 +670,7 @@ class TestAsyncWaitingRooms: session_duration=1, suspended=True, ) - assert_matches_type(WaitingRoomUpdateResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -690,7 +687,7 @@ class TestAsyncWaitingRooms: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = await response.parse() - assert_matches_type(WaitingRoomUpdateResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -707,7 +704,7 @@ class TestAsyncWaitingRooms: assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = await response.parse() - assert_matches_type(WaitingRoomUpdateResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) assert cast(Any, response.is_closed) is True @@ -823,7 +820,7 @@ class TestAsyncWaitingRooms: new_users_per_minute=200, total_active_users=200, ) - assert_matches_type(WaitingRoomEditResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -866,7 +863,7 @@ class TestAsyncWaitingRooms: session_duration=1, suspended=True, ) - assert_matches_type(WaitingRoomEditResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -883,7 +880,7 @@ class TestAsyncWaitingRooms: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = await response.parse() - assert_matches_type(WaitingRoomEditResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -900,7 +897,7 @@ class TestAsyncWaitingRooms: assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = await response.parse() - assert_matches_type(WaitingRoomEditResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) assert cast(Any, response.is_closed) is True @@ -924,7 +921,7 @@ class TestAsyncWaitingRooms: "699d98642c564d2e855e9661899b7252", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(WaitingRoomGetResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -937,7 +934,7 @@ class TestAsyncWaitingRooms: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = await response.parse() - assert_matches_type(WaitingRoomGetResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -950,7 +947,7 @@ class TestAsyncWaitingRooms: assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = await response.parse() - assert_matches_type(WaitingRoomGetResponse, waiting_room, path=["response"]) + assert_matches_type(WaitingroomWaitingroom, 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 8ec819189..dcb2c1b0a 100644 --- a/tests/api_resources/user/firewall/test_access_rules.py +++ b/tests/api_resources/user/firewall/test_access_rules.py @@ -11,9 +11,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.user.firewall import ( - AccessRuleEditResponse, - AccessRuleListResponse, - AccessRuleCreateResponse, + LegacyJhsRule, AccessRuleDeleteResponse, ) @@ -30,7 +28,7 @@ class TestAccessRules: configuration={}, mode="challenge", ) - assert_matches_type(Optional[AccessRuleCreateResponse], access_rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -43,7 +41,7 @@ class TestAccessRules: mode="challenge", notes="This rule is enabled because of an event that occurred on date X.", ) - assert_matches_type(Optional[AccessRuleCreateResponse], access_rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +54,7 @@ class TestAccessRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" access_rule = response.parse() - assert_matches_type(Optional[AccessRuleCreateResponse], access_rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -69,7 +67,7 @@ class TestAccessRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" access_rule = response.parse() - assert_matches_type(Optional[AccessRuleCreateResponse], access_rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -77,7 +75,7 @@ class TestAccessRules: @parametrize def test_method_list(self, client: Cloudflare) -> None: access_rule = client.user.firewall.access_rules.list() - assert_matches_type(SyncV4PagePaginationArray[AccessRuleListResponse], access_rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -101,7 +99,7 @@ class TestAccessRules: page=1, per_page=20, ) - assert_matches_type(SyncV4PagePaginationArray[AccessRuleListResponse], access_rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -111,7 +109,7 @@ class TestAccessRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" access_rule = response.parse() - assert_matches_type(SyncV4PagePaginationArray[AccessRuleListResponse], access_rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -121,7 +119,7 @@ class TestAccessRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" access_rule = response.parse() - assert_matches_type(SyncV4PagePaginationArray[AccessRuleListResponse], access_rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LegacyJhsRule], access_rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -173,7 +171,7 @@ class TestAccessRules: access_rule = client.user.firewall.access_rules.edit( "92f17202ed8bd63d69a66b86a49a8f6b", ) - assert_matches_type(Optional[AccessRuleEditResponse], access_rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -183,7 +181,7 @@ class TestAccessRules: mode="challenge", notes="This rule is enabled because of an event that occurred on date X.", ) - assert_matches_type(Optional[AccessRuleEditResponse], access_rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -195,7 +193,7 @@ class TestAccessRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" access_rule = response.parse() - assert_matches_type(Optional[AccessRuleEditResponse], access_rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -207,7 +205,7 @@ class TestAccessRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" access_rule = response.parse() - assert_matches_type(Optional[AccessRuleEditResponse], access_rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -230,7 +228,7 @@ class TestAsyncAccessRules: configuration={}, mode="challenge", ) - assert_matches_type(Optional[AccessRuleCreateResponse], access_rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -243,7 +241,7 @@ class TestAsyncAccessRules: mode="challenge", notes="This rule is enabled because of an event that occurred on date X.", ) - assert_matches_type(Optional[AccessRuleCreateResponse], access_rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -256,7 +254,7 @@ class TestAsyncAccessRules: 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[AccessRuleCreateResponse], access_rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -269,7 +267,7 @@ class TestAsyncAccessRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" access_rule = await response.parse() - assert_matches_type(Optional[AccessRuleCreateResponse], access_rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -277,7 +275,7 @@ class TestAsyncAccessRules: @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[AccessRuleListResponse], access_rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -301,7 +299,7 @@ class TestAsyncAccessRules: page=1, per_page=20, ) - assert_matches_type(AsyncV4PagePaginationArray[AccessRuleListResponse], access_rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -311,7 +309,7 @@ class TestAsyncAccessRules: 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[AccessRuleListResponse], access_rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -321,7 +319,7 @@ class TestAsyncAccessRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" access_rule = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[AccessRuleListResponse], access_rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsRule], access_rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -373,7 +371,7 @@ class TestAsyncAccessRules: access_rule = await async_client.user.firewall.access_rules.edit( "92f17202ed8bd63d69a66b86a49a8f6b", ) - assert_matches_type(Optional[AccessRuleEditResponse], access_rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -383,7 +381,7 @@ class TestAsyncAccessRules: mode="challenge", notes="This rule is enabled because of an event that occurred on date X.", ) - assert_matches_type(Optional[AccessRuleEditResponse], access_rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -395,7 +393,7 @@ class TestAsyncAccessRules: 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[AccessRuleEditResponse], access_rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -407,7 +405,7 @@ class TestAsyncAccessRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" access_rule = await response.parse() - assert_matches_type(Optional[AccessRuleEditResponse], access_rule, path=["response"]) + assert_matches_type(Optional[LegacyJhsRule], access_rule, 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 933ae0e70..1d7fad2fe 100644 --- a/tests/api_resources/user/load_balancers/test_monitors.py +++ b/tests/api_resources/user/load_balancers/test_monitors.py @@ -10,12 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.user.load_balancers import ( - MonitorGetResponse, - MonitorEditResponse, MonitorListResponse, - MonitorCreateResponse, + LoadBalancingMonitor, MonitorDeleteResponse, - MonitorUpdateResponse, MonitorPreviewResponse, MonitorReferencesResponse, ) @@ -32,7 +29,7 @@ class TestMonitors: monitor = client.user.load_balancers.monitors.create( expected_codes="2xx", ) - assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -58,7 +55,7 @@ class TestMonitors: load_balancer_monitor_timeout=0, type="https", ) - assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -70,7 +67,7 @@ class TestMonitors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -82,7 +79,7 @@ class TestMonitors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) assert cast(Any, response.is_closed) is True @@ -93,7 +90,7 @@ class TestMonitors: "f1aba936b94213e5b8dca0c0dbf1f9cc", expected_codes="2xx", ) - assert_matches_type(MonitorUpdateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -120,7 +117,7 @@ class TestMonitors: load_balancer_monitor_timeout=0, type="https", ) - assert_matches_type(MonitorUpdateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -133,7 +130,7 @@ class TestMonitors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(MonitorUpdateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -146,7 +143,7 @@ class TestMonitors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(MonitorUpdateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) assert cast(Any, response.is_closed) is True @@ -236,7 +233,7 @@ class TestMonitors: "f1aba936b94213e5b8dca0c0dbf1f9cc", expected_codes="2xx", ) - assert_matches_type(MonitorEditResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -263,7 +260,7 @@ class TestMonitors: load_balancer_monitor_timeout=0, type="https", ) - assert_matches_type(MonitorEditResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -276,7 +273,7 @@ class TestMonitors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(MonitorEditResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -289,7 +286,7 @@ class TestMonitors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(MonitorEditResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) assert cast(Any, response.is_closed) is True @@ -308,7 +305,7 @@ class TestMonitors: monitor = client.user.load_balancers.monitors.get( "f1aba936b94213e5b8dca0c0dbf1f9cc", ) - assert_matches_type(MonitorGetResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -320,7 +317,7 @@ class TestMonitors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(MonitorGetResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -332,7 +329,7 @@ class TestMonitors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(MonitorGetResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) assert cast(Any, response.is_closed) is True @@ -469,7 +466,7 @@ class TestAsyncMonitors: monitor = await async_client.user.load_balancers.monitors.create( expected_codes="2xx", ) - assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -495,7 +492,7 @@ class TestAsyncMonitors: load_balancer_monitor_timeout=0, type="https", ) - assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -507,7 +504,7 @@ class TestAsyncMonitors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -519,7 +516,7 @@ class TestAsyncMonitors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) assert cast(Any, response.is_closed) is True @@ -530,7 +527,7 @@ class TestAsyncMonitors: "f1aba936b94213e5b8dca0c0dbf1f9cc", expected_codes="2xx", ) - assert_matches_type(MonitorUpdateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -557,7 +554,7 @@ class TestAsyncMonitors: load_balancer_monitor_timeout=0, type="https", ) - assert_matches_type(MonitorUpdateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -570,7 +567,7 @@ class TestAsyncMonitors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(MonitorUpdateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -583,7 +580,7 @@ class TestAsyncMonitors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(MonitorUpdateResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) assert cast(Any, response.is_closed) is True @@ -673,7 +670,7 @@ class TestAsyncMonitors: "f1aba936b94213e5b8dca0c0dbf1f9cc", expected_codes="2xx", ) - assert_matches_type(MonitorEditResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -700,7 +697,7 @@ class TestAsyncMonitors: load_balancer_monitor_timeout=0, type="https", ) - assert_matches_type(MonitorEditResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -713,7 +710,7 @@ class TestAsyncMonitors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(MonitorEditResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -726,7 +723,7 @@ class TestAsyncMonitors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(MonitorEditResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) assert cast(Any, response.is_closed) is True @@ -745,7 +742,7 @@ class TestAsyncMonitors: monitor = await async_client.user.load_balancers.monitors.get( "f1aba936b94213e5b8dca0c0dbf1f9cc", ) - assert_matches_type(MonitorGetResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -757,7 +754,7 @@ class TestAsyncMonitors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(MonitorGetResponse, monitor, path=["response"]) + assert_matches_type(LoadBalancingMonitor, monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -769,7 +766,7 @@ class TestAsyncMonitors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(MonitorGetResponse, monitor, path=["response"]) + assert_matches_type(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 5a1f4e5a8..e9ec989ff 100644 --- a/tests/api_resources/user/load_balancers/test_pools.py +++ b/tests/api_resources/user/load_balancers/test_pools.py @@ -10,13 +10,10 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.user.load_balancers import ( - PoolGetResponse, - PoolEditResponse, PoolListResponse, - PoolCreateResponse, + LoadBalancingPool, PoolDeleteResponse, PoolHealthResponse, - PoolUpdateResponse, PoolPreviewResponse, PoolReferencesResponse, ) @@ -34,7 +31,7 @@ class TestPools: name="primary-dc-1", origins=[{}, {}, {}], ) - assert_matches_type(PoolCreateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +90,7 @@ class TestPools: }, origin_steering={"policy": "random"}, ) - assert_matches_type(PoolCreateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +103,7 @@ class TestPools: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(PoolCreateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -119,7 +116,7 @@ class TestPools: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(PoolCreateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) assert cast(Any, response.is_closed) is True @@ -131,7 +128,7 @@ class TestPools: name="primary-dc-1", origins=[{}, {}, {}], ) - assert_matches_type(PoolUpdateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -191,7 +188,7 @@ class TestPools: }, origin_steering={"policy": "random"}, ) - assert_matches_type(PoolUpdateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -205,7 +202,7 @@ class TestPools: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(PoolUpdateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -219,7 +216,7 @@ class TestPools: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(PoolUpdateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) assert cast(Any, response.is_closed) is True @@ -317,7 +314,7 @@ class TestPools: pool = client.user.load_balancers.pools.edit( "17b5962d775c646f3f9725cbc7a53df4", ) - assert_matches_type(PoolEditResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -377,7 +374,7 @@ class TestPools: }, ], ) - assert_matches_type(PoolEditResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -389,7 +386,7 @@ class TestPools: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(PoolEditResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -401,7 +398,7 @@ class TestPools: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(PoolEditResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) assert cast(Any, response.is_closed) is True @@ -419,7 +416,7 @@ class TestPools: pool = client.user.load_balancers.pools.get( "17b5962d775c646f3f9725cbc7a53df4", ) - assert_matches_type(PoolGetResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -431,7 +428,7 @@ class TestPools: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(PoolGetResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -443,7 +440,7 @@ class TestPools: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(PoolGetResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) assert cast(Any, response.is_closed) is True @@ -623,7 +620,7 @@ class TestAsyncPools: name="primary-dc-1", origins=[{}, {}, {}], ) - assert_matches_type(PoolCreateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -682,7 +679,7 @@ class TestAsyncPools: }, origin_steering={"policy": "random"}, ) - assert_matches_type(PoolCreateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -695,7 +692,7 @@ class TestAsyncPools: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(PoolCreateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -708,7 +705,7 @@ class TestAsyncPools: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(PoolCreateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) assert cast(Any, response.is_closed) is True @@ -720,7 +717,7 @@ class TestAsyncPools: name="primary-dc-1", origins=[{}, {}, {}], ) - assert_matches_type(PoolUpdateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -780,7 +777,7 @@ class TestAsyncPools: }, origin_steering={"policy": "random"}, ) - assert_matches_type(PoolUpdateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -794,7 +791,7 @@ class TestAsyncPools: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(PoolUpdateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -808,7 +805,7 @@ class TestAsyncPools: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(PoolUpdateResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) assert cast(Any, response.is_closed) is True @@ -906,7 +903,7 @@ class TestAsyncPools: pool = await async_client.user.load_balancers.pools.edit( "17b5962d775c646f3f9725cbc7a53df4", ) - assert_matches_type(PoolEditResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -966,7 +963,7 @@ class TestAsyncPools: }, ], ) - assert_matches_type(PoolEditResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -978,7 +975,7 @@ class TestAsyncPools: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(PoolEditResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -990,7 +987,7 @@ class TestAsyncPools: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(PoolEditResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1008,7 +1005,7 @@ class TestAsyncPools: pool = await async_client.user.load_balancers.pools.get( "17b5962d775c646f3f9725cbc7a53df4", ) - assert_matches_type(PoolGetResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -1020,7 +1017,7 @@ class TestAsyncPools: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(PoolGetResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -1032,7 +1029,7 @@ class TestAsyncPools: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(PoolGetResponse, pool, path=["response"]) + assert_matches_type(LoadBalancingPool, pool, 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 da474ad71..c2fc4a50c 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.user.load_balancers import PreviewGetResponse +from cloudflare.types.user.load_balancers import LoadBalancingPreviewResult base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestPreview: preview = client.user.load_balancers.preview.get( "f1aba936b94213e5b8dca0c0dbf1f9cc", ) - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,7 @@ class TestPreview: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = response.parse() - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ class TestPreview: assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = response.parse() - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) assert cast(Any, response.is_closed) is True @@ -61,7 +61,7 @@ class TestAsyncPreview: preview = await async_client.user.load_balancers.preview.get( "f1aba936b94213e5b8dca0c0dbf1f9cc", ) - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -73,7 +73,7 @@ class TestAsyncPreview: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = await response.parse() - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -85,6 +85,6 @@ class TestAsyncPreview: assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = await response.parse() - assert_matches_type(PreviewGetResponse, preview, path=["response"]) + assert_matches_type(LoadBalancingPreviewResult, 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 ab1e79853..60449931b 100644 --- a/tests/api_resources/user/test_organizations.py +++ b/tests/api_resources/user/test_organizations.py @@ -11,8 +11,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.user import ( + IamOrganization, OrganizationGetResponse, - OrganizationListResponse, 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[OrganizationListResponse], organization, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[IamOrganization], organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +40,7 @@ class TestOrganizations: per_page=5, status="member", ) - assert_matches_type(SyncV4PagePaginationArray[OrganizationListResponse], organization, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[IamOrganization], organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestOrganizations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = response.parse() - assert_matches_type(SyncV4PagePaginationArray[OrganizationListResponse], organization, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[IamOrganization], organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -60,7 +60,7 @@ class TestOrganizations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = response.parse() - assert_matches_type(SyncV4PagePaginationArray[OrganizationListResponse], organization, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[IamOrganization], 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[OrganizationListResponse], organization, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[IamOrganization], organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -170,7 +170,7 @@ class TestAsyncOrganizations: per_page=5, status="member", ) - assert_matches_type(AsyncV4PagePaginationArray[OrganizationListResponse], organization, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[IamOrganization], organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -180,7 +180,7 @@ class TestAsyncOrganizations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[OrganizationListResponse], organization, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[IamOrganization], organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -190,7 +190,7 @@ class TestAsyncOrganizations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[OrganizationListResponse], organization, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[IamOrganization], organization, 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 6fd818e1f..89d304fbc 100644 --- a/tests/api_resources/vectorize/test_indexes.py +++ b/tests/api_resources/vectorize/test_indexes.py @@ -10,15 +10,13 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.vectorize import ( - IndexGetResponse, IndexListResponse, - IndexQueryResponse, - IndexCreateResponse, IndexDeleteResponse, - IndexInsertResponse, - IndexUpdateResponse, - IndexUpsertResponse, - IndexDeleteByIDsResponse, + VectorizeIndexQuery, + VectorizeCreateIndex, + VectorizeIndexInsert, + VectorizeIndexUpsert, + VectorizeIndexDeleteVectorsByID, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -35,7 +33,7 @@ class TestIndexes: config={"preset": "@cf/baai/bge-small-en-v1.5"}, name="example-index", ) - assert_matches_type(Optional[IndexCreateResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -46,7 +44,7 @@ class TestIndexes: name="example-index", description="This is my example index.", ) - assert_matches_type(Optional[IndexCreateResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -60,7 +58,7 @@ class TestIndexes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = response.parse() - assert_matches_type(Optional[IndexCreateResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -74,7 +72,7 @@ class TestIndexes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = response.parse() - assert_matches_type(Optional[IndexCreateResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) assert cast(Any, response.is_closed) is True @@ -96,7 +94,7 @@ class TestIndexes: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) - assert_matches_type(Optional[IndexUpdateResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -110,7 +108,7 @@ class TestIndexes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = response.parse() - assert_matches_type(Optional[IndexUpdateResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -124,7 +122,7 @@ class TestIndexes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = response.parse() - assert_matches_type(Optional[IndexUpdateResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) assert cast(Any, response.is_closed) is True @@ -246,7 +244,7 @@ class TestIndexes: "example-index", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[IndexDeleteByIDsResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexDeleteVectorsByID], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -256,7 +254,7 @@ class TestIndexes: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ids=["5121db81354a40c6aedc3fe1ace51c59", "f90eb49c2107486abdfd78c67e853430"], ) - assert_matches_type(Optional[IndexDeleteByIDsResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexDeleteVectorsByID], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -269,7 +267,7 @@ class TestIndexes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = response.parse() - assert_matches_type(Optional[IndexDeleteByIDsResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexDeleteVectorsByID], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -282,7 +280,7 @@ class TestIndexes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = response.parse() - assert_matches_type(Optional[IndexDeleteByIDsResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexDeleteVectorsByID], index, path=["response"]) assert cast(Any, response.is_closed) is True @@ -308,7 +306,7 @@ class TestIndexes: "example-index", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[IndexGetResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -321,7 +319,7 @@ class TestIndexes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = response.parse() - assert_matches_type(Optional[IndexGetResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -334,7 +332,7 @@ class TestIndexes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = response.parse() - assert_matches_type(Optional[IndexGetResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) assert cast(Any, response.is_closed) is True @@ -422,7 +420,7 @@ class TestIndexes: "example-index", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[IndexInsertResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexInsert], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -435,7 +433,7 @@ class TestIndexes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = response.parse() - assert_matches_type(Optional[IndexInsertResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexInsert], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -448,7 +446,7 @@ class TestIndexes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = response.parse() - assert_matches_type(Optional[IndexInsertResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexInsert], index, path=["response"]) assert cast(Any, response.is_closed) is True @@ -474,7 +472,7 @@ class TestIndexes: "example-index", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[IndexQueryResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexQuery], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -487,7 +485,7 @@ class TestIndexes: top_k=5, vector=[0.5, 0.5, 0.5], ) - assert_matches_type(Optional[IndexQueryResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexQuery], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -500,7 +498,7 @@ class TestIndexes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = response.parse() - assert_matches_type(Optional[IndexQueryResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexQuery], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -513,7 +511,7 @@ class TestIndexes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = response.parse() - assert_matches_type(Optional[IndexQueryResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexQuery], index, path=["response"]) assert cast(Any, response.is_closed) is True @@ -539,7 +537,7 @@ class TestIndexes: "example-index", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[IndexUpsertResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexUpsert], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -552,7 +550,7 @@ class TestIndexes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = response.parse() - assert_matches_type(Optional[IndexUpsertResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexUpsert], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -565,7 +563,7 @@ class TestIndexes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = response.parse() - assert_matches_type(Optional[IndexUpsertResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexUpsert], index, path=["response"]) assert cast(Any, response.is_closed) is True @@ -596,7 +594,7 @@ class TestAsyncIndexes: config={"preset": "@cf/baai/bge-small-en-v1.5"}, name="example-index", ) - assert_matches_type(Optional[IndexCreateResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -607,7 +605,7 @@ class TestAsyncIndexes: name="example-index", description="This is my example index.", ) - assert_matches_type(Optional[IndexCreateResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -621,7 +619,7 @@ class TestAsyncIndexes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = await response.parse() - assert_matches_type(Optional[IndexCreateResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -635,7 +633,7 @@ class TestAsyncIndexes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = await response.parse() - assert_matches_type(Optional[IndexCreateResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) assert cast(Any, response.is_closed) is True @@ -657,7 +655,7 @@ class TestAsyncIndexes: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) - assert_matches_type(Optional[IndexUpdateResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -671,7 +669,7 @@ class TestAsyncIndexes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = await response.parse() - assert_matches_type(Optional[IndexUpdateResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -685,7 +683,7 @@ class TestAsyncIndexes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = await response.parse() - assert_matches_type(Optional[IndexUpdateResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) assert cast(Any, response.is_closed) is True @@ -807,7 +805,7 @@ class TestAsyncIndexes: "example-index", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[IndexDeleteByIDsResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexDeleteVectorsByID], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -817,7 +815,7 @@ class TestAsyncIndexes: account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ids=["5121db81354a40c6aedc3fe1ace51c59", "f90eb49c2107486abdfd78c67e853430"], ) - assert_matches_type(Optional[IndexDeleteByIDsResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexDeleteVectorsByID], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -830,7 +828,7 @@ class TestAsyncIndexes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = await response.parse() - assert_matches_type(Optional[IndexDeleteByIDsResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexDeleteVectorsByID], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -843,7 +841,7 @@ class TestAsyncIndexes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = await response.parse() - assert_matches_type(Optional[IndexDeleteByIDsResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexDeleteVectorsByID], index, path=["response"]) assert cast(Any, response.is_closed) is True @@ -869,7 +867,7 @@ class TestAsyncIndexes: "example-index", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[IndexGetResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -882,7 +880,7 @@ class TestAsyncIndexes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = await response.parse() - assert_matches_type(Optional[IndexGetResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -895,7 +893,7 @@ class TestAsyncIndexes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = await response.parse() - assert_matches_type(Optional[IndexGetResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeCreateIndex], index, path=["response"]) assert cast(Any, response.is_closed) is True @@ -983,7 +981,7 @@ class TestAsyncIndexes: "example-index", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[IndexInsertResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexInsert], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -996,7 +994,7 @@ class TestAsyncIndexes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = await response.parse() - assert_matches_type(Optional[IndexInsertResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexInsert], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -1009,7 +1007,7 @@ class TestAsyncIndexes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = await response.parse() - assert_matches_type(Optional[IndexInsertResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexInsert], index, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1035,7 +1033,7 @@ class TestAsyncIndexes: "example-index", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[IndexQueryResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexQuery], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -1048,7 +1046,7 @@ class TestAsyncIndexes: top_k=5, vector=[0.5, 0.5, 0.5], ) - assert_matches_type(Optional[IndexQueryResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexQuery], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -1061,7 +1059,7 @@ class TestAsyncIndexes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = await response.parse() - assert_matches_type(Optional[IndexQueryResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexQuery], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -1074,7 +1072,7 @@ class TestAsyncIndexes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = await response.parse() - assert_matches_type(Optional[IndexQueryResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexQuery], index, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1100,7 +1098,7 @@ class TestAsyncIndexes: "example-index", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[IndexUpsertResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexUpsert], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -1113,7 +1111,7 @@ class TestAsyncIndexes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = await response.parse() - assert_matches_type(Optional[IndexUpsertResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexUpsert], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -1126,7 +1124,7 @@ class TestAsyncIndexes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = await response.parse() - assert_matches_type(Optional[IndexUpsertResponse], index, path=["response"]) + assert_matches_type(Optional[VectorizeIndexUpsert], index, 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 0dc2fdb17..7c50e2c9c 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.waiting_rooms.events import DetailGetResponse +from cloudflare.types.waiting_rooms.events import WaitingroomEventDetailsResult base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ class TestDetails: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(DetailGetResponse, detail, path=["response"]) + assert_matches_type(WaitingroomEventDetailsResult, detail, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,7 @@ class TestDetails: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" detail = response.parse() - assert_matches_type(DetailGetResponse, detail, path=["response"]) + assert_matches_type(WaitingroomEventDetailsResult, detail, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +53,7 @@ class TestDetails: assert response.http_request.headers.get("X-Stainless-Lang") == "python" detail = response.parse() - assert_matches_type(DetailGetResponse, detail, path=["response"]) + assert_matches_type(WaitingroomEventDetailsResult, detail, path=["response"]) assert cast(Any, response.is_closed) is True @@ -79,7 +79,7 @@ class TestAsyncDetails: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(DetailGetResponse, detail, path=["response"]) + assert_matches_type(WaitingroomEventDetailsResult, detail, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestAsyncDetails: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" detail = await response.parse() - assert_matches_type(DetailGetResponse, detail, path=["response"]) + assert_matches_type(WaitingroomEventDetailsResult, detail, path=["response"]) @pytest.mark.skip() @parametrize @@ -107,7 +107,7 @@ class TestAsyncDetails: assert response.http_request.headers.get("X-Stainless-Lang") == "python" detail = await response.parse() - assert_matches_type(DetailGetResponse, detail, path=["response"]) + assert_matches_type(WaitingroomEventDetailsResult, 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 4cc938d31..ff7749608 100644 --- a/tests/api_resources/waiting_rooms/test_events.py +++ b/tests/api_resources/waiting_rooms/test_events.py @@ -10,12 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.waiting_rooms import ( - EventGetResponse, - EventEditResponse, EventListResponse, - EventCreateResponse, EventDeleteResponse, - EventUpdateResponse, + WaitingroomEventResult, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -34,7 +31,7 @@ class TestEvents: event_start_time="2021-09-28T15:30:00.000Z", name="production_webinar_event", ) - assert_matches_type(EventCreateResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +53,7 @@ class TestEvents: suspended=True, total_active_users=200, ) - assert_matches_type(EventCreateResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -72,7 +69,7 @@ class TestEvents: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(EventCreateResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -88,7 +85,7 @@ class TestEvents: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(EventCreateResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -115,7 +112,7 @@ class TestEvents: event_start_time="2021-09-28T15:30:00.000Z", name="production_webinar_event", ) - assert_matches_type(EventUpdateResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -138,7 +135,7 @@ class TestEvents: suspended=True, total_active_users=200, ) - assert_matches_type(EventUpdateResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +152,7 @@ class TestEvents: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(EventUpdateResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -172,7 +169,7 @@ class TestEvents: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(EventUpdateResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -296,7 +293,7 @@ class TestEvents: event_start_time="2021-09-28T15:30:00.000Z", name="production_webinar_event", ) - assert_matches_type(EventEditResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -319,7 +316,7 @@ class TestEvents: suspended=True, total_active_users=200, ) - assert_matches_type(EventEditResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -336,7 +333,7 @@ class TestEvents: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(EventEditResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -353,7 +350,7 @@ class TestEvents: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(EventEditResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -378,7 +375,7 @@ class TestEvents: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(EventGetResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -392,7 +389,7 @@ class TestEvents: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(EventGetResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -406,7 +403,7 @@ class TestEvents: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(EventGetResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -434,7 +431,7 @@ class TestAsyncEvents: event_start_time="2021-09-28T15:30:00.000Z", name="production_webinar_event", ) - assert_matches_type(EventCreateResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -456,7 +453,7 @@ class TestAsyncEvents: suspended=True, total_active_users=200, ) - assert_matches_type(EventCreateResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -472,7 +469,7 @@ class TestAsyncEvents: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(EventCreateResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -488,7 +485,7 @@ class TestAsyncEvents: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(EventCreateResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -515,7 +512,7 @@ class TestAsyncEvents: event_start_time="2021-09-28T15:30:00.000Z", name="production_webinar_event", ) - assert_matches_type(EventUpdateResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -538,7 +535,7 @@ class TestAsyncEvents: suspended=True, total_active_users=200, ) - assert_matches_type(EventUpdateResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -555,7 +552,7 @@ class TestAsyncEvents: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(EventUpdateResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -572,7 +569,7 @@ class TestAsyncEvents: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(EventUpdateResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -696,7 +693,7 @@ class TestAsyncEvents: event_start_time="2021-09-28T15:30:00.000Z", name="production_webinar_event", ) - assert_matches_type(EventEditResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -719,7 +716,7 @@ class TestAsyncEvents: suspended=True, total_active_users=200, ) - assert_matches_type(EventEditResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -736,7 +733,7 @@ class TestAsyncEvents: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(EventEditResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -753,7 +750,7 @@ class TestAsyncEvents: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(EventEditResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -778,7 +775,7 @@ class TestAsyncEvents: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(EventGetResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -792,7 +789,7 @@ class TestAsyncEvents: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(EventGetResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -806,7 +803,7 @@ class TestAsyncEvents: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(EventGetResponse, event, path=["response"]) + assert_matches_type(WaitingroomEventResult, 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 29936afe0..c156ac68f 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 @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.web3.hostnames.ipfs_universal_paths.content_lists import ( - EntryGetResponse, EntryListResponse, - EntryCreateResponse, EntryDeleteResponse, - EntryUpdateResponse, + DwebConfigContentListEntry, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -32,7 +30,7 @@ class TestEntries: content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", ) - assert_matches_type(EntryCreateResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +42,7 @@ class TestEntries: type="cid", description="this is my content list entry", ) - assert_matches_type(EntryCreateResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -59,7 +57,7 @@ class TestEntries: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = response.parse() - assert_matches_type(EntryCreateResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -74,7 +72,7 @@ class TestEntries: assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = response.parse() - assert_matches_type(EntryCreateResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) assert cast(Any, response.is_closed) is True @@ -107,7 +105,7 @@ class TestEntries: content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", ) - assert_matches_type(EntryUpdateResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -120,7 +118,7 @@ class TestEntries: type="cid", description="this is my content list entry", ) - assert_matches_type(EntryUpdateResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -136,7 +134,7 @@ class TestEntries: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = response.parse() - assert_matches_type(EntryUpdateResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -152,7 +150,7 @@ class TestEntries: assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = response.parse() - assert_matches_type(EntryUpdateResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) assert cast(Any, response.is_closed) is True @@ -314,7 +312,7 @@ class TestEntries: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(EntryGetResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -328,7 +326,7 @@ class TestEntries: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = response.parse() - assert_matches_type(EntryGetResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -342,7 +340,7 @@ class TestEntries: assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = response.parse() - assert_matches_type(EntryGetResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) assert cast(Any, response.is_closed) is True @@ -385,7 +383,7 @@ class TestAsyncEntries: content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", ) - assert_matches_type(EntryCreateResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -397,7 +395,7 @@ class TestAsyncEntries: type="cid", description="this is my content list entry", ) - assert_matches_type(EntryCreateResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -414,7 +412,7 @@ class TestAsyncEntries: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = await response.parse() - assert_matches_type(EntryCreateResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -429,7 +427,7 @@ class TestAsyncEntries: assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = await response.parse() - assert_matches_type(EntryCreateResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) assert cast(Any, response.is_closed) is True @@ -462,7 +460,7 @@ class TestAsyncEntries: content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", ) - assert_matches_type(EntryUpdateResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -475,7 +473,7 @@ class TestAsyncEntries: type="cid", description="this is my content list entry", ) - assert_matches_type(EntryUpdateResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -493,7 +491,7 @@ class TestAsyncEntries: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = await response.parse() - assert_matches_type(EntryUpdateResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -509,7 +507,7 @@ class TestAsyncEntries: assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = await response.parse() - assert_matches_type(EntryUpdateResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) assert cast(Any, response.is_closed) is True @@ -673,7 +671,7 @@ class TestAsyncEntries: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(EntryGetResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -687,7 +685,7 @@ class TestAsyncEntries: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = await response.parse() - assert_matches_type(EntryGetResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -701,7 +699,7 @@ class TestAsyncEntries: assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = await response.parse() - assert_matches_type(EntryGetResponse, entry, path=["response"]) + assert_matches_type(DwebConfigContentListEntry, 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 92c6f0c28..336905565 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,8 +10,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.web3.hostnames.ipfs_universal_paths import ( - ContentListGetResponse, - ContentListUpdateResponse, + DwebConfigContentListDetails, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -29,7 +28,7 @@ class TestContentLists: action="block", entries=[{}, {}, {}], ) - assert_matches_type(ContentListUpdateResponse, content_list, path=["response"]) + assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +43,7 @@ class TestContentLists: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" content_list = response.parse() - assert_matches_type(ContentListUpdateResponse, content_list, path=["response"]) + assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) @pytest.mark.skip() @parametrize @@ -59,7 +58,7 @@ class TestContentLists: assert response.http_request.headers.get("X-Stainless-Lang") == "python" content_list = response.parse() - assert_matches_type(ContentListUpdateResponse, content_list, path=["response"]) + assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -89,7 +88,7 @@ class TestContentLists: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ContentListGetResponse, content_list, path=["response"]) + assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) @pytest.mark.skip() @parametrize @@ -102,7 +101,7 @@ class TestContentLists: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" content_list = response.parse() - assert_matches_type(ContentListGetResponse, content_list, path=["response"]) + assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) @pytest.mark.skip() @parametrize @@ -115,7 +114,7 @@ class TestContentLists: assert response.http_request.headers.get("X-Stainless-Lang") == "python" content_list = response.parse() - assert_matches_type(ContentListGetResponse, content_list, path=["response"]) + assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -147,7 +146,7 @@ class TestAsyncContentLists: action="block", entries=[{}, {}, {}], ) - assert_matches_type(ContentListUpdateResponse, content_list, path=["response"]) + assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) @pytest.mark.skip() @parametrize @@ -162,7 +161,7 @@ class TestAsyncContentLists: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" content_list = await response.parse() - assert_matches_type(ContentListUpdateResponse, content_list, path=["response"]) + assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) @pytest.mark.skip() @parametrize @@ -177,7 +176,7 @@ class TestAsyncContentLists: assert response.http_request.headers.get("X-Stainless-Lang") == "python" content_list = await response.parse() - assert_matches_type(ContentListUpdateResponse, content_list, path=["response"]) + assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -207,7 +206,7 @@ class TestAsyncContentLists: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ContentListGetResponse, content_list, path=["response"]) + assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) @pytest.mark.skip() @parametrize @@ -220,7 +219,7 @@ class TestAsyncContentLists: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" content_list = await response.parse() - assert_matches_type(ContentListGetResponse, content_list, path=["response"]) + assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) @pytest.mark.skip() @parametrize @@ -233,7 +232,7 @@ class TestAsyncContentLists: assert response.http_request.headers.get("X-Stainless-Lang") == "python" content_list = await response.parse() - assert_matches_type(ContentListGetResponse, content_list, path=["response"]) + assert_matches_type(DwebConfigContentListDetails, 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 bba97c0f8..4a41e6eba 100644 --- a/tests/api_resources/web3/test_hostnames.py +++ b/tests/api_resources/web3/test_hostnames.py @@ -10,10 +10,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.web3 import ( - HostnameGetResponse, - HostnameEditResponse, HostnameListResponse, - HostnameCreateResponse, + DwebConfigWeb3Hostname, HostnameDeleteResponse, ) @@ -30,7 +28,7 @@ class TestHostnames: "023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", ) - assert_matches_type(HostnameCreateResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +39,7 @@ class TestHostnames: description="This is my IPFS gateway.", dnslink="/ipns/onboarding.ipfs.cloudflare.com", ) - assert_matches_type(HostnameCreateResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -54,7 +52,7 @@ class TestHostnames: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = response.parse() - assert_matches_type(HostnameCreateResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -67,7 +65,7 @@ class TestHostnames: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = response.parse() - assert_matches_type(HostnameCreateResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) assert cast(Any, response.is_closed) is True @@ -181,7 +179,7 @@ class TestHostnames: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HostnameEditResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -192,7 +190,7 @@ class TestHostnames: description="This is my IPFS gateway.", dnslink="/ipns/onboarding.ipfs.cloudflare.com", ) - assert_matches_type(HostnameEditResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -205,7 +203,7 @@ class TestHostnames: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = response.parse() - assert_matches_type(HostnameEditResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -218,7 +216,7 @@ class TestHostnames: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = response.parse() - assert_matches_type(HostnameEditResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) assert cast(Any, response.is_closed) is True @@ -244,7 +242,7 @@ class TestHostnames: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HostnameGetResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -257,7 +255,7 @@ class TestHostnames: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = response.parse() - assert_matches_type(HostnameGetResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -270,7 +268,7 @@ class TestHostnames: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = response.parse() - assert_matches_type(HostnameGetResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) assert cast(Any, response.is_closed) is True @@ -300,7 +298,7 @@ class TestAsyncHostnames: "023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", ) - assert_matches_type(HostnameCreateResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -311,7 +309,7 @@ class TestAsyncHostnames: description="This is my IPFS gateway.", dnslink="/ipns/onboarding.ipfs.cloudflare.com", ) - assert_matches_type(HostnameCreateResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -324,7 +322,7 @@ class TestAsyncHostnames: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = await response.parse() - assert_matches_type(HostnameCreateResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -337,7 +335,7 @@ class TestAsyncHostnames: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = await response.parse() - assert_matches_type(HostnameCreateResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) assert cast(Any, response.is_closed) is True @@ -451,7 +449,7 @@ class TestAsyncHostnames: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HostnameEditResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -462,7 +460,7 @@ class TestAsyncHostnames: description="This is my IPFS gateway.", dnslink="/ipns/onboarding.ipfs.cloudflare.com", ) - assert_matches_type(HostnameEditResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -475,7 +473,7 @@ class TestAsyncHostnames: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = await response.parse() - assert_matches_type(HostnameEditResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -488,7 +486,7 @@ class TestAsyncHostnames: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = await response.parse() - assert_matches_type(HostnameEditResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) assert cast(Any, response.is_closed) is True @@ -514,7 +512,7 @@ class TestAsyncHostnames: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HostnameGetResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -527,7 +525,7 @@ class TestAsyncHostnames: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = await response.parse() - assert_matches_type(HostnameGetResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -540,7 +538,7 @@ class TestAsyncHostnames: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = await response.parse() - assert_matches_type(HostnameGetResponse, hostname, path=["response"]) + assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/workers/scripts/test_content.py b/tests/api_resources/workers/scripts/test_content.py index 50d8c9031..30b481e7d 100644 --- a/tests/api_resources/workers/scripts/test_content.py +++ b/tests/api_resources/workers/scripts/test_content.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.workers.scripts import ContentUpdateResponse +from cloudflare.types.workers import WorkersScript base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestContent: "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ContentUpdateResponse, content, path=["response"]) + assert_matches_type(WorkersScript, content, path=["response"]) @pytest.mark.skip() @parametrize @@ -38,7 +38,7 @@ class TestContent: "main_module": "worker.js", }, ) - assert_matches_type(ContentUpdateResponse, content, path=["response"]) + assert_matches_type(WorkersScript, content, path=["response"]) @pytest.mark.skip() @parametrize @@ -51,7 +51,7 @@ class TestContent: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" content = response.parse() - assert_matches_type(ContentUpdateResponse, content, path=["response"]) + assert_matches_type(WorkersScript, content, path=["response"]) @pytest.mark.skip() @parametrize @@ -64,7 +64,7 @@ class TestContent: assert response.http_request.headers.get("X-Stainless-Lang") == "python" content = response.parse() - assert_matches_type(ContentUpdateResponse, content, path=["response"]) + assert_matches_type(WorkersScript, content, path=["response"]) assert cast(Any, response.is_closed) is True @@ -94,7 +94,7 @@ class TestAsyncContent: "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ContentUpdateResponse, content, path=["response"]) + assert_matches_type(WorkersScript, content, path=["response"]) @pytest.mark.skip() @parametrize @@ -108,7 +108,7 @@ class TestAsyncContent: "main_module": "worker.js", }, ) - assert_matches_type(ContentUpdateResponse, content, path=["response"]) + assert_matches_type(WorkersScript, content, path=["response"]) @pytest.mark.skip() @parametrize @@ -121,7 +121,7 @@ class TestAsyncContent: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" content = await response.parse() - assert_matches_type(ContentUpdateResponse, content, path=["response"]) + assert_matches_type(WorkersScript, content, path=["response"]) @pytest.mark.skip() @parametrize @@ -134,7 +134,7 @@ class TestAsyncContent: assert response.http_request.headers.get("X-Stainless-Lang") == "python" content = await response.parse() - assert_matches_type(ContentUpdateResponse, content, path=["response"]) + assert_matches_type(WorkersScript, content, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/workers/services/environments/test_content.py b/tests/api_resources/workers/services/environments/test_content.py index a8f010337..1383fbb37 100644 --- a/tests/api_resources/workers/services/environments/test_content.py +++ b/tests/api_resources/workers/services/environments/test_content.py @@ -17,7 +17,7 @@ from cloudflare._response import ( StreamedBinaryAPIResponse, AsyncStreamedBinaryAPIResponse, ) -from cloudflare.types.workers.services.environments import ContentUpdateResponse +from cloudflare.types.workers import WorkersScript base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -33,7 +33,7 @@ class TestContent: account_id="023e105f4ecef8ad9ca31a8372d0c353", service_name="my-worker", ) - assert_matches_type(ContentUpdateResponse, content, path=["response"]) + assert_matches_type(WorkersScript, content, path=["response"]) @pytest.mark.skip() @parametrize @@ -48,7 +48,7 @@ class TestContent: "main_module": "worker.js", }, ) - assert_matches_type(ContentUpdateResponse, content, path=["response"]) + assert_matches_type(WorkersScript, content, path=["response"]) @pytest.mark.skip() @parametrize @@ -62,7 +62,7 @@ class TestContent: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" content = response.parse() - assert_matches_type(ContentUpdateResponse, content, path=["response"]) + assert_matches_type(WorkersScript, content, path=["response"]) @pytest.mark.skip() @parametrize @@ -76,7 +76,7 @@ class TestContent: assert response.http_request.headers.get("X-Stainless-Lang") == "python" content = response.parse() - assert_matches_type(ContentUpdateResponse, content, path=["response"]) + assert_matches_type(WorkersScript, content, path=["response"]) assert cast(Any, response.is_closed) is True @@ -198,7 +198,7 @@ class TestAsyncContent: account_id="023e105f4ecef8ad9ca31a8372d0c353", service_name="my-worker", ) - assert_matches_type(ContentUpdateResponse, content, path=["response"]) + assert_matches_type(WorkersScript, content, path=["response"]) @pytest.mark.skip() @parametrize @@ -213,7 +213,7 @@ class TestAsyncContent: "main_module": "worker.js", }, ) - assert_matches_type(ContentUpdateResponse, content, path=["response"]) + assert_matches_type(WorkersScript, content, path=["response"]) @pytest.mark.skip() @parametrize @@ -227,7 +227,7 @@ class TestAsyncContent: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" content = await response.parse() - assert_matches_type(ContentUpdateResponse, content, path=["response"]) + assert_matches_type(WorkersScript, content, path=["response"]) @pytest.mark.skip() @parametrize @@ -241,7 +241,7 @@ class TestAsyncContent: assert response.http_request.headers.get("X-Stainless-Lang") == "python" content = await response.parse() - assert_matches_type(ContentUpdateResponse, content, path=["response"]) + assert_matches_type(WorkersScript, content, 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 0ffd33b13..3f8511837 100644 --- a/tests/api_resources/workers/test_domains.py +++ b/tests/api_resources/workers/test_domains.py @@ -9,11 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.workers import ( - DomainGetResponse, - DomainListResponse, - DomainUpdateResponse, -) +from cloudflare.types.workers import WorkersDomain, DomainListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -31,7 +27,7 @@ class TestDomains: service="foo", zone_id="593c9c94de529bbbfaac7c53ced0447d", ) - assert_matches_type(DomainUpdateResponse, domain, path=["response"]) + assert_matches_type(WorkersDomain, domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +43,7 @@ class TestDomains: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = response.parse() - assert_matches_type(DomainUpdateResponse, domain, path=["response"]) + assert_matches_type(WorkersDomain, domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -63,7 +59,7 @@ class TestDomains: assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = response.parse() - assert_matches_type(DomainUpdateResponse, domain, path=["response"]) + assert_matches_type(WorkersDomain, domain, path=["response"]) assert cast(Any, response.is_closed) is True @@ -158,7 +154,7 @@ class TestDomains: "dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) - assert_matches_type(DomainGetResponse, domain, path=["response"]) + assert_matches_type(WorkersDomain, domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +167,7 @@ class TestDomains: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = response.parse() - assert_matches_type(DomainGetResponse, domain, path=["response"]) + assert_matches_type(WorkersDomain, domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -184,7 +180,7 @@ class TestDomains: assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = response.parse() - assert_matches_type(DomainGetResponse, domain, path=["response"]) + assert_matches_type(WorkersDomain, domain, path=["response"]) assert cast(Any, response.is_closed) is True @@ -202,7 +198,7 @@ class TestAsyncDomains: service="foo", zone_id="593c9c94de529bbbfaac7c53ced0447d", ) - assert_matches_type(DomainUpdateResponse, domain, path=["response"]) + assert_matches_type(WorkersDomain, domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -218,7 +214,7 @@ class TestAsyncDomains: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = await response.parse() - assert_matches_type(DomainUpdateResponse, domain, path=["response"]) + assert_matches_type(WorkersDomain, domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -234,7 +230,7 @@ class TestAsyncDomains: assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = await response.parse() - assert_matches_type(DomainUpdateResponse, domain, path=["response"]) + assert_matches_type(WorkersDomain, domain, path=["response"]) assert cast(Any, response.is_closed) is True @@ -329,7 +325,7 @@ class TestAsyncDomains: "dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) - assert_matches_type(DomainGetResponse, domain, path=["response"]) + assert_matches_type(WorkersDomain, domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -342,7 +338,7 @@ class TestAsyncDomains: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = await response.parse() - assert_matches_type(DomainGetResponse, domain, path=["response"]) + assert_matches_type(WorkersDomain, domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -355,6 +351,6 @@ class TestAsyncDomains: assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = await response.parse() - assert_matches_type(DomainGetResponse, domain, path=["response"]) + assert_matches_type(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 e8c545dae..ec958dedc 100644 --- a/tests/api_resources/workers/test_filters.py +++ b/tests/api_resources/workers/test_filters.py @@ -10,10 +10,10 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.workers import ( + WorkersFilters, FilterListResponse, FilterCreateResponse, FilterDeleteResponse, - FilterUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -81,7 +81,7 @@ class TestFilters: enabled=True, pattern="example.net/*", ) - assert_matches_type(FilterUpdateResponse, filter, path=["response"]) + assert_matches_type(WorkersFilters, filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +96,7 @@ class TestFilters: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(FilterUpdateResponse, filter, path=["response"]) + assert_matches_type(WorkersFilters, filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -111,7 +111,7 @@ class TestFilters: assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(FilterUpdateResponse, filter, path=["response"]) + assert_matches_type(WorkersFilters, filter, path=["response"]) assert cast(Any, response.is_closed) is True @@ -291,7 +291,7 @@ class TestAsyncFilters: enabled=True, pattern="example.net/*", ) - assert_matches_type(FilterUpdateResponse, filter, path=["response"]) + assert_matches_type(WorkersFilters, filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -306,7 +306,7 @@ class TestAsyncFilters: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(FilterUpdateResponse, filter, path=["response"]) + assert_matches_type(WorkersFilters, filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -321,7 +321,7 @@ class TestAsyncFilters: assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(FilterUpdateResponse, filter, path=["response"]) + assert_matches_type(WorkersFilters, 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 70f3d3d99..ff3f4ace9 100644 --- a/tests/api_resources/workers/test_routes.py +++ b/tests/api_resources/workers/test_routes.py @@ -10,11 +10,10 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.workers import ( - RouteGetResponse, + WorkersRoutes, RouteListResponse, RouteCreateResponse, RouteDeleteResponse, - RouteUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -87,7 +86,7 @@ class TestRoutes: zone_id="023e105f4ecef8ad9ca31a8372d0c353", pattern="example.net/*", ) - assert_matches_type(RouteUpdateResponse, route, path=["response"]) + assert_matches_type(WorkersRoutes, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -98,7 +97,7 @@ class TestRoutes: pattern="example.net/*", script="this-is_my_script-01", ) - assert_matches_type(RouteUpdateResponse, route, path=["response"]) + assert_matches_type(WorkersRoutes, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -112,7 +111,7 @@ class TestRoutes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = response.parse() - assert_matches_type(RouteUpdateResponse, route, path=["response"]) + assert_matches_type(WorkersRoutes, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -126,7 +125,7 @@ class TestRoutes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = response.parse() - assert_matches_type(RouteUpdateResponse, route, path=["response"]) + assert_matches_type(WorkersRoutes, route, path=["response"]) assert cast(Any, response.is_closed) is True @@ -248,7 +247,7 @@ class TestRoutes: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RouteGetResponse, route, path=["response"]) + assert_matches_type(WorkersRoutes, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -261,7 +260,7 @@ class TestRoutes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = response.parse() - assert_matches_type(RouteGetResponse, route, path=["response"]) + assert_matches_type(WorkersRoutes, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -274,7 +273,7 @@ class TestRoutes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = response.parse() - assert_matches_type(RouteGetResponse, route, path=["response"]) + assert_matches_type(WorkersRoutes, route, path=["response"]) assert cast(Any, response.is_closed) is True @@ -361,7 +360,7 @@ class TestAsyncRoutes: zone_id="023e105f4ecef8ad9ca31a8372d0c353", pattern="example.net/*", ) - assert_matches_type(RouteUpdateResponse, route, path=["response"]) + assert_matches_type(WorkersRoutes, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -372,7 +371,7 @@ class TestAsyncRoutes: pattern="example.net/*", script="this-is_my_script-01", ) - assert_matches_type(RouteUpdateResponse, route, path=["response"]) + assert_matches_type(WorkersRoutes, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -386,7 +385,7 @@ class TestAsyncRoutes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = await response.parse() - assert_matches_type(RouteUpdateResponse, route, path=["response"]) + assert_matches_type(WorkersRoutes, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -400,7 +399,7 @@ class TestAsyncRoutes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = await response.parse() - assert_matches_type(RouteUpdateResponse, route, path=["response"]) + assert_matches_type(WorkersRoutes, route, path=["response"]) assert cast(Any, response.is_closed) is True @@ -522,7 +521,7 @@ class TestAsyncRoutes: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RouteGetResponse, route, path=["response"]) + assert_matches_type(WorkersRoutes, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -535,7 +534,7 @@ class TestAsyncRoutes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = await response.parse() - assert_matches_type(RouteGetResponse, route, path=["response"]) + assert_matches_type(WorkersRoutes, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -548,7 +547,7 @@ class TestAsyncRoutes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = await response.parse() - assert_matches_type(RouteGetResponse, route, path=["response"]) + assert_matches_type(WorkersRoutes, 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 8659e23a9..6fc134d31 100644 --- a/tests/api_resources/workers/test_scripts.py +++ b/tests/api_resources/workers/test_scripts.py @@ -17,10 +17,7 @@ from cloudflare._response import ( StreamedBinaryAPIResponse, AsyncStreamedBinaryAPIResponse, ) -from cloudflare.types.workers import ( - ScriptListResponse, - ScriptUpdateResponse, -) +from cloudflare.types.workers import WorkersScript, ScriptListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -35,7 +32,7 @@ class TestScripts: "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -120,7 +117,7 @@ class TestScripts: "version_tags": {}, }, ) - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -133,7 +130,7 @@ class TestScripts: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = response.parse() - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -146,7 +143,7 @@ class TestScripts: assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = response.parse() - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) assert cast(Any, response.is_closed) is True @@ -350,7 +347,7 @@ class TestAsyncScripts: "this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -435,7 +432,7 @@ class TestAsyncScripts: "version_tags": {}, }, ) - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -448,7 +445,7 @@ class TestAsyncScripts: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = await response.parse() - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -461,7 +458,7 @@ class TestAsyncScripts: assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = await response.parse() - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/content/test_scripts.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/content/test_scripts.py index fb83f50f0..3a69bb416 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/content/test_scripts.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/content/test_scripts.py @@ -17,9 +17,7 @@ from cloudflare._response import ( StreamedBinaryAPIResponse, AsyncStreamedBinaryAPIResponse, ) -from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts.content import ( - ScriptUpdateResponse, -) +from cloudflare.types.workers import WorkersScript base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -35,7 +33,7 @@ class TestScripts: account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +48,7 @@ class TestScripts: "main_module": "worker.js", }, ) - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -64,7 +62,7 @@ class TestScripts: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = response.parse() - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -78,7 +76,7 @@ class TestScripts: assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = response.parse() - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) assert cast(Any, response.is_closed) is True @@ -200,7 +198,7 @@ class TestAsyncScripts: account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -215,7 +213,7 @@ class TestAsyncScripts: "main_module": "worker.js", }, ) - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -229,7 +227,7 @@ class TestAsyncScripts: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = await response.parse() - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -243,7 +241,7 @@ class TestAsyncScripts: assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = await response.parse() - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, 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 2adca84f6..42ef6446e 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 @@ -9,9 +9,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.types.workers import WorkersScript from cloudflare.types.workers_for_platforms.dispatch.namespaces import ( - ScriptGetResponse, - ScriptUpdateResponse, + WorkersNamespaceScript, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -28,7 +28,7 @@ class TestScripts: account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -113,7 +113,7 @@ class TestScripts: "version_tags": {}, }, ) - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -127,7 +127,7 @@ class TestScripts: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = response.parse() - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -141,7 +141,7 @@ class TestScripts: assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = response.parse() - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) assert cast(Any, response.is_closed) is True @@ -252,7 +252,7 @@ class TestScripts: account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) - assert_matches_type(ScriptGetResponse, script, path=["response"]) + assert_matches_type(WorkersNamespaceScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -266,7 +266,7 @@ class TestScripts: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = response.parse() - assert_matches_type(ScriptGetResponse, script, path=["response"]) + assert_matches_type(WorkersNamespaceScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -280,7 +280,7 @@ class TestScripts: assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = response.parse() - assert_matches_type(ScriptGetResponse, script, path=["response"]) + assert_matches_type(WorkersNamespaceScript, script, path=["response"]) assert cast(Any, response.is_closed) is True @@ -320,7 +320,7 @@ class TestAsyncScripts: account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -405,7 +405,7 @@ class TestAsyncScripts: "version_tags": {}, }, ) - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -419,7 +419,7 @@ class TestAsyncScripts: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = await response.parse() - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -433,7 +433,7 @@ class TestAsyncScripts: assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = await response.parse() - assert_matches_type(ScriptUpdateResponse, script, path=["response"]) + assert_matches_type(WorkersScript, script, path=["response"]) assert cast(Any, response.is_closed) is True @@ -544,7 +544,7 @@ class TestAsyncScripts: account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) - assert_matches_type(ScriptGetResponse, script, path=["response"]) + assert_matches_type(WorkersNamespaceScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -558,7 +558,7 @@ class TestAsyncScripts: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = await response.parse() - assert_matches_type(ScriptGetResponse, script, path=["response"]) + assert_matches_type(WorkersNamespaceScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -572,7 +572,7 @@ class TestAsyncScripts: assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = await response.parse() - assert_matches_type(ScriptGetResponse, script, path=["response"]) + assert_matches_type(WorkersNamespaceScript, 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 c981a4877..99a400372 100644 --- a/tests/api_resources/zero_trust/access/applications/test_policies.py +++ b/tests/api_resources/zero_trust/access/applications/test_policies.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.access.applications import ( - PolicyGetResponse, + AccessPolicies, PolicyListResponse, - PolicyCreateResponse, PolicyDeleteResponse, - PolicyUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -38,7 +36,7 @@ class TestPolicies: account_id="string", zone_id="string", ) - assert_matches_type(PolicyCreateResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -83,7 +81,7 @@ class TestPolicies: ], session_duration="24h", ) - assert_matches_type(PolicyCreateResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -104,7 +102,7 @@ class TestPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(PolicyCreateResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -125,7 +123,7 @@ class TestPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(PolicyCreateResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -190,7 +188,7 @@ class TestPolicies: account_id="string", zone_id="string", ) - assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -236,7 +234,7 @@ class TestPolicies: ], session_duration="24h", ) - assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -258,7 +256,7 @@ class TestPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -280,7 +278,7 @@ class TestPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -519,7 +517,7 @@ class TestPolicies: account_id="string", zone_id="string", ) - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -530,7 +528,7 @@ class TestPolicies: account_id="string", zone_id="string", ) - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -545,7 +543,7 @@ class TestPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -560,7 +558,7 @@ class TestPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -618,7 +616,7 @@ class TestAsyncPolicies: account_id="string", zone_id="string", ) - assert_matches_type(PolicyCreateResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -663,7 +661,7 @@ class TestAsyncPolicies: ], session_duration="24h", ) - assert_matches_type(PolicyCreateResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -684,7 +682,7 @@ class TestAsyncPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(PolicyCreateResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -705,7 +703,7 @@ class TestAsyncPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(PolicyCreateResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -770,7 +768,7 @@ class TestAsyncPolicies: account_id="string", zone_id="string", ) - assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -816,7 +814,7 @@ class TestAsyncPolicies: ], session_duration="24h", ) - assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -838,7 +836,7 @@ class TestAsyncPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -860,7 +858,7 @@ class TestAsyncPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1099,7 +1097,7 @@ class TestAsyncPolicies: account_id="string", zone_id="string", ) - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -1110,7 +1108,7 @@ class TestAsyncPolicies: account_id="string", zone_id="string", ) - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -1125,7 +1123,7 @@ class TestAsyncPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -1140,7 +1138,7 @@ class TestAsyncPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(PolicyGetResponse, policy, path=["response"]) + assert_matches_type(AccessPolicies, 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 08ab26ef8..add993f47 100644 --- a/tests/api_resources/zero_trust/access/test_applications.py +++ b/tests/api_resources/zero_trust/access/test_applications.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.access import ( - ApplicationGetResponse, + AccessApps, ApplicationListResponse, - ApplicationCreateResponse, ApplicationDeleteResponse, - ApplicationUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +28,7 @@ class TestApplications: account_id="string", zone_id="string", ) - assert_matches_type(ApplicationCreateResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -94,7 +92,7 @@ class TestApplications: tags=["engineers", "engineers", "engineers"], type="bookmark", ) - assert_matches_type(ApplicationCreateResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -107,7 +105,7 @@ class TestApplications: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(ApplicationCreateResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -120,7 +118,7 @@ class TestApplications: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(ApplicationCreateResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -147,7 +145,7 @@ class TestApplications: account_id="string", zone_id="string", ) - assert_matches_type(ApplicationUpdateResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -212,7 +210,7 @@ class TestApplications: tags=["engineers", "engineers", "engineers"], type="bookmark", ) - assert_matches_type(ApplicationUpdateResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -226,7 +224,7 @@ class TestApplications: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(ApplicationUpdateResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -240,7 +238,7 @@ class TestApplications: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(ApplicationUpdateResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -397,7 +395,7 @@ class TestApplications: account_id="string", zone_id="string", ) - assert_matches_type(ApplicationGetResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -407,7 +405,7 @@ class TestApplications: account_id="string", zone_id="string", ) - assert_matches_type(ApplicationGetResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -421,7 +419,7 @@ class TestApplications: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(ApplicationGetResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -435,7 +433,7 @@ class TestApplications: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(ApplicationGetResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -534,7 +532,7 @@ class TestAsyncApplications: account_id="string", zone_id="string", ) - assert_matches_type(ApplicationCreateResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -598,7 +596,7 @@ class TestAsyncApplications: tags=["engineers", "engineers", "engineers"], type="bookmark", ) - assert_matches_type(ApplicationCreateResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -611,7 +609,7 @@ class TestAsyncApplications: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(ApplicationCreateResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -624,7 +622,7 @@ class TestAsyncApplications: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(ApplicationCreateResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -651,7 +649,7 @@ class TestAsyncApplications: account_id="string", zone_id="string", ) - assert_matches_type(ApplicationUpdateResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -716,7 +714,7 @@ class TestAsyncApplications: tags=["engineers", "engineers", "engineers"], type="bookmark", ) - assert_matches_type(ApplicationUpdateResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -730,7 +728,7 @@ class TestAsyncApplications: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(ApplicationUpdateResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -744,7 +742,7 @@ class TestAsyncApplications: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(ApplicationUpdateResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -901,7 +899,7 @@ class TestAsyncApplications: account_id="string", zone_id="string", ) - assert_matches_type(ApplicationGetResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -911,7 +909,7 @@ class TestAsyncApplications: account_id="string", zone_id="string", ) - assert_matches_type(ApplicationGetResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -925,7 +923,7 @@ class TestAsyncApplications: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(ApplicationGetResponse, application, path=["response"]) + assert_matches_type(AccessApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -939,7 +937,7 @@ class TestAsyncApplications: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(ApplicationGetResponse, application, path=["response"]) + assert_matches_type(AccessApps, 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 6a93d3a8e..1083fa5c6 100644 --- a/tests/api_resources/zero_trust/access/test_bookmarks.py +++ b/tests/api_resources/zero_trust/access/test_bookmarks.py @@ -9,13 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.access import ( - BookmarkGetResponse, - BookmarkListResponse, - BookmarkCreateResponse, - BookmarkDeleteResponse, - BookmarkUpdateResponse, -) +from cloudflare.types.zero_trust.access import AccessBookmarks, BookmarkListResponse, BookmarkDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +24,7 @@ class TestBookmarks: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(BookmarkCreateResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -43,7 +37,7 @@ class TestBookmarks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = response.parse() - assert_matches_type(BookmarkCreateResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +50,7 @@ class TestBookmarks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = response.parse() - assert_matches_type(BookmarkCreateResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, bookmark, path=["response"]) assert cast(Any, response.is_closed) is True @@ -76,7 +70,7 @@ class TestBookmarks: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(BookmarkUpdateResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -89,7 +83,7 @@ class TestBookmarks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = response.parse() - assert_matches_type(BookmarkUpdateResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -102,7 +96,7 @@ class TestBookmarks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = response.parse() - assert_matches_type(BookmarkUpdateResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, bookmark, path=["response"]) assert cast(Any, response.is_closed) is True @@ -202,7 +196,7 @@ class TestBookmarks: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(BookmarkGetResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -215,7 +209,7 @@ class TestBookmarks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = response.parse() - assert_matches_type(BookmarkGetResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -228,7 +222,7 @@ class TestBookmarks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = response.parse() - assert_matches_type(BookmarkGetResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, bookmark, path=["response"]) assert cast(Any, response.is_closed) is True @@ -252,7 +246,7 @@ class TestAsyncBookmarks: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(BookmarkCreateResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -265,7 +259,7 @@ class TestAsyncBookmarks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = await response.parse() - assert_matches_type(BookmarkCreateResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -278,7 +272,7 @@ class TestAsyncBookmarks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = await response.parse() - assert_matches_type(BookmarkCreateResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, bookmark, path=["response"]) assert cast(Any, response.is_closed) is True @@ -298,7 +292,7 @@ class TestAsyncBookmarks: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(BookmarkUpdateResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -311,7 +305,7 @@ class TestAsyncBookmarks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = await response.parse() - assert_matches_type(BookmarkUpdateResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -324,7 +318,7 @@ class TestAsyncBookmarks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = await response.parse() - assert_matches_type(BookmarkUpdateResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, bookmark, path=["response"]) assert cast(Any, response.is_closed) is True @@ -424,7 +418,7 @@ class TestAsyncBookmarks: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(BookmarkGetResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -437,7 +431,7 @@ class TestAsyncBookmarks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = await response.parse() - assert_matches_type(BookmarkGetResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -450,7 +444,7 @@ class TestAsyncBookmarks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = await response.parse() - assert_matches_type(BookmarkGetResponse, bookmark, path=["response"]) + assert_matches_type(AccessBookmarks, 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 e6a020295..85e8df2b3 100644 --- a/tests/api_resources/zero_trust/access/test_certificates.py +++ b/tests/api_resources/zero_trust/access/test_certificates.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.access import ( - CertificateGetResponse, + AccessCertificates, CertificateListResponse, - CertificateCreateResponse, CertificateDeleteResponse, - CertificateUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -32,7 +30,7 @@ class TestCertificates: account_id="string", zone_id="string", ) - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +42,7 @@ class TestCertificates: zone_id="string", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], ) - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -59,7 +57,7 @@ class TestCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -74,7 +72,7 @@ class TestCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -106,7 +104,7 @@ class TestCertificates: account_id="string", zone_id="string", ) - assert_matches_type(CertificateUpdateResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -118,7 +116,7 @@ class TestCertificates: zone_id="string", name="Allow devs", ) - assert_matches_type(CertificateUpdateResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -133,7 +131,7 @@ class TestCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateUpdateResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -148,7 +146,7 @@ class TestCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateUpdateResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -322,7 +320,7 @@ class TestCertificates: account_id="string", zone_id="string", ) - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -332,7 +330,7 @@ class TestCertificates: account_id="string", zone_id="string", ) - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -346,7 +344,7 @@ class TestCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -360,7 +358,7 @@ class TestCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -401,7 +399,7 @@ class TestAsyncCertificates: account_id="string", zone_id="string", ) - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -413,7 +411,7 @@ class TestAsyncCertificates: zone_id="string", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], ) - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -428,7 +426,7 @@ class TestAsyncCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -443,7 +441,7 @@ class TestAsyncCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateCreateResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -475,7 +473,7 @@ class TestAsyncCertificates: account_id="string", zone_id="string", ) - assert_matches_type(CertificateUpdateResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -487,7 +485,7 @@ class TestAsyncCertificates: zone_id="string", name="Allow devs", ) - assert_matches_type(CertificateUpdateResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -502,7 +500,7 @@ class TestAsyncCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateUpdateResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -517,7 +515,7 @@ class TestAsyncCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateUpdateResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -691,7 +689,7 @@ class TestAsyncCertificates: account_id="string", zone_id="string", ) - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -701,7 +699,7 @@ class TestAsyncCertificates: account_id="string", zone_id="string", ) - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -715,7 +713,7 @@ class TestAsyncCertificates: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -729,7 +727,7 @@ class TestAsyncCertificates: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(CertificateGetResponse, certificate, path=["response"]) + assert_matches_type(AccessCertificates, 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 073e4c38a..7d14f7fba 100644 --- a/tests/api_resources/zero_trust/access/test_custom_pages.py +++ b/tests/api_resources/zero_trust/access/test_custom_pages.py @@ -10,11 +10,10 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.access import ( - CustomPageGetResponse, + AccessCustomPage, CustomPageListResponse, - CustomPageCreateResponse, CustomPageDeleteResponse, - CustomPageUpdateResponse, + AccessCustomPageWithoutHTML, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -32,7 +31,7 @@ class TestCustomPages: name="string", type="identity_denied", ) - assert_matches_type(CustomPageCreateResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +43,7 @@ class TestCustomPages: type="identity_denied", app_count=0, ) - assert_matches_type(CustomPageCreateResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -59,7 +58,7 @@ class TestCustomPages: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = response.parse() - assert_matches_type(CustomPageCreateResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -74,7 +73,7 @@ class TestCustomPages: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = response.parse() - assert_matches_type(CustomPageCreateResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) assert cast(Any, response.is_closed) is True @@ -99,7 +98,7 @@ class TestCustomPages: name="string", type="identity_denied", ) - assert_matches_type(CustomPageUpdateResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -112,7 +111,7 @@ class TestCustomPages: type="identity_denied", app_count=0, ) - assert_matches_type(CustomPageUpdateResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -128,7 +127,7 @@ class TestCustomPages: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = response.parse() - assert_matches_type(CustomPageUpdateResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -144,7 +143,7 @@ class TestCustomPages: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = response.parse() - assert_matches_type(CustomPageUpdateResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) assert cast(Any, response.is_closed) is True @@ -270,7 +269,7 @@ class TestCustomPages: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CustomPageGetResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPage, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -283,7 +282,7 @@ class TestCustomPages: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = response.parse() - assert_matches_type(CustomPageGetResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPage, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -296,7 +295,7 @@ class TestCustomPages: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = response.parse() - assert_matches_type(CustomPageGetResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPage, custom_page, path=["response"]) assert cast(Any, response.is_closed) is True @@ -328,7 +327,7 @@ class TestAsyncCustomPages: name="string", type="identity_denied", ) - assert_matches_type(CustomPageCreateResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -340,7 +339,7 @@ class TestAsyncCustomPages: type="identity_denied", app_count=0, ) - assert_matches_type(CustomPageCreateResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -355,7 +354,7 @@ class TestAsyncCustomPages: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = await response.parse() - assert_matches_type(CustomPageCreateResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -370,7 +369,7 @@ class TestAsyncCustomPages: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = await response.parse() - assert_matches_type(CustomPageCreateResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) assert cast(Any, response.is_closed) is True @@ -395,7 +394,7 @@ class TestAsyncCustomPages: name="string", type="identity_denied", ) - assert_matches_type(CustomPageUpdateResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -408,7 +407,7 @@ class TestAsyncCustomPages: type="identity_denied", app_count=0, ) - assert_matches_type(CustomPageUpdateResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -424,7 +423,7 @@ class TestAsyncCustomPages: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = await response.parse() - assert_matches_type(CustomPageUpdateResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -440,7 +439,7 @@ class TestAsyncCustomPages: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = await response.parse() - assert_matches_type(CustomPageUpdateResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) assert cast(Any, response.is_closed) is True @@ -566,7 +565,7 @@ class TestAsyncCustomPages: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CustomPageGetResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPage, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -579,7 +578,7 @@ class TestAsyncCustomPages: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = await response.parse() - assert_matches_type(CustomPageGetResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPage, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -592,7 +591,7 @@ class TestAsyncCustomPages: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = await response.parse() - assert_matches_type(CustomPageGetResponse, custom_page, path=["response"]) + assert_matches_type(AccessCustomPage, 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 fcb286660..fe0468f94 100644 --- a/tests/api_resources/zero_trust/access/test_groups.py +++ b/tests/api_resources/zero_trust/access/test_groups.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.access import ( - GroupGetResponse, + AccessGroups, GroupListResponse, - GroupCreateResponse, GroupDeleteResponse, - GroupUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -36,7 +34,7 @@ class TestGroups: account_id="string", zone_id="string", ) - assert_matches_type(GroupCreateResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -62,7 +60,7 @@ class TestGroups: {"email": {"email": "test@example.com"}}, ], ) - assert_matches_type(GroupCreateResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +79,7 @@ class TestGroups: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = response.parse() - assert_matches_type(GroupCreateResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -100,7 +98,7 @@ class TestGroups: assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = response.parse() - assert_matches_type(GroupCreateResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) assert cast(Any, response.is_closed) is True @@ -145,7 +143,7 @@ class TestGroups: account_id="string", zone_id="string", ) - assert_matches_type(GroupUpdateResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -172,7 +170,7 @@ class TestGroups: {"email": {"email": "test@example.com"}}, ], ) - assert_matches_type(GroupUpdateResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -192,7 +190,7 @@ class TestGroups: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = response.parse() - assert_matches_type(GroupUpdateResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -212,7 +210,7 @@ class TestGroups: assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = response.parse() - assert_matches_type(GroupUpdateResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) assert cast(Any, response.is_closed) is True @@ -401,7 +399,7 @@ class TestGroups: account_id="string", zone_id="string", ) - assert_matches_type(GroupGetResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -411,7 +409,7 @@ class TestGroups: account_id="string", zone_id="string", ) - assert_matches_type(GroupGetResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -425,7 +423,7 @@ class TestGroups: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = response.parse() - assert_matches_type(GroupGetResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -439,7 +437,7 @@ class TestGroups: assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = response.parse() - assert_matches_type(GroupGetResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) assert cast(Any, response.is_closed) is True @@ -484,7 +482,7 @@ class TestAsyncGroups: account_id="string", zone_id="string", ) - assert_matches_type(GroupCreateResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -510,7 +508,7 @@ class TestAsyncGroups: {"email": {"email": "test@example.com"}}, ], ) - assert_matches_type(GroupCreateResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -529,7 +527,7 @@ class TestAsyncGroups: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = await response.parse() - assert_matches_type(GroupCreateResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -548,7 +546,7 @@ class TestAsyncGroups: assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = await response.parse() - assert_matches_type(GroupCreateResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) assert cast(Any, response.is_closed) is True @@ -593,7 +591,7 @@ class TestAsyncGroups: account_id="string", zone_id="string", ) - assert_matches_type(GroupUpdateResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -620,7 +618,7 @@ class TestAsyncGroups: {"email": {"email": "test@example.com"}}, ], ) - assert_matches_type(GroupUpdateResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -640,7 +638,7 @@ class TestAsyncGroups: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = await response.parse() - assert_matches_type(GroupUpdateResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -660,7 +658,7 @@ class TestAsyncGroups: assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = await response.parse() - assert_matches_type(GroupUpdateResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) assert cast(Any, response.is_closed) is True @@ -849,7 +847,7 @@ class TestAsyncGroups: account_id="string", zone_id="string", ) - assert_matches_type(GroupGetResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -859,7 +857,7 @@ class TestAsyncGroups: account_id="string", zone_id="string", ) - assert_matches_type(GroupGetResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -873,7 +871,7 @@ class TestAsyncGroups: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = await response.parse() - assert_matches_type(GroupGetResponse, group, path=["response"]) + assert_matches_type(AccessGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -887,7 +885,7 @@ class TestAsyncGroups: assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = await response.parse() - assert_matches_type(GroupGetResponse, group, path=["response"]) + assert_matches_type(AccessGroups, 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 96e49b2da..e775164db 100644 --- a/tests/api_resources/zero_trust/access/test_service_tokens.py +++ b/tests/api_resources/zero_trust/access/test_service_tokens.py @@ -10,12 +10,10 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.access import ( + AccessServiceTokens, ServiceTokenListResponse, ServiceTokenCreateResponse, - ServiceTokenDeleteResponse, ServiceTokenRotateResponse, - ServiceTokenUpdateResponse, - ServiceTokenRefreshResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -100,7 +98,7 @@ class TestServiceTokens: account_id="string", zone_id="string", ) - assert_matches_type(ServiceTokenUpdateResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -112,7 +110,7 @@ class TestServiceTokens: duration="60m", name="CI/CD token", ) - assert_matches_type(ServiceTokenUpdateResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -126,7 +124,7 @@ class TestServiceTokens: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = response.parse() - assert_matches_type(ServiceTokenUpdateResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -140,7 +138,7 @@ class TestServiceTokens: assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = response.parse() - assert_matches_type(ServiceTokenUpdateResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) assert cast(Any, response.is_closed) is True @@ -237,7 +235,7 @@ class TestServiceTokens: account_id="string", zone_id="string", ) - assert_matches_type(ServiceTokenDeleteResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -247,7 +245,7 @@ class TestServiceTokens: account_id="string", zone_id="string", ) - assert_matches_type(ServiceTokenDeleteResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -261,7 +259,7 @@ class TestServiceTokens: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = response.parse() - assert_matches_type(ServiceTokenDeleteResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -275,7 +273,7 @@ class TestServiceTokens: assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = response.parse() - assert_matches_type(ServiceTokenDeleteResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) assert cast(Any, response.is_closed) is True @@ -310,7 +308,7 @@ class TestServiceTokens: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ServiceTokenRefreshResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -323,7 +321,7 @@ class TestServiceTokens: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = response.parse() - assert_matches_type(ServiceTokenRefreshResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -336,7 +334,7 @@ class TestServiceTokens: assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = response.parse() - assert_matches_type(ServiceTokenRefreshResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) assert cast(Any, response.is_closed) is True @@ -487,7 +485,7 @@ class TestAsyncServiceTokens: account_id="string", zone_id="string", ) - assert_matches_type(ServiceTokenUpdateResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -499,7 +497,7 @@ class TestAsyncServiceTokens: duration="60m", name="CI/CD token", ) - assert_matches_type(ServiceTokenUpdateResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -513,7 +511,7 @@ class TestAsyncServiceTokens: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = await response.parse() - assert_matches_type(ServiceTokenUpdateResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -527,7 +525,7 @@ class TestAsyncServiceTokens: assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = await response.parse() - assert_matches_type(ServiceTokenUpdateResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) assert cast(Any, response.is_closed) is True @@ -624,7 +622,7 @@ class TestAsyncServiceTokens: account_id="string", zone_id="string", ) - assert_matches_type(ServiceTokenDeleteResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -634,7 +632,7 @@ class TestAsyncServiceTokens: account_id="string", zone_id="string", ) - assert_matches_type(ServiceTokenDeleteResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -648,7 +646,7 @@ class TestAsyncServiceTokens: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = await response.parse() - assert_matches_type(ServiceTokenDeleteResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -662,7 +660,7 @@ class TestAsyncServiceTokens: assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = await response.parse() - assert_matches_type(ServiceTokenDeleteResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) assert cast(Any, response.is_closed) is True @@ -697,7 +695,7 @@ class TestAsyncServiceTokens: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ServiceTokenRefreshResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -710,7 +708,7 @@ class TestAsyncServiceTokens: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = await response.parse() - assert_matches_type(ServiceTokenRefreshResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -723,7 +721,7 @@ class TestAsyncServiceTokens: assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = await response.parse() - assert_matches_type(ServiceTokenRefreshResponse, service_token, path=["response"]) + assert_matches_type(AccessServiceTokens, 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 011dc61c0..45475138d 100644 --- a/tests/api_resources/zero_trust/access/test_tags.py +++ b/tests/api_resources/zero_trust/access/test_tags.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.access import ( - TagGetResponse, + AccessTag, TagListResponse, - TagCreateResponse, TagDeleteResponse, - TagUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +28,7 @@ class TestTags: "023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) - assert_matches_type(TagCreateResponse, tag, path=["response"]) + assert_matches_type(AccessTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -43,7 +41,7 @@ class TestTags: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = response.parse() - assert_matches_type(TagCreateResponse, tag, path=["response"]) + assert_matches_type(AccessTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +54,7 @@ class TestTags: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = response.parse() - assert_matches_type(TagCreateResponse, tag, path=["response"]) + assert_matches_type(AccessTag, tag, path=["response"]) assert cast(Any, response.is_closed) is True @@ -77,7 +75,7 @@ class TestTags: identifier="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) - assert_matches_type(TagUpdateResponse, tag, path=["response"]) + assert_matches_type(AccessTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -91,7 +89,7 @@ class TestTags: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = response.parse() - assert_matches_type(TagUpdateResponse, tag, path=["response"]) + assert_matches_type(AccessTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +103,7 @@ class TestTags: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = response.parse() - assert_matches_type(TagUpdateResponse, tag, path=["response"]) + assert_matches_type(AccessTag, tag, path=["response"]) assert cast(Any, response.is_closed) is True @@ -227,7 +225,7 @@ class TestTags: "engineers", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TagGetResponse, tag, path=["response"]) + assert_matches_type(AccessTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -240,7 +238,7 @@ class TestTags: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = response.parse() - assert_matches_type(TagGetResponse, tag, path=["response"]) + assert_matches_type(AccessTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -253,7 +251,7 @@ class TestTags: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = response.parse() - assert_matches_type(TagGetResponse, tag, path=["response"]) + assert_matches_type(AccessTag, tag, path=["response"]) assert cast(Any, response.is_closed) is True @@ -283,7 +281,7 @@ class TestAsyncTags: "023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) - assert_matches_type(TagCreateResponse, tag, path=["response"]) + assert_matches_type(AccessTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -296,7 +294,7 @@ class TestAsyncTags: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = await response.parse() - assert_matches_type(TagCreateResponse, tag, path=["response"]) + assert_matches_type(AccessTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -309,7 +307,7 @@ class TestAsyncTags: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = await response.parse() - assert_matches_type(TagCreateResponse, tag, path=["response"]) + assert_matches_type(AccessTag, tag, path=["response"]) assert cast(Any, response.is_closed) is True @@ -330,7 +328,7 @@ class TestAsyncTags: identifier="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) - assert_matches_type(TagUpdateResponse, tag, path=["response"]) + assert_matches_type(AccessTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -344,7 +342,7 @@ class TestAsyncTags: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = await response.parse() - assert_matches_type(TagUpdateResponse, tag, path=["response"]) + assert_matches_type(AccessTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -358,7 +356,7 @@ class TestAsyncTags: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = await response.parse() - assert_matches_type(TagUpdateResponse, tag, path=["response"]) + assert_matches_type(AccessTag, tag, path=["response"]) assert cast(Any, response.is_closed) is True @@ -480,7 +478,7 @@ class TestAsyncTags: "engineers", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TagGetResponse, tag, path=["response"]) + assert_matches_type(AccessTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -493,7 +491,7 @@ class TestAsyncTags: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = await response.parse() - assert_matches_type(TagGetResponse, tag, path=["response"]) + assert_matches_type(AccessTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -506,7 +504,7 @@ class TestAsyncTags: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = await response.parse() - assert_matches_type(TagGetResponse, tag, path=["response"]) + assert_matches_type(AccessTag, 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 f4657ba96..bf5a8e41f 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.access.users import LastSeenIdentityGetResponse +from cloudflare.types.zero_trust.access.users import AccessIdentity base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestLastSeenIdentity: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(LastSeenIdentityGetResponse, last_seen_identity, path=["response"]) + assert_matches_type(AccessIdentity, last_seen_identity, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestLastSeenIdentity: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" last_seen_identity = response.parse() - assert_matches_type(LastSeenIdentityGetResponse, last_seen_identity, path=["response"]) + assert_matches_type(AccessIdentity, last_seen_identity, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestLastSeenIdentity: assert response.http_request.headers.get("X-Stainless-Lang") == "python" last_seen_identity = response.parse() - assert_matches_type(LastSeenIdentityGetResponse, last_seen_identity, path=["response"]) + assert_matches_type(AccessIdentity, last_seen_identity, path=["response"]) assert cast(Any, response.is_closed) is True @@ -80,7 +80,7 @@ class TestAsyncLastSeenIdentity: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(LastSeenIdentityGetResponse, last_seen_identity, path=["response"]) + assert_matches_type(AccessIdentity, last_seen_identity, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestAsyncLastSeenIdentity: 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(LastSeenIdentityGetResponse, last_seen_identity, path=["response"]) + assert_matches_type(AccessIdentity, last_seen_identity, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +106,7 @@ class TestAsyncLastSeenIdentity: assert response.http_request.headers.get("X-Stainless-Lang") == "python" last_seen_identity = await response.parse() - assert_matches_type(LastSeenIdentityGetResponse, last_seen_identity, path=["response"]) + assert_matches_type(AccessIdentity, last_seen_identity, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/devices/postures/test_integrations.py b/tests/api_resources/zero_trust/devices/postures/test_integrations.py index 53bd215ad..cefa241fa 100644 --- a/tests/api_resources/zero_trust/devices/postures/test_integrations.py +++ b/tests/api_resources/zero_trust/devices/postures/test_integrations.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.devices.postures import ( - IntegrationGetResponse, - IntegrationEditResponse, IntegrationListResponse, - IntegrationCreateResponse, IntegrationDeleteResponse, + TeamsDevicesDevicePostureIntegrations, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -38,7 +36,7 @@ class TestIntegrations: name="My Workspace One Integration", type="workspace_one", ) - assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +53,7 @@ class TestIntegrations: name="My Workspace One Integration", type="workspace_one", ) - assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -76,7 +74,7 @@ class TestIntegrations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = response.parse() - assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -97,7 +95,7 @@ class TestIntegrations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = response.parse() - assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) assert cast(Any, response.is_closed) is True @@ -188,7 +186,7 @@ class TestIntegrations: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[IntegrationEditResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -206,7 +204,7 @@ class TestIntegrations: name="My Workspace One Integration", type="workspace_one", ) - assert_matches_type(Optional[IntegrationEditResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -219,7 +217,7 @@ class TestIntegrations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = response.parse() - assert_matches_type(Optional[IntegrationEditResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -232,7 +230,7 @@ class TestIntegrations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = response.parse() - assert_matches_type(Optional[IntegrationEditResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) assert cast(Any, response.is_closed) is True @@ -252,7 +250,7 @@ class TestIntegrations: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[IntegrationGetResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -265,7 +263,7 @@ class TestIntegrations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = response.parse() - assert_matches_type(Optional[IntegrationGetResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -278,7 +276,7 @@ class TestIntegrations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = response.parse() - assert_matches_type(Optional[IntegrationGetResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) assert cast(Any, response.is_closed) is True @@ -310,7 +308,7 @@ class TestAsyncIntegrations: name="My Workspace One Integration", type="workspace_one", ) - assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -327,7 +325,7 @@ class TestAsyncIntegrations: name="My Workspace One Integration", type="workspace_one", ) - assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -348,7 +346,7 @@ class TestAsyncIntegrations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = await response.parse() - assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -369,7 +367,7 @@ class TestAsyncIntegrations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = await response.parse() - assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) assert cast(Any, response.is_closed) is True @@ -460,7 +458,7 @@ class TestAsyncIntegrations: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[IntegrationEditResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -478,7 +476,7 @@ class TestAsyncIntegrations: name="My Workspace One Integration", type="workspace_one", ) - assert_matches_type(Optional[IntegrationEditResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -491,7 +489,7 @@ class TestAsyncIntegrations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = await response.parse() - assert_matches_type(Optional[IntegrationEditResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -504,7 +502,7 @@ class TestAsyncIntegrations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = await response.parse() - assert_matches_type(Optional[IntegrationEditResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) assert cast(Any, response.is_closed) is True @@ -524,7 +522,7 @@ class TestAsyncIntegrations: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[IntegrationGetResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -537,7 +535,7 @@ class TestAsyncIntegrations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = await response.parse() - assert_matches_type(Optional[IntegrationGetResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -550,7 +548,7 @@ class TestAsyncIntegrations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = await response.parse() - assert_matches_type(Optional[IntegrationGetResponse], integration, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], 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 779f9c908..74fa275c6 100644 --- a/tests/api_resources/zero_trust/devices/test_dex_tests.py +++ b/tests/api_resources/zero_trust/devices/test_dex_tests.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.devices import ( - DEXTestGetResponse, DEXTestListResponse, - DEXTestCreateResponse, DEXTestDeleteResponse, - DEXTestUpdateResponse, + TeamsDevicesDeviceDEXTestSchemasHTTP, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -33,7 +31,7 @@ class TestDEXTests: interval="30m", name="HTTP dash health check", ) - assert_matches_type(Optional[DEXTestCreateResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +48,7 @@ class TestDEXTests: name="HTTP dash health check", description="Checks the dash endpoint every 30 minutes", ) - assert_matches_type(Optional[DEXTestCreateResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -66,7 +64,7 @@ class TestDEXTests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" dex_test = response.parse() - assert_matches_type(Optional[DEXTestCreateResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -82,7 +80,7 @@ class TestDEXTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dex_test = response.parse() - assert_matches_type(Optional[DEXTestCreateResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) assert cast(Any, response.is_closed) is True @@ -97,7 +95,7 @@ class TestDEXTests: interval="30m", name="HTTP dash health check", ) - assert_matches_type(Optional[DEXTestUpdateResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -115,7 +113,7 @@ class TestDEXTests: name="HTTP dash health check", description="Checks the dash endpoint every 30 minutes", ) - assert_matches_type(Optional[DEXTestUpdateResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +130,7 @@ class TestDEXTests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" dex_test = response.parse() - assert_matches_type(Optional[DEXTestUpdateResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -149,7 +147,7 @@ class TestDEXTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dex_test = response.parse() - assert_matches_type(Optional[DEXTestUpdateResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) assert cast(Any, response.is_closed) is True @@ -253,7 +251,7 @@ class TestDEXTests: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[DEXTestGetResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -266,7 +264,7 @@ class TestDEXTests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" dex_test = response.parse() - assert_matches_type(Optional[DEXTestGetResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -279,7 +277,7 @@ class TestDEXTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dex_test = response.parse() - assert_matches_type(Optional[DEXTestGetResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) assert cast(Any, response.is_closed) is True @@ -306,7 +304,7 @@ class TestAsyncDEXTests: interval="30m", name="HTTP dash health check", ) - assert_matches_type(Optional[DEXTestCreateResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -323,7 +321,7 @@ class TestAsyncDEXTests: name="HTTP dash health check", description="Checks the dash endpoint every 30 minutes", ) - assert_matches_type(Optional[DEXTestCreateResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -339,7 +337,7 @@ class TestAsyncDEXTests: 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[DEXTestCreateResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -355,7 +353,7 @@ class TestAsyncDEXTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dex_test = await response.parse() - assert_matches_type(Optional[DEXTestCreateResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) assert cast(Any, response.is_closed) is True @@ -370,7 +368,7 @@ class TestAsyncDEXTests: interval="30m", name="HTTP dash health check", ) - assert_matches_type(Optional[DEXTestUpdateResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -388,7 +386,7 @@ class TestAsyncDEXTests: name="HTTP dash health check", description="Checks the dash endpoint every 30 minutes", ) - assert_matches_type(Optional[DEXTestUpdateResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -405,7 +403,7 @@ class TestAsyncDEXTests: 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[DEXTestUpdateResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -422,7 +420,7 @@ class TestAsyncDEXTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dex_test = await response.parse() - assert_matches_type(Optional[DEXTestUpdateResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) assert cast(Any, response.is_closed) is True @@ -526,7 +524,7 @@ class TestAsyncDEXTests: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[DEXTestGetResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -539,7 +537,7 @@ class TestAsyncDEXTests: 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[DEXTestGetResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -552,7 +550,7 @@ class TestAsyncDEXTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dex_test = await response.parse() - assert_matches_type(Optional[DEXTestGetResponse], dex_test, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], 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 f85876576..b505fe7f2 100644 --- a/tests/api_resources/zero_trust/devices/test_networks.py +++ b/tests/api_resources/zero_trust/devices/test_networks.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.devices import ( - NetworkGetResponse, NetworkListResponse, - NetworkCreateResponse, NetworkDeleteResponse, - NetworkUpdateResponse, + TeamsDevicesDeviceManagedNetworks, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -32,7 +30,7 @@ class TestNetworks: name="managed-network-1", type="tls", ) - assert_matches_type(Optional[NetworkCreateResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -46,7 +44,7 @@ class TestNetworks: name="managed-network-1", type="tls", ) - assert_matches_type(Optional[NetworkCreateResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -61,7 +59,7 @@ class TestNetworks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = response.parse() - assert_matches_type(Optional[NetworkCreateResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -76,7 +74,7 @@ class TestNetworks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = response.parse() - assert_matches_type(Optional[NetworkCreateResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) assert cast(Any, response.is_closed) is True @@ -87,7 +85,7 @@ class TestNetworks: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[NetworkUpdateResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -102,7 +100,7 @@ class TestNetworks: name="managed-network-1", type="tls", ) - assert_matches_type(Optional[NetworkUpdateResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -115,7 +113,7 @@ class TestNetworks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = response.parse() - assert_matches_type(Optional[NetworkUpdateResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -128,7 +126,7 @@ class TestNetworks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = response.parse() - assert_matches_type(Optional[NetworkUpdateResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) assert cast(Any, response.is_closed) is True @@ -228,7 +226,7 @@ class TestNetworks: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[NetworkGetResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -241,7 +239,7 @@ class TestNetworks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = response.parse() - assert_matches_type(Optional[NetworkGetResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -254,7 +252,7 @@ class TestNetworks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = response.parse() - assert_matches_type(Optional[NetworkGetResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) assert cast(Any, response.is_closed) is True @@ -280,7 +278,7 @@ class TestAsyncNetworks: name="managed-network-1", type="tls", ) - assert_matches_type(Optional[NetworkCreateResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -294,7 +292,7 @@ class TestAsyncNetworks: name="managed-network-1", type="tls", ) - assert_matches_type(Optional[NetworkCreateResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -309,7 +307,7 @@ class TestAsyncNetworks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = await response.parse() - assert_matches_type(Optional[NetworkCreateResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -324,7 +322,7 @@ class TestAsyncNetworks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = await response.parse() - assert_matches_type(Optional[NetworkCreateResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) assert cast(Any, response.is_closed) is True @@ -335,7 +333,7 @@ class TestAsyncNetworks: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[NetworkUpdateResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -350,7 +348,7 @@ class TestAsyncNetworks: name="managed-network-1", type="tls", ) - assert_matches_type(Optional[NetworkUpdateResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -363,7 +361,7 @@ class TestAsyncNetworks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = await response.parse() - assert_matches_type(Optional[NetworkUpdateResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -376,7 +374,7 @@ class TestAsyncNetworks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = await response.parse() - assert_matches_type(Optional[NetworkUpdateResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) assert cast(Any, response.is_closed) is True @@ -476,7 +474,7 @@ class TestAsyncNetworks: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[NetworkGetResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -489,7 +487,7 @@ class TestAsyncNetworks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = await response.parse() - assert_matches_type(Optional[NetworkGetResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -502,7 +500,7 @@ class TestAsyncNetworks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = await response.parse() - assert_matches_type(Optional[NetworkGetResponse], network, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], 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 6c4901f22..07a2f972e 100644 --- a/tests/api_resources/zero_trust/devices/test_policies.py +++ b/tests/api_resources/zero_trust/devices/test_policies.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.devices import ( - PolicyGetResponse, - PolicyEditResponse, PolicyListResponse, - PolicyCreateResponse, PolicyDeleteResponse, + TeamsDevicesDeviceSettingsPolicy, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -32,7 +30,7 @@ class TestPolicies: name="Allow Developers", precedence=100, ) - assert_matches_type(Optional[PolicyCreateResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -60,7 +58,7 @@ class TestPolicies: support_url="https://1.1.1.1/help", switch_locked=True, ) - assert_matches_type(Optional[PolicyCreateResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -75,7 +73,7 @@ class TestPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(Optional[PolicyCreateResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -90,7 +88,7 @@ class TestPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(Optional[PolicyCreateResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -181,7 +179,7 @@ class TestPolicies: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[PolicyEditResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -208,7 +206,7 @@ class TestPolicies: support_url="https://1.1.1.1/help", switch_locked=True, ) - assert_matches_type(Optional[PolicyEditResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -221,7 +219,7 @@ class TestPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(Optional[PolicyEditResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -234,7 +232,7 @@ class TestPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(Optional[PolicyEditResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -254,7 +252,7 @@ class TestPolicies: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -267,7 +265,7 @@ class TestPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -280,7 +278,7 @@ class TestPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -306,7 +304,7 @@ class TestAsyncPolicies: name="Allow Developers", precedence=100, ) - assert_matches_type(Optional[PolicyCreateResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -334,7 +332,7 @@ class TestAsyncPolicies: support_url="https://1.1.1.1/help", switch_locked=True, ) - assert_matches_type(Optional[PolicyCreateResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -349,7 +347,7 @@ class TestAsyncPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(Optional[PolicyCreateResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -364,7 +362,7 @@ class TestAsyncPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(Optional[PolicyCreateResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -455,7 +453,7 @@ class TestAsyncPolicies: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[PolicyEditResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -482,7 +480,7 @@ class TestAsyncPolicies: support_url="https://1.1.1.1/help", switch_locked=True, ) - assert_matches_type(Optional[PolicyEditResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -495,7 +493,7 @@ class TestAsyncPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(Optional[PolicyEditResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -508,7 +506,7 @@ class TestAsyncPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(Optional[PolicyEditResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -528,7 +526,7 @@ class TestAsyncPolicies: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -541,7 +539,7 @@ class TestAsyncPolicies: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -554,7 +552,7 @@ class TestAsyncPolicies: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/devices/test_postures.py b/tests/api_resources/zero_trust/devices/test_postures.py index bbffdfb18..8cf0c76e9 100644 --- a/tests/api_resources/zero_trust/devices/test_postures.py +++ b/tests/api_resources/zero_trust/devices/test_postures.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.devices import ( - PostureGetResponse, PostureListResponse, - PostureCreateResponse, PostureDeleteResponse, - PostureUpdateResponse, + TeamsDevicesDevicePostureRules, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -31,7 +29,7 @@ class TestPostures: name="Admin Serial Numbers", type="file", ) - assert_matches_type(Optional[PostureCreateResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -52,7 +50,7 @@ class TestPostures: match=[{"platform": "windows"}, {"platform": "windows"}, {"platform": "windows"}], schedule="1h", ) - assert_matches_type(Optional[PostureCreateResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -66,7 +64,7 @@ class TestPostures: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = response.parse() - assert_matches_type(Optional[PostureCreateResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -80,7 +78,7 @@ class TestPostures: assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = response.parse() - assert_matches_type(Optional[PostureCreateResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) assert cast(Any, response.is_closed) is True @@ -93,7 +91,7 @@ class TestPostures: name="Admin Serial Numbers", type="file", ) - assert_matches_type(Optional[PostureUpdateResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -115,7 +113,7 @@ class TestPostures: match=[{"platform": "windows"}, {"platform": "windows"}, {"platform": "windows"}], schedule="1h", ) - assert_matches_type(Optional[PostureUpdateResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -130,7 +128,7 @@ class TestPostures: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = response.parse() - assert_matches_type(Optional[PostureUpdateResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +143,7 @@ class TestPostures: assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = response.parse() - assert_matches_type(Optional[PostureUpdateResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) assert cast(Any, response.is_closed) is True @@ -247,7 +245,7 @@ class TestPostures: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[PostureGetResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -260,7 +258,7 @@ class TestPostures: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = response.parse() - assert_matches_type(Optional[PostureGetResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -273,7 +271,7 @@ class TestPostures: assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = response.parse() - assert_matches_type(Optional[PostureGetResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) assert cast(Any, response.is_closed) is True @@ -298,7 +296,7 @@ class TestAsyncPostures: name="Admin Serial Numbers", type="file", ) - assert_matches_type(Optional[PostureCreateResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -319,7 +317,7 @@ class TestAsyncPostures: match=[{"platform": "windows"}, {"platform": "windows"}, {"platform": "windows"}], schedule="1h", ) - assert_matches_type(Optional[PostureCreateResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -333,7 +331,7 @@ class TestAsyncPostures: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = await response.parse() - assert_matches_type(Optional[PostureCreateResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -347,7 +345,7 @@ class TestAsyncPostures: assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = await response.parse() - assert_matches_type(Optional[PostureCreateResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) assert cast(Any, response.is_closed) is True @@ -360,7 +358,7 @@ class TestAsyncPostures: name="Admin Serial Numbers", type="file", ) - assert_matches_type(Optional[PostureUpdateResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -382,7 +380,7 @@ class TestAsyncPostures: match=[{"platform": "windows"}, {"platform": "windows"}, {"platform": "windows"}], schedule="1h", ) - assert_matches_type(Optional[PostureUpdateResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -397,7 +395,7 @@ class TestAsyncPostures: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = await response.parse() - assert_matches_type(Optional[PostureUpdateResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -412,7 +410,7 @@ class TestAsyncPostures: assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = await response.parse() - assert_matches_type(Optional[PostureUpdateResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) assert cast(Any, response.is_closed) is True @@ -514,7 +512,7 @@ class TestAsyncPostures: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[PostureGetResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -527,7 +525,7 @@ class TestAsyncPostures: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = await response.parse() - assert_matches_type(Optional[PostureGetResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -540,7 +538,7 @@ class TestAsyncPostures: assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = await response.parse() - assert_matches_type(Optional[PostureGetResponse], posture, path=["response"]) + assert_matches_type(Optional[TeamsDevicesDevicePostureRules], 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 9cf6e137d..0510ec635 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.devices import SettingListResponse, SettingUpdateResponse +from cloudflare.types.zero_trust.devices import TeamsDevicesZeroTrustAccountDeviceSettings base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestSettings: setting = client.zero_trust.devices.settings.update( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) + assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,7 @@ class TestSettings: root_certificate_installation_enabled=True, use_zt_virtual_ip=True, ) - assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) + assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ class TestSettings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) + assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -59,7 +59,7 @@ class TestSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) + assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestSettings: setting = client.zero_trust.devices.settings.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[SettingListResponse], setting, path=["response"]) + assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestSettings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(Optional[SettingListResponse], setting, path=["response"]) + assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(Optional[SettingListResponse], setting, path=["response"]) + assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -107,7 +107,7 @@ class TestAsyncSettings: setting = await async_client.zero_trust.devices.settings.update( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) + assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -119,7 +119,7 @@ class TestAsyncSettings: root_certificate_installation_enabled=True, use_zt_virtual_ip=True, ) - assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) + assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -131,7 +131,7 @@ class TestAsyncSettings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) + assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -143,7 +143,7 @@ class TestAsyncSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) + assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -153,7 +153,7 @@ class TestAsyncSettings: setting = await async_client.zero_trust.devices.settings.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[SettingListResponse], setting, path=["response"]) + assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -165,7 +165,7 @@ class TestAsyncSettings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(Optional[SettingListResponse], setting, path=["response"]) + assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -177,6 +177,6 @@ class TestAsyncSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(Optional[SettingListResponse], setting, path=["response"]) + assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py b/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py index fc1b56269..fd6e20b8e 100644 --- a/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py +++ b/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py @@ -10,7 +10,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.zero_trust.dex.fleet_status import DeviceListResponse +from cloudflare.types.zero_trust.dex.fleet_status import DigitalExperienceMonitoringDevice base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -28,7 +28,7 @@ class TestDevices: time_end="2023-10-11T00:00:00Z", time_start="2023-10-11T00:00:00Z", ) - assert_matches_type(SyncV4PagePaginationArray[DeviceListResponse], device, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DigitalExperienceMonitoringDevice], device, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ class TestDevices: status="connected", version="1.0.0", ) - assert_matches_type(SyncV4PagePaginationArray[DeviceListResponse], device, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DigitalExperienceMonitoringDevice], device, path=["response"]) @pytest.mark.skip() @parametrize @@ -63,7 +63,7 @@ class TestDevices: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" device = response.parse() - assert_matches_type(SyncV4PagePaginationArray[DeviceListResponse], device, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DigitalExperienceMonitoringDevice], device, path=["response"]) @pytest.mark.skip() @parametrize @@ -79,7 +79,7 @@ class TestDevices: assert response.http_request.headers.get("X-Stainless-Lang") == "python" device = response.parse() - assert_matches_type(SyncV4PagePaginationArray[DeviceListResponse], device, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DigitalExperienceMonitoringDevice], device, path=["response"]) assert cast(Any, response.is_closed) is True @@ -109,7 +109,7 @@ class TestAsyncDevices: time_end="2023-10-11T00:00:00Z", time_start="2023-10-11T00:00:00Z", ) - assert_matches_type(AsyncV4PagePaginationArray[DeviceListResponse], device, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DigitalExperienceMonitoringDevice], device, path=["response"]) @pytest.mark.skip() @parametrize @@ -128,7 +128,7 @@ class TestAsyncDevices: status="connected", version="1.0.0", ) - assert_matches_type(AsyncV4PagePaginationArray[DeviceListResponse], device, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DigitalExperienceMonitoringDevice], device, path=["response"]) @pytest.mark.skip() @parametrize @@ -144,7 +144,7 @@ class TestAsyncDevices: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" device = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[DeviceListResponse], device, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DigitalExperienceMonitoringDevice], device, path=["response"]) @pytest.mark.skip() @parametrize @@ -160,7 +160,9 @@ class TestAsyncDevices: assert response.http_request.headers.get("X-Stainless-Lang") == "python" device = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[DeviceListResponse], device, path=["response"]) + assert_matches_type( + AsyncV4PagePaginationArray[DigitalExperienceMonitoringDevice], device, path=["response"] + ) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py b/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py index 9fc6b987e..f365c4332 100644 --- a/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py +++ b/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py @@ -9,7 +9,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dex.http_tests import PercentileListResponse +from cloudflare.types.zero_trust.dex.http_tests import ( + DigitalExperienceMonitoringHTTPDetailsPercentiles, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -26,7 +28,7 @@ class TestPercentiles: time_end="2023-09-20T17:00:00Z", time_start="2023-09-20T17:00:00Z", ) - assert_matches_type(PercentileListResponse, percentile, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringHTTPDetailsPercentiles, percentile, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +41,7 @@ class TestPercentiles: colo="string", device_id=["string", "string", "string"], ) - assert_matches_type(PercentileListResponse, percentile, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringHTTPDetailsPercentiles, percentile, path=["response"]) @pytest.mark.skip() @parametrize @@ -54,7 +56,7 @@ class TestPercentiles: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" percentile = response.parse() - assert_matches_type(PercentileListResponse, percentile, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringHTTPDetailsPercentiles, percentile, path=["response"]) @pytest.mark.skip() @parametrize @@ -69,7 +71,7 @@ class TestPercentiles: assert response.http_request.headers.get("X-Stainless-Lang") == "python" percentile = response.parse() - assert_matches_type(PercentileListResponse, percentile, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringHTTPDetailsPercentiles, percentile, path=["response"]) assert cast(Any, response.is_closed) is True @@ -105,7 +107,7 @@ class TestAsyncPercentiles: time_end="2023-09-20T17:00:00Z", time_start="2023-09-20T17:00:00Z", ) - assert_matches_type(PercentileListResponse, percentile, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringHTTPDetailsPercentiles, percentile, path=["response"]) @pytest.mark.skip() @parametrize @@ -118,7 +120,7 @@ class TestAsyncPercentiles: colo="string", device_id=["string", "string", "string"], ) - assert_matches_type(PercentileListResponse, percentile, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringHTTPDetailsPercentiles, percentile, path=["response"]) @pytest.mark.skip() @parametrize @@ -133,7 +135,7 @@ class TestAsyncPercentiles: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" percentile = await response.parse() - assert_matches_type(PercentileListResponse, percentile, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringHTTPDetailsPercentiles, percentile, path=["response"]) @pytest.mark.skip() @parametrize @@ -148,7 +150,7 @@ class TestAsyncPercentiles: assert response.http_request.headers.get("X-Stainless-Lang") == "python" percentile = await response.parse() - assert_matches_type(PercentileListResponse, percentile, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringHTTPDetailsPercentiles, percentile, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/dex/test_http_tests.py b/tests/api_resources/zero_trust/dex/test_http_tests.py index 5113d3bf1..7a38b4a0c 100644 --- a/tests/api_resources/zero_trust/dex/test_http_tests.py +++ b/tests/api_resources/zero_trust/dex/test_http_tests.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dex import HTTPTestGetResponse +from cloudflare.types.zero_trust.dex import DigitalExperienceMonitoringHTTPDetails base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +27,7 @@ class TestHTTPTests: time_end="string", time_start="string", ) - assert_matches_type(HTTPTestGetResponse, http_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringHTTPDetails, http_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +41,7 @@ class TestHTTPTests: colo="string", device_id=["string", "string", "string"], ) - assert_matches_type(HTTPTestGetResponse, http_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringHTTPDetails, http_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -57,7 +57,7 @@ class TestHTTPTests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" http_test = response.parse() - assert_matches_type(HTTPTestGetResponse, http_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringHTTPDetails, http_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -73,7 +73,7 @@ class TestHTTPTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" http_test = response.parse() - assert_matches_type(HTTPTestGetResponse, http_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringHTTPDetails, http_test, path=["response"]) assert cast(Any, response.is_closed) is True @@ -112,7 +112,7 @@ class TestAsyncHTTPTests: time_end="string", time_start="string", ) - assert_matches_type(HTTPTestGetResponse, http_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringHTTPDetails, http_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -126,7 +126,7 @@ class TestAsyncHTTPTests: colo="string", device_id=["string", "string", "string"], ) - assert_matches_type(HTTPTestGetResponse, http_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringHTTPDetails, http_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncHTTPTests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" http_test = await response.parse() - assert_matches_type(HTTPTestGetResponse, http_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringHTTPDetails, http_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -158,7 +158,7 @@ class TestAsyncHTTPTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" http_test = await response.parse() - assert_matches_type(HTTPTestGetResponse, http_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringHTTPDetails, http_test, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/dex/test_traceroute_tests.py b/tests/api_resources/zero_trust/dex/test_traceroute_tests.py index 118efa126..083bd8039 100644 --- a/tests/api_resources/zero_trust/dex/test_traceroute_tests.py +++ b/tests/api_resources/zero_trust/dex/test_traceroute_tests.py @@ -10,9 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.dex import ( - TracerouteTestGetResponse, - TracerouteTestNetworkPathResponse, - TracerouteTestPercentilesResponse, + DigitalExperienceMonitoringTracerouteDetails, + DigitalExperienceMonitoringTracerouteTestNetworkPath, + DigitalExperienceMonitoringTracerouteDetailsPercentiles, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -31,7 +31,7 @@ class TestTracerouteTests: time_end="string", time_start="string", ) - assert_matches_type(TracerouteTestGetResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteDetails, traceroute_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -45,7 +45,7 @@ class TestTracerouteTests: colo="string", device_id=["string", "string", "string"], ) - assert_matches_type(TracerouteTestGetResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteDetails, traceroute_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -61,7 +61,7 @@ class TestTracerouteTests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" traceroute_test = response.parse() - assert_matches_type(TracerouteTestGetResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteDetails, traceroute_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -77,7 +77,7 @@ class TestTracerouteTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" traceroute_test = response.parse() - assert_matches_type(TracerouteTestGetResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteDetails, traceroute_test, path=["response"]) assert cast(Any, response.is_closed) is True @@ -113,7 +113,7 @@ class TestTracerouteTests: time_end="string", time_start="string", ) - assert_matches_type(TracerouteTestNetworkPathResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteTestNetworkPath, traceroute_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -130,7 +130,7 @@ class TestTracerouteTests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" traceroute_test = response.parse() - assert_matches_type(TracerouteTestNetworkPathResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteTestNetworkPath, traceroute_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -147,7 +147,9 @@ class TestTracerouteTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" traceroute_test = response.parse() - assert_matches_type(TracerouteTestNetworkPathResponse, traceroute_test, path=["response"]) + assert_matches_type( + DigitalExperienceMonitoringTracerouteTestNetworkPath, traceroute_test, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -183,7 +185,7 @@ class TestTracerouteTests: time_end="2023-09-20T17:00:00Z", time_start="2023-09-20T17:00:00Z", ) - assert_matches_type(TracerouteTestPercentilesResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteDetailsPercentiles, traceroute_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -196,7 +198,7 @@ class TestTracerouteTests: colo="string", device_id=["string", "string", "string"], ) - assert_matches_type(TracerouteTestPercentilesResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteDetailsPercentiles, traceroute_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -211,7 +213,7 @@ class TestTracerouteTests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" traceroute_test = response.parse() - assert_matches_type(TracerouteTestPercentilesResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteDetailsPercentiles, traceroute_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -226,7 +228,9 @@ class TestTracerouteTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" traceroute_test = response.parse() - assert_matches_type(TracerouteTestPercentilesResponse, traceroute_test, path=["response"]) + assert_matches_type( + DigitalExperienceMonitoringTracerouteDetailsPercentiles, traceroute_test, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -263,7 +267,7 @@ class TestAsyncTracerouteTests: time_end="string", time_start="string", ) - assert_matches_type(TracerouteTestGetResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteDetails, traceroute_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -277,7 +281,7 @@ class TestAsyncTracerouteTests: colo="string", device_id=["string", "string", "string"], ) - assert_matches_type(TracerouteTestGetResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteDetails, traceroute_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -293,7 +297,7 @@ class TestAsyncTracerouteTests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" traceroute_test = await response.parse() - assert_matches_type(TracerouteTestGetResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteDetails, traceroute_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -309,7 +313,7 @@ class TestAsyncTracerouteTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" traceroute_test = await response.parse() - assert_matches_type(TracerouteTestGetResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteDetails, traceroute_test, path=["response"]) assert cast(Any, response.is_closed) is True @@ -345,7 +349,7 @@ class TestAsyncTracerouteTests: time_end="string", time_start="string", ) - assert_matches_type(TracerouteTestNetworkPathResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteTestNetworkPath, traceroute_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -362,7 +366,7 @@ class TestAsyncTracerouteTests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" traceroute_test = await response.parse() - assert_matches_type(TracerouteTestNetworkPathResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteTestNetworkPath, traceroute_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -379,7 +383,9 @@ class TestAsyncTracerouteTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" traceroute_test = await response.parse() - assert_matches_type(TracerouteTestNetworkPathResponse, traceroute_test, path=["response"]) + assert_matches_type( + DigitalExperienceMonitoringTracerouteTestNetworkPath, traceroute_test, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -415,7 +421,7 @@ class TestAsyncTracerouteTests: time_end="2023-09-20T17:00:00Z", time_start="2023-09-20T17:00:00Z", ) - assert_matches_type(TracerouteTestPercentilesResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteDetailsPercentiles, traceroute_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -428,7 +434,7 @@ class TestAsyncTracerouteTests: colo="string", device_id=["string", "string", "string"], ) - assert_matches_type(TracerouteTestPercentilesResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteDetailsPercentiles, traceroute_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -443,7 +449,7 @@ class TestAsyncTracerouteTests: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" traceroute_test = await response.parse() - assert_matches_type(TracerouteTestPercentilesResponse, traceroute_test, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteDetailsPercentiles, traceroute_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -458,7 +464,9 @@ class TestAsyncTracerouteTests: assert response.http_request.headers.get("X-Stainless-Lang") == "python" traceroute_test = await response.parse() - assert_matches_type(TracerouteTestPercentilesResponse, traceroute_test, path=["response"]) + assert_matches_type( + DigitalExperienceMonitoringTracerouteDetailsPercentiles, traceroute_test, path=["response"] + ) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py b/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py index 5d630112a..1b9fe1d89 100644 --- a/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py +++ b/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dex.tests import UniqueDeviceListResponse +from cloudflare.types.zero_trust.dex.tests import DigitalExperienceMonitoringUniqueDevices base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestUniqueDevices: unique_device = client.zero_trust.dex.tests.unique_devices.list( account_id="01a7362d577a6c3019a474fd6f485823", ) - assert_matches_type(UniqueDeviceListResponse, unique_device, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringUniqueDevices, unique_device, path=["response"]) @pytest.mark.skip() @parametrize @@ -33,7 +33,7 @@ class TestUniqueDevices: device_id=["string", "string", "string"], test_name="string", ) - assert_matches_type(UniqueDeviceListResponse, unique_device, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringUniqueDevices, unique_device, path=["response"]) @pytest.mark.skip() @parametrize @@ -45,7 +45,7 @@ class TestUniqueDevices: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" unique_device = response.parse() - assert_matches_type(UniqueDeviceListResponse, unique_device, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringUniqueDevices, unique_device, path=["response"]) @pytest.mark.skip() @parametrize @@ -57,7 +57,7 @@ class TestUniqueDevices: assert response.http_request.headers.get("X-Stainless-Lang") == "python" unique_device = response.parse() - assert_matches_type(UniqueDeviceListResponse, unique_device, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringUniqueDevices, unique_device, path=["response"]) assert cast(Any, response.is_closed) is True @@ -79,7 +79,7 @@ class TestAsyncUniqueDevices: unique_device = await async_client.zero_trust.dex.tests.unique_devices.list( account_id="01a7362d577a6c3019a474fd6f485823", ) - assert_matches_type(UniqueDeviceListResponse, unique_device, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringUniqueDevices, unique_device, path=["response"]) @pytest.mark.skip() @parametrize @@ -89,7 +89,7 @@ class TestAsyncUniqueDevices: device_id=["string", "string", "string"], test_name="string", ) - assert_matches_type(UniqueDeviceListResponse, unique_device, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringUniqueDevices, unique_device, path=["response"]) @pytest.mark.skip() @parametrize @@ -101,7 +101,7 @@ class TestAsyncUniqueDevices: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" unique_device = await response.parse() - assert_matches_type(UniqueDeviceListResponse, unique_device, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringUniqueDevices, unique_device, path=["response"]) @pytest.mark.skip() @parametrize @@ -113,7 +113,7 @@ class TestAsyncUniqueDevices: assert response.http_request.headers.get("X-Stainless-Lang") == "python" unique_device = await response.parse() - assert_matches_type(UniqueDeviceListResponse, unique_device, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringUniqueDevices, unique_device, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py b/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py index 7508b18c4..3a2b6167f 100644 --- a/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py +++ b/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py @@ -9,7 +9,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dex.traceroute_test_results import NetworkPathListResponse +from cloudflare.types.zero_trust.dex.traceroute_test_results import ( + DigitalExperienceMonitoringTracerouteTestResultNetworkPath, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +26,7 @@ class TestNetworkPath: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", ) - assert_matches_type(NetworkPathListResponse, network_path, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteTestResultNetworkPath, network_path, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +39,7 @@ class TestNetworkPath: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" network_path = response.parse() - assert_matches_type(NetworkPathListResponse, network_path, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteTestResultNetworkPath, network_path, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +52,9 @@ class TestNetworkPath: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network_path = response.parse() - assert_matches_type(NetworkPathListResponse, network_path, path=["response"]) + assert_matches_type( + DigitalExperienceMonitoringTracerouteTestResultNetworkPath, network_path, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -80,7 +84,7 @@ class TestAsyncNetworkPath: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", ) - assert_matches_type(NetworkPathListResponse, network_path, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteTestResultNetworkPath, network_path, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +97,7 @@ class TestAsyncNetworkPath: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" network_path = await response.parse() - assert_matches_type(NetworkPathListResponse, network_path, path=["response"]) + assert_matches_type(DigitalExperienceMonitoringTracerouteTestResultNetworkPath, network_path, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +110,9 @@ class TestAsyncNetworkPath: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network_path = await response.parse() - assert_matches_type(NetworkPathListResponse, network_path, path=["response"]) + assert_matches_type( + DigitalExperienceMonitoringTracerouteTestResultNetworkPath, network_path, path=["response"] + ) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py index 21fe021a2..5c6230e75 100644 --- a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py +++ b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py @@ -9,7 +9,8 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dlp.datasets import UploadEditResponse, UploadCreateResponse +from cloudflare.types.zero_trust.dlp import DLPDataset +from cloudflare.types.zero_trust.dlp.datasets import DLPDatasetNewVersion base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +25,7 @@ class TestUpload: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="string", ) - assert_matches_type(Optional[UploadCreateResponse], upload, path=["response"]) + assert_matches_type(Optional[DLPDatasetNewVersion], upload, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +38,7 @@ class TestUpload: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" upload = response.parse() - assert_matches_type(Optional[UploadCreateResponse], upload, path=["response"]) + assert_matches_type(Optional[DLPDatasetNewVersion], upload, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +51,7 @@ class TestUpload: assert response.http_request.headers.get("X-Stainless-Lang") == "python" upload = response.parse() - assert_matches_type(Optional[UploadCreateResponse], upload, path=["response"]) + assert_matches_type(Optional[DLPDatasetNewVersion], upload, path=["response"]) assert cast(Any, response.is_closed) is True @@ -77,7 +78,7 @@ class TestUpload: account_id="string", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) - assert_matches_type(Optional[UploadEditResponse], upload, path=["response"]) + assert_matches_type(Optional[DLPDataset], upload, path=["response"]) @pytest.mark.skip() @parametrize @@ -91,7 +92,7 @@ class TestUpload: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" upload = response.parse() - assert_matches_type(Optional[UploadEditResponse], upload, path=["response"]) + assert_matches_type(Optional[DLPDataset], upload, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +106,7 @@ class TestUpload: assert response.http_request.headers.get("X-Stainless-Lang") == "python" upload = response.parse() - assert_matches_type(Optional[UploadEditResponse], upload, path=["response"]) + assert_matches_type(Optional[DLPDataset], upload, path=["response"]) assert cast(Any, response.is_closed) is True @@ -137,7 +138,7 @@ class TestAsyncUpload: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="string", ) - assert_matches_type(Optional[UploadCreateResponse], upload, path=["response"]) + assert_matches_type(Optional[DLPDatasetNewVersion], upload, path=["response"]) @pytest.mark.skip() @parametrize @@ -150,7 +151,7 @@ class TestAsyncUpload: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" upload = await response.parse() - assert_matches_type(Optional[UploadCreateResponse], upload, path=["response"]) + assert_matches_type(Optional[DLPDatasetNewVersion], upload, path=["response"]) @pytest.mark.skip() @parametrize @@ -163,7 +164,7 @@ class TestAsyncUpload: assert response.http_request.headers.get("X-Stainless-Lang") == "python" upload = await response.parse() - assert_matches_type(Optional[UploadCreateResponse], upload, path=["response"]) + assert_matches_type(Optional[DLPDatasetNewVersion], upload, path=["response"]) assert cast(Any, response.is_closed) is True @@ -190,7 +191,7 @@ class TestAsyncUpload: account_id="string", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) - assert_matches_type(Optional[UploadEditResponse], upload, path=["response"]) + assert_matches_type(Optional[DLPDataset], upload, path=["response"]) @pytest.mark.skip() @parametrize @@ -204,7 +205,7 @@ class TestAsyncUpload: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" upload = await response.parse() - assert_matches_type(Optional[UploadEditResponse], upload, path=["response"]) + assert_matches_type(Optional[DLPDataset], upload, path=["response"]) @pytest.mark.skip() @parametrize @@ -218,7 +219,7 @@ class TestAsyncUpload: assert response.http_request.headers.get("X-Stainless-Lang") == "python" upload = await response.parse() - assert_matches_type(Optional[UploadEditResponse], upload, path=["response"]) + assert_matches_type(Optional[DLPDataset], upload, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_customs.py b/tests/api_resources/zero_trust/dlp/profiles/test_customs.py index b26bfd801..710246ed2 100644 --- a/tests/api_resources/zero_trust/dlp/profiles/test_customs.py +++ b/tests/api_resources/zero_trust/dlp/profiles/test_customs.py @@ -10,10 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.dlp.profiles import ( - CustomGetResponse, + DLPCustomProfile, CustomCreateResponse, CustomDeleteResponse, - CustomUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -75,7 +74,7 @@ class TestCustoms: "384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CustomUpdateResponse, custom, path=["response"]) + assert_matches_type(DLPCustomProfile, custom, path=["response"]) @pytest.mark.skip() @parametrize @@ -121,7 +120,7 @@ class TestCustoms: name="Generic CVV Card Number", shared_entries=[{"enabled": True}, {"enabled": True}, {"enabled": True}], ) - assert_matches_type(CustomUpdateResponse, custom, path=["response"]) + assert_matches_type(DLPCustomProfile, custom, path=["response"]) @pytest.mark.skip() @parametrize @@ -134,7 +133,7 @@ class TestCustoms: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom = response.parse() - assert_matches_type(CustomUpdateResponse, custom, path=["response"]) + assert_matches_type(DLPCustomProfile, custom, path=["response"]) @pytest.mark.skip() @parametrize @@ -147,7 +146,7 @@ class TestCustoms: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom = response.parse() - assert_matches_type(CustomUpdateResponse, custom, path=["response"]) + assert_matches_type(DLPCustomProfile, custom, path=["response"]) assert cast(Any, response.is_closed) is True @@ -225,7 +224,7 @@ class TestCustoms: "384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CustomGetResponse, custom, path=["response"]) + assert_matches_type(DLPCustomProfile, custom, path=["response"]) @pytest.mark.skip() @parametrize @@ -238,7 +237,7 @@ class TestCustoms: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom = response.parse() - assert_matches_type(CustomGetResponse, custom, path=["response"]) + assert_matches_type(DLPCustomProfile, custom, path=["response"]) @pytest.mark.skip() @parametrize @@ -251,7 +250,7 @@ class TestCustoms: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom = response.parse() - assert_matches_type(CustomGetResponse, custom, path=["response"]) + assert_matches_type(DLPCustomProfile, custom, path=["response"]) assert cast(Any, response.is_closed) is True @@ -327,7 +326,7 @@ class TestAsyncCustoms: "384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CustomUpdateResponse, custom, path=["response"]) + assert_matches_type(DLPCustomProfile, custom, path=["response"]) @pytest.mark.skip() @parametrize @@ -373,7 +372,7 @@ class TestAsyncCustoms: name="Generic CVV Card Number", shared_entries=[{"enabled": True}, {"enabled": True}, {"enabled": True}], ) - assert_matches_type(CustomUpdateResponse, custom, path=["response"]) + assert_matches_type(DLPCustomProfile, custom, path=["response"]) @pytest.mark.skip() @parametrize @@ -386,7 +385,7 @@ class TestAsyncCustoms: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom = await response.parse() - assert_matches_type(CustomUpdateResponse, custom, path=["response"]) + assert_matches_type(DLPCustomProfile, custom, path=["response"]) @pytest.mark.skip() @parametrize @@ -399,7 +398,7 @@ class TestAsyncCustoms: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom = await response.parse() - assert_matches_type(CustomUpdateResponse, custom, path=["response"]) + assert_matches_type(DLPCustomProfile, custom, path=["response"]) assert cast(Any, response.is_closed) is True @@ -477,7 +476,7 @@ class TestAsyncCustoms: "384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CustomGetResponse, custom, path=["response"]) + assert_matches_type(DLPCustomProfile, custom, path=["response"]) @pytest.mark.skip() @parametrize @@ -490,7 +489,7 @@ class TestAsyncCustoms: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom = await response.parse() - assert_matches_type(CustomGetResponse, custom, path=["response"]) + assert_matches_type(DLPCustomProfile, custom, path=["response"]) @pytest.mark.skip() @parametrize @@ -503,7 +502,7 @@ class TestAsyncCustoms: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom = await response.parse() - assert_matches_type(CustomGetResponse, custom, path=["response"]) + assert_matches_type(DLPCustomProfile, custom, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_predefineds.py b/tests/api_resources/zero_trust/dlp/profiles/test_predefineds.py index 084f66ad8..4f776bf7f 100644 --- a/tests/api_resources/zero_trust/dlp/profiles/test_predefineds.py +++ b/tests/api_resources/zero_trust/dlp/profiles/test_predefineds.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dlp.profiles import ( - PredefinedGetResponse, - PredefinedUpdateResponse, -) +from cloudflare.types.zero_trust.dlp.profiles import DLPPredefinedProfile base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestPredefineds: "384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PredefinedUpdateResponse, predefined, path=["response"]) + assert_matches_type(DLPPredefinedProfile, predefined, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +39,7 @@ class TestPredefineds: }, entries=[{"enabled": True}, {"enabled": True}, {"enabled": True}], ) - assert_matches_type(PredefinedUpdateResponse, predefined, path=["response"]) + assert_matches_type(DLPPredefinedProfile, predefined, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +52,7 @@ class TestPredefineds: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" predefined = response.parse() - assert_matches_type(PredefinedUpdateResponse, predefined, path=["response"]) + assert_matches_type(DLPPredefinedProfile, predefined, path=["response"]) @pytest.mark.skip() @parametrize @@ -68,7 +65,7 @@ class TestPredefineds: assert response.http_request.headers.get("X-Stainless-Lang") == "python" predefined = response.parse() - assert_matches_type(PredefinedUpdateResponse, predefined, path=["response"]) + assert_matches_type(DLPPredefinedProfile, predefined, path=["response"]) assert cast(Any, response.is_closed) is True @@ -94,7 +91,7 @@ class TestPredefineds: "384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PredefinedGetResponse, predefined, path=["response"]) + assert_matches_type(DLPPredefinedProfile, predefined, path=["response"]) @pytest.mark.skip() @parametrize @@ -107,7 +104,7 @@ class TestPredefineds: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" predefined = response.parse() - assert_matches_type(PredefinedGetResponse, predefined, path=["response"]) + assert_matches_type(DLPPredefinedProfile, predefined, path=["response"]) @pytest.mark.skip() @parametrize @@ -120,7 +117,7 @@ class TestPredefineds: assert response.http_request.headers.get("X-Stainless-Lang") == "python" predefined = response.parse() - assert_matches_type(PredefinedGetResponse, predefined, path=["response"]) + assert_matches_type(DLPPredefinedProfile, predefined, path=["response"]) assert cast(Any, response.is_closed) is True @@ -150,7 +147,7 @@ class TestAsyncPredefineds: "384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PredefinedUpdateResponse, predefined, path=["response"]) + assert_matches_type(DLPPredefinedProfile, predefined, path=["response"]) @pytest.mark.skip() @parametrize @@ -165,7 +162,7 @@ class TestAsyncPredefineds: }, entries=[{"enabled": True}, {"enabled": True}, {"enabled": True}], ) - assert_matches_type(PredefinedUpdateResponse, predefined, path=["response"]) + assert_matches_type(DLPPredefinedProfile, predefined, path=["response"]) @pytest.mark.skip() @parametrize @@ -178,7 +175,7 @@ class TestAsyncPredefineds: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" predefined = await response.parse() - assert_matches_type(PredefinedUpdateResponse, predefined, path=["response"]) + assert_matches_type(DLPPredefinedProfile, predefined, path=["response"]) @pytest.mark.skip() @parametrize @@ -191,7 +188,7 @@ class TestAsyncPredefineds: assert response.http_request.headers.get("X-Stainless-Lang") == "python" predefined = await response.parse() - assert_matches_type(PredefinedUpdateResponse, predefined, path=["response"]) + assert_matches_type(DLPPredefinedProfile, predefined, path=["response"]) assert cast(Any, response.is_closed) is True @@ -217,7 +214,7 @@ class TestAsyncPredefineds: "384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PredefinedGetResponse, predefined, path=["response"]) + assert_matches_type(DLPPredefinedProfile, predefined, path=["response"]) @pytest.mark.skip() @parametrize @@ -230,7 +227,7 @@ class TestAsyncPredefineds: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" predefined = await response.parse() - assert_matches_type(PredefinedGetResponse, predefined, path=["response"]) + assert_matches_type(DLPPredefinedProfile, predefined, path=["response"]) @pytest.mark.skip() @parametrize @@ -243,7 +240,7 @@ class TestAsyncPredefineds: assert response.http_request.headers.get("X-Stainless-Lang") == "python" predefined = await response.parse() - assert_matches_type(PredefinedGetResponse, predefined, path=["response"]) + assert_matches_type(DLPPredefinedProfile, predefined, 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 9263a1a78..b6c64a085 100644 --- a/tests/api_resources/zero_trust/dlp/test_datasets.py +++ b/tests/api_resources/zero_trust/dlp/test_datasets.py @@ -10,10 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.dlp import ( - DatasetGetResponse, - DatasetListResponse, - DatasetCreateResponse, - DatasetUpdateResponse, + DLPDataset, + DLPDatasetArray, + DLPDatasetCreation, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -29,7 +28,7 @@ class TestDatasets: account_id="string", name="string", ) - assert_matches_type(Optional[DatasetCreateResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDatasetCreation], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +39,7 @@ class TestDatasets: description="string", secret=True, ) - assert_matches_type(Optional[DatasetCreateResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDatasetCreation], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +52,7 @@ class TestDatasets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = response.parse() - assert_matches_type(Optional[DatasetCreateResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDatasetCreation], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -66,7 +65,7 @@ class TestDatasets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = response.parse() - assert_matches_type(Optional[DatasetCreateResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDatasetCreation], dataset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -86,7 +85,7 @@ class TestDatasets: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="string", ) - assert_matches_type(Optional[DatasetUpdateResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDataset], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -97,7 +96,7 @@ class TestDatasets: description="string", name="string", ) - assert_matches_type(Optional[DatasetUpdateResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDataset], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -110,7 +109,7 @@ class TestDatasets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = response.parse() - assert_matches_type(Optional[DatasetUpdateResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDataset], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -123,7 +122,7 @@ class TestDatasets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = response.parse() - assert_matches_type(Optional[DatasetUpdateResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDataset], dataset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -148,7 +147,7 @@ class TestDatasets: dataset = client.zero_trust.dlp.datasets.list( account_id="string", ) - assert_matches_type(Optional[DatasetListResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDatasetArray], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -160,7 +159,7 @@ class TestDatasets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = response.parse() - assert_matches_type(Optional[DatasetListResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDatasetArray], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -172,7 +171,7 @@ class TestDatasets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = response.parse() - assert_matches_type(Optional[DatasetListResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDatasetArray], dataset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -243,7 +242,7 @@ class TestDatasets: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="string", ) - assert_matches_type(Optional[DatasetGetResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDataset], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -256,7 +255,7 @@ class TestDatasets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = response.parse() - assert_matches_type(Optional[DatasetGetResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDataset], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -269,7 +268,7 @@ class TestDatasets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = response.parse() - assert_matches_type(Optional[DatasetGetResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDataset], dataset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -299,7 +298,7 @@ class TestAsyncDatasets: account_id="string", name="string", ) - assert_matches_type(Optional[DatasetCreateResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDatasetCreation], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -310,7 +309,7 @@ class TestAsyncDatasets: description="string", secret=True, ) - assert_matches_type(Optional[DatasetCreateResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDatasetCreation], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -323,7 +322,7 @@ class TestAsyncDatasets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = await response.parse() - assert_matches_type(Optional[DatasetCreateResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDatasetCreation], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -336,7 +335,7 @@ class TestAsyncDatasets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = await response.parse() - assert_matches_type(Optional[DatasetCreateResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDatasetCreation], dataset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -356,7 +355,7 @@ class TestAsyncDatasets: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="string", ) - assert_matches_type(Optional[DatasetUpdateResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDataset], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -367,7 +366,7 @@ class TestAsyncDatasets: description="string", name="string", ) - assert_matches_type(Optional[DatasetUpdateResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDataset], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -380,7 +379,7 @@ class TestAsyncDatasets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = await response.parse() - assert_matches_type(Optional[DatasetUpdateResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDataset], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -393,7 +392,7 @@ class TestAsyncDatasets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = await response.parse() - assert_matches_type(Optional[DatasetUpdateResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDataset], dataset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -418,7 +417,7 @@ class TestAsyncDatasets: dataset = await async_client.zero_trust.dlp.datasets.list( account_id="string", ) - assert_matches_type(Optional[DatasetListResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDatasetArray], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -430,7 +429,7 @@ class TestAsyncDatasets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = await response.parse() - assert_matches_type(Optional[DatasetListResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDatasetArray], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -442,7 +441,7 @@ class TestAsyncDatasets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = await response.parse() - assert_matches_type(Optional[DatasetListResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDatasetArray], dataset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -513,7 +512,7 @@ class TestAsyncDatasets: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="string", ) - assert_matches_type(Optional[DatasetGetResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDataset], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -526,7 +525,7 @@ class TestAsyncDatasets: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = await response.parse() - assert_matches_type(Optional[DatasetGetResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDataset], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -539,7 +538,7 @@ class TestAsyncDatasets: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = await response.parse() - assert_matches_type(Optional[DatasetGetResponse], dataset, path=["response"]) + assert_matches_type(Optional[DLPDataset], dataset, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py b/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py index 63addbba4..dbd06b8ea 100644 --- a/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py +++ b/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.gateway import ( - AuditSSHSettingGetResponse, - AuditSSHSettingUpdateResponse, -) +from cloudflare.types.zero_trust.gateway import ZeroTrustGatewaySettings base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestAuditSSHSettings: account_id="699d98642c564d2e855e9661899b7252", public_key="1pyl6I1tL7xfJuFYVzXlUW8uXXlpxegHXBzGCBKaSFA=", ) - assert_matches_type(AuditSSHSettingUpdateResponse, audit_ssh_setting, path=["response"]) + assert_matches_type(ZeroTrustGatewaySettings, audit_ssh_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +34,7 @@ class TestAuditSSHSettings: public_key="1pyl6I1tL7xfJuFYVzXlUW8uXXlpxegHXBzGCBKaSFA=", seed_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) - assert_matches_type(AuditSSHSettingUpdateResponse, audit_ssh_setting, path=["response"]) + assert_matches_type(ZeroTrustGatewaySettings, audit_ssh_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +47,7 @@ class TestAuditSSHSettings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" audit_ssh_setting = response.parse() - assert_matches_type(AuditSSHSettingUpdateResponse, audit_ssh_setting, path=["response"]) + assert_matches_type(ZeroTrustGatewaySettings, audit_ssh_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -63,7 +60,7 @@ class TestAuditSSHSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" audit_ssh_setting = response.parse() - assert_matches_type(AuditSSHSettingUpdateResponse, audit_ssh_setting, path=["response"]) + assert_matches_type(ZeroTrustGatewaySettings, audit_ssh_setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -73,7 +70,7 @@ class TestAuditSSHSettings: audit_ssh_setting = client.zero_trust.gateway.audit_ssh_settings.get( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(AuditSSHSettingGetResponse, audit_ssh_setting, path=["response"]) + assert_matches_type(ZeroTrustGatewaySettings, audit_ssh_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -85,7 +82,7 @@ class TestAuditSSHSettings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" audit_ssh_setting = response.parse() - assert_matches_type(AuditSSHSettingGetResponse, audit_ssh_setting, path=["response"]) + assert_matches_type(ZeroTrustGatewaySettings, audit_ssh_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -97,7 +94,7 @@ class TestAuditSSHSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" audit_ssh_setting = response.parse() - assert_matches_type(AuditSSHSettingGetResponse, audit_ssh_setting, path=["response"]) + assert_matches_type(ZeroTrustGatewaySettings, audit_ssh_setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -112,7 +109,7 @@ class TestAsyncAuditSSHSettings: account_id="699d98642c564d2e855e9661899b7252", public_key="1pyl6I1tL7xfJuFYVzXlUW8uXXlpxegHXBzGCBKaSFA=", ) - assert_matches_type(AuditSSHSettingUpdateResponse, audit_ssh_setting, path=["response"]) + assert_matches_type(ZeroTrustGatewaySettings, audit_ssh_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -122,7 +119,7 @@ class TestAsyncAuditSSHSettings: public_key="1pyl6I1tL7xfJuFYVzXlUW8uXXlpxegHXBzGCBKaSFA=", seed_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) - assert_matches_type(AuditSSHSettingUpdateResponse, audit_ssh_setting, path=["response"]) + assert_matches_type(ZeroTrustGatewaySettings, audit_ssh_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -135,7 +132,7 @@ class TestAsyncAuditSSHSettings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" audit_ssh_setting = await response.parse() - assert_matches_type(AuditSSHSettingUpdateResponse, audit_ssh_setting, path=["response"]) + assert_matches_type(ZeroTrustGatewaySettings, audit_ssh_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -148,7 +145,7 @@ class TestAsyncAuditSSHSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" audit_ssh_setting = await response.parse() - assert_matches_type(AuditSSHSettingUpdateResponse, audit_ssh_setting, path=["response"]) + assert_matches_type(ZeroTrustGatewaySettings, audit_ssh_setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -158,7 +155,7 @@ class TestAsyncAuditSSHSettings: audit_ssh_setting = await async_client.zero_trust.gateway.audit_ssh_settings.get( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(AuditSSHSettingGetResponse, audit_ssh_setting, path=["response"]) + assert_matches_type(ZeroTrustGatewaySettings, audit_ssh_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -170,7 +167,7 @@ class TestAsyncAuditSSHSettings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" audit_ssh_setting = await response.parse() - assert_matches_type(AuditSSHSettingGetResponse, audit_ssh_setting, path=["response"]) + assert_matches_type(ZeroTrustGatewaySettings, audit_ssh_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -182,6 +179,6 @@ class TestAsyncAuditSSHSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" audit_ssh_setting = await response.parse() - assert_matches_type(AuditSSHSettingGetResponse, audit_ssh_setting, path=["response"]) + assert_matches_type(ZeroTrustGatewaySettings, audit_ssh_setting, 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 9a4fa52fb..777bb6178 100644 --- a/tests/api_resources/zero_trust/gateway/test_lists.py +++ b/tests/api_resources/zero_trust/gateway/test_lists.py @@ -10,12 +10,10 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.gateway import ( - ListGetResponse, - ListEditResponse, ListListResponse, ListCreateResponse, ListDeleteResponse, - ListUpdateResponse, + ZeroTrustGatewayLists, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -84,7 +82,7 @@ class TestLists: account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) - assert_matches_type(ListUpdateResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) @pytest.mark.skip() @parametrize @@ -95,7 +93,7 @@ class TestLists: name="Admin Serial Numbers", description="The serial numbers for administrators", ) - assert_matches_type(ListUpdateResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) @pytest.mark.skip() @parametrize @@ -109,7 +107,7 @@ class TestLists: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = response.parse() - assert_matches_type(ListUpdateResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) @pytest.mark.skip() @parametrize @@ -123,7 +121,7 @@ class TestLists: assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = response.parse() - assert_matches_type(ListUpdateResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -224,7 +222,7 @@ class TestLists: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(ListEditResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) @pytest.mark.skip() @parametrize @@ -235,7 +233,7 @@ class TestLists: append=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], remove=["8GE8721REF", "8GE8721REF", "8GE8721REF"], ) - assert_matches_type(ListEditResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) @pytest.mark.skip() @parametrize @@ -248,7 +246,7 @@ class TestLists: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = response.parse() - assert_matches_type(ListEditResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) @pytest.mark.skip() @parametrize @@ -261,7 +259,7 @@ class TestLists: assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = response.parse() - assert_matches_type(ListEditResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -281,7 +279,7 @@ class TestLists: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(ListGetResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) @pytest.mark.skip() @parametrize @@ -294,7 +292,7 @@ class TestLists: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = response.parse() - assert_matches_type(ListGetResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) @pytest.mark.skip() @parametrize @@ -307,7 +305,7 @@ class TestLists: assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = response.parse() - assert_matches_type(ListGetResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -384,7 +382,7 @@ class TestAsyncLists: account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) - assert_matches_type(ListUpdateResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) @pytest.mark.skip() @parametrize @@ -395,7 +393,7 @@ class TestAsyncLists: name="Admin Serial Numbers", description="The serial numbers for administrators", ) - assert_matches_type(ListUpdateResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) @pytest.mark.skip() @parametrize @@ -409,7 +407,7 @@ class TestAsyncLists: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = await response.parse() - assert_matches_type(ListUpdateResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) @pytest.mark.skip() @parametrize @@ -423,7 +421,7 @@ class TestAsyncLists: assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = await response.parse() - assert_matches_type(ListUpdateResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -524,7 +522,7 @@ class TestAsyncLists: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(ListEditResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) @pytest.mark.skip() @parametrize @@ -535,7 +533,7 @@ class TestAsyncLists: append=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], remove=["8GE8721REF", "8GE8721REF", "8GE8721REF"], ) - assert_matches_type(ListEditResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) @pytest.mark.skip() @parametrize @@ -548,7 +546,7 @@ class TestAsyncLists: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = await response.parse() - assert_matches_type(ListEditResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) @pytest.mark.skip() @parametrize @@ -561,7 +559,7 @@ class TestAsyncLists: assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = await response.parse() - assert_matches_type(ListEditResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -581,7 +579,7 @@ class TestAsyncLists: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(ListGetResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) @pytest.mark.skip() @parametrize @@ -594,7 +592,7 @@ class TestAsyncLists: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = await response.parse() - assert_matches_type(ListGetResponse, list, path=["response"]) + assert_matches_type(ZeroTrustGatewayLists, list, path=["response"]) @pytest.mark.skip() @parametrize @@ -607,7 +605,7 @@ class TestAsyncLists: assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = await response.parse() - assert_matches_type(ListGetResponse, list, path=["response"]) + assert_matches_type(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 9b955cfc9..0d1539299 100644 --- a/tests/api_resources/zero_trust/gateway/test_locations.py +++ b/tests/api_resources/zero_trust/gateway/test_locations.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.gateway import ( - LocationGetResponse, LocationListResponse, - LocationCreateResponse, LocationDeleteResponse, - LocationUpdateResponse, + ZeroTrustGatewayLocations, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +28,7 @@ class TestLocations: account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) - assert_matches_type(LocationCreateResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +40,7 @@ class TestLocations: ecs_support=False, networks=[{"network": "192.0.2.1/32"}, {"network": "192.0.2.1/32"}, {"network": "192.0.2.1/32"}], ) - assert_matches_type(LocationCreateResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +53,7 @@ class TestLocations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" location = response.parse() - assert_matches_type(LocationCreateResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) @pytest.mark.skip() @parametrize @@ -68,7 +66,7 @@ class TestLocations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" location = response.parse() - assert_matches_type(LocationCreateResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) assert cast(Any, response.is_closed) is True @@ -80,7 +78,7 @@ class TestLocations: account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) - assert_matches_type(LocationUpdateResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +91,7 @@ class TestLocations: ecs_support=False, networks=[{"network": "192.0.2.1/32"}, {"network": "192.0.2.1/32"}, {"network": "192.0.2.1/32"}], ) - assert_matches_type(LocationUpdateResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) @pytest.mark.skip() @parametrize @@ -107,7 +105,7 @@ class TestLocations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" location = response.parse() - assert_matches_type(LocationUpdateResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) @pytest.mark.skip() @parametrize @@ -121,7 +119,7 @@ class TestLocations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" location = response.parse() - assert_matches_type(LocationUpdateResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) assert cast(Any, response.is_closed) is True @@ -203,7 +201,7 @@ class TestLocations: "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(LocationGetResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) @pytest.mark.skip() @parametrize @@ -216,7 +214,7 @@ class TestLocations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" location = response.parse() - assert_matches_type(LocationGetResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) @pytest.mark.skip() @parametrize @@ -229,7 +227,7 @@ class TestLocations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" location = response.parse() - assert_matches_type(LocationGetResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) assert cast(Any, response.is_closed) is True @@ -244,7 +242,7 @@ class TestAsyncLocations: account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) - assert_matches_type(LocationCreateResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) @pytest.mark.skip() @parametrize @@ -256,7 +254,7 @@ class TestAsyncLocations: ecs_support=False, networks=[{"network": "192.0.2.1/32"}, {"network": "192.0.2.1/32"}, {"network": "192.0.2.1/32"}], ) - assert_matches_type(LocationCreateResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) @pytest.mark.skip() @parametrize @@ -269,7 +267,7 @@ class TestAsyncLocations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" location = await response.parse() - assert_matches_type(LocationCreateResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) @pytest.mark.skip() @parametrize @@ -282,7 +280,7 @@ class TestAsyncLocations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" location = await response.parse() - assert_matches_type(LocationCreateResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) assert cast(Any, response.is_closed) is True @@ -294,7 +292,7 @@ class TestAsyncLocations: account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) - assert_matches_type(LocationUpdateResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) @pytest.mark.skip() @parametrize @@ -307,7 +305,7 @@ class TestAsyncLocations: ecs_support=False, networks=[{"network": "192.0.2.1/32"}, {"network": "192.0.2.1/32"}, {"network": "192.0.2.1/32"}], ) - assert_matches_type(LocationUpdateResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) @pytest.mark.skip() @parametrize @@ -321,7 +319,7 @@ class TestAsyncLocations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" location = await response.parse() - assert_matches_type(LocationUpdateResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) @pytest.mark.skip() @parametrize @@ -335,7 +333,7 @@ class TestAsyncLocations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" location = await response.parse() - assert_matches_type(LocationUpdateResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) assert cast(Any, response.is_closed) is True @@ -417,7 +415,7 @@ class TestAsyncLocations: "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(LocationGetResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) @pytest.mark.skip() @parametrize @@ -430,7 +428,7 @@ class TestAsyncLocations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" location = await response.parse() - assert_matches_type(LocationGetResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) @pytest.mark.skip() @parametrize @@ -443,6 +441,6 @@ class TestAsyncLocations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" location = await response.parse() - assert_matches_type(LocationGetResponse, location, path=["response"]) + assert_matches_type(ZeroTrustGatewayLocations, location, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/gateway/test_loggings.py b/tests/api_resources/zero_trust/gateway/test_loggings.py index d5cdf98cb..2fdf28d13 100644 --- a/tests/api_resources/zero_trust/gateway/test_loggings.py +++ b/tests/api_resources/zero_trust/gateway/test_loggings.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.gateway import LoggingGetResponse, LoggingUpdateResponse +from cloudflare.types.zero_trust.gateway import ZeroTrustGatewayGatewayAccountLoggingSettings base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestLoggings: logging = client.zero_trust.gateway.loggings.update( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(LoggingUpdateResponse, logging, path=["response"]) + assert_matches_type(ZeroTrustGatewayGatewayAccountLoggingSettings, logging, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestLoggings: "l4": {}, }, ) - assert_matches_type(LoggingUpdateResponse, logging, path=["response"]) + assert_matches_type(ZeroTrustGatewayGatewayAccountLoggingSettings, logging, path=["response"]) @pytest.mark.skip() @parametrize @@ -49,7 +49,7 @@ class TestLoggings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" logging = response.parse() - assert_matches_type(LoggingUpdateResponse, logging, path=["response"]) + assert_matches_type(ZeroTrustGatewayGatewayAccountLoggingSettings, logging, path=["response"]) @pytest.mark.skip() @parametrize @@ -61,7 +61,7 @@ class TestLoggings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" logging = response.parse() - assert_matches_type(LoggingUpdateResponse, logging, path=["response"]) + assert_matches_type(ZeroTrustGatewayGatewayAccountLoggingSettings, logging, path=["response"]) assert cast(Any, response.is_closed) is True @@ -71,7 +71,7 @@ class TestLoggings: logging = client.zero_trust.gateway.loggings.get( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(LoggingGetResponse, logging, path=["response"]) + assert_matches_type(ZeroTrustGatewayGatewayAccountLoggingSettings, logging, path=["response"]) @pytest.mark.skip() @parametrize @@ -83,7 +83,7 @@ class TestLoggings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" logging = response.parse() - assert_matches_type(LoggingGetResponse, logging, path=["response"]) + assert_matches_type(ZeroTrustGatewayGatewayAccountLoggingSettings, logging, path=["response"]) @pytest.mark.skip() @parametrize @@ -95,7 +95,7 @@ class TestLoggings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" logging = response.parse() - assert_matches_type(LoggingGetResponse, logging, path=["response"]) + assert_matches_type(ZeroTrustGatewayGatewayAccountLoggingSettings, logging, path=["response"]) assert cast(Any, response.is_closed) is True @@ -109,7 +109,7 @@ class TestAsyncLoggings: logging = await async_client.zero_trust.gateway.loggings.update( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(LoggingUpdateResponse, logging, path=["response"]) + assert_matches_type(ZeroTrustGatewayGatewayAccountLoggingSettings, logging, path=["response"]) @pytest.mark.skip() @parametrize @@ -123,7 +123,7 @@ class TestAsyncLoggings: "l4": {}, }, ) - assert_matches_type(LoggingUpdateResponse, logging, path=["response"]) + assert_matches_type(ZeroTrustGatewayGatewayAccountLoggingSettings, logging, path=["response"]) @pytest.mark.skip() @parametrize @@ -135,7 +135,7 @@ class TestAsyncLoggings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" logging = await response.parse() - assert_matches_type(LoggingUpdateResponse, logging, path=["response"]) + assert_matches_type(ZeroTrustGatewayGatewayAccountLoggingSettings, logging, path=["response"]) @pytest.mark.skip() @parametrize @@ -147,7 +147,7 @@ class TestAsyncLoggings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" logging = await response.parse() - assert_matches_type(LoggingUpdateResponse, logging, path=["response"]) + assert_matches_type(ZeroTrustGatewayGatewayAccountLoggingSettings, logging, path=["response"]) assert cast(Any, response.is_closed) is True @@ -157,7 +157,7 @@ class TestAsyncLoggings: logging = await async_client.zero_trust.gateway.loggings.get( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(LoggingGetResponse, logging, path=["response"]) + assert_matches_type(ZeroTrustGatewayGatewayAccountLoggingSettings, logging, path=["response"]) @pytest.mark.skip() @parametrize @@ -169,7 +169,7 @@ class TestAsyncLoggings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" logging = await response.parse() - assert_matches_type(LoggingGetResponse, logging, path=["response"]) + assert_matches_type(ZeroTrustGatewayGatewayAccountLoggingSettings, logging, path=["response"]) @pytest.mark.skip() @parametrize @@ -181,6 +181,6 @@ class TestAsyncLoggings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" logging = await response.parse() - assert_matches_type(LoggingGetResponse, logging, path=["response"]) + assert_matches_type(ZeroTrustGatewayGatewayAccountLoggingSettings, logging, 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 9f170b467..671acfe16 100644 --- a/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py +++ b/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.gateway import ( - ProxyEndpointGetResponse, - ProxyEndpointEditResponse, ProxyEndpointListResponse, - ProxyEndpointCreateResponse, ProxyEndpointDeleteResponse, + ZeroTrustGatewayProxyEndpoints, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -31,7 +29,7 @@ class TestProxyEndpoints: ips=["192.0.2.1/32", "192.0.2.1/32", "192.0.2.1/32"], name="Devops team", ) - assert_matches_type(ProxyEndpointCreateResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +40,7 @@ class TestProxyEndpoints: name="Devops team", subdomain="oli3n9zkz5.proxy.cloudflare-gateway.com", ) - assert_matches_type(ProxyEndpointCreateResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +54,7 @@ class TestProxyEndpoints: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_endpoint = response.parse() - assert_matches_type(ProxyEndpointCreateResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -70,7 +68,7 @@ class TestProxyEndpoints: assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_endpoint = response.parse() - assert_matches_type(ProxyEndpointCreateResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) assert cast(Any, response.is_closed) is True @@ -152,7 +150,7 @@ class TestProxyEndpoints: "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(ProxyEndpointEditResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -164,7 +162,7 @@ class TestProxyEndpoints: name="Devops team", subdomain="oli3n9zkz5.proxy.cloudflare-gateway.com", ) - assert_matches_type(ProxyEndpointEditResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -177,7 +175,7 @@ class TestProxyEndpoints: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_endpoint = response.parse() - assert_matches_type(ProxyEndpointEditResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -190,7 +188,7 @@ class TestProxyEndpoints: assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_endpoint = response.parse() - assert_matches_type(ProxyEndpointEditResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) assert cast(Any, response.is_closed) is True @@ -201,7 +199,7 @@ class TestProxyEndpoints: "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(ProxyEndpointGetResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -214,7 +212,7 @@ class TestProxyEndpoints: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_endpoint = response.parse() - assert_matches_type(ProxyEndpointGetResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -227,7 +225,7 @@ class TestProxyEndpoints: assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_endpoint = response.parse() - assert_matches_type(ProxyEndpointGetResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) assert cast(Any, response.is_closed) is True @@ -243,7 +241,7 @@ class TestAsyncProxyEndpoints: ips=["192.0.2.1/32", "192.0.2.1/32", "192.0.2.1/32"], name="Devops team", ) - assert_matches_type(ProxyEndpointCreateResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -254,7 +252,7 @@ class TestAsyncProxyEndpoints: name="Devops team", subdomain="oli3n9zkz5.proxy.cloudflare-gateway.com", ) - assert_matches_type(ProxyEndpointCreateResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -268,7 +266,7 @@ class TestAsyncProxyEndpoints: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_endpoint = await response.parse() - assert_matches_type(ProxyEndpointCreateResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -282,7 +280,7 @@ class TestAsyncProxyEndpoints: assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_endpoint = await response.parse() - assert_matches_type(ProxyEndpointCreateResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) assert cast(Any, response.is_closed) is True @@ -364,7 +362,7 @@ class TestAsyncProxyEndpoints: "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(ProxyEndpointEditResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -376,7 +374,7 @@ class TestAsyncProxyEndpoints: name="Devops team", subdomain="oli3n9zkz5.proxy.cloudflare-gateway.com", ) - assert_matches_type(ProxyEndpointEditResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -389,7 +387,7 @@ class TestAsyncProxyEndpoints: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_endpoint = await response.parse() - assert_matches_type(ProxyEndpointEditResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -402,7 +400,7 @@ class TestAsyncProxyEndpoints: assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_endpoint = await response.parse() - assert_matches_type(ProxyEndpointEditResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) assert cast(Any, response.is_closed) is True @@ -413,7 +411,7 @@ class TestAsyncProxyEndpoints: "ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(ProxyEndpointGetResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -426,7 +424,7 @@ class TestAsyncProxyEndpoints: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_endpoint = await response.parse() - assert_matches_type(ProxyEndpointGetResponse, proxy_endpoint, path=["response"]) + assert_matches_type(ZeroTrustGatewayProxyEndpoints, proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -439,6 +437,6 @@ class TestAsyncProxyEndpoints: assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_endpoint = await response.parse() - assert_matches_type(ProxyEndpointGetResponse, proxy_endpoint, path=["response"]) + assert_matches_type(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 7bd8bf6b2..74dc16c3e 100644 --- a/tests/api_resources/zero_trust/gateway/test_rules.py +++ b/tests/api_resources/zero_trust/gateway/test_rules.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.gateway import ( - RuleGetResponse, RuleListResponse, - RuleCreateResponse, RuleDeleteResponse, - RuleUpdateResponse, + ZeroTrustGatewayRules, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -31,7 +29,7 @@ class TestRules: action="allow", name="block bad websites", ) - assert_matches_type(RuleCreateResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -144,7 +142,7 @@ class TestRules: }, traffic='http.request.uri matches ".*a/partial/uri.*" and http.request.host in $01302951-49f9-47c9-a400-0297e60b6a10', ) - assert_matches_type(RuleCreateResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -158,7 +156,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleCreateResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -172,7 +170,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleCreateResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -185,7 +183,7 @@ class TestRules: action="allow", name="block bad websites", ) - assert_matches_type(RuleUpdateResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -299,7 +297,7 @@ class TestRules: }, traffic='http.request.uri matches ".*a/partial/uri.*" and http.request.host in $01302951-49f9-47c9-a400-0297e60b6a10', ) - assert_matches_type(RuleUpdateResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -314,7 +312,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleUpdateResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -329,7 +327,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleUpdateResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -431,7 +429,7 @@ class TestRules: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(RuleGetResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -444,7 +442,7 @@ class TestRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleGetResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -457,7 +455,7 @@ class TestRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleGetResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -482,7 +480,7 @@ class TestAsyncRules: action="allow", name="block bad websites", ) - assert_matches_type(RuleCreateResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -595,7 +593,7 @@ class TestAsyncRules: }, traffic='http.request.uri matches ".*a/partial/uri.*" and http.request.host in $01302951-49f9-47c9-a400-0297e60b6a10', ) - assert_matches_type(RuleCreateResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -609,7 +607,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleCreateResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -623,7 +621,7 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleCreateResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -636,7 +634,7 @@ class TestAsyncRules: action="allow", name="block bad websites", ) - assert_matches_type(RuleUpdateResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -750,7 +748,7 @@ class TestAsyncRules: }, traffic='http.request.uri matches ".*a/partial/uri.*" and http.request.host in $01302951-49f9-47c9-a400-0297e60b6a10', ) - assert_matches_type(RuleUpdateResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -765,7 +763,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleUpdateResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -780,7 +778,7 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleUpdateResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -882,7 +880,7 @@ class TestAsyncRules: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(RuleGetResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -895,7 +893,7 @@ class TestAsyncRules: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleGetResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -908,7 +906,7 @@ class TestAsyncRules: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleGetResponse, rule, path=["response"]) + assert_matches_type(ZeroTrustGatewayRules, rule, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/networks/routes/test_ips.py b/tests/api_resources/zero_trust/networks/routes/test_ips.py index 320f7f6c9..b29384914 100644 --- a/tests/api_resources/zero_trust/networks/routes/test_ips.py +++ b/tests/api_resources/zero_trust/networks/routes/test_ips.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.networks.routes import IPGetResponse +from cloudflare.types.zero_trust.networks import TunnelTeamnet base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestIPs: "10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(IPGetResponse, ip, path=["response"]) + assert_matches_type(TunnelTeamnet, ip, path=["response"]) @pytest.mark.skip() @parametrize @@ -34,7 +34,7 @@ class TestIPs: account_id="699d98642c564d2e855e9661899b7252", virtual_network_id={}, ) - assert_matches_type(IPGetResponse, ip, path=["response"]) + assert_matches_type(TunnelTeamnet, ip, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ class TestIPs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ip = response.parse() - assert_matches_type(IPGetResponse, ip, path=["response"]) + assert_matches_type(TunnelTeamnet, ip, path=["response"]) @pytest.mark.skip() @parametrize @@ -60,7 +60,7 @@ class TestIPs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ip = response.parse() - assert_matches_type(IPGetResponse, ip, path=["response"]) + assert_matches_type(TunnelTeamnet, ip, path=["response"]) assert cast(Any, response.is_closed) is True @@ -90,7 +90,7 @@ class TestAsyncIPs: "10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(IPGetResponse, ip, path=["response"]) + assert_matches_type(TunnelTeamnet, ip, path=["response"]) @pytest.mark.skip() @parametrize @@ -100,7 +100,7 @@ class TestAsyncIPs: account_id="699d98642c564d2e855e9661899b7252", virtual_network_id={}, ) - assert_matches_type(IPGetResponse, ip, path=["response"]) + assert_matches_type(TunnelTeamnet, ip, path=["response"]) @pytest.mark.skip() @parametrize @@ -113,7 +113,7 @@ class TestAsyncIPs: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ip = await response.parse() - assert_matches_type(IPGetResponse, ip, path=["response"]) + assert_matches_type(TunnelTeamnet, ip, path=["response"]) @pytest.mark.skip() @parametrize @@ -126,7 +126,7 @@ class TestAsyncIPs: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ip = await response.parse() - assert_matches_type(IPGetResponse, ip, path=["response"]) + assert_matches_type(TunnelTeamnet, ip, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/networks/routes/test_networks.py b/tests/api_resources/zero_trust/networks/routes/test_networks.py index 7238d8c37..3dba55a2b 100644 --- a/tests/api_resources/zero_trust/networks/routes/test_networks.py +++ b/tests/api_resources/zero_trust/networks/routes/test_networks.py @@ -9,11 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.networks.routes import ( - NetworkEditResponse, - NetworkCreateResponse, - NetworkDeleteResponse, -) +from cloudflare.types.zero_trust.networks import TunnelRoute base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -28,7 +24,7 @@ class TestNetworks: "172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(NetworkCreateResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +35,7 @@ class TestNetworks: comment="Example comment for this route.", virtual_network_id={}, ) - assert_matches_type(NetworkCreateResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) @pytest.mark.skip() @parametrize @@ -52,7 +48,7 @@ class TestNetworks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = response.parse() - assert_matches_type(NetworkCreateResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) @pytest.mark.skip() @parametrize @@ -65,7 +61,7 @@ class TestNetworks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = response.parse() - assert_matches_type(NetworkCreateResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) assert cast(Any, response.is_closed) is True @@ -91,7 +87,7 @@ class TestNetworks: "172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(NetworkDeleteResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) @pytest.mark.skip() @parametrize @@ -101,7 +97,7 @@ class TestNetworks: account_id="699d98642c564d2e855e9661899b7252", tun_type="cfd_tunnel", ) - assert_matches_type(NetworkDeleteResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) @pytest.mark.skip() @parametrize @@ -114,7 +110,7 @@ class TestNetworks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = response.parse() - assert_matches_type(NetworkDeleteResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) @pytest.mark.skip() @parametrize @@ -127,7 +123,7 @@ class TestNetworks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = response.parse() - assert_matches_type(NetworkDeleteResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) assert cast(Any, response.is_closed) is True @@ -153,7 +149,7 @@ class TestNetworks: "172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(NetworkEditResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) @pytest.mark.skip() @parametrize @@ -166,7 +162,7 @@ class TestNetworks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = response.parse() - assert_matches_type(NetworkEditResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) @pytest.mark.skip() @parametrize @@ -179,7 +175,7 @@ class TestNetworks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = response.parse() - assert_matches_type(NetworkEditResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) assert cast(Any, response.is_closed) is True @@ -209,7 +205,7 @@ class TestAsyncNetworks: "172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(NetworkCreateResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) @pytest.mark.skip() @parametrize @@ -220,7 +216,7 @@ class TestAsyncNetworks: comment="Example comment for this route.", virtual_network_id={}, ) - assert_matches_type(NetworkCreateResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) @pytest.mark.skip() @parametrize @@ -233,7 +229,7 @@ class TestAsyncNetworks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = await response.parse() - assert_matches_type(NetworkCreateResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) @pytest.mark.skip() @parametrize @@ -246,7 +242,7 @@ class TestAsyncNetworks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = await response.parse() - assert_matches_type(NetworkCreateResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) assert cast(Any, response.is_closed) is True @@ -272,7 +268,7 @@ class TestAsyncNetworks: "172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(NetworkDeleteResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) @pytest.mark.skip() @parametrize @@ -282,7 +278,7 @@ class TestAsyncNetworks: account_id="699d98642c564d2e855e9661899b7252", tun_type="cfd_tunnel", ) - assert_matches_type(NetworkDeleteResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) @pytest.mark.skip() @parametrize @@ -295,7 +291,7 @@ class TestAsyncNetworks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = await response.parse() - assert_matches_type(NetworkDeleteResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) @pytest.mark.skip() @parametrize @@ -308,7 +304,7 @@ class TestAsyncNetworks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = await response.parse() - assert_matches_type(NetworkDeleteResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) assert cast(Any, response.is_closed) is True @@ -334,7 +330,7 @@ class TestAsyncNetworks: "172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(NetworkEditResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) @pytest.mark.skip() @parametrize @@ -347,7 +343,7 @@ class TestAsyncNetworks: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = await response.parse() - assert_matches_type(NetworkEditResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) @pytest.mark.skip() @parametrize @@ -360,7 +356,7 @@ class TestAsyncNetworks: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = await response.parse() - assert_matches_type(NetworkEditResponse, network, path=["response"]) + assert_matches_type(TunnelRoute, network, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/networks/test_routes.py b/tests/api_resources/zero_trust/networks/test_routes.py index 5aadef464..6339541cf 100644 --- a/tests/api_resources/zero_trust/networks/test_routes.py +++ b/tests/api_resources/zero_trust/networks/test_routes.py @@ -11,10 +11,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.zero_trust.networks import ( - RouteEditResponse, - RouteListResponse, - RouteCreateResponse, - RouteDeleteResponse, + TunnelRoute, + TunnelTeamnet, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +28,7 @@ class TestRoutes: account_id="699d98642c564d2e855e9661899b7252", ip_network="172.16.0.0/16", ) - assert_matches_type(RouteCreateResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +39,7 @@ class TestRoutes: comment="Example comment for this route.", virtual_network_id={}, ) - assert_matches_type(RouteCreateResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -54,7 +52,7 @@ class TestRoutes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = response.parse() - assert_matches_type(RouteCreateResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -67,7 +65,7 @@ class TestRoutes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = response.parse() - assert_matches_type(RouteCreateResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) assert cast(Any, response.is_closed) is True @@ -86,7 +84,7 @@ class TestRoutes: route = client.zero_trust.networks.routes.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(SyncV4PagePaginationArray[RouteListResponse], route, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[TunnelTeamnet], route, path=["response"]) @pytest.mark.skip() @parametrize @@ -104,7 +102,7 @@ class TestRoutes: tunnel_id={}, virtual_network_id={}, ) - assert_matches_type(SyncV4PagePaginationArray[RouteListResponse], route, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[TunnelTeamnet], route, path=["response"]) @pytest.mark.skip() @parametrize @@ -116,7 +114,7 @@ class TestRoutes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = response.parse() - assert_matches_type(SyncV4PagePaginationArray[RouteListResponse], route, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[TunnelTeamnet], route, path=["response"]) @pytest.mark.skip() @parametrize @@ -128,7 +126,7 @@ class TestRoutes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = response.parse() - assert_matches_type(SyncV4PagePaginationArray[RouteListResponse], route, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[TunnelTeamnet], route, path=["response"]) assert cast(Any, response.is_closed) is True @@ -147,7 +145,7 @@ class TestRoutes: "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(RouteDeleteResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -160,7 +158,7 @@ class TestRoutes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = response.parse() - assert_matches_type(RouteDeleteResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +171,7 @@ class TestRoutes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = response.parse() - assert_matches_type(RouteDeleteResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) assert cast(Any, response.is_closed) is True @@ -199,7 +197,7 @@ class TestRoutes: "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(RouteEditResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -213,7 +211,7 @@ class TestRoutes: tunnel_id={}, virtual_network_id={}, ) - assert_matches_type(RouteEditResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -226,7 +224,7 @@ class TestRoutes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = response.parse() - assert_matches_type(RouteEditResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -239,7 +237,7 @@ class TestRoutes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = response.parse() - assert_matches_type(RouteEditResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) assert cast(Any, response.is_closed) is True @@ -269,7 +267,7 @@ class TestAsyncRoutes: account_id="699d98642c564d2e855e9661899b7252", ip_network="172.16.0.0/16", ) - assert_matches_type(RouteCreateResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -280,7 +278,7 @@ class TestAsyncRoutes: comment="Example comment for this route.", virtual_network_id={}, ) - assert_matches_type(RouteCreateResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -293,7 +291,7 @@ class TestAsyncRoutes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = await response.parse() - assert_matches_type(RouteCreateResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -306,7 +304,7 @@ class TestAsyncRoutes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = await response.parse() - assert_matches_type(RouteCreateResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) assert cast(Any, response.is_closed) is True @@ -325,7 +323,7 @@ class TestAsyncRoutes: route = await async_client.zero_trust.networks.routes.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(AsyncV4PagePaginationArray[RouteListResponse], route, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[TunnelTeamnet], route, path=["response"]) @pytest.mark.skip() @parametrize @@ -343,7 +341,7 @@ class TestAsyncRoutes: tunnel_id={}, virtual_network_id={}, ) - assert_matches_type(AsyncV4PagePaginationArray[RouteListResponse], route, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[TunnelTeamnet], route, path=["response"]) @pytest.mark.skip() @parametrize @@ -355,7 +353,7 @@ class TestAsyncRoutes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[RouteListResponse], route, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[TunnelTeamnet], route, path=["response"]) @pytest.mark.skip() @parametrize @@ -367,7 +365,7 @@ class TestAsyncRoutes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[RouteListResponse], route, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[TunnelTeamnet], route, path=["response"]) assert cast(Any, response.is_closed) is True @@ -386,7 +384,7 @@ class TestAsyncRoutes: "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(RouteDeleteResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -399,7 +397,7 @@ class TestAsyncRoutes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = await response.parse() - assert_matches_type(RouteDeleteResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -412,7 +410,7 @@ class TestAsyncRoutes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = await response.parse() - assert_matches_type(RouteDeleteResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) assert cast(Any, response.is_closed) is True @@ -438,7 +436,7 @@ class TestAsyncRoutes: "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(RouteEditResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -452,7 +450,7 @@ class TestAsyncRoutes: tunnel_id={}, virtual_network_id={}, ) - assert_matches_type(RouteEditResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -465,7 +463,7 @@ class TestAsyncRoutes: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = await response.parse() - assert_matches_type(RouteEditResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -478,7 +476,7 @@ class TestAsyncRoutes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = await response.parse() - assert_matches_type(RouteEditResponse, route, path=["response"]) + assert_matches_type(TunnelRoute, route, 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 23064c5d7..e63d3137e 100644 --- a/tests/api_resources/zero_trust/test_identity_providers.py +++ b/tests/api_resources/zero_trust/test_identity_providers.py @@ -10,11 +10,9 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust import ( - IdentityProviderGetResponse, + AccessIdentityProviders, IdentityProviderListResponse, - IdentityProviderCreateResponse, IdentityProviderDeleteResponse, - IdentityProviderUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -33,7 +31,7 @@ class TestIdentityProviders: account_id="string", zone_id="string", ) - assert_matches_type(IdentityProviderCreateResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -91,7 +89,7 @@ class TestIdentityProviders: "user_deprovision": True, }, ) - assert_matches_type(IdentityProviderCreateResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -107,7 +105,7 @@ class TestIdentityProviders: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(IdentityProviderCreateResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -123,7 +121,7 @@ class TestIdentityProviders: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(IdentityProviderCreateResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -159,7 +157,7 @@ class TestIdentityProviders: account_id="string", zone_id="string", ) - assert_matches_type(IdentityProviderUpdateResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -218,7 +216,7 @@ class TestIdentityProviders: "user_deprovision": True, }, ) - assert_matches_type(IdentityProviderUpdateResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -235,7 +233,7 @@ class TestIdentityProviders: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(IdentityProviderUpdateResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -252,7 +250,7 @@ class TestIdentityProviders: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(IdentityProviderUpdateResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -432,7 +430,7 @@ class TestIdentityProviders: account_id="string", zone_id="string", ) - assert_matches_type(IdentityProviderGetResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -442,7 +440,7 @@ class TestIdentityProviders: account_id="string", zone_id="string", ) - assert_matches_type(IdentityProviderGetResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -456,7 +454,7 @@ class TestIdentityProviders: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(IdentityProviderGetResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -470,7 +468,7 @@ class TestIdentityProviders: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(IdentityProviderGetResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -512,7 +510,7 @@ class TestAsyncIdentityProviders: account_id="string", zone_id="string", ) - assert_matches_type(IdentityProviderCreateResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -570,7 +568,7 @@ class TestAsyncIdentityProviders: "user_deprovision": True, }, ) - assert_matches_type(IdentityProviderCreateResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -586,7 +584,7 @@ class TestAsyncIdentityProviders: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(IdentityProviderCreateResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -602,7 +600,7 @@ class TestAsyncIdentityProviders: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(IdentityProviderCreateResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -638,7 +636,7 @@ class TestAsyncIdentityProviders: account_id="string", zone_id="string", ) - assert_matches_type(IdentityProviderUpdateResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -697,7 +695,7 @@ class TestAsyncIdentityProviders: "user_deprovision": True, }, ) - assert_matches_type(IdentityProviderUpdateResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -714,7 +712,7 @@ class TestAsyncIdentityProviders: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(IdentityProviderUpdateResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -731,7 +729,7 @@ class TestAsyncIdentityProviders: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(IdentityProviderUpdateResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -911,7 +909,7 @@ class TestAsyncIdentityProviders: account_id="string", zone_id="string", ) - assert_matches_type(IdentityProviderGetResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -921,7 +919,7 @@ class TestAsyncIdentityProviders: account_id="string", zone_id="string", ) - assert_matches_type(IdentityProviderGetResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -935,7 +933,7 @@ class TestAsyncIdentityProviders: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(IdentityProviderGetResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -949,7 +947,7 @@ class TestAsyncIdentityProviders: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(IdentityProviderGetResponse, identity_provider, path=["response"]) + assert_matches_type(AccessIdentityProviders, 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 4fe95179f..b276f39b5 100644 --- a/tests/api_resources/zero_trust/test_organizations.py +++ b/tests/api_resources/zero_trust/test_organizations.py @@ -10,9 +10,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust import ( - OrganizationListResponse, - OrganizationCreateResponse, - OrganizationUpdateResponse, + AccessOrganizations, OrganizationRevokeUsersResponse, ) @@ -31,7 +29,7 @@ class TestOrganizations: account_id="string", zone_id="string", ) - assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +54,7 @@ class TestOrganizations: user_seat_expiration_inactive_time="720h", warp_auth_session_duration="24h", ) - assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -71,7 +69,7 @@ class TestOrganizations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = response.parse() - assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -86,7 +84,7 @@ class TestOrganizations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = response.parse() - assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +114,7 @@ class TestOrganizations: account_id="string", zone_id="string", ) - assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +143,7 @@ class TestOrganizations: user_seat_expiration_inactive_time="720h", warp_auth_session_duration="24h", ) - assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -158,7 +156,7 @@ class TestOrganizations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = response.parse() - assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +169,7 @@ class TestOrganizations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = response.parse() - assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) assert cast(Any, response.is_closed) is True @@ -197,7 +195,7 @@ class TestOrganizations: account_id="string", zone_id="string", ) - assert_matches_type(OrganizationListResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -206,7 +204,7 @@ class TestOrganizations: account_id="string", zone_id="string", ) - assert_matches_type(OrganizationListResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -219,7 +217,7 @@ class TestOrganizations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = response.parse() - assert_matches_type(OrganizationListResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -232,7 +230,7 @@ class TestOrganizations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = response.parse() - assert_matches_type(OrganizationListResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) assert cast(Any, response.is_closed) is True @@ -331,7 +329,7 @@ class TestAsyncOrganizations: account_id="string", zone_id="string", ) - assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -356,7 +354,7 @@ class TestAsyncOrganizations: user_seat_expiration_inactive_time="720h", warp_auth_session_duration="24h", ) - assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -371,7 +369,7 @@ class TestAsyncOrganizations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = await response.parse() - assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -386,7 +384,7 @@ class TestAsyncOrganizations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = await response.parse() - assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) assert cast(Any, response.is_closed) is True @@ -416,7 +414,7 @@ class TestAsyncOrganizations: account_id="string", zone_id="string", ) - assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -445,7 +443,7 @@ class TestAsyncOrganizations: user_seat_expiration_inactive_time="720h", warp_auth_session_duration="24h", ) - assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -458,7 +456,7 @@ class TestAsyncOrganizations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = await response.parse() - assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -471,7 +469,7 @@ class TestAsyncOrganizations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = await response.parse() - assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) assert cast(Any, response.is_closed) is True @@ -497,7 +495,7 @@ class TestAsyncOrganizations: account_id="string", zone_id="string", ) - assert_matches_type(OrganizationListResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -506,7 +504,7 @@ class TestAsyncOrganizations: account_id="string", zone_id="string", ) - assert_matches_type(OrganizationListResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -519,7 +517,7 @@ class TestAsyncOrganizations: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = await response.parse() - assert_matches_type(OrganizationListResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -532,7 +530,7 @@ class TestAsyncOrganizations: assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = await response.parse() - assert_matches_type(OrganizationListResponse, organization, path=["response"]) + assert_matches_type(AccessOrganizations, organization, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/test_tunnels.py b/tests/api_resources/zero_trust/test_tunnels.py index ce3f668db..df15e46d1 100644 --- a/tests/api_resources/zero_trust/test_tunnels.py +++ b/tests/api_resources/zero_trust/test_tunnels.py @@ -12,11 +12,9 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.zero_trust import ( - TunnelGetResponse, + TunnelArgoTunnel, TunnelEditResponse, TunnelListResponse, - TunnelCreateResponse, - TunnelDeleteResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -33,7 +31,7 @@ class TestTunnels: name="blog", tunnel_secret={}, ) - assert_matches_type(TunnelCreateResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +45,7 @@ class TestTunnels: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tunnel = response.parse() - assert_matches_type(TunnelCreateResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) @pytest.mark.skip() @parametrize @@ -61,7 +59,7 @@ class TestTunnels: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tunnel = response.parse() - assert_matches_type(TunnelCreateResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) assert cast(Any, response.is_closed) is True @@ -143,7 +141,7 @@ class TestTunnels: account_id="699d98642c564d2e855e9661899b7252", body={}, ) - assert_matches_type(TunnelDeleteResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) @pytest.mark.skip() @parametrize @@ -157,7 +155,7 @@ class TestTunnels: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tunnel = response.parse() - assert_matches_type(TunnelDeleteResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +169,7 @@ class TestTunnels: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tunnel = response.parse() - assert_matches_type(TunnelDeleteResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) assert cast(Any, response.is_closed) is True @@ -262,7 +260,7 @@ class TestTunnels: "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(TunnelGetResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) @pytest.mark.skip() @parametrize @@ -275,7 +273,7 @@ class TestTunnels: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tunnel = response.parse() - assert_matches_type(TunnelGetResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) @pytest.mark.skip() @parametrize @@ -288,7 +286,7 @@ class TestTunnels: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tunnel = response.parse() - assert_matches_type(TunnelGetResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) assert cast(Any, response.is_closed) is True @@ -319,7 +317,7 @@ class TestAsyncTunnels: name="blog", tunnel_secret={}, ) - assert_matches_type(TunnelCreateResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) @pytest.mark.skip() @parametrize @@ -333,7 +331,7 @@ class TestAsyncTunnels: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tunnel = await response.parse() - assert_matches_type(TunnelCreateResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) @pytest.mark.skip() @parametrize @@ -347,7 +345,7 @@ class TestAsyncTunnels: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tunnel = await response.parse() - assert_matches_type(TunnelCreateResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) assert cast(Any, response.is_closed) is True @@ -429,7 +427,7 @@ class TestAsyncTunnels: account_id="699d98642c564d2e855e9661899b7252", body={}, ) - assert_matches_type(TunnelDeleteResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) @pytest.mark.skip() @parametrize @@ -443,7 +441,7 @@ class TestAsyncTunnels: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tunnel = await response.parse() - assert_matches_type(TunnelDeleteResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) @pytest.mark.skip() @parametrize @@ -457,7 +455,7 @@ class TestAsyncTunnels: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tunnel = await response.parse() - assert_matches_type(TunnelDeleteResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) assert cast(Any, response.is_closed) is True @@ -548,7 +546,7 @@ class TestAsyncTunnels: "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(TunnelGetResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) @pytest.mark.skip() @parametrize @@ -561,7 +559,7 @@ class TestAsyncTunnels: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tunnel = await response.parse() - assert_matches_type(TunnelGetResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) @pytest.mark.skip() @parametrize @@ -574,7 +572,7 @@ class TestAsyncTunnels: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tunnel = await response.parse() - assert_matches_type(TunnelGetResponse, tunnel, path=["response"]) + assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/tunnels/test_connectors.py b/tests/api_resources/zero_trust/tunnels/test_connectors.py index 7d16d5a82..c904044e4 100644 --- a/tests/api_resources/zero_trust/tunnels/test_connectors.py +++ b/tests/api_resources/zero_trust/tunnels/test_connectors.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.tunnels import ConnectorGetResponse +from cloudflare.types.zero_trust.tunnels import TunnelTunnelClient base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ class TestConnectors: account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) - assert_matches_type(ConnectorGetResponse, connector, path=["response"]) + assert_matches_type(TunnelTunnelClient, connector, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,7 @@ class TestConnectors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" connector = response.parse() - assert_matches_type(ConnectorGetResponse, connector, path=["response"]) + assert_matches_type(TunnelTunnelClient, connector, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +53,7 @@ class TestConnectors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" connector = response.parse() - assert_matches_type(ConnectorGetResponse, connector, path=["response"]) + assert_matches_type(TunnelTunnelClient, connector, path=["response"]) assert cast(Any, response.is_closed) is True @@ -93,7 +93,7 @@ class TestAsyncConnectors: account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) - assert_matches_type(ConnectorGetResponse, connector, path=["response"]) + assert_matches_type(TunnelTunnelClient, connector, path=["response"]) @pytest.mark.skip() @parametrize @@ -107,7 +107,7 @@ class TestAsyncConnectors: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" connector = await response.parse() - assert_matches_type(ConnectorGetResponse, connector, path=["response"]) + assert_matches_type(TunnelTunnelClient, connector, path=["response"]) @pytest.mark.skip() @parametrize @@ -121,7 +121,7 @@ class TestAsyncConnectors: assert response.http_request.headers.get("X-Stainless-Lang") == "python" connector = await response.parse() - assert_matches_type(ConnectorGetResponse, connector, path=["response"]) + assert_matches_type(TunnelTunnelClient, connector, 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 ca5113ee4..477b89762 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import AdvancedDDOSGetResponse +from cloudflare.types.zones.settings import ZonesAdvancedDDOS base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ class TestAdvancedDDOS: advanced_ddos = client.zones.settings.advanced_ddos.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[AdvancedDDOSGetResponse], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZonesAdvancedDDOS], advanced_ddos, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,7 @@ class TestAdvancedDDOS: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" advanced_ddos = response.parse() - assert_matches_type(Optional[AdvancedDDOSGetResponse], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZonesAdvancedDDOS], advanced_ddos, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ class TestAdvancedDDOS: assert response.http_request.headers.get("X-Stainless-Lang") == "python" advanced_ddos = response.parse() - assert_matches_type(Optional[AdvancedDDOSGetResponse], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZonesAdvancedDDOS], advanced_ddos, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestAsyncAdvancedDDOS: advanced_ddos = await async_client.zones.settings.advanced_ddos.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[AdvancedDDOSGetResponse], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZonesAdvancedDDOS], advanced_ddos, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestAsyncAdvancedDDOS: 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[AdvancedDDOSGetResponse], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZonesAdvancedDDOS], advanced_ddos, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestAsyncAdvancedDDOS: assert response.http_request.headers.get("X-Stainless-Lang") == "python" advanced_ddos = await response.parse() - assert_matches_type(Optional[AdvancedDDOSGetResponse], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZonesAdvancedDDOS], 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 232da1563..21c524733 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import AlwaysOnlineGetResponse, AlwaysOnlineEditResponse +from cloudflare.types.zones.settings import ZonesAlwaysOnline base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestAlwaysOnline: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[AlwaysOnlineEditResponse], always_online, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestAlwaysOnline: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" always_online = response.parse() - assert_matches_type(Optional[AlwaysOnlineEditResponse], always_online, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestAlwaysOnline: assert response.http_request.headers.get("X-Stainless-Lang") == "python" always_online = response.parse() - assert_matches_type(Optional[AlwaysOnlineEditResponse], always_online, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestAlwaysOnline: always_online = client.zones.settings.always_online.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[AlwaysOnlineGetResponse], always_online, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestAlwaysOnline: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" always_online = response.parse() - assert_matches_type(Optional[AlwaysOnlineGetResponse], always_online, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestAlwaysOnline: assert response.http_request.headers.get("X-Stainless-Lang") == "python" always_online = response.parse() - assert_matches_type(Optional[AlwaysOnlineGetResponse], always_online, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncAlwaysOnline: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[AlwaysOnlineEditResponse], always_online, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncAlwaysOnline: 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[AlwaysOnlineEditResponse], always_online, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncAlwaysOnline: assert response.http_request.headers.get("X-Stainless-Lang") == "python" always_online = await response.parse() - assert_matches_type(Optional[AlwaysOnlineEditResponse], always_online, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncAlwaysOnline: always_online = await async_client.zones.settings.always_online.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[AlwaysOnlineGetResponse], always_online, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncAlwaysOnline: 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[AlwaysOnlineGetResponse], always_online, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncAlwaysOnline: assert response.http_request.headers.get("X-Stainless-Lang") == "python" always_online = await response.parse() - assert_matches_type(Optional[AlwaysOnlineGetResponse], always_online, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysOnline], 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 4e324f6e7..9e6dc94b9 100644 --- a/tests/api_resources/zones/settings/test_always_use_https.py +++ b/tests/api_resources/zones/settings/test_always_use_https.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - AlwaysUseHTTPSGetResponse, - AlwaysUseHTTPSEditResponse, -) +from cloudflare.types.zones.settings import ZonesAlwaysUseHTTPS base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestAlwaysUseHTTPS: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[AlwaysUseHTTPSEditResponse], always_use_https, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +37,7 @@ class TestAlwaysUseHTTPS: 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[AlwaysUseHTTPSEditResponse], always_use_https, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +50,7 @@ class TestAlwaysUseHTTPS: assert response.http_request.headers.get("X-Stainless-Lang") == "python" always_use_https = response.parse() - assert_matches_type(Optional[AlwaysUseHTTPSEditResponse], always_use_https, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) assert cast(Any, response.is_closed) is True @@ -72,7 +69,7 @@ class TestAlwaysUseHTTPS: always_use_https = client.zones.settings.always_use_https.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[AlwaysUseHTTPSGetResponse], always_use_https, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +81,7 @@ class TestAlwaysUseHTTPS: 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[AlwaysUseHTTPSGetResponse], always_use_https, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestAlwaysUseHTTPS: assert response.http_request.headers.get("X-Stainless-Lang") == "python" always_use_https = response.parse() - assert_matches_type(Optional[AlwaysUseHTTPSGetResponse], always_use_https, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) assert cast(Any, response.is_closed) is True @@ -119,7 +116,7 @@ class TestAsyncAlwaysUseHTTPS: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[AlwaysUseHTTPSEditResponse], always_use_https, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +129,7 @@ class TestAsyncAlwaysUseHTTPS: 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[AlwaysUseHTTPSEditResponse], always_use_https, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +142,7 @@ class TestAsyncAlwaysUseHTTPS: assert response.http_request.headers.get("X-Stainless-Lang") == "python" always_use_https = await response.parse() - assert_matches_type(Optional[AlwaysUseHTTPSEditResponse], always_use_https, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) assert cast(Any, response.is_closed) is True @@ -164,7 +161,7 @@ class TestAsyncAlwaysUseHTTPS: always_use_https = await async_client.zones.settings.always_use_https.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[AlwaysUseHTTPSGetResponse], always_use_https, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +173,7 @@ class TestAsyncAlwaysUseHTTPS: 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[AlwaysUseHTTPSGetResponse], always_use_https, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +185,7 @@ class TestAsyncAlwaysUseHTTPS: assert response.http_request.headers.get("X-Stainless-Lang") == "python" always_use_https = await response.parse() - assert_matches_type(Optional[AlwaysUseHTTPSGetResponse], always_use_https, path=["response"]) + assert_matches_type(Optional[ZonesAlwaysUseHTTPS], 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 22690eb1b..4b3294c67 100644 --- a/tests/api_resources/zones/settings/test_automatic_https_rewrites.py +++ b/tests/api_resources/zones/settings/test_automatic_https_rewrites.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - AutomaticHTTPSRewriteGetResponse, - AutomaticHTTPSRewriteEditResponse, -) +from cloudflare.types.zones.settings import ZonesAutomaticHTTPSRewrites base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestAutomaticHTTPSRewrites: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[AutomaticHTTPSRewriteEditResponse], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +37,7 @@ class TestAutomaticHTTPSRewrites: 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[AutomaticHTTPSRewriteEditResponse], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +50,7 @@ class TestAutomaticHTTPSRewrites: assert response.http_request.headers.get("X-Stainless-Lang") == "python" automatic_https_rewrite = response.parse() - assert_matches_type(Optional[AutomaticHTTPSRewriteEditResponse], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) assert cast(Any, response.is_closed) is True @@ -72,7 +69,7 @@ class TestAutomaticHTTPSRewrites: automatic_https_rewrite = client.zones.settings.automatic_https_rewrites.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[AutomaticHTTPSRewriteGetResponse], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +81,7 @@ class TestAutomaticHTTPSRewrites: 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[AutomaticHTTPSRewriteGetResponse], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestAutomaticHTTPSRewrites: assert response.http_request.headers.get("X-Stainless-Lang") == "python" automatic_https_rewrite = response.parse() - assert_matches_type(Optional[AutomaticHTTPSRewriteGetResponse], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) assert cast(Any, response.is_closed) is True @@ -119,7 +116,7 @@ class TestAsyncAutomaticHTTPSRewrites: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[AutomaticHTTPSRewriteEditResponse], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +129,7 @@ class TestAsyncAutomaticHTTPSRewrites: 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[AutomaticHTTPSRewriteEditResponse], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +142,7 @@ class TestAsyncAutomaticHTTPSRewrites: assert response.http_request.headers.get("X-Stainless-Lang") == "python" automatic_https_rewrite = await response.parse() - assert_matches_type(Optional[AutomaticHTTPSRewriteEditResponse], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) assert cast(Any, response.is_closed) is True @@ -164,7 +161,7 @@ class TestAsyncAutomaticHTTPSRewrites: automatic_https_rewrite = await async_client.zones.settings.automatic_https_rewrites.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[AutomaticHTTPSRewriteGetResponse], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +173,7 @@ class TestAsyncAutomaticHTTPSRewrites: 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[AutomaticHTTPSRewriteGetResponse], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +185,7 @@ class TestAsyncAutomaticHTTPSRewrites: assert response.http_request.headers.get("X-Stainless-Lang") == "python" automatic_https_rewrite = await response.parse() - assert_matches_type(Optional[AutomaticHTTPSRewriteGetResponse], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], 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 741f423b7..5d13b66b3 100644 --- a/tests/api_resources/zones/settings/test_automatic_platform_optimization.py +++ b/tests/api_resources/zones/settings/test_automatic_platform_optimization.py @@ -10,8 +10,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zones.settings import ( - AutomaticPlatformOptimizationGetResponse, - AutomaticPlatformOptimizationEditResponse, + ZonesAutomaticPlatformOptimization, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -35,7 +34,7 @@ class TestAutomaticPlatformOptimization: }, ) assert_matches_type( - Optional[AutomaticPlatformOptimizationEditResponse], automatic_platform_optimization, path=["response"] + Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) @pytest.mark.skip() @@ -57,7 +56,7 @@ class TestAutomaticPlatformOptimization: assert response.http_request.headers.get("X-Stainless-Lang") == "python" automatic_platform_optimization = response.parse() assert_matches_type( - Optional[AutomaticPlatformOptimizationEditResponse], automatic_platform_optimization, path=["response"] + Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) @pytest.mark.skip() @@ -79,7 +78,7 @@ class TestAutomaticPlatformOptimization: automatic_platform_optimization = response.parse() assert_matches_type( - Optional[AutomaticPlatformOptimizationEditResponse], automatic_platform_optimization, path=["response"] + Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) assert cast(Any, response.is_closed) is True @@ -107,7 +106,7 @@ class TestAutomaticPlatformOptimization: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type( - Optional[AutomaticPlatformOptimizationGetResponse], automatic_platform_optimization, path=["response"] + Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) @pytest.mark.skip() @@ -121,7 +120,7 @@ class TestAutomaticPlatformOptimization: assert response.http_request.headers.get("X-Stainless-Lang") == "python" automatic_platform_optimization = response.parse() assert_matches_type( - Optional[AutomaticPlatformOptimizationGetResponse], automatic_platform_optimization, path=["response"] + Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) @pytest.mark.skip() @@ -135,7 +134,7 @@ class TestAutomaticPlatformOptimization: automatic_platform_optimization = response.parse() assert_matches_type( - Optional[AutomaticPlatformOptimizationGetResponse], automatic_platform_optimization, path=["response"] + Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) assert cast(Any, response.is_closed) is True @@ -167,7 +166,7 @@ class TestAsyncAutomaticPlatformOptimization: }, ) assert_matches_type( - Optional[AutomaticPlatformOptimizationEditResponse], automatic_platform_optimization, path=["response"] + Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) @pytest.mark.skip() @@ -189,7 +188,7 @@ class TestAsyncAutomaticPlatformOptimization: assert response.http_request.headers.get("X-Stainless-Lang") == "python" automatic_platform_optimization = await response.parse() assert_matches_type( - Optional[AutomaticPlatformOptimizationEditResponse], automatic_platform_optimization, path=["response"] + Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) @pytest.mark.skip() @@ -211,7 +210,7 @@ class TestAsyncAutomaticPlatformOptimization: automatic_platform_optimization = await response.parse() assert_matches_type( - Optional[AutomaticPlatformOptimizationEditResponse], automatic_platform_optimization, path=["response"] + Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) assert cast(Any, response.is_closed) is True @@ -239,7 +238,7 @@ class TestAsyncAutomaticPlatformOptimization: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type( - Optional[AutomaticPlatformOptimizationGetResponse], automatic_platform_optimization, path=["response"] + Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) @pytest.mark.skip() @@ -253,7 +252,7 @@ class TestAsyncAutomaticPlatformOptimization: assert response.http_request.headers.get("X-Stainless-Lang") == "python" automatic_platform_optimization = await response.parse() assert_matches_type( - Optional[AutomaticPlatformOptimizationGetResponse], automatic_platform_optimization, path=["response"] + Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) @pytest.mark.skip() @@ -267,7 +266,7 @@ class TestAsyncAutomaticPlatformOptimization: automatic_platform_optimization = await response.parse() assert_matches_type( - Optional[AutomaticPlatformOptimizationGetResponse], automatic_platform_optimization, path=["response"] + Optional[ZonesAutomaticPlatformOptimization], 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 d9843c34c..af33df289 100644 --- a/tests/api_resources/zones/settings/test_brotli.py +++ b/tests/api_resources/zones/settings/test_brotli.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import BrotliGetResponse, BrotliEditResponse +from cloudflare.types.zones.settings import ZonesBrotli base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestBrotli: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[BrotliEditResponse], brotli, path=["response"]) + assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestBrotli: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brotli = response.parse() - assert_matches_type(Optional[BrotliEditResponse], brotli, path=["response"]) + assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestBrotli: assert response.http_request.headers.get("X-Stainless-Lang") == "python" brotli = response.parse() - assert_matches_type(Optional[BrotliEditResponse], brotli, path=["response"]) + assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestBrotli: brotli = client.zones.settings.brotli.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[BrotliGetResponse], brotli, path=["response"]) + assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestBrotli: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brotli = response.parse() - assert_matches_type(Optional[BrotliGetResponse], brotli, path=["response"]) + assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestBrotli: assert response.http_request.headers.get("X-Stainless-Lang") == "python" brotli = response.parse() - assert_matches_type(Optional[BrotliGetResponse], brotli, path=["response"]) + assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncBrotli: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[BrotliEditResponse], brotli, path=["response"]) + assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncBrotli: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brotli = await response.parse() - assert_matches_type(Optional[BrotliEditResponse], brotli, path=["response"]) + assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncBrotli: assert response.http_request.headers.get("X-Stainless-Lang") == "python" brotli = await response.parse() - assert_matches_type(Optional[BrotliEditResponse], brotli, path=["response"]) + assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncBrotli: brotli = await async_client.zones.settings.brotli.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[BrotliGetResponse], brotli, path=["response"]) + assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncBrotli: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brotli = await response.parse() - assert_matches_type(Optional[BrotliGetResponse], brotli, path=["response"]) + assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncBrotli: assert response.http_request.headers.get("X-Stainless-Lang") == "python" brotli = await response.parse() - assert_matches_type(Optional[BrotliGetResponse], brotli, path=["response"]) + assert_matches_type(Optional[ZonesBrotli], 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 0c1192106..2916a7f0f 100644 --- a/tests/api_resources/zones/settings/test_browser_cache_ttl.py +++ b/tests/api_resources/zones/settings/test_browser_cache_ttl.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - BrowserCacheTTLGetResponse, - BrowserCacheTTLEditResponse, -) +from cloudflare.types.zones.settings import ZonesBrowserCacheTTL base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestBrowserCacheTTL: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value=0, ) - assert_matches_type(Optional[BrowserCacheTTLEditResponse], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +37,7 @@ class TestBrowserCacheTTL: 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[BrowserCacheTTLEditResponse], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +50,7 @@ class TestBrowserCacheTTL: assert response.http_request.headers.get("X-Stainless-Lang") == "python" browser_cache_ttl = response.parse() - assert_matches_type(Optional[BrowserCacheTTLEditResponse], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -72,7 +69,7 @@ class TestBrowserCacheTTL: browser_cache_ttl = client.zones.settings.browser_cache_ttl.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[BrowserCacheTTLGetResponse], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +81,7 @@ class TestBrowserCacheTTL: 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[BrowserCacheTTLGetResponse], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestBrowserCacheTTL: assert response.http_request.headers.get("X-Stainless-Lang") == "python" browser_cache_ttl = response.parse() - assert_matches_type(Optional[BrowserCacheTTLGetResponse], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -119,7 +116,7 @@ class TestAsyncBrowserCacheTTL: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value=0, ) - assert_matches_type(Optional[BrowserCacheTTLEditResponse], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +129,7 @@ class TestAsyncBrowserCacheTTL: 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[BrowserCacheTTLEditResponse], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +142,7 @@ class TestAsyncBrowserCacheTTL: assert response.http_request.headers.get("X-Stainless-Lang") == "python" browser_cache_ttl = await response.parse() - assert_matches_type(Optional[BrowserCacheTTLEditResponse], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -164,7 +161,7 @@ class TestAsyncBrowserCacheTTL: browser_cache_ttl = await async_client.zones.settings.browser_cache_ttl.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[BrowserCacheTTLGetResponse], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +173,7 @@ class TestAsyncBrowserCacheTTL: 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[BrowserCacheTTLGetResponse], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +185,7 @@ class TestAsyncBrowserCacheTTL: assert response.http_request.headers.get("X-Stainless-Lang") == "python" browser_cache_ttl = await response.parse() - assert_matches_type(Optional[BrowserCacheTTLGetResponse], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCacheTTL], 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 0131d7ba0..32e894fc2 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import BrowserCheckGetResponse, BrowserCheckEditResponse +from cloudflare.types.zones.settings import ZonesBrowserCheck base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestBrowserCheck: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[BrowserCheckEditResponse], browser_check, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestBrowserCheck: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" browser_check = response.parse() - assert_matches_type(Optional[BrowserCheckEditResponse], browser_check, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestBrowserCheck: assert response.http_request.headers.get("X-Stainless-Lang") == "python" browser_check = response.parse() - assert_matches_type(Optional[BrowserCheckEditResponse], browser_check, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestBrowserCheck: browser_check = client.zones.settings.browser_check.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[BrowserCheckGetResponse], browser_check, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestBrowserCheck: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" browser_check = response.parse() - assert_matches_type(Optional[BrowserCheckGetResponse], browser_check, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestBrowserCheck: assert response.http_request.headers.get("X-Stainless-Lang") == "python" browser_check = response.parse() - assert_matches_type(Optional[BrowserCheckGetResponse], browser_check, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncBrowserCheck: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[BrowserCheckEditResponse], browser_check, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncBrowserCheck: 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[BrowserCheckEditResponse], browser_check, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncBrowserCheck: assert response.http_request.headers.get("X-Stainless-Lang") == "python" browser_check = await response.parse() - assert_matches_type(Optional[BrowserCheckEditResponse], browser_check, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncBrowserCheck: browser_check = await async_client.zones.settings.browser_check.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[BrowserCheckGetResponse], browser_check, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncBrowserCheck: 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[BrowserCheckGetResponse], browser_check, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncBrowserCheck: assert response.http_request.headers.get("X-Stainless-Lang") == "python" browser_check = await response.parse() - assert_matches_type(Optional[BrowserCheckGetResponse], browser_check, path=["response"]) + assert_matches_type(Optional[ZonesBrowserCheck], 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 5f17a476a..48435b13e 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import CacheLevelGetResponse, CacheLevelEditResponse +from cloudflare.types.zones.settings import ZonesCacheLevel base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestCacheLevel: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="aggressive", ) - assert_matches_type(Optional[CacheLevelEditResponse], cache_level, path=["response"]) + assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestCacheLevel: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" cache_level = response.parse() - assert_matches_type(Optional[CacheLevelEditResponse], cache_level, path=["response"]) + assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestCacheLevel: assert response.http_request.headers.get("X-Stainless-Lang") == "python" cache_level = response.parse() - assert_matches_type(Optional[CacheLevelEditResponse], cache_level, path=["response"]) + assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestCacheLevel: cache_level = client.zones.settings.cache_level.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[CacheLevelGetResponse], cache_level, path=["response"]) + assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestCacheLevel: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" cache_level = response.parse() - assert_matches_type(Optional[CacheLevelGetResponse], cache_level, path=["response"]) + assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestCacheLevel: assert response.http_request.headers.get("X-Stainless-Lang") == "python" cache_level = response.parse() - assert_matches_type(Optional[CacheLevelGetResponse], cache_level, path=["response"]) + assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncCacheLevel: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="aggressive", ) - assert_matches_type(Optional[CacheLevelEditResponse], cache_level, path=["response"]) + assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncCacheLevel: 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[CacheLevelEditResponse], cache_level, path=["response"]) + assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncCacheLevel: assert response.http_request.headers.get("X-Stainless-Lang") == "python" cache_level = await response.parse() - assert_matches_type(Optional[CacheLevelEditResponse], cache_level, path=["response"]) + assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncCacheLevel: cache_level = await async_client.zones.settings.cache_level.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[CacheLevelGetResponse], cache_level, path=["response"]) + assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncCacheLevel: 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[CacheLevelGetResponse], cache_level, path=["response"]) + assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncCacheLevel: assert response.http_request.headers.get("X-Stainless-Lang") == "python" cache_level = await response.parse() - assert_matches_type(Optional[CacheLevelGetResponse], cache_level, path=["response"]) + assert_matches_type(Optional[ZonesCacheLevel], 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 735423f33..58594f8ec 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ChallengeTTLGetResponse, ChallengeTTLEditResponse +from cloudflare.types.zones.settings import ZonesChallengeTTL base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestChallengeTTL: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value=300, ) - assert_matches_type(Optional[ChallengeTTLEditResponse], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestChallengeTTL: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" challenge_ttl = response.parse() - assert_matches_type(Optional[ChallengeTTLEditResponse], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestChallengeTTL: assert response.http_request.headers.get("X-Stainless-Lang") == "python" challenge_ttl = response.parse() - assert_matches_type(Optional[ChallengeTTLEditResponse], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestChallengeTTL: challenge_ttl = client.zones.settings.challenge_ttl.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ChallengeTTLGetResponse], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestChallengeTTL: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" challenge_ttl = response.parse() - assert_matches_type(Optional[ChallengeTTLGetResponse], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestChallengeTTL: assert response.http_request.headers.get("X-Stainless-Lang") == "python" challenge_ttl = response.parse() - assert_matches_type(Optional[ChallengeTTLGetResponse], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncChallengeTTL: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value=300, ) - assert_matches_type(Optional[ChallengeTTLEditResponse], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncChallengeTTL: 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[ChallengeTTLEditResponse], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncChallengeTTL: assert response.http_request.headers.get("X-Stainless-Lang") == "python" challenge_ttl = await response.parse() - assert_matches_type(Optional[ChallengeTTLEditResponse], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncChallengeTTL: challenge_ttl = await async_client.zones.settings.challenge_ttl.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ChallengeTTLGetResponse], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncChallengeTTL: 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[ChallengeTTLGetResponse], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncChallengeTTL: assert response.http_request.headers.get("X-Stainless-Lang") == "python" challenge_ttl = await response.parse() - assert_matches_type(Optional[ChallengeTTLGetResponse], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZonesChallengeTTL], 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 53ad08dab..3bd8ca03b 100644 --- a/tests/api_resources/zones/settings/test_ciphers.py +++ b/tests/api_resources/zones/settings/test_ciphers.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import CipherGetResponse, CipherEditResponse +from cloudflare.types.zones.settings import ZonesCiphers base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestCiphers: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], ) - assert_matches_type(Optional[CipherEditResponse], cipher, path=["response"]) + assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestCiphers: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" cipher = response.parse() - assert_matches_type(Optional[CipherEditResponse], cipher, path=["response"]) + assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestCiphers: assert response.http_request.headers.get("X-Stainless-Lang") == "python" cipher = response.parse() - assert_matches_type(Optional[CipherEditResponse], cipher, path=["response"]) + assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestCiphers: cipher = client.zones.settings.ciphers.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[CipherGetResponse], cipher, path=["response"]) + assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestCiphers: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" cipher = response.parse() - assert_matches_type(Optional[CipherGetResponse], cipher, path=["response"]) + assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestCiphers: assert response.http_request.headers.get("X-Stainless-Lang") == "python" cipher = response.parse() - assert_matches_type(Optional[CipherGetResponse], cipher, path=["response"]) + assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncCiphers: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], ) - assert_matches_type(Optional[CipherEditResponse], cipher, path=["response"]) + assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncCiphers: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" cipher = await response.parse() - assert_matches_type(Optional[CipherEditResponse], cipher, path=["response"]) + assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncCiphers: assert response.http_request.headers.get("X-Stainless-Lang") == "python" cipher = await response.parse() - assert_matches_type(Optional[CipherEditResponse], cipher, path=["response"]) + assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncCiphers: cipher = await async_client.zones.settings.ciphers.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[CipherGetResponse], cipher, path=["response"]) + assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncCiphers: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" cipher = await response.parse() - assert_matches_type(Optional[CipherGetResponse], cipher, path=["response"]) + assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncCiphers: assert response.http_request.headers.get("X-Stainless-Lang") == "python" cipher = await response.parse() - assert_matches_type(Optional[CipherGetResponse], cipher, path=["response"]) + assert_matches_type(Optional[ZonesCiphers], 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 176138719..ebef79915 100644 --- a/tests/api_resources/zones/settings/test_development_mode.py +++ b/tests/api_resources/zones/settings/test_development_mode.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - DevelopmentModeGetResponse, - DevelopmentModeEditResponse, -) +from cloudflare.types.zones.settings import ZonesDevelopmentMode base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestDevelopmentMode: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[DevelopmentModeEditResponse], development_mode, path=["response"]) + assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +37,7 @@ class TestDevelopmentMode: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" development_mode = response.parse() - assert_matches_type(Optional[DevelopmentModeEditResponse], development_mode, path=["response"]) + assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +50,7 @@ class TestDevelopmentMode: assert response.http_request.headers.get("X-Stainless-Lang") == "python" development_mode = response.parse() - assert_matches_type(Optional[DevelopmentModeEditResponse], development_mode, path=["response"]) + assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) assert cast(Any, response.is_closed) is True @@ -72,7 +69,7 @@ class TestDevelopmentMode: development_mode = client.zones.settings.development_mode.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[DevelopmentModeGetResponse], development_mode, path=["response"]) + assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +81,7 @@ class TestDevelopmentMode: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" development_mode = response.parse() - assert_matches_type(Optional[DevelopmentModeGetResponse], development_mode, path=["response"]) + assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestDevelopmentMode: assert response.http_request.headers.get("X-Stainless-Lang") == "python" development_mode = response.parse() - assert_matches_type(Optional[DevelopmentModeGetResponse], development_mode, path=["response"]) + assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) assert cast(Any, response.is_closed) is True @@ -119,7 +116,7 @@ class TestAsyncDevelopmentMode: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[DevelopmentModeEditResponse], development_mode, path=["response"]) + assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +129,7 @@ class TestAsyncDevelopmentMode: 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[DevelopmentModeEditResponse], development_mode, path=["response"]) + assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +142,7 @@ class TestAsyncDevelopmentMode: assert response.http_request.headers.get("X-Stainless-Lang") == "python" development_mode = await response.parse() - assert_matches_type(Optional[DevelopmentModeEditResponse], development_mode, path=["response"]) + assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) assert cast(Any, response.is_closed) is True @@ -164,7 +161,7 @@ class TestAsyncDevelopmentMode: development_mode = await async_client.zones.settings.development_mode.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[DevelopmentModeGetResponse], development_mode, path=["response"]) + assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +173,7 @@ class TestAsyncDevelopmentMode: 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[DevelopmentModeGetResponse], development_mode, path=["response"]) + assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +185,7 @@ class TestAsyncDevelopmentMode: assert response.http_request.headers.get("X-Stainless-Lang") == "python" development_mode = await response.parse() - assert_matches_type(Optional[DevelopmentModeGetResponse], development_mode, path=["response"]) + assert_matches_type(Optional[ZonesDevelopmentMode], 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 0e353cc31..840d5ea5e 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import EarlyHintGetResponse, EarlyHintEditResponse +from cloudflare.types.zones.settings import ZonesEarlyHints base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestEarlyHints: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[EarlyHintEditResponse], early_hint, path=["response"]) + assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestEarlyHints: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" early_hint = response.parse() - assert_matches_type(Optional[EarlyHintEditResponse], early_hint, path=["response"]) + assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestEarlyHints: assert response.http_request.headers.get("X-Stainless-Lang") == "python" early_hint = response.parse() - assert_matches_type(Optional[EarlyHintEditResponse], early_hint, path=["response"]) + assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestEarlyHints: early_hint = client.zones.settings.early_hints.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[EarlyHintGetResponse], early_hint, path=["response"]) + assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestEarlyHints: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" early_hint = response.parse() - assert_matches_type(Optional[EarlyHintGetResponse], early_hint, path=["response"]) + assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestEarlyHints: assert response.http_request.headers.get("X-Stainless-Lang") == "python" early_hint = response.parse() - assert_matches_type(Optional[EarlyHintGetResponse], early_hint, path=["response"]) + assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncEarlyHints: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[EarlyHintEditResponse], early_hint, path=["response"]) + assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncEarlyHints: 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[EarlyHintEditResponse], early_hint, path=["response"]) + assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncEarlyHints: assert response.http_request.headers.get("X-Stainless-Lang") == "python" early_hint = await response.parse() - assert_matches_type(Optional[EarlyHintEditResponse], early_hint, path=["response"]) + assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncEarlyHints: early_hint = await async_client.zones.settings.early_hints.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[EarlyHintGetResponse], early_hint, path=["response"]) + assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncEarlyHints: 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[EarlyHintGetResponse], early_hint, path=["response"]) + assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncEarlyHints: assert response.http_request.headers.get("X-Stainless-Lang") == "python" early_hint = await response.parse() - assert_matches_type(Optional[EarlyHintGetResponse], early_hint, path=["response"]) + assert_matches_type(Optional[ZonesEarlyHints], 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 c3ca4d5d6..eec304915 100644 --- a/tests/api_resources/zones/settings/test_email_obfuscation.py +++ b/tests/api_resources/zones/settings/test_email_obfuscation.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - EmailObfuscationGetResponse, - EmailObfuscationEditResponse, -) +from cloudflare.types.zones.settings import ZonesEmailObfuscation base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestEmailObfuscation: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[EmailObfuscationEditResponse], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +37,7 @@ class TestEmailObfuscation: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_obfuscation = response.parse() - assert_matches_type(Optional[EmailObfuscationEditResponse], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +50,7 @@ class TestEmailObfuscation: assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_obfuscation = response.parse() - assert_matches_type(Optional[EmailObfuscationEditResponse], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -72,7 +69,7 @@ class TestEmailObfuscation: email_obfuscation = client.zones.settings.email_obfuscation.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[EmailObfuscationGetResponse], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +81,7 @@ class TestEmailObfuscation: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_obfuscation = response.parse() - assert_matches_type(Optional[EmailObfuscationGetResponse], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestEmailObfuscation: assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_obfuscation = response.parse() - assert_matches_type(Optional[EmailObfuscationGetResponse], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -119,7 +116,7 @@ class TestAsyncEmailObfuscation: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[EmailObfuscationEditResponse], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +129,7 @@ class TestAsyncEmailObfuscation: 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[EmailObfuscationEditResponse], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +142,7 @@ class TestAsyncEmailObfuscation: assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_obfuscation = await response.parse() - assert_matches_type(Optional[EmailObfuscationEditResponse], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -164,7 +161,7 @@ class TestAsyncEmailObfuscation: email_obfuscation = await async_client.zones.settings.email_obfuscation.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[EmailObfuscationGetResponse], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +173,7 @@ class TestAsyncEmailObfuscation: 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[EmailObfuscationGetResponse], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +185,7 @@ class TestAsyncEmailObfuscation: assert response.http_request.headers.get("X-Stainless-Lang") == "python" email_obfuscation = await response.parse() - assert_matches_type(Optional[EmailObfuscationGetResponse], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZonesEmailObfuscation], 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 88cc94eae..9c7d06715 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import FontSettingGetResponse, FontSettingEditResponse +from cloudflare.types.zones.settings import SpeedCloudflareFonts base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestFontSettings: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[FontSettingEditResponse], font_setting, path=["response"]) + assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestFontSettings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" font_setting = response.parse() - assert_matches_type(Optional[FontSettingEditResponse], font_setting, path=["response"]) + assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestFontSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" font_setting = response.parse() - assert_matches_type(Optional[FontSettingEditResponse], font_setting, path=["response"]) + assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestFontSettings: font_setting = client.zones.settings.font_settings.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[FontSettingGetResponse], font_setting, path=["response"]) + assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestFontSettings: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" font_setting = response.parse() - assert_matches_type(Optional[FontSettingGetResponse], font_setting, path=["response"]) + assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestFontSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" font_setting = response.parse() - assert_matches_type(Optional[FontSettingGetResponse], font_setting, path=["response"]) + assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncFontSettings: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[FontSettingEditResponse], font_setting, path=["response"]) + assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncFontSettings: 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[FontSettingEditResponse], font_setting, path=["response"]) + assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncFontSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" font_setting = await response.parse() - assert_matches_type(Optional[FontSettingEditResponse], font_setting, path=["response"]) + assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncFontSettings: font_setting = await async_client.zones.settings.font_settings.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[FontSettingGetResponse], font_setting, path=["response"]) + assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncFontSettings: 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[FontSettingGetResponse], font_setting, path=["response"]) + assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncFontSettings: assert response.http_request.headers.get("X-Stainless-Lang") == "python" font_setting = await response.parse() - assert_matches_type(Optional[FontSettingGetResponse], font_setting, path=["response"]) + assert_matches_type(Optional[SpeedCloudflareFonts], 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 4e3f744d1..de2a91f67 100644 --- a/tests/api_resources/zones/settings/test_h2_prioritization.py +++ b/tests/api_resources/zones/settings/test_h2_prioritization.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - H2PrioritizationGetResponse, - H2PrioritizationEditResponse, -) +from cloudflare.types.zones.settings import ZonesH2Prioritization base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +27,7 @@ class TestH2Prioritization: "value": "on", }, ) - assert_matches_type(Optional[H2PrioritizationEditResponse], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +39,7 @@ class TestH2Prioritization: "value": "on", }, ) - assert_matches_type(Optional[H2PrioritizationEditResponse], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -58,7 +55,7 @@ class TestH2Prioritization: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" h2_prioritization = response.parse() - assert_matches_type(Optional[H2PrioritizationEditResponse], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -74,7 +71,7 @@ class TestH2Prioritization: assert response.http_request.headers.get("X-Stainless-Lang") == "python" h2_prioritization = response.parse() - assert_matches_type(Optional[H2PrioritizationEditResponse], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) assert cast(Any, response.is_closed) is True @@ -96,7 +93,7 @@ class TestH2Prioritization: h2_prioritization = client.zones.settings.h2_prioritization.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[H2PrioritizationGetResponse], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -108,7 +105,7 @@ class TestH2Prioritization: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" h2_prioritization = response.parse() - assert_matches_type(Optional[H2PrioritizationGetResponse], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -120,7 +117,7 @@ class TestH2Prioritization: assert response.http_request.headers.get("X-Stainless-Lang") == "python" h2_prioritization = response.parse() - assert_matches_type(Optional[H2PrioritizationGetResponse], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) assert cast(Any, response.is_closed) is True @@ -146,7 +143,7 @@ class TestAsyncH2Prioritization: "value": "on", }, ) - assert_matches_type(Optional[H2PrioritizationEditResponse], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -158,7 +155,7 @@ class TestAsyncH2Prioritization: "value": "on", }, ) - assert_matches_type(Optional[H2PrioritizationEditResponse], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -174,7 +171,7 @@ class TestAsyncH2Prioritization: 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[H2PrioritizationEditResponse], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -190,7 +187,7 @@ class TestAsyncH2Prioritization: assert response.http_request.headers.get("X-Stainless-Lang") == "python" h2_prioritization = await response.parse() - assert_matches_type(Optional[H2PrioritizationEditResponse], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) assert cast(Any, response.is_closed) is True @@ -212,7 +209,7 @@ class TestAsyncH2Prioritization: h2_prioritization = await async_client.zones.settings.h2_prioritization.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[H2PrioritizationGetResponse], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -224,7 +221,7 @@ class TestAsyncH2Prioritization: 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[H2PrioritizationGetResponse], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -236,7 +233,7 @@ class TestAsyncH2Prioritization: assert response.http_request.headers.get("X-Stainless-Lang") == "python" h2_prioritization = await response.parse() - assert_matches_type(Optional[H2PrioritizationGetResponse], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZonesH2Prioritization], 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 4867289b5..37c405adf 100644 --- a/tests/api_resources/zones/settings/test_hotlink_protection.py +++ b/tests/api_resources/zones/settings/test_hotlink_protection.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - HotlinkProtectionGetResponse, - HotlinkProtectionEditResponse, -) +from cloudflare.types.zones.settings import ZonesHotlinkProtection base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestHotlinkProtection: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[HotlinkProtectionEditResponse], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +37,7 @@ class TestHotlinkProtection: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hotlink_protection = response.parse() - assert_matches_type(Optional[HotlinkProtectionEditResponse], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +50,7 @@ class TestHotlinkProtection: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hotlink_protection = response.parse() - assert_matches_type(Optional[HotlinkProtectionEditResponse], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) assert cast(Any, response.is_closed) is True @@ -72,7 +69,7 @@ class TestHotlinkProtection: hotlink_protection = client.zones.settings.hotlink_protection.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[HotlinkProtectionGetResponse], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +81,7 @@ class TestHotlinkProtection: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" hotlink_protection = response.parse() - assert_matches_type(Optional[HotlinkProtectionGetResponse], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestHotlinkProtection: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hotlink_protection = response.parse() - assert_matches_type(Optional[HotlinkProtectionGetResponse], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) assert cast(Any, response.is_closed) is True @@ -119,7 +116,7 @@ class TestAsyncHotlinkProtection: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[HotlinkProtectionEditResponse], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +129,7 @@ class TestAsyncHotlinkProtection: 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[HotlinkProtectionEditResponse], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +142,7 @@ class TestAsyncHotlinkProtection: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hotlink_protection = await response.parse() - assert_matches_type(Optional[HotlinkProtectionEditResponse], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) assert cast(Any, response.is_closed) is True @@ -164,7 +161,7 @@ class TestAsyncHotlinkProtection: hotlink_protection = await async_client.zones.settings.hotlink_protection.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[HotlinkProtectionGetResponse], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +173,7 @@ class TestAsyncHotlinkProtection: 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[HotlinkProtectionGetResponse], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +185,7 @@ class TestAsyncHotlinkProtection: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hotlink_protection = await response.parse() - assert_matches_type(Optional[HotlinkProtectionGetResponse], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZonesHotlinkProtection], 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 7fb4e8900..f74499795 100644 --- a/tests/api_resources/zones/settings/test_http2.py +++ b/tests/api_resources/zones/settings/test_http2.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import HTTP2GetResponse, HTTP2EditResponse +from cloudflare.types.zones.settings import ZonesHTTP2 base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestHTTP2: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[HTTP2EditResponse], http2, path=["response"]) + assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestHTTP2: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" http2 = response.parse() - assert_matches_type(Optional[HTTP2EditResponse], http2, path=["response"]) + assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestHTTP2: assert response.http_request.headers.get("X-Stainless-Lang") == "python" http2 = response.parse() - assert_matches_type(Optional[HTTP2EditResponse], http2, path=["response"]) + assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestHTTP2: http2 = client.zones.settings.http2.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[HTTP2GetResponse], http2, path=["response"]) + assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestHTTP2: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" http2 = response.parse() - assert_matches_type(Optional[HTTP2GetResponse], http2, path=["response"]) + assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestHTTP2: assert response.http_request.headers.get("X-Stainless-Lang") == "python" http2 = response.parse() - assert_matches_type(Optional[HTTP2GetResponse], http2, path=["response"]) + assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncHTTP2: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[HTTP2EditResponse], http2, path=["response"]) + assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncHTTP2: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" http2 = await response.parse() - assert_matches_type(Optional[HTTP2EditResponse], http2, path=["response"]) + assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncHTTP2: assert response.http_request.headers.get("X-Stainless-Lang") == "python" http2 = await response.parse() - assert_matches_type(Optional[HTTP2EditResponse], http2, path=["response"]) + assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncHTTP2: http2 = await async_client.zones.settings.http2.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[HTTP2GetResponse], http2, path=["response"]) + assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncHTTP2: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" http2 = await response.parse() - assert_matches_type(Optional[HTTP2GetResponse], http2, path=["response"]) + assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncHTTP2: assert response.http_request.headers.get("X-Stainless-Lang") == "python" http2 = await response.parse() - assert_matches_type(Optional[HTTP2GetResponse], http2, path=["response"]) + assert_matches_type(Optional[ZonesHTTP2], 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 f56ad3028..78b45fa0b 100644 --- a/tests/api_resources/zones/settings/test_http3.py +++ b/tests/api_resources/zones/settings/test_http3.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import HTTP3GetResponse, HTTP3EditResponse +from cloudflare.types.zones.settings import ZonesHTTP3 base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestHTTP3: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[HTTP3EditResponse], http3, path=["response"]) + assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestHTTP3: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" http3 = response.parse() - assert_matches_type(Optional[HTTP3EditResponse], http3, path=["response"]) + assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestHTTP3: assert response.http_request.headers.get("X-Stainless-Lang") == "python" http3 = response.parse() - assert_matches_type(Optional[HTTP3EditResponse], http3, path=["response"]) + assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestHTTP3: http3 = client.zones.settings.http3.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[HTTP3GetResponse], http3, path=["response"]) + assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestHTTP3: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" http3 = response.parse() - assert_matches_type(Optional[HTTP3GetResponse], http3, path=["response"]) + assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestHTTP3: assert response.http_request.headers.get("X-Stainless-Lang") == "python" http3 = response.parse() - assert_matches_type(Optional[HTTP3GetResponse], http3, path=["response"]) + assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncHTTP3: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[HTTP3EditResponse], http3, path=["response"]) + assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncHTTP3: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" http3 = await response.parse() - assert_matches_type(Optional[HTTP3EditResponse], http3, path=["response"]) + assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncHTTP3: assert response.http_request.headers.get("X-Stainless-Lang") == "python" http3 = await response.parse() - assert_matches_type(Optional[HTTP3EditResponse], http3, path=["response"]) + assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncHTTP3: http3 = await async_client.zones.settings.http3.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[HTTP3GetResponse], http3, path=["response"]) + assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncHTTP3: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" http3 = await response.parse() - assert_matches_type(Optional[HTTP3GetResponse], http3, path=["response"]) + assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncHTTP3: assert response.http_request.headers.get("X-Stainless-Lang") == "python" http3 = await response.parse() - assert_matches_type(Optional[HTTP3GetResponse], http3, path=["response"]) + assert_matches_type(Optional[ZonesHTTP3], 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 d7daaffa1..7943e6128 100644 --- a/tests/api_resources/zones/settings/test_image_resizing.py +++ b/tests/api_resources/zones/settings/test_image_resizing.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - ImageResizingGetResponse, - ImageResizingEditResponse, -) +from cloudflare.types.zones.settings import ZonesImageResizing base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +27,7 @@ class TestImageResizing: "value": "on", }, ) - assert_matches_type(Optional[ImageResizingEditResponse], image_resizing, path=["response"]) + assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +39,7 @@ class TestImageResizing: "value": "on", }, ) - assert_matches_type(Optional[ImageResizingEditResponse], image_resizing, path=["response"]) + assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -58,7 +55,7 @@ class TestImageResizing: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" image_resizing = response.parse() - assert_matches_type(Optional[ImageResizingEditResponse], image_resizing, path=["response"]) + assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -74,7 +71,7 @@ class TestImageResizing: assert response.http_request.headers.get("X-Stainless-Lang") == "python" image_resizing = response.parse() - assert_matches_type(Optional[ImageResizingEditResponse], image_resizing, path=["response"]) + assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) assert cast(Any, response.is_closed) is True @@ -96,7 +93,7 @@ class TestImageResizing: image_resizing = client.zones.settings.image_resizing.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ImageResizingGetResponse], image_resizing, path=["response"]) + assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -108,7 +105,7 @@ class TestImageResizing: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" image_resizing = response.parse() - assert_matches_type(Optional[ImageResizingGetResponse], image_resizing, path=["response"]) + assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -120,7 +117,7 @@ class TestImageResizing: assert response.http_request.headers.get("X-Stainless-Lang") == "python" image_resizing = response.parse() - assert_matches_type(Optional[ImageResizingGetResponse], image_resizing, path=["response"]) + assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) assert cast(Any, response.is_closed) is True @@ -146,7 +143,7 @@ class TestAsyncImageResizing: "value": "on", }, ) - assert_matches_type(Optional[ImageResizingEditResponse], image_resizing, path=["response"]) + assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -158,7 +155,7 @@ class TestAsyncImageResizing: "value": "on", }, ) - assert_matches_type(Optional[ImageResizingEditResponse], image_resizing, path=["response"]) + assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -174,7 +171,7 @@ class TestAsyncImageResizing: 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[ImageResizingEditResponse], image_resizing, path=["response"]) + assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -190,7 +187,7 @@ class TestAsyncImageResizing: assert response.http_request.headers.get("X-Stainless-Lang") == "python" image_resizing = await response.parse() - assert_matches_type(Optional[ImageResizingEditResponse], image_resizing, path=["response"]) + assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) assert cast(Any, response.is_closed) is True @@ -212,7 +209,7 @@ class TestAsyncImageResizing: image_resizing = await async_client.zones.settings.image_resizing.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ImageResizingGetResponse], image_resizing, path=["response"]) + assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -224,7 +221,7 @@ class TestAsyncImageResizing: 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[ImageResizingGetResponse], image_resizing, path=["response"]) + assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -236,7 +233,7 @@ class TestAsyncImageResizing: assert response.http_request.headers.get("X-Stainless-Lang") == "python" image_resizing = await response.parse() - assert_matches_type(Optional[ImageResizingGetResponse], image_resizing, path=["response"]) + assert_matches_type(Optional[ZonesImageResizing], 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 60a09b213..ea88a453b 100644 --- a/tests/api_resources/zones/settings/test_ip_geolocation.py +++ b/tests/api_resources/zones/settings/test_ip_geolocation.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - IPGeolocationGetResponse, - IPGeolocationEditResponse, -) +from cloudflare.types.zones.settings import ZonesIPGeolocation base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestIPGeolocation: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[IPGeolocationEditResponse], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +37,7 @@ class TestIPGeolocation: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ip_geolocation = response.parse() - assert_matches_type(Optional[IPGeolocationEditResponse], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +50,7 @@ class TestIPGeolocation: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ip_geolocation = response.parse() - assert_matches_type(Optional[IPGeolocationEditResponse], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -72,7 +69,7 @@ class TestIPGeolocation: ip_geolocation = client.zones.settings.ip_geolocation.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[IPGeolocationGetResponse], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +81,7 @@ class TestIPGeolocation: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ip_geolocation = response.parse() - assert_matches_type(Optional[IPGeolocationGetResponse], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestIPGeolocation: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ip_geolocation = response.parse() - assert_matches_type(Optional[IPGeolocationGetResponse], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -119,7 +116,7 @@ class TestAsyncIPGeolocation: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[IPGeolocationEditResponse], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +129,7 @@ class TestAsyncIPGeolocation: 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[IPGeolocationEditResponse], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +142,7 @@ class TestAsyncIPGeolocation: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ip_geolocation = await response.parse() - assert_matches_type(Optional[IPGeolocationEditResponse], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -164,7 +161,7 @@ class TestAsyncIPGeolocation: ip_geolocation = await async_client.zones.settings.ip_geolocation.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[IPGeolocationGetResponse], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +173,7 @@ class TestAsyncIPGeolocation: 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[IPGeolocationGetResponse], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +185,7 @@ class TestAsyncIPGeolocation: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ip_geolocation = await response.parse() - assert_matches_type(Optional[IPGeolocationGetResponse], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZonesIPGeolocation], 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 6efd1a27a..25d7db4ab 100644 --- a/tests/api_resources/zones/settings/test_ipv6.py +++ b/tests/api_resources/zones/settings/test_ipv6.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import IPV6GetResponse, IPV6EditResponse +from cloudflare.types.zones.settings import ZonesIPV6 base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestIPV6: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[IPV6EditResponse], ipv6, path=["response"]) + assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestIPV6: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ipv6 = response.parse() - assert_matches_type(Optional[IPV6EditResponse], ipv6, path=["response"]) + assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestIPV6: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ipv6 = response.parse() - assert_matches_type(Optional[IPV6EditResponse], ipv6, path=["response"]) + assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestIPV6: ipv6 = client.zones.settings.ipv6.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[IPV6GetResponse], ipv6, path=["response"]) + assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestIPV6: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ipv6 = response.parse() - assert_matches_type(Optional[IPV6GetResponse], ipv6, path=["response"]) + assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestIPV6: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ipv6 = response.parse() - assert_matches_type(Optional[IPV6GetResponse], ipv6, path=["response"]) + assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncIPV6: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[IPV6EditResponse], ipv6, path=["response"]) + assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncIPV6: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ipv6 = await response.parse() - assert_matches_type(Optional[IPV6EditResponse], ipv6, path=["response"]) + assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncIPV6: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ipv6 = await response.parse() - assert_matches_type(Optional[IPV6EditResponse], ipv6, path=["response"]) + assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncIPV6: ipv6 = await async_client.zones.settings.ipv6.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[IPV6GetResponse], ipv6, path=["response"]) + assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncIPV6: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ipv6 = await response.parse() - assert_matches_type(Optional[IPV6GetResponse], ipv6, path=["response"]) + assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncIPV6: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ipv6 = await response.parse() - assert_matches_type(Optional[IPV6GetResponse], ipv6, path=["response"]) + assert_matches_type(Optional[ZonesIPV6], 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 9eeb8ecd5..6d23a10e5 100644 --- a/tests/api_resources/zones/settings/test_min_tls_version.py +++ b/tests/api_resources/zones/settings/test_min_tls_version.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - MinTLSVersionGetResponse, - MinTLSVersionEditResponse, -) +from cloudflare.types.zones.settings import ZonesMinTLSVersion base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestMinTLSVersion: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="1.0", ) - assert_matches_type(Optional[MinTLSVersionEditResponse], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +37,7 @@ class TestMinTLSVersion: 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[MinTLSVersionEditResponse], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +50,7 @@ class TestMinTLSVersion: assert response.http_request.headers.get("X-Stainless-Lang") == "python" min_tls_version = response.parse() - assert_matches_type(Optional[MinTLSVersionEditResponse], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) assert cast(Any, response.is_closed) is True @@ -72,7 +69,7 @@ class TestMinTLSVersion: min_tls_version = client.zones.settings.min_tls_version.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[MinTLSVersionGetResponse], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +81,7 @@ class TestMinTLSVersion: 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[MinTLSVersionGetResponse], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestMinTLSVersion: assert response.http_request.headers.get("X-Stainless-Lang") == "python" min_tls_version = response.parse() - assert_matches_type(Optional[MinTLSVersionGetResponse], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) assert cast(Any, response.is_closed) is True @@ -119,7 +116,7 @@ class TestAsyncMinTLSVersion: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="1.0", ) - assert_matches_type(Optional[MinTLSVersionEditResponse], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +129,7 @@ class TestAsyncMinTLSVersion: 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[MinTLSVersionEditResponse], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +142,7 @@ class TestAsyncMinTLSVersion: assert response.http_request.headers.get("X-Stainless-Lang") == "python" min_tls_version = await response.parse() - assert_matches_type(Optional[MinTLSVersionEditResponse], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) assert cast(Any, response.is_closed) is True @@ -164,7 +161,7 @@ class TestAsyncMinTLSVersion: min_tls_version = await async_client.zones.settings.min_tls_version.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[MinTLSVersionGetResponse], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +173,7 @@ class TestAsyncMinTLSVersion: 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[MinTLSVersionGetResponse], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +185,7 @@ class TestAsyncMinTLSVersion: assert response.http_request.headers.get("X-Stainless-Lang") == "python" min_tls_version = await response.parse() - assert_matches_type(Optional[MinTLSVersionGetResponse], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZonesMinTLSVersion], 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 3b80cd3a3..3ceed71ac 100644 --- a/tests/api_resources/zones/settings/test_minify.py +++ b/tests/api_resources/zones/settings/test_minify.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import MinifyGetResponse, MinifyEditResponse +from cloudflare.types.zones.settings import ZonesMinify base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestMinify: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value={}, ) - assert_matches_type(Optional[MinifyEditResponse], minify, path=["response"]) + assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestMinify: "js": "on", }, ) - assert_matches_type(Optional[MinifyEditResponse], minify, path=["response"]) + assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestMinify: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" minify = response.parse() - assert_matches_type(Optional[MinifyEditResponse], minify, path=["response"]) + assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -63,7 +63,7 @@ class TestMinify: assert response.http_request.headers.get("X-Stainless-Lang") == "python" minify = response.parse() - assert_matches_type(Optional[MinifyEditResponse], minify, path=["response"]) + assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) assert cast(Any, response.is_closed) is True @@ -82,7 +82,7 @@ class TestMinify: minify = client.zones.settings.minify.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[MinifyGetResponse], minify, path=["response"]) + assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -94,7 +94,7 @@ class TestMinify: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" minify = response.parse() - assert_matches_type(Optional[MinifyGetResponse], minify, path=["response"]) + assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +106,7 @@ class TestMinify: assert response.http_request.headers.get("X-Stainless-Lang") == "python" minify = response.parse() - assert_matches_type(Optional[MinifyGetResponse], minify, path=["response"]) + assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) assert cast(Any, response.is_closed) is True @@ -129,7 +129,7 @@ class TestAsyncMinify: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value={}, ) - assert_matches_type(Optional[MinifyEditResponse], minify, path=["response"]) + assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncMinify: "js": "on", }, ) - assert_matches_type(Optional[MinifyEditResponse], minify, path=["response"]) + assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +155,7 @@ class TestAsyncMinify: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" minify = await response.parse() - assert_matches_type(Optional[MinifyEditResponse], minify, path=["response"]) + assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -168,7 +168,7 @@ class TestAsyncMinify: assert response.http_request.headers.get("X-Stainless-Lang") == "python" minify = await response.parse() - assert_matches_type(Optional[MinifyEditResponse], minify, path=["response"]) + assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) assert cast(Any, response.is_closed) is True @@ -187,7 +187,7 @@ class TestAsyncMinify: minify = await async_client.zones.settings.minify.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[MinifyGetResponse], minify, path=["response"]) + assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -199,7 +199,7 @@ class TestAsyncMinify: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" minify = await response.parse() - assert_matches_type(Optional[MinifyGetResponse], minify, path=["response"]) + assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -211,7 +211,7 @@ class TestAsyncMinify: assert response.http_request.headers.get("X-Stainless-Lang") == "python" minify = await response.parse() - assert_matches_type(Optional[MinifyGetResponse], minify, path=["response"]) + assert_matches_type(Optional[ZonesMinify], 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 ac2d87144..aa3bfead6 100644 --- a/tests/api_resources/zones/settings/test_mirage.py +++ b/tests/api_resources/zones/settings/test_mirage.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import MirageGetResponse, MirageEditResponse +from cloudflare.types.zones.settings import ZonesMirage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestMirage: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[MirageEditResponse], mirage, path=["response"]) + assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestMirage: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mirage = response.parse() - assert_matches_type(Optional[MirageEditResponse], mirage, path=["response"]) + assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestMirage: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mirage = response.parse() - assert_matches_type(Optional[MirageEditResponse], mirage, path=["response"]) + assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestMirage: mirage = client.zones.settings.mirage.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[MirageGetResponse], mirage, path=["response"]) + assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestMirage: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mirage = response.parse() - assert_matches_type(Optional[MirageGetResponse], mirage, path=["response"]) + assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestMirage: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mirage = response.parse() - assert_matches_type(Optional[MirageGetResponse], mirage, path=["response"]) + assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncMirage: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[MirageEditResponse], mirage, path=["response"]) + assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncMirage: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mirage = await response.parse() - assert_matches_type(Optional[MirageEditResponse], mirage, path=["response"]) + assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncMirage: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mirage = await response.parse() - assert_matches_type(Optional[MirageEditResponse], mirage, path=["response"]) + assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncMirage: mirage = await async_client.zones.settings.mirage.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[MirageGetResponse], mirage, path=["response"]) + assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncMirage: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mirage = await response.parse() - assert_matches_type(Optional[MirageGetResponse], mirage, path=["response"]) + assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncMirage: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mirage = await response.parse() - assert_matches_type(Optional[MirageGetResponse], mirage, path=["response"]) + assert_matches_type(Optional[ZonesMirage], 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 93011c0a2..1b040ff01 100644 --- a/tests/api_resources/zones/settings/test_mobile_redirect.py +++ b/tests/api_resources/zones/settings/test_mobile_redirect.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - MobileRedirectGetResponse, - MobileRedirectEditResponse, -) +from cloudflare.types.zones.settings import ZonesMobileRedirect base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestMobileRedirect: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value={}, ) - assert_matches_type(Optional[MobileRedirectEditResponse], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +37,7 @@ class TestMobileRedirect: "strip_uri": False, }, ) - assert_matches_type(Optional[MobileRedirectEditResponse], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +50,7 @@ class TestMobileRedirect: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mobile_redirect = response.parse() - assert_matches_type(Optional[MobileRedirectEditResponse], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -66,7 +63,7 @@ class TestMobileRedirect: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mobile_redirect = response.parse() - assert_matches_type(Optional[MobileRedirectEditResponse], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) assert cast(Any, response.is_closed) is True @@ -85,7 +82,7 @@ class TestMobileRedirect: mobile_redirect = client.zones.settings.mobile_redirect.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[MobileRedirectGetResponse], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -97,7 +94,7 @@ class TestMobileRedirect: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" mobile_redirect = response.parse() - assert_matches_type(Optional[MobileRedirectGetResponse], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -109,7 +106,7 @@ class TestMobileRedirect: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mobile_redirect = response.parse() - assert_matches_type(Optional[MobileRedirectGetResponse], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) assert cast(Any, response.is_closed) is True @@ -132,7 +129,7 @@ class TestAsyncMobileRedirect: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value={}, ) - assert_matches_type(Optional[MobileRedirectEditResponse], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +142,7 @@ class TestAsyncMobileRedirect: "strip_uri": False, }, ) - assert_matches_type(Optional[MobileRedirectEditResponse], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -158,7 +155,7 @@ class TestAsyncMobileRedirect: 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[MobileRedirectEditResponse], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +168,7 @@ class TestAsyncMobileRedirect: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mobile_redirect = await response.parse() - assert_matches_type(Optional[MobileRedirectEditResponse], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) assert cast(Any, response.is_closed) is True @@ -190,7 +187,7 @@ class TestAsyncMobileRedirect: mobile_redirect = await async_client.zones.settings.mobile_redirect.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[MobileRedirectGetResponse], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -202,7 +199,7 @@ class TestAsyncMobileRedirect: 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[MobileRedirectGetResponse], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -214,7 +211,7 @@ class TestAsyncMobileRedirect: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mobile_redirect = await response.parse() - assert_matches_type(Optional[MobileRedirectGetResponse], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZonesMobileRedirect], 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 4bc74605f..e8d8d1517 100644 --- a/tests/api_resources/zones/settings/test_nel.py +++ b/tests/api_resources/zones/settings/test_nel.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import NELGetResponse, NELEditResponse +from cloudflare.types.zones.settings import ZonesNEL base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +27,7 @@ class TestNEL: "value": {}, }, ) - assert_matches_type(Optional[NELEditResponse], nel, path=["response"]) + assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,7 @@ class TestNEL: "value": {"enabled": False}, }, ) - assert_matches_type(Optional[NELEditResponse], nel, path=["response"]) + assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +55,7 @@ class TestNEL: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" nel = response.parse() - assert_matches_type(Optional[NELEditResponse], nel, path=["response"]) + assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -71,7 +71,7 @@ class TestNEL: assert response.http_request.headers.get("X-Stainless-Lang") == "python" nel = response.parse() - assert_matches_type(Optional[NELEditResponse], nel, path=["response"]) + assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) assert cast(Any, response.is_closed) is True @@ -93,7 +93,7 @@ class TestNEL: nel = client.zones.settings.nel.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[NELGetResponse], nel, path=["response"]) + assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +105,7 @@ class TestNEL: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" nel = response.parse() - assert_matches_type(Optional[NELGetResponse], nel, path=["response"]) + assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -117,7 +117,7 @@ class TestNEL: assert response.http_request.headers.get("X-Stainless-Lang") == "python" nel = response.parse() - assert_matches_type(Optional[NELGetResponse], nel, path=["response"]) + assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) assert cast(Any, response.is_closed) is True @@ -143,7 +143,7 @@ class TestAsyncNEL: "value": {}, }, ) - assert_matches_type(Optional[NELEditResponse], nel, path=["response"]) + assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +155,7 @@ class TestAsyncNEL: "value": {"enabled": False}, }, ) - assert_matches_type(Optional[NELEditResponse], nel, path=["response"]) + assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +171,7 @@ class TestAsyncNEL: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" nel = await response.parse() - assert_matches_type(Optional[NELEditResponse], nel, path=["response"]) + assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +187,7 @@ class TestAsyncNEL: assert response.http_request.headers.get("X-Stainless-Lang") == "python" nel = await response.parse() - assert_matches_type(Optional[NELEditResponse], nel, path=["response"]) + assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) assert cast(Any, response.is_closed) is True @@ -209,7 +209,7 @@ class TestAsyncNEL: nel = await async_client.zones.settings.nel.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[NELGetResponse], nel, path=["response"]) + assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -221,7 +221,7 @@ class TestAsyncNEL: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" nel = await response.parse() - assert_matches_type(Optional[NELGetResponse], nel, path=["response"]) + assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -233,7 +233,7 @@ class TestAsyncNEL: assert response.http_request.headers.get("X-Stainless-Lang") == "python" nel = await response.parse() - assert_matches_type(Optional[NELGetResponse], nel, path=["response"]) + assert_matches_type(Optional[ZonesNEL], 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 716b942e3..33b22b8e4 100644 --- a/tests/api_resources/zones/settings/test_opportunistic_encryption.py +++ b/tests/api_resources/zones/settings/test_opportunistic_encryption.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - OpportunisticEncryptionGetResponse, - OpportunisticEncryptionEditResponse, -) +from cloudflare.types.zones.settings import ZonesOpportunisticEncryption base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestOpportunisticEncryption: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[OpportunisticEncryptionEditResponse], opportunistic_encryption, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +37,7 @@ class TestOpportunisticEncryption: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" opportunistic_encryption = response.parse() - assert_matches_type(Optional[OpportunisticEncryptionEditResponse], opportunistic_encryption, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,9 +50,7 @@ class TestOpportunisticEncryption: assert response.http_request.headers.get("X-Stainless-Lang") == "python" opportunistic_encryption = response.parse() - assert_matches_type( - Optional[OpportunisticEncryptionEditResponse], opportunistic_encryption, path=["response"] - ) + assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) assert cast(Any, response.is_closed) is True @@ -74,7 +69,7 @@ class TestOpportunisticEncryption: opportunistic_encryption = client.zones.settings.opportunistic_encryption.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[OpportunisticEncryptionGetResponse], opportunistic_encryption, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) @pytest.mark.skip() @parametrize @@ -86,7 +81,7 @@ class TestOpportunisticEncryption: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" opportunistic_encryption = response.parse() - assert_matches_type(Optional[OpportunisticEncryptionGetResponse], opportunistic_encryption, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) @pytest.mark.skip() @parametrize @@ -98,9 +93,7 @@ class TestOpportunisticEncryption: assert response.http_request.headers.get("X-Stainless-Lang") == "python" opportunistic_encryption = response.parse() - assert_matches_type( - Optional[OpportunisticEncryptionGetResponse], opportunistic_encryption, path=["response"] - ) + assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) assert cast(Any, response.is_closed) is True @@ -123,7 +116,7 @@ class TestAsyncOpportunisticEncryption: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[OpportunisticEncryptionEditResponse], opportunistic_encryption, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) @pytest.mark.skip() @parametrize @@ -136,7 +129,7 @@ class TestAsyncOpportunisticEncryption: 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[OpportunisticEncryptionEditResponse], opportunistic_encryption, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) @pytest.mark.skip() @parametrize @@ -149,9 +142,7 @@ class TestAsyncOpportunisticEncryption: assert response.http_request.headers.get("X-Stainless-Lang") == "python" opportunistic_encryption = await response.parse() - assert_matches_type( - Optional[OpportunisticEncryptionEditResponse], opportunistic_encryption, path=["response"] - ) + assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) assert cast(Any, response.is_closed) is True @@ -170,7 +161,7 @@ class TestAsyncOpportunisticEncryption: opportunistic_encryption = await async_client.zones.settings.opportunistic_encryption.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[OpportunisticEncryptionGetResponse], opportunistic_encryption, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) @pytest.mark.skip() @parametrize @@ -182,7 +173,7 @@ class TestAsyncOpportunisticEncryption: 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[OpportunisticEncryptionGetResponse], opportunistic_encryption, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) @pytest.mark.skip() @parametrize @@ -194,9 +185,7 @@ class TestAsyncOpportunisticEncryption: assert response.http_request.headers.get("X-Stainless-Lang") == "python" opportunistic_encryption = await response.parse() - assert_matches_type( - Optional[OpportunisticEncryptionGetResponse], opportunistic_encryption, path=["response"] - ) + assert_matches_type(Optional[ZonesOpportunisticEncryption], 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 5330016ed..25123b553 100644 --- a/tests/api_resources/zones/settings/test_opportunistic_onion.py +++ b/tests/api_resources/zones/settings/test_opportunistic_onion.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - OpportunisticOnionGetResponse, - OpportunisticOnionEditResponse, -) +from cloudflare.types.zones.settings import ZonesOpportunisticOnion base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestOpportunisticOnion: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[OpportunisticOnionEditResponse], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +37,7 @@ class TestOpportunisticOnion: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" opportunistic_onion = response.parse() - assert_matches_type(Optional[OpportunisticOnionEditResponse], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +50,7 @@ class TestOpportunisticOnion: assert response.http_request.headers.get("X-Stainless-Lang") == "python" opportunistic_onion = response.parse() - assert_matches_type(Optional[OpportunisticOnionEditResponse], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) assert cast(Any, response.is_closed) is True @@ -72,7 +69,7 @@ class TestOpportunisticOnion: opportunistic_onion = client.zones.settings.opportunistic_onion.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[OpportunisticOnionGetResponse], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +81,7 @@ class TestOpportunisticOnion: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" opportunistic_onion = response.parse() - assert_matches_type(Optional[OpportunisticOnionGetResponse], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestOpportunisticOnion: assert response.http_request.headers.get("X-Stainless-Lang") == "python" opportunistic_onion = response.parse() - assert_matches_type(Optional[OpportunisticOnionGetResponse], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) assert cast(Any, response.is_closed) is True @@ -119,7 +116,7 @@ class TestAsyncOpportunisticOnion: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[OpportunisticOnionEditResponse], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +129,7 @@ class TestAsyncOpportunisticOnion: 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[OpportunisticOnionEditResponse], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +142,7 @@ class TestAsyncOpportunisticOnion: assert response.http_request.headers.get("X-Stainless-Lang") == "python" opportunistic_onion = await response.parse() - assert_matches_type(Optional[OpportunisticOnionEditResponse], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) assert cast(Any, response.is_closed) is True @@ -164,7 +161,7 @@ class TestAsyncOpportunisticOnion: opportunistic_onion = await async_client.zones.settings.opportunistic_onion.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[OpportunisticOnionGetResponse], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +173,7 @@ class TestAsyncOpportunisticOnion: 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[OpportunisticOnionGetResponse], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +185,7 @@ class TestAsyncOpportunisticOnion: assert response.http_request.headers.get("X-Stainless-Lang") == "python" opportunistic_onion = await response.parse() - assert_matches_type(Optional[OpportunisticOnionGetResponse], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZonesOpportunisticOnion], 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 2323fa526..812ccee8f 100644 --- a/tests/api_resources/zones/settings/test_orange_to_orange.py +++ b/tests/api_resources/zones/settings/test_orange_to_orange.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - OrangeToOrangeGetResponse, - OrangeToOrangeEditResponse, -) +from cloudflare.types.zones.settings import ZonesOrangeToOrange base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +27,7 @@ class TestOrangeToOrange: "value": "on", }, ) - assert_matches_type(Optional[OrangeToOrangeEditResponse], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +39,7 @@ class TestOrangeToOrange: "value": "on", }, ) - assert_matches_type(Optional[OrangeToOrangeEditResponse], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -58,7 +55,7 @@ class TestOrangeToOrange: 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[OrangeToOrangeEditResponse], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -74,7 +71,7 @@ class TestOrangeToOrange: assert response.http_request.headers.get("X-Stainless-Lang") == "python" orange_to_orange = response.parse() - assert_matches_type(Optional[OrangeToOrangeEditResponse], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) assert cast(Any, response.is_closed) is True @@ -96,7 +93,7 @@ class TestOrangeToOrange: orange_to_orange = client.zones.settings.orange_to_orange.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[OrangeToOrangeGetResponse], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -108,7 +105,7 @@ class TestOrangeToOrange: 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[OrangeToOrangeGetResponse], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -120,7 +117,7 @@ class TestOrangeToOrange: assert response.http_request.headers.get("X-Stainless-Lang") == "python" orange_to_orange = response.parse() - assert_matches_type(Optional[OrangeToOrangeGetResponse], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) assert cast(Any, response.is_closed) is True @@ -146,7 +143,7 @@ class TestAsyncOrangeToOrange: "value": "on", }, ) - assert_matches_type(Optional[OrangeToOrangeEditResponse], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -158,7 +155,7 @@ class TestAsyncOrangeToOrange: "value": "on", }, ) - assert_matches_type(Optional[OrangeToOrangeEditResponse], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -174,7 +171,7 @@ class TestAsyncOrangeToOrange: 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[OrangeToOrangeEditResponse], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -190,7 +187,7 @@ class TestAsyncOrangeToOrange: assert response.http_request.headers.get("X-Stainless-Lang") == "python" orange_to_orange = await response.parse() - assert_matches_type(Optional[OrangeToOrangeEditResponse], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) assert cast(Any, response.is_closed) is True @@ -212,7 +209,7 @@ class TestAsyncOrangeToOrange: orange_to_orange = await async_client.zones.settings.orange_to_orange.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[OrangeToOrangeGetResponse], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -224,7 +221,7 @@ class TestAsyncOrangeToOrange: 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[OrangeToOrangeGetResponse], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -236,7 +233,7 @@ class TestAsyncOrangeToOrange: assert response.http_request.headers.get("X-Stainless-Lang") == "python" orange_to_orange = await response.parse() - assert_matches_type(Optional[OrangeToOrangeGetResponse], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZonesOrangeToOrange], 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 ac5b91670..e6dc48e4d 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,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - OriginErrorPagePassThruGetResponse, - OriginErrorPagePassThruEditResponse, -) +from cloudflare.types.zones.settings import ZonesOriginErrorPagePassThru base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,9 +24,7 @@ class TestOriginErrorPagePassThru: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type( - Optional[OriginErrorPagePassThruEditResponse], origin_error_page_pass_thru, path=["response"] - ) + assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,9 +37,7 @@ class TestOriginErrorPagePassThru: 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[OriginErrorPagePassThruEditResponse], origin_error_page_pass_thru, path=["response"] - ) + assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) @pytest.mark.skip() @parametrize @@ -57,9 +50,7 @@ class TestOriginErrorPagePassThru: assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_error_page_pass_thru = response.parse() - assert_matches_type( - Optional[OriginErrorPagePassThruEditResponse], origin_error_page_pass_thru, path=["response"] - ) + assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) assert cast(Any, response.is_closed) is True @@ -78,9 +69,7 @@ class TestOriginErrorPagePassThru: origin_error_page_pass_thru = client.zones.settings.origin_error_page_pass_thru.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type( - Optional[OriginErrorPagePassThruGetResponse], origin_error_page_pass_thru, path=["response"] - ) + assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) @pytest.mark.skip() @parametrize @@ -92,9 +81,7 @@ class TestOriginErrorPagePassThru: 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[OriginErrorPagePassThruGetResponse], origin_error_page_pass_thru, path=["response"] - ) + assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,9 +93,7 @@ class TestOriginErrorPagePassThru: assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_error_page_pass_thru = response.parse() - assert_matches_type( - Optional[OriginErrorPagePassThruGetResponse], origin_error_page_pass_thru, path=["response"] - ) + assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) assert cast(Any, response.is_closed) is True @@ -131,9 +116,7 @@ class TestAsyncOriginErrorPagePassThru: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type( - Optional[OriginErrorPagePassThruEditResponse], origin_error_page_pass_thru, path=["response"] - ) + assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) @pytest.mark.skip() @parametrize @@ -146,9 +129,7 @@ class TestAsyncOriginErrorPagePassThru: 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[OriginErrorPagePassThruEditResponse], origin_error_page_pass_thru, path=["response"] - ) + assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) @pytest.mark.skip() @parametrize @@ -161,9 +142,7 @@ class TestAsyncOriginErrorPagePassThru: assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_error_page_pass_thru = await response.parse() - assert_matches_type( - Optional[OriginErrorPagePassThruEditResponse], origin_error_page_pass_thru, path=["response"] - ) + assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) assert cast(Any, response.is_closed) is True @@ -182,9 +161,7 @@ class TestAsyncOriginErrorPagePassThru: origin_error_page_pass_thru = await async_client.zones.settings.origin_error_page_pass_thru.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type( - Optional[OriginErrorPagePassThruGetResponse], origin_error_page_pass_thru, path=["response"] - ) + assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) @pytest.mark.skip() @parametrize @@ -196,9 +173,7 @@ class TestAsyncOriginErrorPagePassThru: 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[OriginErrorPagePassThruGetResponse], origin_error_page_pass_thru, path=["response"] - ) + assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) @pytest.mark.skip() @parametrize @@ -210,9 +185,7 @@ class TestAsyncOriginErrorPagePassThru: assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_error_page_pass_thru = await response.parse() - assert_matches_type( - Optional[OriginErrorPagePassThruGetResponse], origin_error_page_pass_thru, path=["response"] - ) + assert_matches_type(Optional[ZonesOriginErrorPagePassThru], 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 713004637..482e634f0 100644 --- a/tests/api_resources/zones/settings/test_polish.py +++ b/tests/api_resources/zones/settings/test_polish.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import PolishGetResponse, PolishEditResponse +from cloudflare.types.zones.settings import ZonesPolish base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +27,7 @@ class TestPolish: "value": "off", }, ) - assert_matches_type(Optional[PolishEditResponse], polish, path=["response"]) + assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,7 @@ class TestPolish: "value": "off", }, ) - assert_matches_type(Optional[PolishEditResponse], polish, path=["response"]) + assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +55,7 @@ class TestPolish: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" polish = response.parse() - assert_matches_type(Optional[PolishEditResponse], polish, path=["response"]) + assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -71,7 +71,7 @@ class TestPolish: assert response.http_request.headers.get("X-Stainless-Lang") == "python" polish = response.parse() - assert_matches_type(Optional[PolishEditResponse], polish, path=["response"]) + assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) assert cast(Any, response.is_closed) is True @@ -93,7 +93,7 @@ class TestPolish: polish = client.zones.settings.polish.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PolishGetResponse], polish, path=["response"]) + assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +105,7 @@ class TestPolish: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" polish = response.parse() - assert_matches_type(Optional[PolishGetResponse], polish, path=["response"]) + assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -117,7 +117,7 @@ class TestPolish: assert response.http_request.headers.get("X-Stainless-Lang") == "python" polish = response.parse() - assert_matches_type(Optional[PolishGetResponse], polish, path=["response"]) + assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) assert cast(Any, response.is_closed) is True @@ -143,7 +143,7 @@ class TestAsyncPolish: "value": "off", }, ) - assert_matches_type(Optional[PolishEditResponse], polish, path=["response"]) + assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +155,7 @@ class TestAsyncPolish: "value": "off", }, ) - assert_matches_type(Optional[PolishEditResponse], polish, path=["response"]) + assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +171,7 @@ class TestAsyncPolish: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" polish = await response.parse() - assert_matches_type(Optional[PolishEditResponse], polish, path=["response"]) + assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +187,7 @@ class TestAsyncPolish: assert response.http_request.headers.get("X-Stainless-Lang") == "python" polish = await response.parse() - assert_matches_type(Optional[PolishEditResponse], polish, path=["response"]) + assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) assert cast(Any, response.is_closed) is True @@ -209,7 +209,7 @@ class TestAsyncPolish: polish = await async_client.zones.settings.polish.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PolishGetResponse], polish, path=["response"]) + assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -221,7 +221,7 @@ class TestAsyncPolish: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" polish = await response.parse() - assert_matches_type(Optional[PolishGetResponse], polish, path=["response"]) + assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -233,7 +233,7 @@ class TestAsyncPolish: assert response.http_request.headers.get("X-Stainless-Lang") == "python" polish = await response.parse() - assert_matches_type(Optional[PolishGetResponse], polish, path=["response"]) + assert_matches_type(Optional[ZonesPolish], 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 152dc1b7d..68c34cb3a 100644 --- a/tests/api_resources/zones/settings/test_prefetch_preload.py +++ b/tests/api_resources/zones/settings/test_prefetch_preload.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - PrefetchPreloadGetResponse, - PrefetchPreloadEditResponse, -) +from cloudflare.types.zones.settings import ZonesPrefetchPreload base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestPrefetchPreload: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[PrefetchPreloadEditResponse], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +37,7 @@ class TestPrefetchPreload: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefetch_preload = response.parse() - assert_matches_type(Optional[PrefetchPreloadEditResponse], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +50,7 @@ class TestPrefetchPreload: assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefetch_preload = response.parse() - assert_matches_type(Optional[PrefetchPreloadEditResponse], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) assert cast(Any, response.is_closed) is True @@ -72,7 +69,7 @@ class TestPrefetchPreload: prefetch_preload = client.zones.settings.prefetch_preload.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PrefetchPreloadGetResponse], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +81,7 @@ class TestPrefetchPreload: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefetch_preload = response.parse() - assert_matches_type(Optional[PrefetchPreloadGetResponse], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestPrefetchPreload: assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefetch_preload = response.parse() - assert_matches_type(Optional[PrefetchPreloadGetResponse], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) assert cast(Any, response.is_closed) is True @@ -119,7 +116,7 @@ class TestAsyncPrefetchPreload: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[PrefetchPreloadEditResponse], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +129,7 @@ class TestAsyncPrefetchPreload: 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[PrefetchPreloadEditResponse], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +142,7 @@ class TestAsyncPrefetchPreload: assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefetch_preload = await response.parse() - assert_matches_type(Optional[PrefetchPreloadEditResponse], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) assert cast(Any, response.is_closed) is True @@ -164,7 +161,7 @@ class TestAsyncPrefetchPreload: prefetch_preload = await async_client.zones.settings.prefetch_preload.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PrefetchPreloadGetResponse], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +173,7 @@ class TestAsyncPrefetchPreload: 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[PrefetchPreloadGetResponse], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +185,7 @@ class TestAsyncPrefetchPreload: assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefetch_preload = await response.parse() - assert_matches_type(Optional[PrefetchPreloadGetResponse], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZonesPrefetchPreload], 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 1f4681016..d1cf3e4d7 100644 --- a/tests/api_resources/zones/settings/test_proxy_read_timeout.py +++ b/tests/api_resources/zones/settings/test_proxy_read_timeout.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - ProxyReadTimeoutGetResponse, - ProxyReadTimeoutEditResponse, -) +from cloudflare.types.zones.settings import ZonesProxyReadTimeout base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +27,7 @@ class TestProxyReadTimeout: "value": 0, }, ) - assert_matches_type(Optional[ProxyReadTimeoutEditResponse], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +39,7 @@ class TestProxyReadTimeout: "value": 0, }, ) - assert_matches_type(Optional[ProxyReadTimeoutEditResponse], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -58,7 +55,7 @@ class TestProxyReadTimeout: 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[ProxyReadTimeoutEditResponse], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -74,7 +71,7 @@ class TestProxyReadTimeout: assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_read_timeout = response.parse() - assert_matches_type(Optional[ProxyReadTimeoutEditResponse], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) assert cast(Any, response.is_closed) is True @@ -96,7 +93,7 @@ class TestProxyReadTimeout: proxy_read_timeout = client.zones.settings.proxy_read_timeout.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ProxyReadTimeoutGetResponse], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -108,7 +105,7 @@ class TestProxyReadTimeout: 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[ProxyReadTimeoutGetResponse], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -120,7 +117,7 @@ class TestProxyReadTimeout: assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_read_timeout = response.parse() - assert_matches_type(Optional[ProxyReadTimeoutGetResponse], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) assert cast(Any, response.is_closed) is True @@ -146,7 +143,7 @@ class TestAsyncProxyReadTimeout: "value": 0, }, ) - assert_matches_type(Optional[ProxyReadTimeoutEditResponse], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -158,7 +155,7 @@ class TestAsyncProxyReadTimeout: "value": 0, }, ) - assert_matches_type(Optional[ProxyReadTimeoutEditResponse], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -174,7 +171,7 @@ class TestAsyncProxyReadTimeout: 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[ProxyReadTimeoutEditResponse], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -190,7 +187,7 @@ class TestAsyncProxyReadTimeout: assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_read_timeout = await response.parse() - assert_matches_type(Optional[ProxyReadTimeoutEditResponse], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) assert cast(Any, response.is_closed) is True @@ -212,7 +209,7 @@ class TestAsyncProxyReadTimeout: proxy_read_timeout = await async_client.zones.settings.proxy_read_timeout.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ProxyReadTimeoutGetResponse], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -224,7 +221,7 @@ class TestAsyncProxyReadTimeout: 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[ProxyReadTimeoutGetResponse], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -236,7 +233,7 @@ class TestAsyncProxyReadTimeout: assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_read_timeout = await response.parse() - assert_matches_type(Optional[ProxyReadTimeoutGetResponse], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZonesProxyReadTimeout], 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 5b0c8410d..3f41e5a45 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import PseudoIPV4GetResponse, PseudoIPV4EditResponse +from cloudflare.types.zones.settings import ZonesPseudoIPV4 base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestPseudoIPV4: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[PseudoIPV4EditResponse], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestPseudoIPV4: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pseudo_ipv4 = response.parse() - assert_matches_type(Optional[PseudoIPV4EditResponse], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestPseudoIPV4: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pseudo_ipv4 = response.parse() - assert_matches_type(Optional[PseudoIPV4EditResponse], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestPseudoIPV4: pseudo_ipv4 = client.zones.settings.pseudo_ipv4.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PseudoIPV4GetResponse], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestPseudoIPV4: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pseudo_ipv4 = response.parse() - assert_matches_type(Optional[PseudoIPV4GetResponse], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestPseudoIPV4: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pseudo_ipv4 = response.parse() - assert_matches_type(Optional[PseudoIPV4GetResponse], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncPseudoIPV4: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[PseudoIPV4EditResponse], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncPseudoIPV4: 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[PseudoIPV4EditResponse], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncPseudoIPV4: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pseudo_ipv4 = await response.parse() - assert_matches_type(Optional[PseudoIPV4EditResponse], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncPseudoIPV4: pseudo_ipv4 = await async_client.zones.settings.pseudo_ipv4.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PseudoIPV4GetResponse], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncPseudoIPV4: 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[PseudoIPV4GetResponse], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncPseudoIPV4: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pseudo_ipv4 = await response.parse() - assert_matches_type(Optional[PseudoIPV4GetResponse], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZonesPseudoIPV4], 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 39a5f8468..0d7033545 100644 --- a/tests/api_resources/zones/settings/test_response_buffering.py +++ b/tests/api_resources/zones/settings/test_response_buffering.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - ResponseBufferingGetResponse, - ResponseBufferingEditResponse, -) +from cloudflare.types.zones.settings import ZonesBuffering base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestResponseBuffering: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ResponseBufferingEditResponse], response_buffering, path=["response"]) + assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +37,7 @@ class TestResponseBuffering: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" response_buffering = response.parse() - assert_matches_type(Optional[ResponseBufferingEditResponse], response_buffering, path=["response"]) + assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +50,7 @@ class TestResponseBuffering: assert response.http_request.headers.get("X-Stainless-Lang") == "python" response_buffering = response.parse() - assert_matches_type(Optional[ResponseBufferingEditResponse], response_buffering, path=["response"]) + assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) assert cast(Any, response.is_closed) is True @@ -72,7 +69,7 @@ class TestResponseBuffering: response_buffering = client.zones.settings.response_buffering.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ResponseBufferingGetResponse], response_buffering, path=["response"]) + assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +81,7 @@ class TestResponseBuffering: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" response_buffering = response.parse() - assert_matches_type(Optional[ResponseBufferingGetResponse], response_buffering, path=["response"]) + assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestResponseBuffering: assert response.http_request.headers.get("X-Stainless-Lang") == "python" response_buffering = response.parse() - assert_matches_type(Optional[ResponseBufferingGetResponse], response_buffering, path=["response"]) + assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) assert cast(Any, response.is_closed) is True @@ -119,7 +116,7 @@ class TestAsyncResponseBuffering: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ResponseBufferingEditResponse], response_buffering, path=["response"]) + assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +129,7 @@ class TestAsyncResponseBuffering: 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[ResponseBufferingEditResponse], response_buffering, path=["response"]) + assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +142,7 @@ class TestAsyncResponseBuffering: assert response.http_request.headers.get("X-Stainless-Lang") == "python" response_buffering = await response.parse() - assert_matches_type(Optional[ResponseBufferingEditResponse], response_buffering, path=["response"]) + assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) assert cast(Any, response.is_closed) is True @@ -164,7 +161,7 @@ class TestAsyncResponseBuffering: response_buffering = await async_client.zones.settings.response_buffering.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ResponseBufferingGetResponse], response_buffering, path=["response"]) + assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +173,7 @@ class TestAsyncResponseBuffering: 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[ResponseBufferingGetResponse], response_buffering, path=["response"]) + assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +185,7 @@ class TestAsyncResponseBuffering: assert response.http_request.headers.get("X-Stainless-Lang") == "python" response_buffering = await response.parse() - assert_matches_type(Optional[ResponseBufferingGetResponse], response_buffering, path=["response"]) + assert_matches_type(Optional[ZonesBuffering], 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 b19fed8d5..c1cd37dc0 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import RocketLoaderGetResponse, RocketLoaderEditResponse +from cloudflare.types.zones.settings import ZonesRocketLoader base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +27,7 @@ class TestRocketLoader: "value": "on", }, ) - assert_matches_type(Optional[RocketLoaderEditResponse], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,7 @@ class TestRocketLoader: "value": "on", }, ) - assert_matches_type(Optional[RocketLoaderEditResponse], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +55,7 @@ class TestRocketLoader: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rocket_loader = response.parse() - assert_matches_type(Optional[RocketLoaderEditResponse], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -71,7 +71,7 @@ class TestRocketLoader: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rocket_loader = response.parse() - assert_matches_type(Optional[RocketLoaderEditResponse], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) assert cast(Any, response.is_closed) is True @@ -93,7 +93,7 @@ class TestRocketLoader: rocket_loader = client.zones.settings.rocket_loader.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[RocketLoaderGetResponse], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +105,7 @@ class TestRocketLoader: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rocket_loader = response.parse() - assert_matches_type(Optional[RocketLoaderGetResponse], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -117,7 +117,7 @@ class TestRocketLoader: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rocket_loader = response.parse() - assert_matches_type(Optional[RocketLoaderGetResponse], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) assert cast(Any, response.is_closed) is True @@ -143,7 +143,7 @@ class TestAsyncRocketLoader: "value": "on", }, ) - assert_matches_type(Optional[RocketLoaderEditResponse], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +155,7 @@ class TestAsyncRocketLoader: "value": "on", }, ) - assert_matches_type(Optional[RocketLoaderEditResponse], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +171,7 @@ class TestAsyncRocketLoader: 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[RocketLoaderEditResponse], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +187,7 @@ class TestAsyncRocketLoader: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rocket_loader = await response.parse() - assert_matches_type(Optional[RocketLoaderEditResponse], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) assert cast(Any, response.is_closed) is True @@ -209,7 +209,7 @@ class TestAsyncRocketLoader: rocket_loader = await async_client.zones.settings.rocket_loader.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[RocketLoaderGetResponse], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -221,7 +221,7 @@ class TestAsyncRocketLoader: 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[RocketLoaderGetResponse], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -233,7 +233,7 @@ class TestAsyncRocketLoader: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rocket_loader = await response.parse() - assert_matches_type(Optional[RocketLoaderGetResponse], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZonesRocketLoader], 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 99bdf76cc..e01e02833 100644 --- a/tests/api_resources/zones/settings/test_security_headers.py +++ b/tests/api_resources/zones/settings/test_security_headers.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - SecurityHeaderGetResponse, - SecurityHeaderEditResponse, -) +from cloudflare.types.zones.settings import ZonesSecurityHeader base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestSecurityHeaders: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value={}, ) - assert_matches_type(Optional[SecurityHeaderEditResponse], security_header, path=["response"]) + assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -43,7 +40,7 @@ class TestSecurityHeaders: } }, ) - assert_matches_type(Optional[SecurityHeaderEditResponse], security_header, path=["response"]) + assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +53,7 @@ class TestSecurityHeaders: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" security_header = response.parse() - assert_matches_type(Optional[SecurityHeaderEditResponse], security_header, path=["response"]) + assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -69,7 +66,7 @@ class TestSecurityHeaders: assert response.http_request.headers.get("X-Stainless-Lang") == "python" security_header = response.parse() - assert_matches_type(Optional[SecurityHeaderEditResponse], security_header, path=["response"]) + assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) assert cast(Any, response.is_closed) is True @@ -88,7 +85,7 @@ class TestSecurityHeaders: security_header = client.zones.settings.security_headers.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SecurityHeaderGetResponse], security_header, path=["response"]) + assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -100,7 +97,7 @@ class TestSecurityHeaders: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" security_header = response.parse() - assert_matches_type(Optional[SecurityHeaderGetResponse], security_header, path=["response"]) + assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -112,7 +109,7 @@ class TestSecurityHeaders: assert response.http_request.headers.get("X-Stainless-Lang") == "python" security_header = response.parse() - assert_matches_type(Optional[SecurityHeaderGetResponse], security_header, path=["response"]) + assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) assert cast(Any, response.is_closed) is True @@ -135,7 +132,7 @@ class TestAsyncSecurityHeaders: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value={}, ) - assert_matches_type(Optional[SecurityHeaderEditResponse], security_header, path=["response"]) + assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -151,7 +148,7 @@ class TestAsyncSecurityHeaders: } }, ) - assert_matches_type(Optional[SecurityHeaderEditResponse], security_header, path=["response"]) + assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -164,7 +161,7 @@ class TestAsyncSecurityHeaders: 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[SecurityHeaderEditResponse], security_header, path=["response"]) + assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -177,7 +174,7 @@ class TestAsyncSecurityHeaders: assert response.http_request.headers.get("X-Stainless-Lang") == "python" security_header = await response.parse() - assert_matches_type(Optional[SecurityHeaderEditResponse], security_header, path=["response"]) + assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) assert cast(Any, response.is_closed) is True @@ -196,7 +193,7 @@ class TestAsyncSecurityHeaders: security_header = await async_client.zones.settings.security_headers.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SecurityHeaderGetResponse], security_header, path=["response"]) + assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -208,7 +205,7 @@ class TestAsyncSecurityHeaders: 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[SecurityHeaderGetResponse], security_header, path=["response"]) + assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -220,7 +217,7 @@ class TestAsyncSecurityHeaders: assert response.http_request.headers.get("X-Stainless-Lang") == "python" security_header = await response.parse() - assert_matches_type(Optional[SecurityHeaderGetResponse], security_header, path=["response"]) + assert_matches_type(Optional[ZonesSecurityHeader], 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 87b4191b8..9671b9a23 100644 --- a/tests/api_resources/zones/settings/test_security_level.py +++ b/tests/api_resources/zones/settings/test_security_level.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - SecurityLevelGetResponse, - SecurityLevelEditResponse, -) +from cloudflare.types.zones.settings import ZonesSecurityLevel base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestSecurityLevel: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[SecurityLevelEditResponse], security_level, path=["response"]) + assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +37,7 @@ class TestSecurityLevel: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" security_level = response.parse() - assert_matches_type(Optional[SecurityLevelEditResponse], security_level, path=["response"]) + assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +50,7 @@ class TestSecurityLevel: assert response.http_request.headers.get("X-Stainless-Lang") == "python" security_level = response.parse() - assert_matches_type(Optional[SecurityLevelEditResponse], security_level, path=["response"]) + assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) assert cast(Any, response.is_closed) is True @@ -72,7 +69,7 @@ class TestSecurityLevel: security_level = client.zones.settings.security_level.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SecurityLevelGetResponse], security_level, path=["response"]) + assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +81,7 @@ class TestSecurityLevel: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" security_level = response.parse() - assert_matches_type(Optional[SecurityLevelGetResponse], security_level, path=["response"]) + assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestSecurityLevel: assert response.http_request.headers.get("X-Stainless-Lang") == "python" security_level = response.parse() - assert_matches_type(Optional[SecurityLevelGetResponse], security_level, path=["response"]) + assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) assert cast(Any, response.is_closed) is True @@ -119,7 +116,7 @@ class TestAsyncSecurityLevel: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[SecurityLevelEditResponse], security_level, path=["response"]) + assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +129,7 @@ class TestAsyncSecurityLevel: 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[SecurityLevelEditResponse], security_level, path=["response"]) + assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +142,7 @@ class TestAsyncSecurityLevel: assert response.http_request.headers.get("X-Stainless-Lang") == "python" security_level = await response.parse() - assert_matches_type(Optional[SecurityLevelEditResponse], security_level, path=["response"]) + assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) assert cast(Any, response.is_closed) is True @@ -164,7 +161,7 @@ class TestAsyncSecurityLevel: security_level = await async_client.zones.settings.security_level.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SecurityLevelGetResponse], security_level, path=["response"]) + assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +173,7 @@ class TestAsyncSecurityLevel: 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[SecurityLevelGetResponse], security_level, path=["response"]) + assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +185,7 @@ class TestAsyncSecurityLevel: assert response.http_request.headers.get("X-Stainless-Lang") == "python" security_level = await response.parse() - assert_matches_type(Optional[SecurityLevelGetResponse], security_level, path=["response"]) + assert_matches_type(Optional[ZonesSecurityLevel], 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 e130d8bbc..ad0d2a51c 100644 --- a/tests/api_resources/zones/settings/test_server_side_excludes.py +++ b/tests/api_resources/zones/settings/test_server_side_excludes.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - ServerSideExcludeGetResponse, - ServerSideExcludeEditResponse, -) +from cloudflare.types.zones.settings import ZonesServerSideExclude base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestServerSideExcludes: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ServerSideExcludeEditResponse], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +37,7 @@ class TestServerSideExcludes: 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[ServerSideExcludeEditResponse], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +50,7 @@ class TestServerSideExcludes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" server_side_exclude = response.parse() - assert_matches_type(Optional[ServerSideExcludeEditResponse], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) assert cast(Any, response.is_closed) is True @@ -72,7 +69,7 @@ class TestServerSideExcludes: server_side_exclude = client.zones.settings.server_side_excludes.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ServerSideExcludeGetResponse], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +81,7 @@ class TestServerSideExcludes: 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[ServerSideExcludeGetResponse], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestServerSideExcludes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" server_side_exclude = response.parse() - assert_matches_type(Optional[ServerSideExcludeGetResponse], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) assert cast(Any, response.is_closed) is True @@ -119,7 +116,7 @@ class TestAsyncServerSideExcludes: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ServerSideExcludeEditResponse], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +129,7 @@ class TestAsyncServerSideExcludes: 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[ServerSideExcludeEditResponse], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +142,7 @@ class TestAsyncServerSideExcludes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" server_side_exclude = await response.parse() - assert_matches_type(Optional[ServerSideExcludeEditResponse], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) assert cast(Any, response.is_closed) is True @@ -164,7 +161,7 @@ class TestAsyncServerSideExcludes: server_side_exclude = await async_client.zones.settings.server_side_excludes.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ServerSideExcludeGetResponse], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +173,7 @@ class TestAsyncServerSideExcludes: 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[ServerSideExcludeGetResponse], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +185,7 @@ class TestAsyncServerSideExcludes: assert response.http_request.headers.get("X-Stainless-Lang") == "python" server_side_exclude = await response.parse() - assert_matches_type(Optional[ServerSideExcludeGetResponse], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZonesServerSideExclude], 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 0c0bab51e..aae572dc1 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,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - SortQueryStringForCacheGetResponse, - SortQueryStringForCacheEditResponse, -) +from cloudflare.types.zones.settings import ZonesSortQueryStringForCache base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,9 +24,7 @@ class TestSortQueryStringForCache: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type( - Optional[SortQueryStringForCacheEditResponse], sort_query_string_for_cache, path=["response"] - ) + assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,9 +37,7 @@ class TestSortQueryStringForCache: 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[SortQueryStringForCacheEditResponse], sort_query_string_for_cache, path=["response"] - ) + assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) @pytest.mark.skip() @parametrize @@ -57,9 +50,7 @@ class TestSortQueryStringForCache: assert response.http_request.headers.get("X-Stainless-Lang") == "python" sort_query_string_for_cache = response.parse() - assert_matches_type( - Optional[SortQueryStringForCacheEditResponse], sort_query_string_for_cache, path=["response"] - ) + assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) assert cast(Any, response.is_closed) is True @@ -78,9 +69,7 @@ class TestSortQueryStringForCache: sort_query_string_for_cache = client.zones.settings.sort_query_string_for_cache.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type( - Optional[SortQueryStringForCacheGetResponse], sort_query_string_for_cache, path=["response"] - ) + assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) @pytest.mark.skip() @parametrize @@ -92,9 +81,7 @@ class TestSortQueryStringForCache: 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[SortQueryStringForCacheGetResponse], sort_query_string_for_cache, path=["response"] - ) + assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,9 +93,7 @@ class TestSortQueryStringForCache: assert response.http_request.headers.get("X-Stainless-Lang") == "python" sort_query_string_for_cache = response.parse() - assert_matches_type( - Optional[SortQueryStringForCacheGetResponse], sort_query_string_for_cache, path=["response"] - ) + assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) assert cast(Any, response.is_closed) is True @@ -131,9 +116,7 @@ class TestAsyncSortQueryStringForCache: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type( - Optional[SortQueryStringForCacheEditResponse], sort_query_string_for_cache, path=["response"] - ) + assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) @pytest.mark.skip() @parametrize @@ -146,9 +129,7 @@ class TestAsyncSortQueryStringForCache: 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[SortQueryStringForCacheEditResponse], sort_query_string_for_cache, path=["response"] - ) + assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) @pytest.mark.skip() @parametrize @@ -161,9 +142,7 @@ class TestAsyncSortQueryStringForCache: assert response.http_request.headers.get("X-Stainless-Lang") == "python" sort_query_string_for_cache = await response.parse() - assert_matches_type( - Optional[SortQueryStringForCacheEditResponse], sort_query_string_for_cache, path=["response"] - ) + assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) assert cast(Any, response.is_closed) is True @@ -182,9 +161,7 @@ class TestAsyncSortQueryStringForCache: sort_query_string_for_cache = await async_client.zones.settings.sort_query_string_for_cache.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type( - Optional[SortQueryStringForCacheGetResponse], sort_query_string_for_cache, path=["response"] - ) + assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) @pytest.mark.skip() @parametrize @@ -196,9 +173,7 @@ class TestAsyncSortQueryStringForCache: 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[SortQueryStringForCacheGetResponse], sort_query_string_for_cache, path=["response"] - ) + assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) @pytest.mark.skip() @parametrize @@ -210,9 +185,7 @@ class TestAsyncSortQueryStringForCache: assert response.http_request.headers.get("X-Stainless-Lang") == "python" sort_query_string_for_cache = await response.parse() - assert_matches_type( - Optional[SortQueryStringForCacheGetResponse], sort_query_string_for_cache, path=["response"] - ) + assert_matches_type(Optional[ZonesSortQueryStringForCache], 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 b0232b99b..9af2639cb 100644 --- a/tests/api_resources/zones/settings/test_ssl.py +++ b/tests/api_resources/zones/settings/test_ssl.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import SSLGetResponse, SSLEditResponse +from cloudflare.types.zones.settings import ZonesSSL base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestSSL: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[SSLEditResponse], ssl, path=["response"]) + assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestSSL: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl = response.parse() - assert_matches_type(Optional[SSLEditResponse], ssl, path=["response"]) + assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestSSL: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl = response.parse() - assert_matches_type(Optional[SSLEditResponse], ssl, path=["response"]) + assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestSSL: ssl = client.zones.settings.ssl.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SSLGetResponse], ssl, path=["response"]) + assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestSSL: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl = response.parse() - assert_matches_type(Optional[SSLGetResponse], ssl, path=["response"]) + assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestSSL: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl = response.parse() - assert_matches_type(Optional[SSLGetResponse], ssl, path=["response"]) + assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncSSL: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[SSLEditResponse], ssl, path=["response"]) + assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncSSL: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl = await response.parse() - assert_matches_type(Optional[SSLEditResponse], ssl, path=["response"]) + assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncSSL: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl = await response.parse() - assert_matches_type(Optional[SSLEditResponse], ssl, path=["response"]) + assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncSSL: ssl = await async_client.zones.settings.ssl.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SSLGetResponse], ssl, path=["response"]) + assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncSSL: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl = await response.parse() - assert_matches_type(Optional[SSLGetResponse], ssl, path=["response"]) + assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncSSL: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl = await response.parse() - assert_matches_type(Optional[SSLGetResponse], ssl, path=["response"]) + assert_matches_type(Optional[ZonesSSL], 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 dceaa5461..f12569960 100644 --- a/tests/api_resources/zones/settings/test_ssl_recommender.py +++ b/tests/api_resources/zones/settings/test_ssl_recommender.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - SSLRecommenderGetResponse, - SSLRecommenderEditResponse, -) +from cloudflare.types.zones.settings import ZonesSSLRecommender base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestSSLRecommender: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value={}, ) - assert_matches_type(Optional[SSLRecommenderEditResponse], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +36,7 @@ class TestSSLRecommender: "id": "ssl_recommender", }, ) - assert_matches_type(Optional[SSLRecommenderEditResponse], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -52,7 +49,7 @@ class TestSSLRecommender: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl_recommender = response.parse() - assert_matches_type(Optional[SSLRecommenderEditResponse], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -65,7 +62,7 @@ class TestSSLRecommender: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl_recommender = response.parse() - assert_matches_type(Optional[SSLRecommenderEditResponse], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) assert cast(Any, response.is_closed) is True @@ -84,7 +81,7 @@ class TestSSLRecommender: ssl_recommender = client.zones.settings.ssl_recommender.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SSLRecommenderGetResponse], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestSSLRecommender: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl_recommender = response.parse() - assert_matches_type(Optional[SSLRecommenderGetResponse], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -108,7 +105,7 @@ class TestSSLRecommender: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl_recommender = response.parse() - assert_matches_type(Optional[SSLRecommenderGetResponse], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) assert cast(Any, response.is_closed) is True @@ -131,7 +128,7 @@ class TestAsyncSSLRecommender: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value={}, ) - assert_matches_type(Optional[SSLRecommenderEditResponse], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -143,7 +140,7 @@ class TestAsyncSSLRecommender: "id": "ssl_recommender", }, ) - assert_matches_type(Optional[SSLRecommenderEditResponse], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -156,7 +153,7 @@ class TestAsyncSSLRecommender: 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[SSLRecommenderEditResponse], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -169,7 +166,7 @@ class TestAsyncSSLRecommender: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl_recommender = await response.parse() - assert_matches_type(Optional[SSLRecommenderEditResponse], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) assert cast(Any, response.is_closed) is True @@ -188,7 +185,7 @@ class TestAsyncSSLRecommender: ssl_recommender = await async_client.zones.settings.ssl_recommender.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SSLRecommenderGetResponse], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -200,7 +197,7 @@ class TestAsyncSSLRecommender: 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[SSLRecommenderGetResponse], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -212,7 +209,7 @@ class TestAsyncSSLRecommender: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl_recommender = await response.parse() - assert_matches_type(Optional[SSLRecommenderGetResponse], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZonesSSLRecommender], 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 cd11f3b9a..ba20c6aef 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import TLS1_3GetResponse, TLS1_3EditResponse +from cloudflare.types.zones.settings import ZonesTLS1_3 base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestTLS1_3: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[TLS1_3EditResponse], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestTLS1_3: 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[TLS1_3EditResponse], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestTLS1_3: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls_1_3 = response.parse() - assert_matches_type(Optional[TLS1_3EditResponse], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestTLS1_3: tls_1_3 = client.zones.settings.tls_1_3.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[TLS1_3GetResponse], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestTLS1_3: 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[TLS1_3GetResponse], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestTLS1_3: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls_1_3 = response.parse() - assert_matches_type(Optional[TLS1_3GetResponse], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncTLS1_3: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[TLS1_3EditResponse], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncTLS1_3: 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[TLS1_3EditResponse], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncTLS1_3: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls_1_3 = await response.parse() - assert_matches_type(Optional[TLS1_3EditResponse], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncTLS1_3: tls_1_3 = await async_client.zones.settings.tls_1_3.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[TLS1_3GetResponse], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncTLS1_3: 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[TLS1_3GetResponse], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncTLS1_3: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls_1_3 = await response.parse() - assert_matches_type(Optional[TLS1_3GetResponse], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZonesTLS1_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 f34cfd051..a57bd1cf2 100644 --- a/tests/api_resources/zones/settings/test_tls_client_auth.py +++ b/tests/api_resources/zones/settings/test_tls_client_auth.py @@ -9,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - TLSClientAuthGetResponse, - TLSClientAuthEditResponse, -) +from cloudflare.types.zones.settings import ZonesTLSClientAuth base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestTLSClientAuth: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[TLSClientAuthEditResponse], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +37,7 @@ class TestTLSClientAuth: 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[TLSClientAuthEditResponse], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +50,7 @@ class TestTLSClientAuth: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls_client_auth = response.parse() - assert_matches_type(Optional[TLSClientAuthEditResponse], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) assert cast(Any, response.is_closed) is True @@ -72,7 +69,7 @@ class TestTLSClientAuth: tls_client_auth = client.zones.settings.tls_client_auth.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[TLSClientAuthGetResponse], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +81,7 @@ class TestTLSClientAuth: 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[TLSClientAuthGetResponse], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestTLSClientAuth: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls_client_auth = response.parse() - assert_matches_type(Optional[TLSClientAuthGetResponse], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) assert cast(Any, response.is_closed) is True @@ -119,7 +116,7 @@ class TestAsyncTLSClientAuth: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[TLSClientAuthEditResponse], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +129,7 @@ class TestAsyncTLSClientAuth: 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[TLSClientAuthEditResponse], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +142,7 @@ class TestAsyncTLSClientAuth: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls_client_auth = await response.parse() - assert_matches_type(Optional[TLSClientAuthEditResponse], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) assert cast(Any, response.is_closed) is True @@ -164,7 +161,7 @@ class TestAsyncTLSClientAuth: tls_client_auth = await async_client.zones.settings.tls_client_auth.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[TLSClientAuthGetResponse], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +173,7 @@ class TestAsyncTLSClientAuth: 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[TLSClientAuthGetResponse], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +185,7 @@ class TestAsyncTLSClientAuth: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls_client_auth = await response.parse() - assert_matches_type(Optional[TLSClientAuthGetResponse], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZonesTLSClientAuth], 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 5bf88632d..241b75363 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,10 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ( - TrueClientIPHeaderGetResponse, - TrueClientIPHeaderEditResponse, -) +from cloudflare.types.zones.settings import ZonesTrueClientIPHeader base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ class TestTrueClientIPHeader: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[TrueClientIPHeaderEditResponse], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +37,7 @@ class TestTrueClientIPHeader: 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[TrueClientIPHeaderEditResponse], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +50,7 @@ class TestTrueClientIPHeader: assert response.http_request.headers.get("X-Stainless-Lang") == "python" true_client_ip_header = response.parse() - assert_matches_type(Optional[TrueClientIPHeaderEditResponse], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) assert cast(Any, response.is_closed) is True @@ -72,7 +69,7 @@ class TestTrueClientIPHeader: true_client_ip_header = client.zones.settings.true_client_ip_header.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[TrueClientIPHeaderGetResponse], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +81,7 @@ class TestTrueClientIPHeader: 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[TrueClientIPHeaderGetResponse], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +93,7 @@ class TestTrueClientIPHeader: assert response.http_request.headers.get("X-Stainless-Lang") == "python" true_client_ip_header = response.parse() - assert_matches_type(Optional[TrueClientIPHeaderGetResponse], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) assert cast(Any, response.is_closed) is True @@ -119,7 +116,7 @@ class TestAsyncTrueClientIPHeader: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[TrueClientIPHeaderEditResponse], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +129,7 @@ class TestAsyncTrueClientIPHeader: 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[TrueClientIPHeaderEditResponse], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +142,7 @@ class TestAsyncTrueClientIPHeader: assert response.http_request.headers.get("X-Stainless-Lang") == "python" true_client_ip_header = await response.parse() - assert_matches_type(Optional[TrueClientIPHeaderEditResponse], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) assert cast(Any, response.is_closed) is True @@ -164,7 +161,7 @@ class TestAsyncTrueClientIPHeader: true_client_ip_header = await async_client.zones.settings.true_client_ip_header.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[TrueClientIPHeaderGetResponse], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +173,7 @@ class TestAsyncTrueClientIPHeader: 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[TrueClientIPHeaderGetResponse], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +185,7 @@ class TestAsyncTrueClientIPHeader: assert response.http_request.headers.get("X-Stainless-Lang") == "python" true_client_ip_header = await response.parse() - assert_matches_type(Optional[TrueClientIPHeaderGetResponse], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZonesTrueClientIPHeader], 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 4cbbeffb2..de0690e4e 100644 --- a/tests/api_resources/zones/settings/test_waf.py +++ b/tests/api_resources/zones/settings/test_waf.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import WAFGetResponse, WAFEditResponse +from cloudflare.types.zones.settings import ZonesWAF base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestWAF: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[WAFEditResponse], waf, path=["response"]) + assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestWAF: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" waf = response.parse() - assert_matches_type(Optional[WAFEditResponse], waf, path=["response"]) + assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestWAF: assert response.http_request.headers.get("X-Stainless-Lang") == "python" waf = response.parse() - assert_matches_type(Optional[WAFEditResponse], waf, path=["response"]) + assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestWAF: waf = client.zones.settings.waf.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[WAFGetResponse], waf, path=["response"]) + assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestWAF: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" waf = response.parse() - assert_matches_type(Optional[WAFGetResponse], waf, path=["response"]) + assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestWAF: assert response.http_request.headers.get("X-Stainless-Lang") == "python" waf = response.parse() - assert_matches_type(Optional[WAFGetResponse], waf, path=["response"]) + assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncWAF: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[WAFEditResponse], waf, path=["response"]) + assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncWAF: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" waf = await response.parse() - assert_matches_type(Optional[WAFEditResponse], waf, path=["response"]) + assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncWAF: assert response.http_request.headers.get("X-Stainless-Lang") == "python" waf = await response.parse() - assert_matches_type(Optional[WAFEditResponse], waf, path=["response"]) + assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncWAF: waf = await async_client.zones.settings.waf.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[WAFGetResponse], waf, path=["response"]) + assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncWAF: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" waf = await response.parse() - assert_matches_type(Optional[WAFGetResponse], waf, path=["response"]) + assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncWAF: assert response.http_request.headers.get("X-Stainless-Lang") == "python" waf = await response.parse() - assert_matches_type(Optional[WAFGetResponse], waf, path=["response"]) + assert_matches_type(Optional[ZonesWAF], 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 82773cb28..a900adf4d 100644 --- a/tests/api_resources/zones/settings/test_webp.py +++ b/tests/api_resources/zones/settings/test_webp.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import WebpGetResponse, WebpEditResponse +from cloudflare.types.zones.settings import ZonesWebp base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestWebp: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[WebpEditResponse], webp, path=["response"]) + assert_matches_type(Optional[ZonesWebp], webp, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestWebp: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" webp = response.parse() - assert_matches_type(Optional[WebpEditResponse], webp, path=["response"]) + assert_matches_type(Optional[ZonesWebp], webp, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestWebp: assert response.http_request.headers.get("X-Stainless-Lang") == "python" webp = response.parse() - assert_matches_type(Optional[WebpEditResponse], webp, path=["response"]) + assert_matches_type(Optional[ZonesWebp], webp, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestWebp: webp = client.zones.settings.webp.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[WebpGetResponse], webp, path=["response"]) + assert_matches_type(Optional[ZonesWebp], webp, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestWebp: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" webp = response.parse() - assert_matches_type(Optional[WebpGetResponse], webp, path=["response"]) + assert_matches_type(Optional[ZonesWebp], webp, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestWebp: assert response.http_request.headers.get("X-Stainless-Lang") == "python" webp = response.parse() - assert_matches_type(Optional[WebpGetResponse], webp, path=["response"]) + assert_matches_type(Optional[ZonesWebp], webp, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncWebp: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[WebpEditResponse], webp, path=["response"]) + assert_matches_type(Optional[ZonesWebp], webp, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncWebp: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" webp = await response.parse() - assert_matches_type(Optional[WebpEditResponse], webp, path=["response"]) + assert_matches_type(Optional[ZonesWebp], webp, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncWebp: assert response.http_request.headers.get("X-Stainless-Lang") == "python" webp = await response.parse() - assert_matches_type(Optional[WebpEditResponse], webp, path=["response"]) + assert_matches_type(Optional[ZonesWebp], webp, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncWebp: webp = await async_client.zones.settings.webp.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[WebpGetResponse], webp, path=["response"]) + assert_matches_type(Optional[ZonesWebp], webp, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncWebp: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" webp = await response.parse() - assert_matches_type(Optional[WebpGetResponse], webp, path=["response"]) + assert_matches_type(Optional[ZonesWebp], webp, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncWebp: assert response.http_request.headers.get("X-Stainless-Lang") == "python" webp = await response.parse() - assert_matches_type(Optional[WebpGetResponse], webp, path=["response"]) + assert_matches_type(Optional[ZonesWebp], 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 def8b63d6..eba1d3923 100644 --- a/tests/api_resources/zones/settings/test_websocket.py +++ b/tests/api_resources/zones/settings/test_websocket.py @@ -9,7 +9,7 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import WebsocketGetResponse, WebsocketEditResponse +from cloudflare.types.zones.settings import ZonesWebsockets base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestWebsocket: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[WebsocketEditResponse], websocket, path=["response"]) + assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestWebsocket: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" websocket = response.parse() - assert_matches_type(Optional[WebsocketEditResponse], websocket, path=["response"]) + assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestWebsocket: assert response.http_request.headers.get("X-Stainless-Lang") == "python" websocket = response.parse() - assert_matches_type(Optional[WebsocketEditResponse], websocket, path=["response"]) + assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestWebsocket: websocket = client.zones.settings.websocket.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[WebsocketGetResponse], websocket, path=["response"]) + assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestWebsocket: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" websocket = response.parse() - assert_matches_type(Optional[WebsocketGetResponse], websocket, path=["response"]) + assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestWebsocket: assert response.http_request.headers.get("X-Stainless-Lang") == "python" websocket = response.parse() - assert_matches_type(Optional[WebsocketGetResponse], websocket, path=["response"]) + assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncWebsocket: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[WebsocketEditResponse], websocket, path=["response"]) + assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncWebsocket: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" websocket = await response.parse() - assert_matches_type(Optional[WebsocketEditResponse], websocket, path=["response"]) + assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncWebsocket: assert response.http_request.headers.get("X-Stainless-Lang") == "python" websocket = await response.parse() - assert_matches_type(Optional[WebsocketEditResponse], websocket, path=["response"]) + assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncWebsocket: websocket = await async_client.zones.settings.websocket.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[WebsocketGetResponse], websocket, path=["response"]) + assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncWebsocket: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" websocket = await response.parse() - assert_matches_type(Optional[WebsocketGetResponse], websocket, path=["response"]) + assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncWebsocket: assert response.http_request.headers.get("X-Stainless-Lang") == "python" websocket = await response.parse() - assert_matches_type(Optional[WebsocketGetResponse], websocket, path=["response"]) + assert_matches_type(Optional[ZonesWebsockets], 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 ef49d3d30..845c2f751 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 @@ import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZeroRTTGetResponse, ZeroRTTEditResponse +from cloudflare.types.zones.settings import Zones0rtt base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ class TestZeroRTT: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZeroRTTEditResponse], zero_rtt, path=["response"]) + assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ class TestZeroRTT: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" zero_rtt = response.parse() - assert_matches_type(Optional[ZeroRTTEditResponse], zero_rtt, path=["response"]) + assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ class TestZeroRTT: assert response.http_request.headers.get("X-Stainless-Lang") == "python" zero_rtt = response.parse() - assert_matches_type(Optional[ZeroRTTEditResponse], zero_rtt, path=["response"]) + assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ class TestZeroRTT: zero_rtt = client.zones.settings.zero_rtt.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZeroRTTGetResponse], zero_rtt, path=["response"]) + assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ class TestZeroRTT: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" zero_rtt = response.parse() - assert_matches_type(Optional[ZeroRTTGetResponse], zero_rtt, path=["response"]) + assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ class TestZeroRTT: assert response.http_request.headers.get("X-Stainless-Lang") == "python" zero_rtt = response.parse() - assert_matches_type(Optional[ZeroRTTGetResponse], zero_rtt, path=["response"]) + assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ class TestAsyncZeroRTT: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZeroRTTEditResponse], zero_rtt, path=["response"]) + assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ class TestAsyncZeroRTT: 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[ZeroRTTEditResponse], zero_rtt, path=["response"]) + assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ class TestAsyncZeroRTT: assert response.http_request.headers.get("X-Stainless-Lang") == "python" zero_rtt = await response.parse() - assert_matches_type(Optional[ZeroRTTEditResponse], zero_rtt, path=["response"]) + assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ class TestAsyncZeroRTT: zero_rtt = await async_client.zones.settings.zero_rtt.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZeroRTTGetResponse], zero_rtt, path=["response"]) + assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ class TestAsyncZeroRTT: 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[ZeroRTTGetResponse], zero_rtt, path=["response"]) + assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +185,7 @@ class TestAsyncZeroRTT: assert response.http_request.headers.get("X-Stainless-Lang") == "python" zero_rtt = await response.parse() - assert_matches_type(Optional[ZeroRTTGetResponse], zero_rtt, path=["response"]) + assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) assert cast(Any, response.is_closed) is True