From f9b879a727349e6604c3ae88c7949c388d655766 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 08:29:05 +0000 Subject: [PATCH 001/124] feat(api): OpenAPI spec update via Stainless API (#1014) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b45dbe1d84d..4a8cb087804 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-49d54760f87326f9200c777f867e4ea579c92a43f481207ae252db9748c9b07b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9d1a5f2de8e753867ab88ca1b88d1d1cdc944a7834fb81506a7ace10ed151624.yml From b762e85608f579b5b3a69a8a6ee948857b7f605d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 08:54:34 +0000 Subject: [PATCH 002/124] feat(api): OpenAPI spec update via Stainless API (#1016) --- .stats.yml | 2 +- api.md | 2 +- .../resources/radar/attacks/layer3/top/top.py | 10 +++++++++ .../resources/radar/attacks/layer7/top/top.py | 10 +++++++++ src/cloudflare/resources/radar/datasets.py | 22 ++++--------------- .../resources/radar/ranking/domain.py | 6 ++--- .../resources/radar/ranking/ranking.py | 6 ++--- src/cloudflare/types/radar/__init__.py | 1 - .../radar/as112/summary_dnssec_response.py | 2 +- .../radar/as112/summary_edns_response.py | 2 +- .../as112/summary_ip_version_response.py | 2 +- .../radar/as112/summary_protocol_response.py | 2 +- .../as112/summary_query_type_response.py | 2 +- .../as112/summary_response_codes_response.py | 2 +- .../types/radar/as112/top_dnssec_response.py | 2 +- .../types/radar/as112/top_edns_response.py | 2 +- .../radar/as112/top_ip_version_response.py | 2 +- .../radar/as112/top_locations_response.py | 2 +- .../types/radar/as112_timeseries_response.py | 2 +- .../layer3/summary_bitrate_response.py | 2 +- .../layer3/summary_duration_response.py | 2 +- .../attacks/layer3/summary_get_response.py | 2 +- .../layer3/summary_ip_version_response.py | 2 +- .../layer3/summary_protocol_response.py | 2 +- .../attacks/layer3/summary_vector_response.py | 2 +- .../layer3/timeseries_group_get_response.py | 2 +- .../layer3/top/location_origin_response.py | 2 +- .../layer3/top/location_target_response.py | 2 +- .../attacks/layer3/top_attacks_params.py | 7 ++++++ .../attacks/layer3/top_attacks_response.py | 2 +- .../attacks/layer3/top_industry_response.py | 2 +- .../attacks/layer3/top_vertical_response.py | 2 +- .../attacks/layer7/summary_get_response.py | 2 +- .../layer7/summary_http_method_response.py | 2 +- .../layer7/summary_http_version_response.py | 2 +- .../layer7/summary_ip_version_response.py | 2 +- .../layer7/summary_managed_rules_response.py | 2 +- .../summary_mitigation_product_response.py | 2 +- .../layer7/timeseries_group_get_response.py | 2 +- .../attacks/layer7/top/ase_origin_response.py | 2 +- .../layer7/top/location_origin_response.py | 2 +- .../layer7/top/location_target_response.py | 2 +- .../attacks/layer7/top_attacks_params.py | 7 ++++++ .../attacks/layer7/top_attacks_response.py | 2 +- .../attacks/layer7/top_industry_response.py | 2 +- .../attacks/layer7/top_vertical_response.py | 2 +- .../attacks/layer7_timeseries_response.py | 2 +- .../types/radar/bgp/top/ase_get_params.py | 13 +++++++++-- .../types/radar/bgp_timeseries_params.py | 13 +++++++++-- .../types/radar/bgp_timeseries_response.py | 2 +- .../connection_tampering_summary_response.py | 2 +- ...on_tampering_timeseries_groups_response.py | 2 +- .../types/radar/dataset_get_params.py | 13 ----------- .../types/radar/dns/top_ases_response.py | 2 +- .../types/radar/dns/top_locations_response.py | 2 +- .../email/routing/summary_arc_response.py | 2 +- .../email/routing/summary_dkim_response.py | 2 +- .../email/routing/summary_dmarc_response.py | 2 +- .../routing/summary_encrypted_response.py | 2 +- .../routing/summary_ip_version_response.py | 2 +- .../email/routing/summary_spf_response.py | 2 +- .../email/security/summary_arc_response.py | 2 +- .../email/security/summary_dkim_response.py | 2 +- .../email/security/summary_dmarc_response.py | 2 +- .../security/summary_malicious_response.py | 2 +- .../email/security/summary_spam_response.py | 2 +- .../email/security/summary_spf_response.py | 2 +- .../email/security/summary_spoof_response.py | 2 +- .../summary_threat_category_response.py | 2 +- .../security/summary_tls_version_response.py | 2 +- .../email/security/top/tld_get_response.py | 2 +- .../top/tlds/malicious_get_response.py | 2 +- .../security/top/tlds/spam_get_response.py | 2 +- .../security/top/tlds/spoof_get_response.py | 2 +- .../types/radar/http/ase_get_response.py | 2 +- .../radar/http/ases/bot_class_get_response.py | 2 +- .../http/ases/browser_family_get_response.py | 2 +- .../http/ases/device_type_get_response.py | 2 +- .../http/ases/http_method_get_response.py | 2 +- .../http/ases/http_protocol_get_response.py | 2 +- .../http/ases/ip_version_get_response.py | 2 +- .../types/radar/http/ases/os_get_response.py | 2 +- .../http/ases/tls_version_get_response.py | 2 +- .../types/radar/http/location_get_response.py | 2 +- .../http/locations/bot_class_get_response.py | 2 +- .../locations/browser_family_get_response.py | 2 +- .../locations/device_type_get_response.py | 2 +- .../locations/http_method_get_response.py | 2 +- .../locations/http_protocol_get_response.py | 2 +- .../http/locations/ip_version_get_response.py | 2 +- .../radar/http/locations/os_get_response.py | 2 +- .../locations/tls_version_get_response.py | 2 +- .../radar/http/summary_bot_class_response.py | 2 +- .../http/summary_device_type_response.py | 2 +- .../http/summary_http_protocol_response.py | 2 +- .../http/summary_http_version_response.py | 2 +- .../radar/http/summary_ip_version_response.py | 2 +- .../types/radar/http/summary_os_response.py | 2 +- .../http/summary_post_quantum_response.py | 2 +- .../http/summary_tls_version_response.py | 2 +- .../http/top_browser_families_response.py | 2 +- .../types/radar/http/top_browsers_response.py | 2 +- .../types/radar/http_timeseries_response.py | 2 +- .../radar/netflow_timeseries_response.py | 2 +- .../radar/quality/iqi_summary_response.py | 2 +- .../radar/quality/speed/top_ases_response.py | 2 +- .../quality/speed/top_locations_response.py | 2 +- .../radar/quality/speed_summary_response.py | 2 +- .../types/radar/ranking/domain_get_params.py | 4 ++-- .../types/radar/ranking_top_params.py | 4 ++-- .../radar/verified_bots/top_bots_response.py | 2 +- .../verified_bots/top_categories_response.py | 2 +- .../radar/attacks/layer3/test_top.py | 2 ++ .../radar/attacks/layer7/test_top.py | 2 ++ .../api_resources/radar/bgp/top/test_ases.py | 18 ++++++++++----- tests/api_resources/radar/test_bgp.py | 18 ++++++++++----- tests/api_resources/radar/test_datasets.py | 16 -------------- 117 files changed, 197 insertions(+), 173 deletions(-) delete mode 100644 src/cloudflare/types/radar/dataset_get_params.py diff --git a/.stats.yml b/.stats.yml index 4a8cb087804..76fac26c154 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9d1a5f2de8e753867ab88ca1b88d1d1cdc944a7834fb81506a7ace10ed151624.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dfb8d2c58c029167d6eb04131ff40df5631570c1bc49279bc148b2331fa68dee.yml diff --git a/api.md b/api.md index 85216eb6939..98cdf91e9c3 100644 --- a/api.md +++ b/api.md @@ -6561,7 +6561,7 @@ Methods: - client.radar.datasets.list(\*\*params) -> DatasetListResponse - client.radar.datasets.download(\*\*params) -> DatasetDownloadResponse -- client.radar.datasets.get(alias, \*\*params) -> str +- client.radar.datasets.get(alias) -> str ## DNS diff --git a/src/cloudflare/resources/radar/attacks/layer3/top/top.py b/src/cloudflare/resources/radar/attacks/layer3/top/top.py index 984669786f7..42c7224e8d6 100644 --- a/src/cloudflare/resources/radar/attacks/layer3/top/top.py +++ b/src/cloudflare/resources/radar/attacks/layer3/top/top.py @@ -87,6 +87,7 @@ def attacks( limit_per_location: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, + normalization: Literal["PERCENTAGE", "MIN_MAX"] | NotGiven = NOT_GIVEN, protocol: List[Literal["UDP", "TCP", "ICMP", "GRE"]] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -134,6 +135,9 @@ def attacks( name: Array of names that will be used to name the series in responses. + normalization: Normalization method applied. Refer to + [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). + protocol: Array of L3/4 attack types. extra_headers: Send extra headers @@ -164,6 +168,7 @@ def attacks( "limit_per_location": limit_per_location, "location": location, "name": name, + "normalization": normalization, "protocol": protocol, }, top_attacks_params.TopAttacksParams, @@ -428,6 +433,7 @@ async def attacks( limit_per_location: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, + normalization: Literal["PERCENTAGE", "MIN_MAX"] | NotGiven = NOT_GIVEN, protocol: List[Literal["UDP", "TCP", "ICMP", "GRE"]] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -475,6 +481,9 @@ async def attacks( name: Array of names that will be used to name the series in responses. + normalization: Normalization method applied. Refer to + [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). + protocol: Array of L3/4 attack types. extra_headers: Send extra headers @@ -505,6 +514,7 @@ async def attacks( "limit_per_location": limit_per_location, "location": location, "name": name, + "normalization": normalization, "protocol": protocol, }, top_attacks_params.TopAttacksParams, diff --git a/src/cloudflare/resources/radar/attacks/layer7/top/top.py b/src/cloudflare/resources/radar/attacks/layer7/top/top.py index 38429445f3e..7ad637c5f91 100644 --- a/src/cloudflare/resources/radar/attacks/layer7/top/top.py +++ b/src/cloudflare/resources/radar/attacks/layer7/top/top.py @@ -100,6 +100,7 @@ def attacks( location: List[str] | NotGiven = NOT_GIVEN, magnitude: Literal["AFFECTED_ZONES", "MITIGATED_REQUESTS"] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, + normalization: Literal["PERCENTAGE", "MIN_MAX"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -152,6 +153,9 @@ def attacks( name: Array of names that will be used to name the series in responses. + normalization: Normalization method applied. Refer to + [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -181,6 +185,7 @@ def attacks( "location": location, "magnitude": magnitude, "name": name, + "normalization": normalization, }, top_attacks_params.TopAttacksParams, ), @@ -445,6 +450,7 @@ async def attacks( location: List[str] | NotGiven = NOT_GIVEN, magnitude: Literal["AFFECTED_ZONES", "MITIGATED_REQUESTS"] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, + normalization: Literal["PERCENTAGE", "MIN_MAX"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -497,6 +503,9 @@ async def attacks( name: Array of names that will be used to name the series in responses. + normalization: Normalization method applied. Refer to + [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -526,6 +535,7 @@ async def attacks( "location": location, "magnitude": magnitude, "name": name, + "normalization": normalization, }, top_attacks_params.TopAttacksParams, ), diff --git a/src/cloudflare/resources/radar/datasets.py b/src/cloudflare/resources/radar/datasets.py index 021724e8c30..68a0bf3e5f1 100644 --- a/src/cloudflare/resources/radar/datasets.py +++ b/src/cloudflare/resources/radar/datasets.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, cast from typing_extensions import Literal import httpx @@ -21,7 +21,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ...types.radar import dataset_get_params, dataset_list_params, dataset_download_params +from ...types.radar import dataset_list_params, dataset_download_params from ..._base_client import ( make_request_options, ) @@ -139,7 +139,6 @@ def get( self, alias: str, *, - date: Optional[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -156,8 +155,6 @@ def get( Args: alias: Dataset alias or id - date: Filter dataset alias by date - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -172,11 +169,7 @@ def get( return self._get( f"/radar/datasets/{alias}", options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform({"date": date}, dataset_get_params.DatasetGetParams), + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), cast_to=str, ) @@ -290,7 +283,6 @@ async def get( self, alias: str, *, - date: Optional[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -307,8 +299,6 @@ async def get( Args: alias: Dataset alias or id - date: Filter dataset alias by date - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -323,11 +313,7 @@ async def get( return await self._get( f"/radar/datasets/{alias}", options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=await async_maybe_transform({"date": date}, dataset_get_params.DatasetGetParams), + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), cast_to=str, ) diff --git a/src/cloudflare/resources/radar/ranking/domain.py b/src/cloudflare/resources/radar/ranking/domain.py index 19aaa5d8e25..3cc705d7ad6 100644 --- a/src/cloudflare/resources/radar/ranking/domain.py +++ b/src/cloudflare/resources/radar/ranking/domain.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Type, Optional, cast +from typing import List, Type, cast from typing_extensions import Literal import httpx @@ -43,7 +43,7 @@ def get( self, domain: str, *, - date: List[Optional[str]] | NotGiven = NOT_GIVEN, + date: List[str] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, @@ -119,7 +119,7 @@ async def get( self, domain: str, *, - date: List[Optional[str]] | NotGiven = NOT_GIVEN, + date: List[str] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/radar/ranking/ranking.py b/src/cloudflare/resources/radar/ranking/ranking.py index ecabe6a0154..fdbb566b907 100644 --- a/src/cloudflare/resources/radar/ranking/ranking.py +++ b/src/cloudflare/resources/radar/ranking/ranking.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Type, Union, Optional, cast +from typing import List, Type, Union, cast from datetime import datetime from typing_extensions import Literal @@ -153,7 +153,7 @@ def timeseries_groups( def top( self, *, - date: List[Optional[str]] | NotGiven = NOT_GIVEN, + date: List[str] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -331,7 +331,7 @@ async def timeseries_groups( async def top( self, *, - date: List[Optional[str]] | NotGiven = NOT_GIVEN, + date: List[str] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/types/radar/__init__.py b/src/cloudflare/types/radar/__init__.py index cab083c87f6..63e479b1721 100644 --- a/src/cloudflare/types/radar/__init__.py +++ b/src/cloudflare/types/radar/__init__.py @@ -3,7 +3,6 @@ from __future__ import annotations from .entity_get_params import EntityGetParams as EntityGetParams -from .dataset_get_params import DatasetGetParams as DatasetGetParams from .radar_email_series import RadarEmailSeries as RadarEmailSeries from .ranking_top_params import RankingTopParams as RankingTopParams from .dataset_list_params import DatasetListParams as DatasetListParams diff --git a/src/cloudflare/types/radar/as112/summary_dnssec_response.py b/src/cloudflare/types/radar/as112/summary_dnssec_response.py index 1dea9f500ff..b692d28f07f 100644 --- a/src/cloudflare/types/radar/as112/summary_dnssec_response.py +++ b/src/cloudflare/types/radar/as112/summary_dnssec_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/as112/summary_edns_response.py b/src/cloudflare/types/radar/as112/summary_edns_response.py index da899d3649d..48ca7517798 100644 --- a/src/cloudflare/types/radar/as112/summary_edns_response.py +++ b/src/cloudflare/types/radar/as112/summary_edns_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/as112/summary_ip_version_response.py b/src/cloudflare/types/radar/as112/summary_ip_version_response.py index e8515c06e80..6286c80dc1d 100644 --- a/src/cloudflare/types/radar/as112/summary_ip_version_response.py +++ b/src/cloudflare/types/radar/as112/summary_ip_version_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/as112/summary_protocol_response.py b/src/cloudflare/types/radar/as112/summary_protocol_response.py index 3af1df35781..473abd3666c 100644 --- a/src/cloudflare/types/radar/as112/summary_protocol_response.py +++ b/src/cloudflare/types/radar/as112/summary_protocol_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/as112/summary_query_type_response.py b/src/cloudflare/types/radar/as112/summary_query_type_response.py index d302fae8743..d5268d2eb3f 100644 --- a/src/cloudflare/types/radar/as112/summary_query_type_response.py +++ b/src/cloudflare/types/radar/as112/summary_query_type_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/as112/summary_response_codes_response.py b/src/cloudflare/types/radar/as112/summary_response_codes_response.py index 9ee9b90e7d0..9c916f07a98 100644 --- a/src/cloudflare/types/radar/as112/summary_response_codes_response.py +++ b/src/cloudflare/types/radar/as112/summary_response_codes_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/as112/top_dnssec_response.py b/src/cloudflare/types/radar/as112/top_dnssec_response.py index 6896a1eb516..a911d0d50b3 100644 --- a/src/cloudflare/types/radar/as112/top_dnssec_response.py +++ b/src/cloudflare/types/radar/as112/top_dnssec_response.py @@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/as112/top_edns_response.py b/src/cloudflare/types/radar/as112/top_edns_response.py index 88dd69c3350..208c881c579 100644 --- a/src/cloudflare/types/radar/as112/top_edns_response.py +++ b/src/cloudflare/types/radar/as112/top_edns_response.py @@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/as112/top_ip_version_response.py b/src/cloudflare/types/radar/as112/top_ip_version_response.py index 3ca89699881..3b48dfa0ca0 100644 --- a/src/cloudflare/types/radar/as112/top_ip_version_response.py +++ b/src/cloudflare/types/radar/as112/top_ip_version_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/as112/top_locations_response.py b/src/cloudflare/types/radar/as112/top_locations_response.py index ccfeff38397..671c3284576 100644 --- a/src/cloudflare/types/radar/as112/top_locations_response.py +++ b/src/cloudflare/types/radar/as112/top_locations_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/as112_timeseries_response.py b/src/cloudflare/types/radar/as112_timeseries_response.py index 169b4dc6611..3664bedad75 100644 --- a/src/cloudflare/types/radar/as112_timeseries_response.py +++ b/src/cloudflare/types/radar/as112_timeseries_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_bitrate_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_bitrate_response.py index 8669564cff6..b04e158c215 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_bitrate_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_bitrate_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_duration_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_duration_response.py index 648f29c9030..a08fb88a43b 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_duration_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_duration_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_get_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_get_response.py index 1465bcb67d6..e332260ec8e 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_get_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_get_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_ip_version_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_ip_version_response.py index b4f96b8667e..e1a3995c7e5 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_ip_version_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_ip_version_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_protocol_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_protocol_response.py index 1cf176e0a5e..7d749df3a2a 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_protocol_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_protocol_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_vector_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_vector_response.py index 47fb5fed0c0..cf21e355719 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_vector_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_vector_response.py @@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_get_response.py b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_get_response.py index e7bf91ff7a1..ea55dbde517 100644 --- a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_get_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_get_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer3/top/location_origin_response.py b/src/cloudflare/types/radar/attacks/layer3/top/location_origin_response.py index 486e59f89c0..102661bf56a 100644 --- a/src/cloudflare/types/radar/attacks/layer3/top/location_origin_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/top/location_origin_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer3/top/location_target_response.py b/src/cloudflare/types/radar/attacks/layer3/top/location_target_response.py index 781bdd4f4f4..4641eb271e6 100644 --- a/src/cloudflare/types/radar/attacks/layer3/top/location_target_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/top/location_target_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer3/top_attacks_params.py b/src/cloudflare/types/radar/attacks/layer3/top_attacks_params.py index 06f4f3147ac..ca4d349d09a 100644 --- a/src/cloudflare/types/radar/attacks/layer3/top_attacks_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/top_attacks_params.py @@ -85,5 +85,12 @@ class TopAttacksParams(TypedDict, total=False): name: List[str] """Array of names that will be used to name the series in responses.""" + normalization: Literal["PERCENTAGE", "MIN_MAX"] + """Normalization method applied. + + Refer to + [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). + """ + protocol: List[Literal["UDP", "TCP", "ICMP", "GRE"]] """Array of L3/4 attack types.""" diff --git a/src/cloudflare/types/radar/attacks/layer3/top_attacks_response.py b/src/cloudflare/types/radar/attacks/layer3/top_attacks_response.py index 96160d6f724..100bfdc7d49 100644 --- a/src/cloudflare/types/radar/attacks/layer3/top_attacks_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/top_attacks_response.py @@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer3/top_industry_response.py b/src/cloudflare/types/radar/attacks/layer3/top_industry_response.py index 26420c75ec6..01b6e141308 100644 --- a/src/cloudflare/types/radar/attacks/layer3/top_industry_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/top_industry_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer3/top_vertical_response.py b/src/cloudflare/types/radar/attacks/layer3/top_vertical_response.py index 5b236c7c4ae..83a240b3100 100644 --- a/src/cloudflare/types/radar/attacks/layer3/top_vertical_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/top_vertical_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_get_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_get_response.py index 8b65b6328df..3830406025a 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_get_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_get_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_http_method_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_http_method_response.py index 40b3d9de8d0..38203e4eb07 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_http_method_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_http_method_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_http_version_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_http_version_response.py index 6fc2906c230..f78c229daaa 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_http_version_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_http_version_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_ip_version_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_ip_version_response.py index b4f96b8667e..e1a3995c7e5 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_ip_version_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_ip_version_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_response.py index 98285c0015c..c62312dffd7 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_response.py index 2e1ac27eb10..f815da2375a 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_get_response.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_get_response.py index 422b256d9cb..60c8a9d9117 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_get_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_get_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer7/top/ase_origin_response.py b/src/cloudflare/types/radar/attacks/layer7/top/ase_origin_response.py index 10a3c3a5307..7c7bdac68f6 100644 --- a/src/cloudflare/types/radar/attacks/layer7/top/ase_origin_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/top/ase_origin_response.py @@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer7/top/location_origin_response.py b/src/cloudflare/types/radar/attacks/layer7/top/location_origin_response.py index 486e59f89c0..102661bf56a 100644 --- a/src/cloudflare/types/radar/attacks/layer7/top/location_origin_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/top/location_origin_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer7/top/location_target_response.py b/src/cloudflare/types/radar/attacks/layer7/top/location_target_response.py index 781bdd4f4f4..4641eb271e6 100644 --- a/src/cloudflare/types/radar/attacks/layer7/top/location_target_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/top/location_target_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer7/top_attacks_params.py b/src/cloudflare/types/radar/attacks/layer7/top_attacks_params.py index c279092fe73..62ec38abfb3 100644 --- a/src/cloudflare/types/radar/attacks/layer7/top_attacks_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/top_attacks_params.py @@ -94,3 +94,10 @@ class TopAttacksParams(TypedDict, total=False): name: List[str] """Array of names that will be used to name the series in responses.""" + + normalization: Literal["PERCENTAGE", "MIN_MAX"] + """Normalization method applied. + + Refer to + [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). + """ diff --git a/src/cloudflare/types/radar/attacks/layer7/top_attacks_response.py b/src/cloudflare/types/radar/attacks/layer7/top_attacks_response.py index f9824a7d0b8..68577c2c62c 100644 --- a/src/cloudflare/types/radar/attacks/layer7/top_attacks_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/top_attacks_response.py @@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer7/top_industry_response.py b/src/cloudflare/types/radar/attacks/layer7/top_industry_response.py index 26420c75ec6..01b6e141308 100644 --- a/src/cloudflare/types/radar/attacks/layer7/top_industry_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/top_industry_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer7/top_vertical_response.py b/src/cloudflare/types/radar/attacks/layer7/top_vertical_response.py index 5b236c7c4ae..83a240b3100 100644 --- a/src/cloudflare/types/radar/attacks/layer7/top_vertical_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/top_vertical_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/attacks/layer7_timeseries_response.py b/src/cloudflare/types/radar/attacks/layer7_timeseries_response.py index 6cc4c9b2636..355696d9df5 100644 --- a/src/cloudflare/types/radar/attacks/layer7_timeseries_response.py +++ b/src/cloudflare/types/radar/attacks/layer7_timeseries_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/bgp/top/ase_get_params.py b/src/cloudflare/types/radar/bgp/top/ase_get_params.py index f24fe9c65e8..c5ea6aeafaf 100644 --- a/src/cloudflare/types/radar/bgp/top/ase_get_params.py +++ b/src/cloudflare/types/radar/bgp/top/ase_get_params.py @@ -69,10 +69,19 @@ class AseGetParams(TypedDict, total=False): """Array of BGP update types.""" -class Prefix(TypedDict, total=False): - location: Required[str] +_PrefixReservedKeywords = TypedDict( + "_PrefixReservedKeywords", + { + "in": str, + }, + total=False, +) + +class Prefix(_PrefixReservedKeywords, total=False): name: Required[str] + test: Required[float] + type: str """Network prefix, IPv4 or IPv6.""" diff --git a/src/cloudflare/types/radar/bgp_timeseries_params.py b/src/cloudflare/types/radar/bgp_timeseries_params.py index 53697dd7bf2..60be5fc3baf 100644 --- a/src/cloudflare/types/radar/bgp_timeseries_params.py +++ b/src/cloudflare/types/radar/bgp_timeseries_params.py @@ -73,10 +73,19 @@ class BGPTimeseriesParams(TypedDict, total=False): """Array of BGP update types.""" -class Prefix(TypedDict, total=False): - location: Required[str] +_PrefixReservedKeywords = TypedDict( + "_PrefixReservedKeywords", + { + "in": str, + }, + total=False, +) + +class Prefix(_PrefixReservedKeywords, total=False): name: Required[str] + test: Required[float] + type: str """Network prefix, IPv4 or IPv6.""" diff --git a/src/cloudflare/types/radar/bgp_timeseries_response.py b/src/cloudflare/types/radar/bgp_timeseries_response.py index 0d3f009785a..b3ca270daa5 100644 --- a/src/cloudflare/types/radar/bgp_timeseries_response.py +++ b/src/cloudflare/types/radar/bgp_timeseries_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/connection_tampering_summary_response.py b/src/cloudflare/types/radar/connection_tampering_summary_response.py index c2685cd0557..4f093b99de1 100644 --- a/src/cloudflare/types/radar/connection_tampering_summary_response.py +++ b/src/cloudflare/types/radar/connection_tampering_summary_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/connection_tampering_timeseries_groups_response.py b/src/cloudflare/types/radar/connection_tampering_timeseries_groups_response.py index 32bef3b657f..f6aeb05577b 100644 --- a/src/cloudflare/types/radar/connection_tampering_timeseries_groups_response.py +++ b/src/cloudflare/types/radar/connection_tampering_timeseries_groups_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/dataset_get_params.py b/src/cloudflare/types/radar/dataset_get_params.py deleted file mode 100644 index 69de9bfc200..00000000000 --- a/src/cloudflare/types/radar/dataset_get_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Optional -from typing_extensions import TypedDict - -__all__ = ["DatasetGetParams"] - - -class DatasetGetParams(TypedDict, total=False): - date: Optional[str] - """Filter dataset alias by date""" diff --git a/src/cloudflare/types/radar/dns/top_ases_response.py b/src/cloudflare/types/radar/dns/top_ases_response.py index e1094d9a13e..e87c9d659f0 100644 --- a/src/cloudflare/types/radar/dns/top_ases_response.py +++ b/src/cloudflare/types/radar/dns/top_ases_response.py @@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/dns/top_locations_response.py b/src/cloudflare/types/radar/dns/top_locations_response.py index e87ae114cf4..4be71f2a029 100644 --- a/src/cloudflare/types/radar/dns/top_locations_response.py +++ b/src/cloudflare/types/radar/dns/top_locations_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/routing/summary_arc_response.py b/src/cloudflare/types/radar/email/routing/summary_arc_response.py index 7b709e6be09..274e9a535ba 100644 --- a/src/cloudflare/types/radar/email/routing/summary_arc_response.py +++ b/src/cloudflare/types/radar/email/routing/summary_arc_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/routing/summary_dkim_response.py b/src/cloudflare/types/radar/email/routing/summary_dkim_response.py index 3baed82617a..df8a79048cd 100644 --- a/src/cloudflare/types/radar/email/routing/summary_dkim_response.py +++ b/src/cloudflare/types/radar/email/routing/summary_dkim_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/routing/summary_dmarc_response.py b/src/cloudflare/types/radar/email/routing/summary_dmarc_response.py index 311673b6b74..0563a742286 100644 --- a/src/cloudflare/types/radar/email/routing/summary_dmarc_response.py +++ b/src/cloudflare/types/radar/email/routing/summary_dmarc_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/routing/summary_encrypted_response.py b/src/cloudflare/types/radar/email/routing/summary_encrypted_response.py index 61c4957355f..5461181d3de 100644 --- a/src/cloudflare/types/radar/email/routing/summary_encrypted_response.py +++ b/src/cloudflare/types/radar/email/routing/summary_encrypted_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/routing/summary_ip_version_response.py b/src/cloudflare/types/radar/email/routing/summary_ip_version_response.py index b4f96b8667e..e1a3995c7e5 100644 --- a/src/cloudflare/types/radar/email/routing/summary_ip_version_response.py +++ b/src/cloudflare/types/radar/email/routing/summary_ip_version_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/routing/summary_spf_response.py b/src/cloudflare/types/radar/email/routing/summary_spf_response.py index 0c62ac60f1f..9cd062e392f 100644 --- a/src/cloudflare/types/radar/email/routing/summary_spf_response.py +++ b/src/cloudflare/types/radar/email/routing/summary_spf_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/security/summary_arc_response.py b/src/cloudflare/types/radar/email/security/summary_arc_response.py index 7b709e6be09..274e9a535ba 100644 --- a/src/cloudflare/types/radar/email/security/summary_arc_response.py +++ b/src/cloudflare/types/radar/email/security/summary_arc_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/security/summary_dkim_response.py b/src/cloudflare/types/radar/email/security/summary_dkim_response.py index 3baed82617a..df8a79048cd 100644 --- a/src/cloudflare/types/radar/email/security/summary_dkim_response.py +++ b/src/cloudflare/types/radar/email/security/summary_dkim_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/security/summary_dmarc_response.py b/src/cloudflare/types/radar/email/security/summary_dmarc_response.py index 311673b6b74..0563a742286 100644 --- a/src/cloudflare/types/radar/email/security/summary_dmarc_response.py +++ b/src/cloudflare/types/radar/email/security/summary_dmarc_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/security/summary_malicious_response.py b/src/cloudflare/types/radar/email/security/summary_malicious_response.py index 011e9d8e9a3..44426a6e84e 100644 --- a/src/cloudflare/types/radar/email/security/summary_malicious_response.py +++ b/src/cloudflare/types/radar/email/security/summary_malicious_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/security/summary_spam_response.py b/src/cloudflare/types/radar/email/security/summary_spam_response.py index cf8250de214..4fe4f3c5172 100644 --- a/src/cloudflare/types/radar/email/security/summary_spam_response.py +++ b/src/cloudflare/types/radar/email/security/summary_spam_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/security/summary_spf_response.py b/src/cloudflare/types/radar/email/security/summary_spf_response.py index 0c62ac60f1f..9cd062e392f 100644 --- a/src/cloudflare/types/radar/email/security/summary_spf_response.py +++ b/src/cloudflare/types/radar/email/security/summary_spf_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/security/summary_spoof_response.py b/src/cloudflare/types/radar/email/security/summary_spoof_response.py index cd55371280b..b9e738ea0e1 100644 --- a/src/cloudflare/types/radar/email/security/summary_spoof_response.py +++ b/src/cloudflare/types/radar/email/security/summary_spoof_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/security/summary_threat_category_response.py b/src/cloudflare/types/radar/email/security/summary_threat_category_response.py index 0ed00cba9cc..36e2d29bbdf 100644 --- a/src/cloudflare/types/radar/email/security/summary_threat_category_response.py +++ b/src/cloudflare/types/radar/email/security/summary_threat_category_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/security/summary_tls_version_response.py b/src/cloudflare/types/radar/email/security/summary_tls_version_response.py index ad9e0d52245..f9ea5ad0711 100644 --- a/src/cloudflare/types/radar/email/security/summary_tls_version_response.py +++ b/src/cloudflare/types/radar/email/security/summary_tls_version_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/security/top/tld_get_response.py b/src/cloudflare/types/radar/email/security/top/tld_get_response.py index d52b588621e..f9c3e48d916 100644 --- a/src/cloudflare/types/radar/email/security/top/tld_get_response.py +++ b/src/cloudflare/types/radar/email/security/top/tld_get_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/security/top/tlds/malicious_get_response.py b/src/cloudflare/types/radar/email/security/top/tlds/malicious_get_response.py index 715d0bc0f9c..1ad92077064 100644 --- a/src/cloudflare/types/radar/email/security/top/tlds/malicious_get_response.py +++ b/src/cloudflare/types/radar/email/security/top/tlds/malicious_get_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/security/top/tlds/spam_get_response.py b/src/cloudflare/types/radar/email/security/top/tlds/spam_get_response.py index 52a8f700e53..a2bf953b472 100644 --- a/src/cloudflare/types/radar/email/security/top/tlds/spam_get_response.py +++ b/src/cloudflare/types/radar/email/security/top/tlds/spam_get_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/email/security/top/tlds/spoof_get_response.py b/src/cloudflare/types/radar/email/security/top/tlds/spoof_get_response.py index 5c927efe84d..18a319011be 100644 --- a/src/cloudflare/types/radar/email/security/top/tlds/spoof_get_response.py +++ b/src/cloudflare/types/radar/email/security/top/tlds/spoof_get_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/ase_get_response.py b/src/cloudflare/types/radar/http/ase_get_response.py index 8daef594897..a606c25f81c 100644 --- a/src/cloudflare/types/radar/http/ase_get_response.py +++ b/src/cloudflare/types/radar/http/ase_get_response.py @@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/ases/bot_class_get_response.py b/src/cloudflare/types/radar/http/ases/bot_class_get_response.py index f31bfef2e86..c48362beaed 100644 --- a/src/cloudflare/types/radar/http/ases/bot_class_get_response.py +++ b/src/cloudflare/types/radar/http/ases/bot_class_get_response.py @@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/ases/browser_family_get_response.py b/src/cloudflare/types/radar/http/ases/browser_family_get_response.py index e7bd3b48901..f4d2f1fc2be 100644 --- a/src/cloudflare/types/radar/http/ases/browser_family_get_response.py +++ b/src/cloudflare/types/radar/http/ases/browser_family_get_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/ases/device_type_get_response.py b/src/cloudflare/types/radar/http/ases/device_type_get_response.py index f6392b8020c..a619785971d 100644 --- a/src/cloudflare/types/radar/http/ases/device_type_get_response.py +++ b/src/cloudflare/types/radar/http/ases/device_type_get_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/ases/http_method_get_response.py b/src/cloudflare/types/radar/http/ases/http_method_get_response.py index ea15fbf1f95..d4e4622fe36 100644 --- a/src/cloudflare/types/radar/http/ases/http_method_get_response.py +++ b/src/cloudflare/types/radar/http/ases/http_method_get_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/ases/http_protocol_get_response.py b/src/cloudflare/types/radar/http/ases/http_protocol_get_response.py index 14a1768cd08..3552fc7cad0 100644 --- a/src/cloudflare/types/radar/http/ases/http_protocol_get_response.py +++ b/src/cloudflare/types/radar/http/ases/http_protocol_get_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/ases/ip_version_get_response.py b/src/cloudflare/types/radar/http/ases/ip_version_get_response.py index f2af7dd18a2..cb714fbcdf2 100644 --- a/src/cloudflare/types/radar/http/ases/ip_version_get_response.py +++ b/src/cloudflare/types/radar/http/ases/ip_version_get_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/ases/os_get_response.py b/src/cloudflare/types/radar/http/ases/os_get_response.py index 1bbbd47f758..a8777949f24 100644 --- a/src/cloudflare/types/radar/http/ases/os_get_response.py +++ b/src/cloudflare/types/radar/http/ases/os_get_response.py @@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/ases/tls_version_get_response.py b/src/cloudflare/types/radar/http/ases/tls_version_get_response.py index 132880a8088..1ffc7b6c327 100644 --- a/src/cloudflare/types/radar/http/ases/tls_version_get_response.py +++ b/src/cloudflare/types/radar/http/ases/tls_version_get_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/location_get_response.py b/src/cloudflare/types/radar/http/location_get_response.py index fbed118e87d..95a4c526fe3 100644 --- a/src/cloudflare/types/radar/http/location_get_response.py +++ b/src/cloudflare/types/radar/http/location_get_response.py @@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/locations/bot_class_get_response.py b/src/cloudflare/types/radar/http/locations/bot_class_get_response.py index 929152ac6d2..9b7d9f6c23d 100644 --- a/src/cloudflare/types/radar/http/locations/bot_class_get_response.py +++ b/src/cloudflare/types/radar/http/locations/bot_class_get_response.py @@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/locations/browser_family_get_response.py b/src/cloudflare/types/radar/http/locations/browser_family_get_response.py index faa107c1193..5f161c3903e 100644 --- a/src/cloudflare/types/radar/http/locations/browser_family_get_response.py +++ b/src/cloudflare/types/radar/http/locations/browser_family_get_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/locations/device_type_get_response.py b/src/cloudflare/types/radar/http/locations/device_type_get_response.py index fe44c5066f6..ed2f568faad 100644 --- a/src/cloudflare/types/radar/http/locations/device_type_get_response.py +++ b/src/cloudflare/types/radar/http/locations/device_type_get_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/locations/http_method_get_response.py b/src/cloudflare/types/radar/http/locations/http_method_get_response.py index cc7fa8f3096..ed56bfd057f 100644 --- a/src/cloudflare/types/radar/http/locations/http_method_get_response.py +++ b/src/cloudflare/types/radar/http/locations/http_method_get_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/locations/http_protocol_get_response.py b/src/cloudflare/types/radar/http/locations/http_protocol_get_response.py index 487174e2c48..6d9b31aad62 100644 --- a/src/cloudflare/types/radar/http/locations/http_protocol_get_response.py +++ b/src/cloudflare/types/radar/http/locations/http_protocol_get_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/locations/ip_version_get_response.py b/src/cloudflare/types/radar/http/locations/ip_version_get_response.py index 148244ac334..bb30d89b81e 100644 --- a/src/cloudflare/types/radar/http/locations/ip_version_get_response.py +++ b/src/cloudflare/types/radar/http/locations/ip_version_get_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/locations/os_get_response.py b/src/cloudflare/types/radar/http/locations/os_get_response.py index 0696ba3b166..31e24633774 100644 --- a/src/cloudflare/types/radar/http/locations/os_get_response.py +++ b/src/cloudflare/types/radar/http/locations/os_get_response.py @@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/locations/tls_version_get_response.py b/src/cloudflare/types/radar/http/locations/tls_version_get_response.py index 158ddcdffaf..82d4b85eec7 100644 --- a/src/cloudflare/types/radar/http/locations/tls_version_get_response.py +++ b/src/cloudflare/types/radar/http/locations/tls_version_get_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/summary_bot_class_response.py b/src/cloudflare/types/radar/http/summary_bot_class_response.py index 133e6e9b160..d4c5847ae8d 100644 --- a/src/cloudflare/types/radar/http/summary_bot_class_response.py +++ b/src/cloudflare/types/radar/http/summary_bot_class_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/summary_device_type_response.py b/src/cloudflare/types/radar/http/summary_device_type_response.py index b59e448a726..7aa1bbd9fd7 100644 --- a/src/cloudflare/types/radar/http/summary_device_type_response.py +++ b/src/cloudflare/types/radar/http/summary_device_type_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/summary_http_protocol_response.py b/src/cloudflare/types/radar/http/summary_http_protocol_response.py index 5777d29f25d..3ee6ffef02f 100644 --- a/src/cloudflare/types/radar/http/summary_http_protocol_response.py +++ b/src/cloudflare/types/radar/http/summary_http_protocol_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/summary_http_version_response.py b/src/cloudflare/types/radar/http/summary_http_version_response.py index f8c1e4f3f9e..7c3c97a3d57 100644 --- a/src/cloudflare/types/radar/http/summary_http_version_response.py +++ b/src/cloudflare/types/radar/http/summary_http_version_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/summary_ip_version_response.py b/src/cloudflare/types/radar/http/summary_ip_version_response.py index e8515c06e80..6286c80dc1d 100644 --- a/src/cloudflare/types/radar/http/summary_ip_version_response.py +++ b/src/cloudflare/types/radar/http/summary_ip_version_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/summary_os_response.py b/src/cloudflare/types/radar/http/summary_os_response.py index eba9ffc9621..b9737a2dcf9 100644 --- a/src/cloudflare/types/radar/http/summary_os_response.py +++ b/src/cloudflare/types/radar/http/summary_os_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/summary_post_quantum_response.py b/src/cloudflare/types/radar/http/summary_post_quantum_response.py index 5a0ef8618f4..f244b9910b7 100644 --- a/src/cloudflare/types/radar/http/summary_post_quantum_response.py +++ b/src/cloudflare/types/radar/http/summary_post_quantum_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/summary_tls_version_response.py b/src/cloudflare/types/radar/http/summary_tls_version_response.py index 67c78083050..1a8ffeb3e19 100644 --- a/src/cloudflare/types/radar/http/summary_tls_version_response.py +++ b/src/cloudflare/types/radar/http/summary_tls_version_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/top_browser_families_response.py b/src/cloudflare/types/radar/http/top_browser_families_response.py index ca364af9b0a..34575a1c574 100644 --- a/src/cloudflare/types/radar/http/top_browser_families_response.py +++ b/src/cloudflare/types/radar/http/top_browser_families_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http/top_browsers_response.py b/src/cloudflare/types/radar/http/top_browsers_response.py index 587df8db78f..5f75affe2d0 100644 --- a/src/cloudflare/types/radar/http/top_browsers_response.py +++ b/src/cloudflare/types/radar/http/top_browsers_response.py @@ -26,7 +26,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/http_timeseries_response.py b/src/cloudflare/types/radar/http_timeseries_response.py index 00d0b8dada4..6b45e4c117c 100644 --- a/src/cloudflare/types/radar/http_timeseries_response.py +++ b/src/cloudflare/types/radar/http_timeseries_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/netflow_timeseries_response.py b/src/cloudflare/types/radar/netflow_timeseries_response.py index d58a81a7360..99701458c4d 100644 --- a/src/cloudflare/types/radar/netflow_timeseries_response.py +++ b/src/cloudflare/types/radar/netflow_timeseries_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/quality/iqi_summary_response.py b/src/cloudflare/types/radar/quality/iqi_summary_response.py index 9b9c2a25df7..3e241c1ed90 100644 --- a/src/cloudflare/types/radar/quality/iqi_summary_response.py +++ b/src/cloudflare/types/radar/quality/iqi_summary_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/quality/speed/top_ases_response.py b/src/cloudflare/types/radar/quality/speed/top_ases_response.py index 1f6fdf10cac..a67ff9d1ba8 100644 --- a/src/cloudflare/types/radar/quality/speed/top_ases_response.py +++ b/src/cloudflare/types/radar/quality/speed/top_ases_response.py @@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/quality/speed/top_locations_response.py b/src/cloudflare/types/radar/quality/speed/top_locations_response.py index 588ddd56f4d..37420438e16 100644 --- a/src/cloudflare/types/radar/quality/speed/top_locations_response.py +++ b/src/cloudflare/types/radar/quality/speed/top_locations_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/quality/speed_summary_response.py b/src/cloudflare/types/radar/quality/speed_summary_response.py index a549509d36d..af59a84fb16 100644 --- a/src/cloudflare/types/radar/quality/speed_summary_response.py +++ b/src/cloudflare/types/radar/quality/speed_summary_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/ranking/domain_get_params.py b/src/cloudflare/types/radar/ranking/domain_get_params.py index bb013085bb8..98bbbaf27da 100644 --- a/src/cloudflare/types/radar/ranking/domain_get_params.py +++ b/src/cloudflare/types/radar/ranking/domain_get_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Optional +from typing import List from typing_extensions import Literal, Annotated, TypedDict from ...._utils import PropertyInfo @@ -11,7 +11,7 @@ class DomainGetParams(TypedDict, total=False): - date: List[Optional[str]] + date: List[str] """Array of dates to filter the ranking.""" format: Literal["JSON", "CSV"] diff --git a/src/cloudflare/types/radar/ranking_top_params.py b/src/cloudflare/types/radar/ranking_top_params.py index b848aa8b944..e482e6f9f96 100644 --- a/src/cloudflare/types/radar/ranking_top_params.py +++ b/src/cloudflare/types/radar/ranking_top_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Optional +from typing import List from typing_extensions import Literal, Annotated, TypedDict from ..._utils import PropertyInfo @@ -11,7 +11,7 @@ class RankingTopParams(TypedDict, total=False): - date: List[Optional[str]] + date: List[str] """Array of dates to filter the ranking.""" format: Literal["JSON", "CSV"] diff --git a/src/cloudflare/types/radar/verified_bots/top_bots_response.py b/src/cloudflare/types/radar/verified_bots/top_bots_response.py index b75b4174bc9..2e3ffc6a653 100644 --- a/src/cloudflare/types/radar/verified_bots/top_bots_response.py +++ b/src/cloudflare/types/radar/verified_bots/top_bots_response.py @@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/src/cloudflare/types/radar/verified_bots/top_categories_response.py b/src/cloudflare/types/radar/verified_bots/top_categories_response.py index ddc083c00ac..46260e454ca 100644 --- a/src/cloudflare/types/radar/verified_bots/top_categories_response.py +++ b/src/cloudflare/types/radar/verified_bots/top_categories_response.py @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel): event_type: str = FieldInfo(alias="eventType") - is_instantaneous: object = FieldInfo(alias="isInstantaneous") + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None) diff --git a/tests/api_resources/radar/attacks/layer3/test_top.py b/tests/api_resources/radar/attacks/layer3/test_top.py index 6d2d7d36d7c..923af0d31f9 100644 --- a/tests/api_resources/radar/attacks/layer3/test_top.py +++ b/tests/api_resources/radar/attacks/layer3/test_top.py @@ -49,6 +49,7 @@ def test_method_attacks_with_all_params(self, client: Cloudflare) -> None: limit_per_location=10, location=["string", "string", "string"], name=["string", "string", "string"], + normalization="PERCENTAGE", protocol=["UDP", "TCP", "ICMP"], ) assert_matches_type(TopAttacksResponse, top, path=["response"]) @@ -202,6 +203,7 @@ async def test_method_attacks_with_all_params(self, async_client: AsyncCloudflar limit_per_location=10, location=["string", "string", "string"], name=["string", "string", "string"], + normalization="PERCENTAGE", protocol=["UDP", "TCP", "ICMP"], ) assert_matches_type(TopAttacksResponse, top, path=["response"]) diff --git a/tests/api_resources/radar/attacks/layer7/test_top.py b/tests/api_resources/radar/attacks/layer7/test_top.py index edce1b2472a..36016747df4 100644 --- a/tests/api_resources/radar/attacks/layer7/test_top.py +++ b/tests/api_resources/radar/attacks/layer7/test_top.py @@ -50,6 +50,7 @@ def test_method_attacks_with_all_params(self, client: Cloudflare) -> None: location=["string", "string", "string"], magnitude="MITIGATED_REQUESTS", name=["string", "string", "string"], + normalization="PERCENTAGE", ) assert_matches_type(TopAttacksResponse, top, path=["response"]) @@ -201,6 +202,7 @@ async def test_method_attacks_with_all_params(self, async_client: AsyncCloudflar location=["string", "string", "string"], magnitude="MITIGATED_REQUESTS", name=["string", "string", "string"], + normalization="PERCENTAGE", ) assert_matches_type(TopAttacksResponse, top, path=["response"]) diff --git a/tests/api_resources/radar/bgp/top/test_ases.py b/tests/api_resources/radar/bgp/top/test_ases.py index 137f86bd408..b9e15f5e751 100644 --- a/tests/api_resources/radar/bgp/top/test_ases.py +++ b/tests/api_resources/radar/bgp/top/test_ases.py @@ -43,18 +43,21 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: name=["string", "string", "string"], prefix=[ { - "location": "query", + "in": "query", "name": "prefix", + "test": 12, "type": "1.1.1.0/24", }, { - "location": "query", + "in": "query", "name": "prefix", + "test": 12, "type": "1.1.1.0/24", }, { - "location": "query", + "in": "query", "name": "prefix", + "test": 12, "type": "1.1.1.0/24", }, ], @@ -145,18 +148,21 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - name=["string", "string", "string"], prefix=[ { - "location": "query", + "in": "query", "name": "prefix", + "test": 12, "type": "1.1.1.0/24", }, { - "location": "query", + "in": "query", "name": "prefix", + "test": 12, "type": "1.1.1.0/24", }, { - "location": "query", + "in": "query", "name": "prefix", + "test": 12, "type": "1.1.1.0/24", }, ], diff --git a/tests/api_resources/radar/test_bgp.py b/tests/api_resources/radar/test_bgp.py index 2b50ea81066..38030a638fc 100644 --- a/tests/api_resources/radar/test_bgp.py +++ b/tests/api_resources/radar/test_bgp.py @@ -43,18 +43,21 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: name=["string", "string", "string"], prefix=[ { - "location": "query", + "in": "query", "name": "prefix", + "test": 12, "type": "1.1.1.0/24", }, { - "location": "query", + "in": "query", "name": "prefix", + "test": 12, "type": "1.1.1.0/24", }, { - "location": "query", + "in": "query", "name": "prefix", + "test": 12, "type": "1.1.1.0/24", }, ], @@ -111,18 +114,21 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf name=["string", "string", "string"], prefix=[ { - "location": "query", + "in": "query", "name": "prefix", + "test": 12, "type": "1.1.1.0/24", }, { - "location": "query", + "in": "query", "name": "prefix", + "test": 12, "type": "1.1.1.0/24", }, { - "location": "query", + "in": "query", "name": "prefix", + "test": 12, "type": "1.1.1.0/24", }, ], diff --git a/tests/api_resources/radar/test_datasets.py b/tests/api_resources/radar/test_datasets.py index f2cc9be2ae5..571fffac223 100644 --- a/tests/api_resources/radar/test_datasets.py +++ b/tests/api_resources/radar/test_datasets.py @@ -101,14 +101,6 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(str, dataset, path=["response"]) - @parametrize - def test_method_get_with_all_params(self, client: Cloudflare) -> None: - dataset = client.radar.datasets.get( - "ranking_top_1000", - date="string", - ) - assert_matches_type(str, dataset, path=["response"]) - @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.datasets.with_raw_response.get( @@ -225,14 +217,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(str, dataset, path=["response"]) - @parametrize - async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: - dataset = await async_client.radar.datasets.get( - "ranking_top_1000", - date="string", - ) - assert_matches_type(str, dataset, path=["response"]) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.datasets.with_raw_response.get( From 7bfbdba867534d51955ded9e009dd501047cf99f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 09:50:56 +0000 Subject: [PATCH 003/124] feat(api): OpenAPI spec update via Stainless API (#1017) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 76fac26c154..f05782e4a75 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dfb8d2c58c029167d6eb04131ff40df5631570c1bc49279bc148b2331fa68dee.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b6aad108d9bd74ab205190cdefd1d4e7db82406d40095750346b1871e8b1619b.yml From 038c47e76305fc244a936093f65031bdd022b4c6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 13:33:05 +0000 Subject: [PATCH 004/124] feat(api): OpenAPI spec update via Stainless API (#1018) --- .stats.yml | 2 +- api.md | 6 +- src/cloudflare/resources/dns/records.py | 1302 ++++++++--- .../types/dns/record_create_params.py | 163 +- .../types/dns/record_edit_params.py | 163 +- .../types/dns/record_update_params.py | 163 +- tests/api_resources/dns/test_records.py | 1960 ++++++++++------- 7 files changed, 2610 insertions(+), 1149 deletions(-) diff --git a/.stats.yml b/.stats.yml index f05782e4a75..334f00871ce 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b6aad108d9bd74ab205190cdefd1d4e7db82406d40095750346b1871e8b1619b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4dcc737ab91fdd1e0edc18214494d806b12d41df4d4641e26e718c8b9dced1dc.yml diff --git a/api.md b/api.md index 98cdf91e9c3..9fc32242fc8 100644 --- a/api.md +++ b/api.md @@ -1634,11 +1634,11 @@ from cloudflare.types.dns import ( Methods: -- client.dns.records.create(\*, zone_id, \*\*params) -> Optional -- client.dns.records.update(dns_record_id, \*, zone_id, \*\*params) -> Optional +- client.dns.records.create(\*, path_zone_id, \*\*params) -> Optional +- client.dns.records.update(dns_record_id, \*, path_zone_id, \*\*params) -> Optional - client.dns.records.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[Record] - client.dns.records.delete(dns_record_id, \*, zone_id) -> Optional -- client.dns.records.edit(dns_record_id, \*, zone_id, \*\*params) -> Optional +- client.dns.records.edit(dns_record_id, \*, path_zone_id, \*\*params) -> Optional - client.dns.records.export(\*, zone_id) -> str - client.dns.records.get(dns_record_id, \*, zone_id) -> Optional - client.dns.records.import\_(\*, zone_id, \*\*params) -> Optional diff --git a/src/cloudflare/resources/dns/records.py b/src/cloudflare/resources/dns/records.py index b5142133fe4..2eed4e82629 100644 --- a/src/cloudflare/resources/dns/records.py +++ b/src/cloudflare/resources/dns/records.py @@ -59,14 +59,16 @@ def with_streaming_response(self) -> RecordsResourceWithStreamingResponse: def create( self, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["A"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -85,7 +87,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier content: A valid IPv4 address. @@ -93,6 +95,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -105,6 +109,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -119,14 +125,16 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["AAAA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -145,7 +153,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier content: A valid IPv6 address. @@ -153,6 +161,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -165,6 +175,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -179,13 +191,15 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.CAARecordData, name: str, type: Literal["CAA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -204,7 +218,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a CAA record. @@ -212,6 +226,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -221,6 +237,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -235,13 +253,15 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.CERTRecordData, name: str, type: Literal["CERT"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -260,7 +280,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a CERT record. @@ -268,6 +288,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -277,6 +299,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -291,14 +315,16 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, content: object, name: str, type: Literal["CNAME"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -317,7 +343,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier content: A valid hostname. Must not match the record's name. @@ -325,6 +351,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -337,6 +365,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -351,13 +381,15 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.DNSKEYRecordData, name: str, type: Literal["DNSKEY"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -376,7 +408,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a DNSKEY record. @@ -384,6 +416,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -393,6 +427,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -407,13 +443,15 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.DSRecordData, name: str, type: Literal["DS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -432,7 +470,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a DS record. @@ -440,6 +478,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -449,6 +489,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -463,13 +505,15 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.HTTPSRecordData, name: str, type: Literal["HTTPS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -488,7 +532,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a HTTPS record. @@ -496,6 +540,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -505,6 +551,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -519,13 +567,15 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.LOCRecordData, name: str, type: Literal["LOC"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -544,7 +594,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a LOC record. @@ -552,6 +602,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -561,6 +613,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -575,14 +629,16 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, content: str, name: str, priority: float, type: Literal["MX"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -601,7 +657,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier content: A valid mail server hostname. @@ -612,6 +668,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -621,6 +679,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -635,13 +695,15 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.NAPTRRecordData, name: str, type: Literal["NAPTR"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -660,7 +722,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a NAPTR record. @@ -668,6 +730,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -677,6 +741,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -691,13 +757,15 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["NS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -716,7 +784,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier content: A valid name server host name. @@ -724,6 +792,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -733,6 +803,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -747,13 +819,15 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["PTR"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -772,7 +846,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier content: Domain name pointing to the address. @@ -780,6 +854,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -789,6 +865,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -803,13 +881,15 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.SMIMEARecordData, name: str, type: Literal["SMIMEA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -828,7 +908,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a SMIMEA record. @@ -836,6 +916,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -845,6 +927,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -859,13 +943,15 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.SRVRecordData, name: str, type: Literal["SRV"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -884,7 +970,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a SRV record. @@ -894,6 +980,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -903,6 +991,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -917,13 +1007,15 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.SSHFPRecordData, name: str, type: Literal["SSHFP"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -942,7 +1034,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a SSHFP record. @@ -950,6 +1042,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -959,6 +1053,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -973,13 +1069,15 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.SVCBRecordData, name: str, type: Literal["SVCB"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -998,7 +1096,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a SVCB record. @@ -1006,6 +1104,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -1015,6 +1115,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1029,13 +1131,15 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.TLSARecordData, name: str, type: Literal["TLSA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1054,7 +1158,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a TLSA record. @@ -1062,6 +1166,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -1071,6 +1177,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1085,13 +1193,15 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["TXT"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1110,7 +1220,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier content: Text content for the record. @@ -1118,6 +1228,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -1127,6 +1239,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1141,14 +1255,16 @@ def create( def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.URIRecordData, name: str, priority: float, type: Literal["URI"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1167,7 +1283,7 @@ def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a URI record. @@ -1178,6 +1294,8 @@ def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -1187,6 +1305,8 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1198,10 +1318,10 @@ def create( ... @required_args( - ["zone_id", "content", "name", "type"], - ["zone_id", "data", "name", "type"], - ["zone_id", "content", "name", "priority", "type"], - ["zone_id", "data", "name", "priority", "type"], + ["path_zone_id", "content", "name", "type"], + ["path_zone_id", "data", "name", "type"], + ["path_zone_id", "content", "name", "priority", "type"], + ["path_zone_id", "data", "name", "priority", "type"], ) def create( self, @@ -1229,6 +1349,7 @@ def create( | Literal["TLSA"] | Literal["TXT"] | Literal["URI"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, @@ -1253,21 +1374,23 @@ def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[Record]: - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + if not path_zone_id: + raise ValueError(f"Expected a non-empty value for `path_zone_id` but received {path_zone_id!r}") return cast( Optional[Record], self._post( - f"/zones/{zone_id}/dns_records", + f"/zones/{path_zone_id}/dns_records", body=maybe_transform( { "content": content, "name": name, "type": type, + "id": id, "comment": comment, "proxied": proxied, "tags": tags, "ttl": ttl, + "zone_id": body_zone_id, "data": data, "priority": priority, }, @@ -1291,14 +1414,16 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["A"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1316,7 +1441,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -1326,6 +1451,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -1338,6 +1465,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1353,14 +1482,16 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["AAAA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1378,7 +1509,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -1388,6 +1519,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -1400,6 +1533,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1415,13 +1550,15 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.CAARecordData, name: str, type: Literal["CAA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1439,7 +1576,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -1449,6 +1586,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -1458,6 +1597,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1473,13 +1614,15 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.CERTRecordData, name: str, type: Literal["CERT"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1497,7 +1640,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -1507,6 +1650,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -1516,6 +1661,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1531,14 +1678,16 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: object, name: str, type: Literal["CNAME"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1556,7 +1705,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -1566,6 +1715,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -1578,6 +1729,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1593,13 +1746,15 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.DNSKEYRecordData, name: str, type: Literal["DNSKEY"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1617,7 +1772,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -1627,6 +1782,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -1636,6 +1793,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1651,13 +1810,15 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.DSRecordData, name: str, type: Literal["DS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1675,7 +1836,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -1685,6 +1846,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -1694,6 +1857,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1709,13 +1874,15 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.HTTPSRecordData, name: str, type: Literal["HTTPS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1733,7 +1900,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -1743,6 +1910,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -1752,6 +1921,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1767,13 +1938,15 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.LOCRecordData, name: str, type: Literal["LOC"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1791,7 +1964,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -1801,6 +1974,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -1810,6 +1985,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1825,14 +2002,16 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, priority: float, type: Literal["MX"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1850,7 +2029,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -1863,6 +2042,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -1872,6 +2053,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1887,13 +2070,15 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.NAPTRRecordData, name: str, type: Literal["NAPTR"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1911,7 +2096,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -1921,6 +2106,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -1930,6 +2117,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1945,13 +2134,15 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["NS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1969,7 +2160,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -1979,6 +2170,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -1988,6 +2181,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2003,13 +2198,15 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["PTR"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2027,7 +2224,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -2037,6 +2234,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -2046,6 +2245,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2061,13 +2262,15 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.SMIMEARecordData, name: str, type: Literal["SMIMEA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2085,7 +2288,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -2095,6 +2298,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -2104,6 +2309,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2119,13 +2326,15 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.SRVRecordData, name: str, type: Literal["SRV"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2143,7 +2352,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -2155,6 +2364,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -2164,6 +2375,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2179,13 +2392,15 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.SSHFPRecordData, name: str, type: Literal["SSHFP"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2203,7 +2418,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -2213,6 +2428,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -2222,6 +2439,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2237,13 +2456,15 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.SVCBRecordData, name: str, type: Literal["SVCB"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2261,7 +2482,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -2271,6 +2492,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -2280,6 +2503,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2295,13 +2520,15 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.TLSARecordData, name: str, type: Literal["TLSA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2319,7 +2546,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -2329,6 +2556,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -2338,6 +2567,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2353,13 +2584,15 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["TXT"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2377,7 +2610,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -2387,6 +2620,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -2396,6 +2631,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2411,14 +2648,16 @@ def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.URIRecordData, name: str, priority: float, type: Literal["URI"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2436,7 +2675,7 @@ def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -2449,6 +2688,8 @@ def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -2458,6 +2699,8 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2469,10 +2712,10 @@ def update( ... @required_args( - ["zone_id", "content", "name", "type"], - ["zone_id", "data", "name", "type"], - ["zone_id", "content", "name", "priority", "type"], - ["zone_id", "data", "name", "priority", "type"], + ["path_zone_id", "content", "name", "type"], + ["path_zone_id", "data", "name", "type"], + ["path_zone_id", "content", "name", "priority", "type"], + ["path_zone_id", "data", "name", "priority", "type"], ) def update( self, @@ -2501,6 +2744,7 @@ def update( | Literal["TLSA"] | Literal["TXT"] | Literal["URI"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, @@ -2525,23 +2769,25 @@ def update( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[Record]: - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + if not path_zone_id: + raise ValueError(f"Expected a non-empty value for `path_zone_id` but received {path_zone_id!r}") if not dns_record_id: raise ValueError(f"Expected a non-empty value for `dns_record_id` but received {dns_record_id!r}") return cast( Optional[Record], self._put( - f"/zones/{zone_id}/dns_records/{dns_record_id}", + f"/zones/{path_zone_id}/dns_records/{dns_record_id}", body=maybe_transform( { "content": content, "name": name, "type": type, + "id": id, "comment": comment, "proxied": proxied, "tags": tags, "ttl": ttl, + "zone_id": body_zone_id, "data": data, "priority": priority, }, @@ -2734,14 +2980,16 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["A"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2759,7 +3007,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -2769,6 +3017,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -2781,6 +3031,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2796,14 +3048,16 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["AAAA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2821,7 +3075,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -2831,6 +3085,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -2843,6 +3099,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2858,13 +3116,15 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.CAARecordData, name: str, type: Literal["CAA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2882,7 +3142,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -2892,6 +3152,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -2901,6 +3163,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2916,13 +3180,15 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.CERTRecordData, name: str, type: Literal["CERT"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2940,7 +3206,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -2950,6 +3216,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -2959,6 +3227,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2974,14 +3244,16 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: object, name: str, type: Literal["CNAME"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2999,7 +3271,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -3009,6 +3281,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -3021,6 +3295,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3036,13 +3312,15 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.DNSKEYRecordData, name: str, type: Literal["DNSKEY"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3060,7 +3338,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -3070,6 +3348,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -3079,6 +3359,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3094,13 +3376,15 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.DSRecordData, name: str, type: Literal["DS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3118,7 +3402,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -3128,6 +3412,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -3137,6 +3423,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3152,13 +3440,15 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.HTTPSRecordData, name: str, type: Literal["HTTPS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3176,7 +3466,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -3186,6 +3476,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -3195,6 +3487,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3210,13 +3504,15 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.LOCRecordData, name: str, type: Literal["LOC"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3234,7 +3530,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -3244,6 +3540,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -3253,6 +3551,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3268,14 +3568,16 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, priority: float, type: Literal["MX"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3293,7 +3595,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -3306,6 +3608,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -3315,6 +3619,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3330,13 +3636,15 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.NAPTRRecordData, name: str, type: Literal["NAPTR"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3354,7 +3662,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -3364,6 +3672,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -3373,6 +3683,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3388,13 +3700,15 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["NS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3412,7 +3726,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -3422,6 +3736,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -3431,6 +3747,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3446,13 +3764,15 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["PTR"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3470,7 +3790,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -3480,6 +3800,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -3489,6 +3811,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3504,13 +3828,15 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.SMIMEARecordData, name: str, type: Literal["SMIMEA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3528,7 +3854,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -3538,6 +3864,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -3547,6 +3875,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3562,13 +3892,15 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.SRVRecordData, name: str, type: Literal["SRV"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3586,7 +3918,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -3598,6 +3930,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -3607,6 +3941,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3622,13 +3958,15 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.SSHFPRecordData, name: str, type: Literal["SSHFP"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3646,7 +3984,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -3656,6 +3994,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -3665,6 +4005,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3680,13 +4022,15 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.SVCBRecordData, name: str, type: Literal["SVCB"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3704,7 +4048,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -3714,6 +4058,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -3723,6 +4069,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3738,13 +4086,15 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.TLSARecordData, name: str, type: Literal["TLSA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3762,7 +4112,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -3772,6 +4122,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -3781,6 +4133,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3796,13 +4150,15 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["TXT"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3820,7 +4176,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -3830,6 +4186,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -3839,6 +4197,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3854,14 +4214,16 @@ def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.URIRecordData, name: str, priority: float, type: Literal["URI"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3879,7 +4241,7 @@ def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -3892,6 +4254,8 @@ def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -3901,6 +4265,8 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3912,10 +4278,10 @@ def edit( ... @required_args( - ["zone_id", "content", "name", "type"], - ["zone_id", "data", "name", "type"], - ["zone_id", "content", "name", "priority", "type"], - ["zone_id", "data", "name", "priority", "type"], + ["path_zone_id", "content", "name", "type"], + ["path_zone_id", "data", "name", "type"], + ["path_zone_id", "content", "name", "priority", "type"], + ["path_zone_id", "data", "name", "priority", "type"], ) def edit( self, @@ -3944,6 +4310,7 @@ def edit( | Literal["TLSA"] | Literal["TXT"] | Literal["URI"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, @@ -3968,23 +4335,25 @@ def edit( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[Record]: - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + if not path_zone_id: + raise ValueError(f"Expected a non-empty value for `path_zone_id` but received {path_zone_id!r}") if not dns_record_id: raise ValueError(f"Expected a non-empty value for `dns_record_id` but received {dns_record_id!r}") return cast( Optional[Record], self._patch( - f"/zones/{zone_id}/dns_records/{dns_record_id}", + f"/zones/{path_zone_id}/dns_records/{dns_record_id}", body=maybe_transform( { "content": content, "name": name, "type": type, + "id": id, "comment": comment, "proxied": proxied, "tags": tags, "ttl": ttl, + "zone_id": body_zone_id, "data": data, "priority": priority, }, @@ -4215,14 +4584,16 @@ def with_streaming_response(self) -> AsyncRecordsResourceWithStreamingResponse: async def create( self, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["A"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4241,7 +4612,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier content: A valid IPv4 address. @@ -4249,6 +4620,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -4261,6 +4634,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4275,14 +4650,16 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["AAAA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4301,7 +4678,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier content: A valid IPv6 address. @@ -4309,6 +4686,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -4321,6 +4700,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4335,13 +4716,15 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.CAARecordData, name: str, type: Literal["CAA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4360,7 +4743,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a CAA record. @@ -4368,6 +4751,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -4377,6 +4762,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4391,13 +4778,15 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.CERTRecordData, name: str, type: Literal["CERT"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4416,7 +4805,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a CERT record. @@ -4424,6 +4813,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -4433,6 +4824,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4447,14 +4840,16 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, content: object, name: str, type: Literal["CNAME"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4473,7 +4868,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier content: A valid hostname. Must not match the record's name. @@ -4481,6 +4876,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -4493,6 +4890,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4507,13 +4906,15 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.DNSKEYRecordData, name: str, type: Literal["DNSKEY"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4532,7 +4933,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a DNSKEY record. @@ -4540,6 +4941,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -4549,6 +4952,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4563,13 +4968,15 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.DSRecordData, name: str, type: Literal["DS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4588,7 +4995,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a DS record. @@ -4596,6 +5003,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -4605,6 +5014,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4619,13 +5030,15 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.HTTPSRecordData, name: str, type: Literal["HTTPS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4644,7 +5057,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a HTTPS record. @@ -4652,6 +5065,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -4661,6 +5076,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4675,13 +5092,15 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.LOCRecordData, name: str, type: Literal["LOC"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4700,7 +5119,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a LOC record. @@ -4708,6 +5127,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -4717,6 +5138,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4731,14 +5154,16 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, content: str, name: str, priority: float, type: Literal["MX"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4757,7 +5182,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier content: A valid mail server hostname. @@ -4768,6 +5193,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -4777,6 +5204,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4791,13 +5220,15 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.NAPTRRecordData, name: str, type: Literal["NAPTR"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4816,7 +5247,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a NAPTR record. @@ -4824,6 +5255,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -4833,6 +5266,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4847,13 +5282,15 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["NS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4872,7 +5309,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier content: A valid name server host name. @@ -4880,6 +5317,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -4889,6 +5328,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4903,13 +5344,15 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["PTR"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4928,7 +5371,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier content: Domain name pointing to the address. @@ -4936,6 +5379,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -4945,6 +5390,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4959,13 +5406,15 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.SMIMEARecordData, name: str, type: Literal["SMIMEA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4984,7 +5433,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a SMIMEA record. @@ -4992,6 +5441,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -5001,6 +5452,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5015,13 +5468,15 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.SRVRecordData, name: str, type: Literal["SRV"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5040,7 +5495,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a SRV record. @@ -5050,6 +5505,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -5059,6 +5516,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5073,13 +5532,15 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.SSHFPRecordData, name: str, type: Literal["SSHFP"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5098,7 +5559,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a SSHFP record. @@ -5106,6 +5567,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -5115,6 +5578,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5129,13 +5594,15 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.SVCBRecordData, name: str, type: Literal["SVCB"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5154,7 +5621,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a SVCB record. @@ -5162,6 +5629,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -5171,6 +5640,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5185,13 +5656,15 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.TLSARecordData, name: str, type: Literal["TLSA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5210,7 +5683,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a TLSA record. @@ -5218,6 +5691,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -5227,6 +5702,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5241,13 +5718,15 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["TXT"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5266,7 +5745,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier content: Text content for the record. @@ -5274,6 +5753,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -5283,6 +5764,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5297,14 +5780,16 @@ async def create( async def create( self, *, - zone_id: str, + path_zone_id: str, data: record_create_params.URIRecordData, name: str, priority: float, type: Literal["URI"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5323,7 +5808,7 @@ async def create( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier data: Components of a URI record. @@ -5334,6 +5819,8 @@ async def create( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -5343,6 +5830,8 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5354,10 +5843,10 @@ async def create( ... @required_args( - ["zone_id", "content", "name", "type"], - ["zone_id", "data", "name", "type"], - ["zone_id", "content", "name", "priority", "type"], - ["zone_id", "data", "name", "priority", "type"], + ["path_zone_id", "content", "name", "type"], + ["path_zone_id", "data", "name", "type"], + ["path_zone_id", "content", "name", "priority", "type"], + ["path_zone_id", "data", "name", "priority", "type"], ) async def create( self, @@ -5385,6 +5874,7 @@ async def create( | Literal["TLSA"] | Literal["TXT"] | Literal["URI"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, @@ -5409,21 +5899,23 @@ async def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[Record]: - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + if not path_zone_id: + raise ValueError(f"Expected a non-empty value for `path_zone_id` but received {path_zone_id!r}") return cast( Optional[Record], await self._post( - f"/zones/{zone_id}/dns_records", + f"/zones/{path_zone_id}/dns_records", body=await async_maybe_transform( { "content": content, "name": name, "type": type, + "id": id, "comment": comment, "proxied": proxied, "tags": tags, "ttl": ttl, + "zone_id": body_zone_id, "data": data, "priority": priority, }, @@ -5447,14 +5939,16 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["A"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5472,7 +5966,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -5482,6 +5976,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -5494,6 +5990,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5509,14 +6007,16 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["AAAA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5534,7 +6034,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -5544,6 +6044,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -5556,6 +6058,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5571,13 +6075,15 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.CAARecordData, name: str, type: Literal["CAA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5595,7 +6101,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -5605,6 +6111,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -5614,6 +6122,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5629,13 +6139,15 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.CERTRecordData, name: str, type: Literal["CERT"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5653,7 +6165,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -5663,6 +6175,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -5672,6 +6186,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5687,14 +6203,16 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: object, name: str, type: Literal["CNAME"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5712,7 +6230,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -5722,6 +6240,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -5734,6 +6254,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5749,13 +6271,15 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.DNSKEYRecordData, name: str, type: Literal["DNSKEY"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5773,7 +6297,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -5783,6 +6307,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -5792,6 +6318,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5807,13 +6335,15 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.DSRecordData, name: str, type: Literal["DS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5831,7 +6361,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -5841,6 +6371,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -5850,6 +6382,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5865,13 +6399,15 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.HTTPSRecordData, name: str, type: Literal["HTTPS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5889,7 +6425,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -5899,6 +6435,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -5908,6 +6446,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5923,13 +6463,15 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.LOCRecordData, name: str, type: Literal["LOC"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5947,7 +6489,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -5957,6 +6499,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -5966,6 +6510,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5981,14 +6527,16 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, priority: float, type: Literal["MX"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6006,7 +6554,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -6019,6 +6567,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -6028,6 +6578,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6043,13 +6595,15 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.NAPTRRecordData, name: str, type: Literal["NAPTR"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6067,7 +6621,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -6077,6 +6631,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -6086,6 +6642,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6101,13 +6659,15 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["NS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6125,7 +6685,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -6135,6 +6695,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -6144,6 +6706,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6159,13 +6723,15 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["PTR"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6183,7 +6749,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -6193,6 +6759,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -6202,6 +6770,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6217,13 +6787,15 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.SMIMEARecordData, name: str, type: Literal["SMIMEA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6241,7 +6813,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -6251,6 +6823,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -6260,6 +6834,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6275,13 +6851,15 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.SRVRecordData, name: str, type: Literal["SRV"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6299,7 +6877,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -6311,6 +6889,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -6320,6 +6900,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6335,13 +6917,15 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.SSHFPRecordData, name: str, type: Literal["SSHFP"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6359,7 +6943,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -6369,6 +6953,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -6378,6 +6964,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6393,13 +6981,15 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.SVCBRecordData, name: str, type: Literal["SVCB"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6417,7 +7007,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -6427,6 +7017,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -6436,6 +7028,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6451,13 +7045,15 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.TLSARecordData, name: str, type: Literal["TLSA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6475,7 +7071,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -6485,6 +7081,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -6494,6 +7092,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6509,13 +7109,15 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["TXT"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6533,7 +7135,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -6543,6 +7145,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -6552,6 +7156,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6567,14 +7173,16 @@ async def update( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_update_params.URIRecordData, name: str, priority: float, type: Literal["URI"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6592,7 +7200,7 @@ async def update( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -6605,6 +7213,8 @@ async def update( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -6614,6 +7224,8 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6625,10 +7237,10 @@ async def update( ... @required_args( - ["zone_id", "content", "name", "type"], - ["zone_id", "data", "name", "type"], - ["zone_id", "content", "name", "priority", "type"], - ["zone_id", "data", "name", "priority", "type"], + ["path_zone_id", "content", "name", "type"], + ["path_zone_id", "data", "name", "type"], + ["path_zone_id", "content", "name", "priority", "type"], + ["path_zone_id", "data", "name", "priority", "type"], ) async def update( self, @@ -6657,6 +7269,7 @@ async def update( | Literal["TLSA"] | Literal["TXT"] | Literal["URI"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, @@ -6681,23 +7294,25 @@ async def update( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[Record]: - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + if not path_zone_id: + raise ValueError(f"Expected a non-empty value for `path_zone_id` but received {path_zone_id!r}") if not dns_record_id: raise ValueError(f"Expected a non-empty value for `dns_record_id` but received {dns_record_id!r}") return cast( Optional[Record], await self._put( - f"/zones/{zone_id}/dns_records/{dns_record_id}", + f"/zones/{path_zone_id}/dns_records/{dns_record_id}", body=await async_maybe_transform( { "content": content, "name": name, "type": type, + "id": id, "comment": comment, "proxied": proxied, "tags": tags, "ttl": ttl, + "zone_id": body_zone_id, "data": data, "priority": priority, }, @@ -6890,14 +7505,16 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["A"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6915,7 +7532,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -6925,6 +7542,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -6937,6 +7556,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6952,14 +7573,16 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["AAAA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6977,7 +7600,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -6987,6 +7610,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -6999,6 +7624,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7014,13 +7641,15 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.CAARecordData, name: str, type: Literal["CAA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7038,7 +7667,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -7048,6 +7677,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -7057,6 +7688,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7072,13 +7705,15 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.CERTRecordData, name: str, type: Literal["CERT"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7096,7 +7731,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -7106,6 +7741,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -7115,6 +7752,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7130,14 +7769,16 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: object, name: str, type: Literal["CNAME"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7155,7 +7796,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -7165,6 +7806,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -7177,6 +7820,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7192,13 +7837,15 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.DNSKEYRecordData, name: str, type: Literal["DNSKEY"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7216,7 +7863,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -7226,6 +7873,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -7235,6 +7884,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7250,13 +7901,15 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.DSRecordData, name: str, type: Literal["DS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7274,7 +7927,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -7284,6 +7937,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -7293,6 +7948,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7308,13 +7965,15 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.HTTPSRecordData, name: str, type: Literal["HTTPS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7332,7 +7991,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -7342,6 +8001,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -7351,6 +8012,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7366,13 +8029,15 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.LOCRecordData, name: str, type: Literal["LOC"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7390,7 +8055,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -7400,6 +8065,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -7409,6 +8076,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7424,14 +8093,16 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, priority: float, type: Literal["MX"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7449,7 +8120,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -7462,6 +8133,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -7471,6 +8144,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7486,13 +8161,15 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.NAPTRRecordData, name: str, type: Literal["NAPTR"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7510,7 +8187,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -7520,6 +8197,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -7529,6 +8208,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7544,13 +8225,15 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["NS"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7568,7 +8251,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -7578,6 +8261,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -7587,6 +8272,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7602,13 +8289,15 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["PTR"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7626,7 +8315,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -7636,6 +8325,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -7645,6 +8336,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7660,13 +8353,15 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.SMIMEARecordData, name: str, type: Literal["SMIMEA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7684,7 +8379,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -7694,6 +8389,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -7703,6 +8400,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7718,13 +8417,15 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.SRVRecordData, name: str, type: Literal["SRV"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7742,7 +8443,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -7754,6 +8455,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -7763,6 +8466,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7778,13 +8483,15 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.SSHFPRecordData, name: str, type: Literal["SSHFP"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7802,7 +8509,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -7812,6 +8519,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -7821,6 +8530,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7836,13 +8547,15 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.SVCBRecordData, name: str, type: Literal["SVCB"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7860,7 +8573,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -7870,6 +8583,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -7879,6 +8594,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7894,13 +8611,15 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.TLSARecordData, name: str, type: Literal["TLSA"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7918,7 +8637,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -7928,6 +8647,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -7937,6 +8658,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7952,13 +8675,15 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, content: str, name: str, type: Literal["TXT"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7976,7 +8701,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -7986,6 +8711,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -7995,6 +8722,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8010,14 +8739,16 @@ async def edit( self, dns_record_id: str, *, - zone_id: str, + path_zone_id: str, data: record_edit_params.URIRecordData, name: str, priority: float, type: Literal["URI"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, + body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -8035,7 +8766,7 @@ async def edit( were used when creating the record. Args: - zone_id: Identifier + path_zone_id: Identifier dns_record_id: Identifier @@ -8048,6 +8779,8 @@ async def edit( type: Record type. + id: Identifier + comment: Comments or notes about the DNS record. This field has no effect on DNS responses. @@ -8057,6 +8790,8 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. + body_zone_id: Identifier + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8068,10 +8803,10 @@ async def edit( ... @required_args( - ["zone_id", "content", "name", "type"], - ["zone_id", "data", "name", "type"], - ["zone_id", "content", "name", "priority", "type"], - ["zone_id", "data", "name", "priority", "type"], + ["path_zone_id", "content", "name", "type"], + ["path_zone_id", "data", "name", "type"], + ["path_zone_id", "content", "name", "priority", "type"], + ["path_zone_id", "data", "name", "priority", "type"], ) async def edit( self, @@ -8100,6 +8835,7 @@ async def edit( | Literal["TLSA"] | Literal["TXT"] | Literal["URI"], + id: str | NotGiven = NOT_GIVEN, comment: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, @@ -8124,23 +8860,25 @@ async def edit( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[Record]: - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + if not path_zone_id: + raise ValueError(f"Expected a non-empty value for `path_zone_id` but received {path_zone_id!r}") if not dns_record_id: raise ValueError(f"Expected a non-empty value for `dns_record_id` but received {dns_record_id!r}") return cast( Optional[Record], await self._patch( - f"/zones/{zone_id}/dns_records/{dns_record_id}", + f"/zones/{path_zone_id}/dns_records/{dns_record_id}", body=await async_maybe_transform( { "content": content, "name": name, "type": type, + "id": id, "comment": comment, "proxied": proxied, "tags": tags, "ttl": ttl, + "zone_id": body_zone_id, "data": data, "priority": priority, }, diff --git a/src/cloudflare/types/dns/record_create_params.py b/src/cloudflare/types/dns/record_create_params.py index 50b85946681..4692fe22e71 100644 --- a/src/cloudflare/types/dns/record_create_params.py +++ b/src/cloudflare/types/dns/record_create_params.py @@ -3,8 +3,9 @@ from __future__ import annotations from typing import List, Union -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Literal, Required, Annotated, TypedDict +from ..._utils import PropertyInfo from .ttl_param import TTLParam from .record_tags import RecordTags @@ -47,7 +48,7 @@ class ARecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -59,6 +60,9 @@ class ARecord(TypedDict, total=False): type: Required[Literal["A"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -81,9 +85,12 @@ class ARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class AAAARecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -95,6 +102,9 @@ class AAAARecord(TypedDict, total=False): type: Required[Literal["AAAA"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -117,9 +127,12 @@ class AAAARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class CAARecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[CAARecordData] @@ -131,6 +144,9 @@ class CAARecord(TypedDict, total=False): type: Required[Literal["CAA"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -147,6 +163,9 @@ class CAARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class CAARecordData(TypedDict, total=False): flags: float @@ -160,7 +179,7 @@ class CAARecordData(TypedDict, total=False): class CERTRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[CERTRecordData] @@ -172,6 +191,9 @@ class CERTRecord(TypedDict, total=False): type: Required[Literal["CERT"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -188,6 +210,9 @@ class CERTRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class CERTRecordData(TypedDict, total=False): algorithm: float @@ -204,7 +229,7 @@ class CERTRecordData(TypedDict, total=False): class CNAMERecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[object] @@ -216,6 +241,9 @@ class CNAMERecord(TypedDict, total=False): type: Required[Literal["CNAME"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -238,9 +266,12 @@ class CNAMERecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class DNSKEYRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[DNSKEYRecordData] @@ -252,6 +283,9 @@ class DNSKEYRecord(TypedDict, total=False): type: Required[Literal["DNSKEY"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -268,6 +302,9 @@ class DNSKEYRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class DNSKEYRecordData(TypedDict, total=False): algorithm: float @@ -284,7 +321,7 @@ class DNSKEYRecordData(TypedDict, total=False): class DSRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[DSRecordData] @@ -296,6 +333,9 @@ class DSRecord(TypedDict, total=False): type: Required[Literal["DS"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -312,6 +352,9 @@ class DSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class DSRecordData(TypedDict, total=False): algorithm: float @@ -328,7 +371,7 @@ class DSRecordData(TypedDict, total=False): class HTTPSRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[HTTPSRecordData] @@ -340,6 +383,9 @@ class HTTPSRecord(TypedDict, total=False): type: Required[Literal["HTTPS"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -356,6 +402,9 @@ class HTTPSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class HTTPSRecordData(TypedDict, total=False): priority: float @@ -369,7 +418,7 @@ class HTTPSRecordData(TypedDict, total=False): class LOCRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[LOCRecordData] @@ -381,6 +430,9 @@ class LOCRecord(TypedDict, total=False): type: Required[Literal["LOC"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -397,6 +449,9 @@ class LOCRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class LOCRecordData(TypedDict, total=False): altitude: float @@ -437,7 +492,7 @@ class LOCRecordData(TypedDict, total=False): class MXRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -455,6 +510,9 @@ class MXRecord(TypedDict, total=False): type: Required[Literal["MX"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -471,9 +529,12 @@ class MXRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class NAPTRRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[NAPTRRecordData] @@ -485,6 +546,9 @@ class NAPTRRecord(TypedDict, total=False): type: Required[Literal["NAPTR"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -501,6 +565,9 @@ class NAPTRRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class NAPTRRecordData(TypedDict, total=False): flags: str @@ -523,7 +590,7 @@ class NAPTRRecordData(TypedDict, total=False): class NSRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -535,6 +602,9 @@ class NSRecord(TypedDict, total=False): type: Required[Literal["NS"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -551,9 +621,12 @@ class NSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class PTRRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -565,6 +638,9 @@ class PTRRecord(TypedDict, total=False): type: Required[Literal["PTR"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -581,9 +657,12 @@ class PTRRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class SMIMEARecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[SMIMEARecordData] @@ -595,6 +674,9 @@ class SMIMEARecord(TypedDict, total=False): type: Required[Literal["SMIMEA"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -611,6 +693,9 @@ class SMIMEARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class SMIMEARecordData(TypedDict, total=False): certificate: str @@ -627,7 +712,7 @@ class SMIMEARecordData(TypedDict, total=False): class SRVRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[SRVRecordData] @@ -643,6 +728,9 @@ class SRVRecord(TypedDict, total=False): type: Required[Literal["SRV"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -659,6 +747,9 @@ class SRVRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class SRVRecordData(TypedDict, total=False): name: str @@ -700,7 +791,7 @@ class SRVRecordData(TypedDict, total=False): class SSHFPRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[SSHFPRecordData] @@ -712,6 +803,9 @@ class SSHFPRecord(TypedDict, total=False): type: Required[Literal["SSHFP"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -728,6 +822,9 @@ class SSHFPRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class SSHFPRecordData(TypedDict, total=False): algorithm: float @@ -741,7 +838,7 @@ class SSHFPRecordData(TypedDict, total=False): class SVCBRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[SVCBRecordData] @@ -753,6 +850,9 @@ class SVCBRecord(TypedDict, total=False): type: Required[Literal["SVCB"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -769,6 +869,9 @@ class SVCBRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class SVCBRecordData(TypedDict, total=False): priority: float @@ -782,7 +885,7 @@ class SVCBRecordData(TypedDict, total=False): class TLSARecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[TLSARecordData] @@ -794,6 +897,9 @@ class TLSARecord(TypedDict, total=False): type: Required[Literal["TLSA"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -810,6 +916,9 @@ class TLSARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class TLSARecordData(TypedDict, total=False): certificate: str @@ -826,7 +935,7 @@ class TLSARecordData(TypedDict, total=False): class TXTRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -838,6 +947,9 @@ class TXTRecord(TypedDict, total=False): type: Required[Literal["TXT"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -854,9 +966,12 @@ class TXTRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class URIRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[URIRecordData] @@ -874,6 +989,9 @@ class URIRecord(TypedDict, total=False): type: Required[Literal["URI"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -890,6 +1008,9 @@ class URIRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class URIRecordData(TypedDict, total=False): target: str diff --git a/src/cloudflare/types/dns/record_edit_params.py b/src/cloudflare/types/dns/record_edit_params.py index e5604e9762c..a0354033775 100644 --- a/src/cloudflare/types/dns/record_edit_params.py +++ b/src/cloudflare/types/dns/record_edit_params.py @@ -3,8 +3,9 @@ from __future__ import annotations from typing import List, Union -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Literal, Required, Annotated, TypedDict +from ..._utils import PropertyInfo from .ttl_param import TTLParam from .record_tags import RecordTags @@ -47,7 +48,7 @@ class ARecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -59,6 +60,9 @@ class ARecord(TypedDict, total=False): type: Required[Literal["A"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -81,9 +85,12 @@ class ARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class AAAARecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -95,6 +102,9 @@ class AAAARecord(TypedDict, total=False): type: Required[Literal["AAAA"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -117,9 +127,12 @@ class AAAARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class CAARecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[CAARecordData] @@ -131,6 +144,9 @@ class CAARecord(TypedDict, total=False): type: Required[Literal["CAA"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -147,6 +163,9 @@ class CAARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class CAARecordData(TypedDict, total=False): flags: float @@ -160,7 +179,7 @@ class CAARecordData(TypedDict, total=False): class CERTRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[CERTRecordData] @@ -172,6 +191,9 @@ class CERTRecord(TypedDict, total=False): type: Required[Literal["CERT"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -188,6 +210,9 @@ class CERTRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class CERTRecordData(TypedDict, total=False): algorithm: float @@ -204,7 +229,7 @@ class CERTRecordData(TypedDict, total=False): class CNAMERecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[object] @@ -216,6 +241,9 @@ class CNAMERecord(TypedDict, total=False): type: Required[Literal["CNAME"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -238,9 +266,12 @@ class CNAMERecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class DNSKEYRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[DNSKEYRecordData] @@ -252,6 +283,9 @@ class DNSKEYRecord(TypedDict, total=False): type: Required[Literal["DNSKEY"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -268,6 +302,9 @@ class DNSKEYRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class DNSKEYRecordData(TypedDict, total=False): algorithm: float @@ -284,7 +321,7 @@ class DNSKEYRecordData(TypedDict, total=False): class DSRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[DSRecordData] @@ -296,6 +333,9 @@ class DSRecord(TypedDict, total=False): type: Required[Literal["DS"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -312,6 +352,9 @@ class DSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class DSRecordData(TypedDict, total=False): algorithm: float @@ -328,7 +371,7 @@ class DSRecordData(TypedDict, total=False): class HTTPSRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[HTTPSRecordData] @@ -340,6 +383,9 @@ class HTTPSRecord(TypedDict, total=False): type: Required[Literal["HTTPS"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -356,6 +402,9 @@ class HTTPSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class HTTPSRecordData(TypedDict, total=False): priority: float @@ -369,7 +418,7 @@ class HTTPSRecordData(TypedDict, total=False): class LOCRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[LOCRecordData] @@ -381,6 +430,9 @@ class LOCRecord(TypedDict, total=False): type: Required[Literal["LOC"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -397,6 +449,9 @@ class LOCRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class LOCRecordData(TypedDict, total=False): altitude: float @@ -437,7 +492,7 @@ class LOCRecordData(TypedDict, total=False): class MXRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -455,6 +510,9 @@ class MXRecord(TypedDict, total=False): type: Required[Literal["MX"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -471,9 +529,12 @@ class MXRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class NAPTRRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[NAPTRRecordData] @@ -485,6 +546,9 @@ class NAPTRRecord(TypedDict, total=False): type: Required[Literal["NAPTR"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -501,6 +565,9 @@ class NAPTRRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class NAPTRRecordData(TypedDict, total=False): flags: str @@ -523,7 +590,7 @@ class NAPTRRecordData(TypedDict, total=False): class NSRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -535,6 +602,9 @@ class NSRecord(TypedDict, total=False): type: Required[Literal["NS"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -551,9 +621,12 @@ class NSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class PTRRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -565,6 +638,9 @@ class PTRRecord(TypedDict, total=False): type: Required[Literal["PTR"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -581,9 +657,12 @@ class PTRRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class SMIMEARecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[SMIMEARecordData] @@ -595,6 +674,9 @@ class SMIMEARecord(TypedDict, total=False): type: Required[Literal["SMIMEA"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -611,6 +693,9 @@ class SMIMEARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class SMIMEARecordData(TypedDict, total=False): certificate: str @@ -627,7 +712,7 @@ class SMIMEARecordData(TypedDict, total=False): class SRVRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[SRVRecordData] @@ -643,6 +728,9 @@ class SRVRecord(TypedDict, total=False): type: Required[Literal["SRV"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -659,6 +747,9 @@ class SRVRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class SRVRecordData(TypedDict, total=False): name: str @@ -700,7 +791,7 @@ class SRVRecordData(TypedDict, total=False): class SSHFPRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[SSHFPRecordData] @@ -712,6 +803,9 @@ class SSHFPRecord(TypedDict, total=False): type: Required[Literal["SSHFP"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -728,6 +822,9 @@ class SSHFPRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class SSHFPRecordData(TypedDict, total=False): algorithm: float @@ -741,7 +838,7 @@ class SSHFPRecordData(TypedDict, total=False): class SVCBRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[SVCBRecordData] @@ -753,6 +850,9 @@ class SVCBRecord(TypedDict, total=False): type: Required[Literal["SVCB"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -769,6 +869,9 @@ class SVCBRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class SVCBRecordData(TypedDict, total=False): priority: float @@ -782,7 +885,7 @@ class SVCBRecordData(TypedDict, total=False): class TLSARecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[TLSARecordData] @@ -794,6 +897,9 @@ class TLSARecord(TypedDict, total=False): type: Required[Literal["TLSA"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -810,6 +916,9 @@ class TLSARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class TLSARecordData(TypedDict, total=False): certificate: str @@ -826,7 +935,7 @@ class TLSARecordData(TypedDict, total=False): class TXTRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -838,6 +947,9 @@ class TXTRecord(TypedDict, total=False): type: Required[Literal["TXT"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -854,9 +966,12 @@ class TXTRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class URIRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[URIRecordData] @@ -874,6 +989,9 @@ class URIRecord(TypedDict, total=False): type: Required[Literal["URI"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -890,6 +1008,9 @@ class URIRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class URIRecordData(TypedDict, total=False): target: str diff --git a/src/cloudflare/types/dns/record_update_params.py b/src/cloudflare/types/dns/record_update_params.py index 881f62f1c71..d9af2e9c204 100644 --- a/src/cloudflare/types/dns/record_update_params.py +++ b/src/cloudflare/types/dns/record_update_params.py @@ -3,8 +3,9 @@ from __future__ import annotations from typing import List, Union -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Literal, Required, Annotated, TypedDict +from ..._utils import PropertyInfo from .ttl_param import TTLParam from .record_tags import RecordTags @@ -47,7 +48,7 @@ class ARecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -59,6 +60,9 @@ class ARecord(TypedDict, total=False): type: Required[Literal["A"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -81,9 +85,12 @@ class ARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class AAAARecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -95,6 +102,9 @@ class AAAARecord(TypedDict, total=False): type: Required[Literal["AAAA"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -117,9 +127,12 @@ class AAAARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class CAARecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[CAARecordData] @@ -131,6 +144,9 @@ class CAARecord(TypedDict, total=False): type: Required[Literal["CAA"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -147,6 +163,9 @@ class CAARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class CAARecordData(TypedDict, total=False): flags: float @@ -160,7 +179,7 @@ class CAARecordData(TypedDict, total=False): class CERTRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[CERTRecordData] @@ -172,6 +191,9 @@ class CERTRecord(TypedDict, total=False): type: Required[Literal["CERT"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -188,6 +210,9 @@ class CERTRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class CERTRecordData(TypedDict, total=False): algorithm: float @@ -204,7 +229,7 @@ class CERTRecordData(TypedDict, total=False): class CNAMERecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[object] @@ -216,6 +241,9 @@ class CNAMERecord(TypedDict, total=False): type: Required[Literal["CNAME"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -238,9 +266,12 @@ class CNAMERecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class DNSKEYRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[DNSKEYRecordData] @@ -252,6 +283,9 @@ class DNSKEYRecord(TypedDict, total=False): type: Required[Literal["DNSKEY"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -268,6 +302,9 @@ class DNSKEYRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class DNSKEYRecordData(TypedDict, total=False): algorithm: float @@ -284,7 +321,7 @@ class DNSKEYRecordData(TypedDict, total=False): class DSRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[DSRecordData] @@ -296,6 +333,9 @@ class DSRecord(TypedDict, total=False): type: Required[Literal["DS"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -312,6 +352,9 @@ class DSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class DSRecordData(TypedDict, total=False): algorithm: float @@ -328,7 +371,7 @@ class DSRecordData(TypedDict, total=False): class HTTPSRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[HTTPSRecordData] @@ -340,6 +383,9 @@ class HTTPSRecord(TypedDict, total=False): type: Required[Literal["HTTPS"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -356,6 +402,9 @@ class HTTPSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class HTTPSRecordData(TypedDict, total=False): priority: float @@ -369,7 +418,7 @@ class HTTPSRecordData(TypedDict, total=False): class LOCRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[LOCRecordData] @@ -381,6 +430,9 @@ class LOCRecord(TypedDict, total=False): type: Required[Literal["LOC"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -397,6 +449,9 @@ class LOCRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class LOCRecordData(TypedDict, total=False): altitude: float @@ -437,7 +492,7 @@ class LOCRecordData(TypedDict, total=False): class MXRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -455,6 +510,9 @@ class MXRecord(TypedDict, total=False): type: Required[Literal["MX"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -471,9 +529,12 @@ class MXRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class NAPTRRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[NAPTRRecordData] @@ -485,6 +546,9 @@ class NAPTRRecord(TypedDict, total=False): type: Required[Literal["NAPTR"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -501,6 +565,9 @@ class NAPTRRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class NAPTRRecordData(TypedDict, total=False): flags: str @@ -523,7 +590,7 @@ class NAPTRRecordData(TypedDict, total=False): class NSRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -535,6 +602,9 @@ class NSRecord(TypedDict, total=False): type: Required[Literal["NS"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -551,9 +621,12 @@ class NSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class PTRRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -565,6 +638,9 @@ class PTRRecord(TypedDict, total=False): type: Required[Literal["PTR"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -581,9 +657,12 @@ class PTRRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class SMIMEARecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[SMIMEARecordData] @@ -595,6 +674,9 @@ class SMIMEARecord(TypedDict, total=False): type: Required[Literal["SMIMEA"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -611,6 +693,9 @@ class SMIMEARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class SMIMEARecordData(TypedDict, total=False): certificate: str @@ -627,7 +712,7 @@ class SMIMEARecordData(TypedDict, total=False): class SRVRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[SRVRecordData] @@ -643,6 +728,9 @@ class SRVRecord(TypedDict, total=False): type: Required[Literal["SRV"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -659,6 +747,9 @@ class SRVRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class SRVRecordData(TypedDict, total=False): name: str @@ -700,7 +791,7 @@ class SRVRecordData(TypedDict, total=False): class SSHFPRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[SSHFPRecordData] @@ -712,6 +803,9 @@ class SSHFPRecord(TypedDict, total=False): type: Required[Literal["SSHFP"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -728,6 +822,9 @@ class SSHFPRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class SSHFPRecordData(TypedDict, total=False): algorithm: float @@ -741,7 +838,7 @@ class SSHFPRecordData(TypedDict, total=False): class SVCBRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[SVCBRecordData] @@ -753,6 +850,9 @@ class SVCBRecord(TypedDict, total=False): type: Required[Literal["SVCB"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -769,6 +869,9 @@ class SVCBRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class SVCBRecordData(TypedDict, total=False): priority: float @@ -782,7 +885,7 @@ class SVCBRecordData(TypedDict, total=False): class TLSARecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[TLSARecordData] @@ -794,6 +897,9 @@ class TLSARecord(TypedDict, total=False): type: Required[Literal["TLSA"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -810,6 +916,9 @@ class TLSARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class TLSARecordData(TypedDict, total=False): certificate: str @@ -826,7 +935,7 @@ class TLSARecordData(TypedDict, total=False): class TXTRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" content: Required[str] @@ -838,6 +947,9 @@ class TXTRecord(TypedDict, total=False): type: Required[Literal["TXT"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -854,9 +966,12 @@ class TXTRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class URIRecord(TypedDict, total=False): - zone_id: Required[str] + path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] """Identifier""" data: Required[URIRecordData] @@ -874,6 +989,9 @@ class URIRecord(TypedDict, total=False): type: Required[Literal["URI"]] """Record type.""" + id: str + """Identifier""" + comment: str """Comments or notes about the DNS record. @@ -890,6 +1008,9 @@ class URIRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ + body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] + """Identifier""" + class URIRecordData(TypedDict, total=False): target: str diff --git a/tests/api_resources/dns/test_records.py b/tests/api_resources/dns/test_records.py index afb7b9304be..3920e119479 100644 --- a/tests/api_resources/dns/test_records.py +++ b/tests/api_resources/dns/test_records.py @@ -27,7 +27,7 @@ class TestRecords: @parametrize def test_method_create_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -38,14 +38,16 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -53,7 +55,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -68,7 +70,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -84,19 +86,20 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_1(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", content="198.51.100.4", name="example.com", type="A", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -107,14 +110,16 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -122,7 +127,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -137,7 +142,7 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -153,19 +158,20 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_2(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", content="2400:cb00:2049::1", name="example.com", type="AAAA", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -176,7 +182,7 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", @@ -184,9 +190,11 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N }, name="example.com", type="CAA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -194,7 +202,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -209,7 +217,7 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -225,19 +233,20 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_3(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="CAA", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -248,7 +257,7 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, "certificate": "string", @@ -257,9 +266,11 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N }, name="example.com", type="CERT", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -267,7 +278,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -282,7 +293,7 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -298,19 +309,20 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_4(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="CERT", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -321,14 +333,16 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -336,7 +350,7 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -351,7 +365,7 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -367,19 +381,20 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_5(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", content={}, name="example.com", type="CNAME", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -390,7 +405,7 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, @@ -399,9 +414,11 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N }, name="example.com", type="DNSKEY", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -409,7 +426,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -424,7 +441,7 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -440,19 +457,20 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_6(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="DNSKEY", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -463,7 +481,7 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, "digest": "string", @@ -472,9 +490,11 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N }, name="example.com", type="DS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -482,7 +502,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -497,7 +517,7 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -513,19 +533,20 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_7(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="DS", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -536,7 +557,7 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -544,9 +565,11 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N }, name="example.com", type="HTTPS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -554,7 +577,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -569,7 +592,7 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -585,19 +608,20 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_8(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="HTTPS", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -608,7 +632,7 @@ def test_method_create_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, "lat_degrees": 37, @@ -625,9 +649,11 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N }, name="example.com", type="LOC", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -635,7 +661,7 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -650,7 +676,7 @@ def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -666,19 +692,20 @@ def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_9(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="LOC", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -690,14 +717,16 @@ def test_method_create_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, type="MX", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -705,7 +734,7 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -721,7 +750,7 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -738,20 +767,21 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_10(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", content="mx.example.com", name="example.com", priority=10, type="MX", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -762,7 +792,7 @@ def test_method_create_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": "string", "order": 100, @@ -773,9 +803,11 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> }, name="example.com", type="NAPTR", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -783,7 +815,7 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -798,7 +830,7 @@ def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -814,19 +846,20 @@ def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_11(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="NAPTR", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -837,13 +870,15 @@ def test_method_create_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -851,7 +886,7 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -866,7 +901,7 @@ def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -882,19 +917,20 @@ def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_12(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", content="ns1.example.com", name="example.com", type="NS", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -905,13 +941,15 @@ def test_method_create_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -919,7 +957,7 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -934,7 +972,7 @@ def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -950,19 +988,20 @@ def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_13(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", content="example.com", name="example.com", type="PTR", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -973,7 +1012,7 @@ def test_method_create_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 0, @@ -982,9 +1021,11 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> }, name="example.com", type="SMIMEA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -992,7 +1033,7 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -1007,7 +1048,7 @@ def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -1023,19 +1064,20 @@ def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_14(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="SMIMEA", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -1046,7 +1088,7 @@ def test_method_create_overload_15(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", "port": 8806, @@ -1058,9 +1100,11 @@ def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> }, name="_sip._tcp.example.com", type="SRV", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1068,7 +1112,7 @@ def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_15(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -1083,7 +1127,7 @@ def test_raw_response_create_overload_15(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_15(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -1099,19 +1143,20 @@ def test_streaming_response_create_overload_15(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_15(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="_sip._tcp.example.com", type="SRV", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -1122,7 +1167,7 @@ def test_method_create_overload_16(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, "fingerprint": "string", @@ -1130,9 +1175,11 @@ def test_method_create_with_all_params_overload_16(self, client: Cloudflare) -> }, name="example.com", type="SSHFP", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1140,7 +1187,7 @@ def test_method_create_with_all_params_overload_16(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_16(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -1155,7 +1202,7 @@ def test_raw_response_create_overload_16(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_16(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -1171,19 +1218,20 @@ def test_streaming_response_create_overload_16(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_16(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="SSHFP", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -1194,7 +1242,7 @@ def test_method_create_overload_17(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -1202,9 +1250,11 @@ def test_method_create_with_all_params_overload_17(self, client: Cloudflare) -> }, name="example.com", type="SVCB", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1212,7 +1262,7 @@ def test_method_create_with_all_params_overload_17(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_17(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -1227,7 +1277,7 @@ def test_raw_response_create_overload_17(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_17(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -1243,19 +1293,20 @@ def test_streaming_response_create_overload_17(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_17(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="SVCB", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -1266,7 +1317,7 @@ def test_method_create_overload_18(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 1, @@ -1275,9 +1326,11 @@ def test_method_create_with_all_params_overload_18(self, client: Cloudflare) -> }, name="example.com", type="TLSA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1285,7 +1338,7 @@ def test_method_create_with_all_params_overload_18(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_18(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -1300,7 +1353,7 @@ def test_raw_response_create_overload_18(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_18(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -1316,19 +1369,20 @@ def test_streaming_response_create_overload_18(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_18(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="TLSA", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -1339,13 +1393,15 @@ def test_method_create_overload_19(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1353,7 +1409,7 @@ def test_method_create_with_all_params_overload_19(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_19(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -1368,7 +1424,7 @@ def test_raw_response_create_overload_19(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_19(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -1384,19 +1440,20 @@ def test_streaming_response_create_overload_19(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_19(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", content="example text content", name="example.com", type="TXT", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -1408,7 +1465,7 @@ def test_method_create_overload_20(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", "weight": 20, @@ -1416,9 +1473,11 @@ def test_method_create_with_all_params_overload_20(self, client: Cloudflare) -> name="example.com", priority=10, type="URI", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1426,7 +1485,7 @@ def test_method_create_with_all_params_overload_20(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_20(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -1442,7 +1501,7 @@ def test_raw_response_create_overload_20(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_20(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -1459,13 +1518,14 @@ def test_streaming_response_create_overload_20(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_20(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", priority=10, type="URI", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -1473,7 +1533,7 @@ def test_path_params_create_overload_20(self, client: Cloudflare) -> None: def test_method_update_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -1485,14 +1545,16 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1501,7 +1563,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -1517,7 +1579,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -1533,19 +1595,20 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_1(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="198.51.100.4", name="example.com", type="A", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -1556,7 +1619,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: def test_method_update_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -1568,14 +1631,16 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1584,7 +1649,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -1600,7 +1665,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -1616,19 +1681,20 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_2(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="2400:cb00:2049::1", name="example.com", type="AAAA", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -1639,7 +1705,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: def test_method_update_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -1651,7 +1717,7 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", @@ -1659,9 +1725,11 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N }, name="example.com", type="CAA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1670,7 +1738,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -1686,7 +1754,7 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -1702,19 +1770,20 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_3(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="CAA", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -1725,7 +1794,7 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: def test_method_update_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -1737,7 +1806,7 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, "certificate": "string", @@ -1746,9 +1815,11 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N }, name="example.com", type="CERT", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1757,7 +1828,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -1773,7 +1844,7 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -1789,19 +1860,20 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_4(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="CERT", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -1812,7 +1884,7 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: def test_method_update_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -1824,14 +1896,16 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1840,7 +1914,7 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -1856,7 +1930,7 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -1872,19 +1946,20 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_5(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content={}, name="example.com", type="CNAME", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -1895,7 +1970,7 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: def test_method_update_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -1907,7 +1982,7 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, @@ -1916,9 +1991,11 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N }, name="example.com", type="DNSKEY", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1927,7 +2004,7 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -1943,7 +2020,7 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -1959,19 +2036,20 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_6(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="DNSKEY", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -1982,7 +2060,7 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: def test_method_update_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -1994,7 +2072,7 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, "digest": "string", @@ -2003,9 +2081,11 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N }, name="example.com", type="DS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2014,7 +2094,7 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -2030,7 +2110,7 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -2046,19 +2126,20 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_7(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="DS", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -2069,7 +2150,7 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: def test_method_update_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -2081,7 +2162,7 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -2089,9 +2170,11 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N }, name="example.com", type="HTTPS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2100,7 +2183,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -2116,7 +2199,7 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -2132,19 +2215,20 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_8(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="HTTPS", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -2155,7 +2239,7 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: def test_method_update_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -2167,7 +2251,7 @@ def test_method_update_overload_9(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, "lat_degrees": 37, @@ -2184,9 +2268,11 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N }, name="example.com", type="LOC", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2195,7 +2281,7 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -2211,7 +2297,7 @@ def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -2227,19 +2313,20 @@ def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_9(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="LOC", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -2250,7 +2337,7 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: def test_method_update_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -2263,14 +2350,16 @@ def test_method_update_overload_10(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, type="MX", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2279,7 +2368,7 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -2296,7 +2385,7 @@ def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -2313,20 +2402,21 @@ def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_10(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="mx.example.com", name="example.com", priority=10, type="MX", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -2338,7 +2428,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: def test_method_update_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -2350,7 +2440,7 @@ def test_method_update_overload_11(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": "string", "order": 100, @@ -2361,9 +2451,11 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> }, name="example.com", type="NAPTR", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2372,7 +2464,7 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -2388,7 +2480,7 @@ def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -2404,19 +2496,20 @@ def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_11(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="NAPTR", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -2427,7 +2520,7 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: def test_method_update_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -2439,13 +2532,15 @@ def test_method_update_overload_12(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2454,7 +2549,7 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -2470,7 +2565,7 @@ def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -2486,19 +2581,20 @@ def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_12(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="ns1.example.com", name="example.com", type="NS", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -2509,7 +2605,7 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: def test_method_update_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -2521,13 +2617,15 @@ def test_method_update_overload_13(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2536,7 +2634,7 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -2552,7 +2650,7 @@ def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -2568,19 +2666,20 @@ def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_13(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="example.com", name="example.com", type="PTR", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -2591,7 +2690,7 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: def test_method_update_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -2603,7 +2702,7 @@ def test_method_update_overload_14(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 0, @@ -2612,9 +2711,11 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> }, name="example.com", type="SMIMEA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2623,7 +2724,7 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -2639,7 +2740,7 @@ def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -2655,19 +2756,20 @@ def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_14(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="SMIMEA", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -2678,7 +2780,7 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: def test_method_update_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -2690,7 +2792,7 @@ def test_method_update_overload_15(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", "port": 8806, @@ -2702,9 +2804,11 @@ def test_method_update_with_all_params_overload_15(self, client: Cloudflare) -> }, name="_sip._tcp.example.com", type="SRV", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2713,7 +2817,7 @@ def test_method_update_with_all_params_overload_15(self, client: Cloudflare) -> def test_raw_response_update_overload_15(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -2729,7 +2833,7 @@ def test_raw_response_update_overload_15(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_15(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -2745,19 +2849,20 @@ def test_streaming_response_update_overload_15(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_15(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="_sip._tcp.example.com", type="SRV", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -2768,7 +2873,7 @@ def test_path_params_update_overload_15(self, client: Cloudflare) -> None: def test_method_update_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -2780,7 +2885,7 @@ def test_method_update_overload_16(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, "fingerprint": "string", @@ -2788,9 +2893,11 @@ def test_method_update_with_all_params_overload_16(self, client: Cloudflare) -> }, name="example.com", type="SSHFP", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2799,7 +2906,7 @@ def test_method_update_with_all_params_overload_16(self, client: Cloudflare) -> def test_raw_response_update_overload_16(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -2815,7 +2922,7 @@ def test_raw_response_update_overload_16(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_16(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -2831,19 +2938,20 @@ def test_streaming_response_update_overload_16(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_16(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="SSHFP", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -2854,7 +2962,7 @@ def test_path_params_update_overload_16(self, client: Cloudflare) -> None: def test_method_update_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -2866,7 +2974,7 @@ def test_method_update_overload_17(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -2874,9 +2982,11 @@ def test_method_update_with_all_params_overload_17(self, client: Cloudflare) -> }, name="example.com", type="SVCB", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2885,7 +2995,7 @@ def test_method_update_with_all_params_overload_17(self, client: Cloudflare) -> def test_raw_response_update_overload_17(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -2901,7 +3011,7 @@ def test_raw_response_update_overload_17(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_17(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -2917,19 +3027,20 @@ def test_streaming_response_update_overload_17(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_17(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="SVCB", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -2940,7 +3051,7 @@ def test_path_params_update_overload_17(self, client: Cloudflare) -> None: def test_method_update_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -2952,7 +3063,7 @@ def test_method_update_overload_18(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 1, @@ -2961,9 +3072,11 @@ def test_method_update_with_all_params_overload_18(self, client: Cloudflare) -> }, name="example.com", type="TLSA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2972,7 +3085,7 @@ def test_method_update_with_all_params_overload_18(self, client: Cloudflare) -> def test_raw_response_update_overload_18(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -2988,7 +3101,7 @@ def test_raw_response_update_overload_18(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_18(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -3004,19 +3117,20 @@ def test_streaming_response_update_overload_18(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_18(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="TLSA", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -3027,7 +3141,7 @@ def test_path_params_update_overload_18(self, client: Cloudflare) -> None: def test_method_update_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -3039,13 +3153,15 @@ def test_method_update_overload_19(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3054,7 +3170,7 @@ def test_method_update_with_all_params_overload_19(self, client: Cloudflare) -> def test_raw_response_update_overload_19(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -3070,7 +3186,7 @@ def test_raw_response_update_overload_19(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_19(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -3086,19 +3202,20 @@ def test_streaming_response_update_overload_19(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_19(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="example text content", name="example.com", type="TXT", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -3109,7 +3226,7 @@ def test_path_params_update_overload_19(self, client: Cloudflare) -> None: def test_method_update_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -3122,7 +3239,7 @@ def test_method_update_overload_20(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", "weight": 20, @@ -3130,9 +3247,11 @@ def test_method_update_with_all_params_overload_20(self, client: Cloudflare) -> name="example.com", priority=10, type="URI", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3141,7 +3260,7 @@ def test_method_update_with_all_params_overload_20(self, client: Cloudflare) -> def test_raw_response_update_overload_20(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -3158,7 +3277,7 @@ def test_raw_response_update_overload_20(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_20(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -3175,20 +3294,21 @@ def test_streaming_response_update_overload_20(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_20(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", priority=10, type="URI", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -3320,7 +3440,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: def test_method_edit_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -3332,14 +3452,16 @@ def test_method_edit_overload_1(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3348,7 +3470,7 @@ def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -3364,7 +3486,7 @@ def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -3380,19 +3502,20 @@ def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="198.51.100.4", name="example.com", type="A", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -3403,7 +3526,7 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: def test_method_edit_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -3415,14 +3538,16 @@ def test_method_edit_overload_2(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3431,7 +3556,7 @@ def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -3447,7 +3572,7 @@ def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -3463,19 +3588,20 @@ def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="2400:cb00:2049::1", name="example.com", type="AAAA", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -3486,7 +3612,7 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: def test_method_edit_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -3498,7 +3624,7 @@ def test_method_edit_overload_3(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", @@ -3506,9 +3632,11 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non }, name="example.com", type="CAA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3517,7 +3645,7 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -3533,7 +3661,7 @@ def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -3549,19 +3677,20 @@ def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="CAA", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -3572,7 +3701,7 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: def test_method_edit_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -3584,7 +3713,7 @@ def test_method_edit_overload_4(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, "certificate": "string", @@ -3593,9 +3722,11 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non }, name="example.com", type="CERT", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3604,7 +3735,7 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -3620,7 +3751,7 @@ def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -3636,19 +3767,20 @@ def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="CERT", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -3659,7 +3791,7 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: def test_method_edit_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -3671,14 +3803,16 @@ def test_method_edit_overload_5(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3687,7 +3821,7 @@ def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -3703,7 +3837,7 @@ def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -3719,19 +3853,20 @@ def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content={}, name="example.com", type="CNAME", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -3742,7 +3877,7 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: def test_method_edit_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -3754,7 +3889,7 @@ def test_method_edit_overload_6(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, @@ -3763,9 +3898,11 @@ def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> Non }, name="example.com", type="DNSKEY", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3774,7 +3911,7 @@ def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -3790,7 +3927,7 @@ def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -3806,19 +3943,20 @@ def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="DNSKEY", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -3829,7 +3967,7 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: def test_method_edit_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -3841,7 +3979,7 @@ def test_method_edit_overload_7(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, "digest": "string", @@ -3850,9 +3988,11 @@ def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> Non }, name="example.com", type="DS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3861,7 +4001,7 @@ def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -3877,7 +4017,7 @@ def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -3893,19 +4033,20 @@ def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="DS", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -3916,7 +4057,7 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: def test_method_edit_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -3928,7 +4069,7 @@ def test_method_edit_overload_8(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -3936,9 +4077,11 @@ def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> Non }, name="example.com", type="HTTPS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3947,7 +4090,7 @@ def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -3963,7 +4106,7 @@ def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -3979,19 +4122,20 @@ def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="HTTPS", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -4002,7 +4146,7 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: def test_method_edit_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -4014,7 +4158,7 @@ def test_method_edit_overload_9(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, "lat_degrees": 37, @@ -4031,9 +4175,11 @@ def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> Non }, name="example.com", type="LOC", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4042,7 +4188,7 @@ def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -4058,7 +4204,7 @@ def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -4074,19 +4220,20 @@ def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="LOC", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -4097,7 +4244,7 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: def test_method_edit_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -4110,14 +4257,16 @@ def test_method_edit_overload_10(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, type="MX", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4126,7 +4275,7 @@ def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> No def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -4143,7 +4292,7 @@ def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -4160,20 +4309,21 @@ def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="mx.example.com", name="example.com", priority=10, type="MX", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -4185,7 +4335,7 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: def test_method_edit_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -4197,7 +4347,7 @@ def test_method_edit_overload_11(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": "string", "order": 100, @@ -4208,9 +4358,11 @@ def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> No }, name="example.com", type="NAPTR", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4219,7 +4371,7 @@ def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> No def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -4235,7 +4387,7 @@ def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -4251,19 +4403,20 @@ def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="NAPTR", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -4274,7 +4427,7 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: def test_method_edit_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -4286,13 +4439,15 @@ def test_method_edit_overload_12(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4301,7 +4456,7 @@ def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> No def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -4317,7 +4472,7 @@ def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -4333,19 +4488,20 @@ def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="ns1.example.com", name="example.com", type="NS", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -4356,7 +4512,7 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: def test_method_edit_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -4368,13 +4524,15 @@ def test_method_edit_overload_13(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4383,7 +4541,7 @@ def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> No def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -4399,7 +4557,7 @@ def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -4415,19 +4573,20 @@ def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="example.com", name="example.com", type="PTR", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -4438,7 +4597,7 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: def test_method_edit_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -4450,7 +4609,7 @@ def test_method_edit_overload_14(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 0, @@ -4459,9 +4618,11 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No }, name="example.com", type="SMIMEA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4470,7 +4631,7 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -4486,7 +4647,7 @@ def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -4502,19 +4663,20 @@ def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="SMIMEA", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -4525,7 +4687,7 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: def test_method_edit_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -4537,7 +4699,7 @@ def test_method_edit_overload_15(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", "port": 8806, @@ -4549,9 +4711,11 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No }, name="_sip._tcp.example.com", type="SRV", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4560,7 +4724,7 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -4576,7 +4740,7 @@ def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -4592,19 +4756,20 @@ def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="_sip._tcp.example.com", type="SRV", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -4615,7 +4780,7 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: def test_method_edit_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -4627,7 +4792,7 @@ def test_method_edit_overload_16(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, "fingerprint": "string", @@ -4635,9 +4800,11 @@ def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> No }, name="example.com", type="SSHFP", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4646,7 +4813,7 @@ def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> No def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -4662,7 +4829,7 @@ def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -4678,19 +4845,20 @@ def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="SSHFP", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -4701,7 +4869,7 @@ def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: def test_method_edit_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -4713,7 +4881,7 @@ def test_method_edit_overload_17(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -4721,9 +4889,11 @@ def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> No }, name="example.com", type="SVCB", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4732,7 +4902,7 @@ def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> No def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -4748,7 +4918,7 @@ def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -4764,19 +4934,20 @@ def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="SVCB", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -4787,7 +4958,7 @@ def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: def test_method_edit_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -4799,7 +4970,7 @@ def test_method_edit_overload_18(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 1, @@ -4808,9 +4979,11 @@ def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> No }, name="example.com", type="TLSA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4819,7 +4992,7 @@ def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> No def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -4835,7 +5008,7 @@ def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -4851,19 +5024,20 @@ def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="TLSA", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -4874,7 +5048,7 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: def test_method_edit_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -4886,13 +5060,15 @@ def test_method_edit_overload_19(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4901,7 +5077,7 @@ def test_method_edit_with_all_params_overload_19(self, client: Cloudflare) -> No def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -4917,7 +5093,7 @@ def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -4933,19 +5109,20 @@ def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="example text content", name="example.com", type="TXT", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -4956,7 +5133,7 @@ def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: def test_method_edit_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -4969,7 +5146,7 @@ def test_method_edit_overload_20(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", "weight": 20, @@ -4977,9 +5154,11 @@ def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> No name="example.com", priority=10, type="URI", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4988,7 +5167,7 @@ def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> No def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -5005,7 +5184,7 @@ def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -5022,20 +5201,21 @@ def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_20(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", priority=10, type="URI", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -5234,7 +5414,7 @@ class TestAsyncRecords: @parametrize async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -5245,14 +5425,16 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5260,7 +5442,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -5275,7 +5457,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -5291,19 +5473,20 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", content="198.51.100.4", name="example.com", type="A", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -5314,14 +5497,16 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5329,7 +5514,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -5344,7 +5529,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -5360,19 +5545,20 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", content="2400:cb00:2049::1", name="example.com", type="AAAA", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -5383,7 +5569,7 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", @@ -5391,9 +5577,11 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn }, name="example.com", type="CAA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5401,7 +5589,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -5416,7 +5604,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -5432,19 +5620,20 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="CAA", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -5455,7 +5644,7 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, "certificate": "string", @@ -5464,9 +5653,11 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn }, name="example.com", type="CERT", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5474,7 +5665,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -5489,7 +5680,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -5505,19 +5696,20 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="CERT", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -5528,14 +5720,16 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5543,7 +5737,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -5558,7 +5752,7 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -5574,19 +5768,20 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", content={}, name="example.com", type="CNAME", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -5597,7 +5792,7 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, @@ -5606,9 +5801,11 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn }, name="example.com", type="DNSKEY", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5616,7 +5813,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -5631,7 +5828,7 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -5647,19 +5844,20 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="DNSKEY", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -5670,7 +5868,7 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, "digest": "string", @@ -5679,9 +5877,11 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn }, name="example.com", type="DS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5689,7 +5889,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -5704,7 +5904,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -5720,19 +5920,20 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="DS", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -5743,7 +5944,7 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -5751,9 +5952,11 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn }, name="example.com", type="HTTPS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5761,7 +5964,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -5776,7 +5979,7 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -5792,19 +5995,20 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="HTTPS", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -5815,7 +6019,7 @@ async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, "lat_degrees": 37, @@ -5832,9 +6036,11 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn }, name="example.com", type="LOC", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5842,7 +6048,7 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -5857,7 +6063,7 @@ async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -5873,19 +6079,20 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_9(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="LOC", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -5897,14 +6104,16 @@ async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, type="MX", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5912,7 +6121,7 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy @parametrize async def test_raw_response_create_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -5928,7 +6137,7 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -5945,20 +6154,21 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_10(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", content="mx.example.com", name="example.com", priority=10, type="MX", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -5969,7 +6179,7 @@ async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": "string", "order": 100, @@ -5980,9 +6190,11 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy }, name="example.com", type="NAPTR", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5990,7 +6202,7 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy @parametrize async def test_raw_response_create_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -6005,7 +6217,7 @@ async def test_raw_response_create_overload_11(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -6021,19 +6233,20 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_11(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="NAPTR", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -6044,13 +6257,15 @@ async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6058,7 +6273,7 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy @parametrize async def test_raw_response_create_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -6073,7 +6288,7 @@ async def test_raw_response_create_overload_12(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -6089,19 +6304,20 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_12(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", content="ns1.example.com", name="example.com", type="NS", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -6112,13 +6328,15 @@ async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6126,7 +6344,7 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy @parametrize async def test_raw_response_create_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -6141,7 +6359,7 @@ async def test_raw_response_create_overload_13(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -6157,19 +6375,20 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_13(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", content="example.com", name="example.com", type="PTR", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -6180,7 +6399,7 @@ async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 0, @@ -6189,9 +6408,11 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy }, name="example.com", type="SMIMEA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6199,7 +6420,7 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy @parametrize async def test_raw_response_create_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -6214,7 +6435,7 @@ async def test_raw_response_create_overload_14(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -6230,19 +6451,20 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_14(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="SMIMEA", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -6253,7 +6475,7 @@ async def test_method_create_overload_15(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", "port": 8806, @@ -6265,9 +6487,11 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy }, name="_sip._tcp.example.com", type="SRV", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6275,7 +6499,7 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy @parametrize async def test_raw_response_create_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -6290,7 +6514,7 @@ async def test_raw_response_create_overload_15(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -6306,19 +6530,20 @@ async def test_streaming_response_create_overload_15(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_15(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="_sip._tcp.example.com", type="SRV", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -6329,7 +6554,7 @@ async def test_method_create_overload_16(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, "fingerprint": "string", @@ -6337,9 +6562,11 @@ async def test_method_create_with_all_params_overload_16(self, async_client: Asy }, name="example.com", type="SSHFP", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6347,7 +6574,7 @@ async def test_method_create_with_all_params_overload_16(self, async_client: Asy @parametrize async def test_raw_response_create_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -6362,7 +6589,7 @@ async def test_raw_response_create_overload_16(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -6378,19 +6605,20 @@ async def test_streaming_response_create_overload_16(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_16(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="SSHFP", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -6401,7 +6629,7 @@ async def test_method_create_overload_17(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -6409,9 +6637,11 @@ async def test_method_create_with_all_params_overload_17(self, async_client: Asy }, name="example.com", type="SVCB", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6419,7 +6649,7 @@ async def test_method_create_with_all_params_overload_17(self, async_client: Asy @parametrize async def test_raw_response_create_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -6434,7 +6664,7 @@ async def test_raw_response_create_overload_17(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -6450,19 +6680,20 @@ async def test_streaming_response_create_overload_17(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_17(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="SVCB", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -6473,7 +6704,7 @@ async def test_method_create_overload_18(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 1, @@ -6482,9 +6713,11 @@ async def test_method_create_with_all_params_overload_18(self, async_client: Asy }, name="example.com", type="TLSA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6492,7 +6725,7 @@ async def test_method_create_with_all_params_overload_18(self, async_client: Asy @parametrize async def test_raw_response_create_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -6507,7 +6740,7 @@ async def test_raw_response_create_overload_18(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -6523,19 +6756,20 @@ async def test_streaming_response_create_overload_18(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_18(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", type="TLSA", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -6546,13 +6780,15 @@ async def test_method_create_overload_19(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6560,7 +6796,7 @@ async def test_method_create_with_all_params_overload_19(self, async_client: Asy @parametrize async def test_raw_response_create_overload_19(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -6575,7 +6811,7 @@ async def test_raw_response_create_overload_19(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_19(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -6591,19 +6827,20 @@ async def test_streaming_response_create_overload_19(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_19(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", content="example text content", name="example.com", type="TXT", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -6615,7 +6852,7 @@ async def test_method_create_overload_20(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", "weight": 20, @@ -6623,9 +6860,11 @@ async def test_method_create_with_all_params_overload_20(self, async_client: Asy name="example.com", priority=10, type="URI", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6633,7 +6872,7 @@ async def test_method_create_with_all_params_overload_20(self, async_client: Asy @parametrize async def test_raw_response_create_overload_20(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -6649,7 +6888,7 @@ async def test_raw_response_create_overload_20(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_20(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -6666,13 +6905,14 @@ async def test_streaming_response_create_overload_20(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_20(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - zone_id="", + path_zone_id="", data={}, name="example.com", priority=10, type="URI", + body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -6680,7 +6920,7 @@ async def test_path_params_create_overload_20(self, async_client: AsyncCloudflar async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -6692,14 +6932,16 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6708,7 +6950,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -6724,7 +6966,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -6740,19 +6982,20 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="198.51.100.4", name="example.com", type="A", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -6763,7 +7006,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -6775,14 +7018,16 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6791,7 +7036,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -6807,7 +7052,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -6823,19 +7068,20 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="2400:cb00:2049::1", name="example.com", type="AAAA", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -6846,7 +7092,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -6858,7 +7104,7 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", @@ -6866,9 +7112,11 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn }, name="example.com", type="CAA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6877,7 +7125,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -6893,7 +7141,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -6909,19 +7157,20 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="CAA", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -6932,7 +7181,7 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -6944,7 +7193,7 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, "certificate": "string", @@ -6953,9 +7202,11 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn }, name="example.com", type="CERT", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6964,7 +7215,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -6980,7 +7231,7 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -6996,19 +7247,20 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="CERT", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -7019,7 +7271,7 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -7031,14 +7283,16 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7047,7 +7301,7 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -7063,7 +7317,7 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -7079,19 +7333,20 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content={}, name="example.com", type="CNAME", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -7102,7 +7357,7 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -7114,7 +7369,7 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, @@ -7123,9 +7378,11 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn }, name="example.com", type="DNSKEY", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7134,7 +7391,7 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -7150,7 +7407,7 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -7166,19 +7423,20 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="DNSKEY", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -7189,7 +7447,7 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -7201,7 +7459,7 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, "digest": "string", @@ -7210,9 +7468,11 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn }, name="example.com", type="DS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7221,7 +7481,7 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -7237,7 +7497,7 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -7253,19 +7513,20 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="DS", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -7276,7 +7537,7 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -7288,7 +7549,7 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -7296,9 +7557,11 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn }, name="example.com", type="HTTPS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7307,7 +7570,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -7323,7 +7586,7 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -7339,19 +7602,20 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="HTTPS", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -7362,7 +7626,7 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -7374,7 +7638,7 @@ async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, "lat_degrees": 37, @@ -7391,9 +7655,11 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn }, name="example.com", type="LOC", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7402,7 +7668,7 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -7418,7 +7684,7 @@ async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -7434,19 +7700,20 @@ async def test_streaming_response_update_overload_9(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="LOC", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -7457,7 +7724,7 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -7470,14 +7737,16 @@ async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, type="MX", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7486,7 +7755,7 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy async def test_raw_response_update_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -7503,7 +7772,7 @@ async def test_raw_response_update_overload_10(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -7520,20 +7789,21 @@ async def test_streaming_response_update_overload_10(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_10(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="mx.example.com", name="example.com", priority=10, type="MX", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -7545,7 +7815,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -7557,7 +7827,7 @@ async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": "string", "order": 100, @@ -7568,9 +7838,11 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy }, name="example.com", type="NAPTR", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7579,7 +7851,7 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy async def test_raw_response_update_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -7595,7 +7867,7 @@ async def test_raw_response_update_overload_11(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -7611,19 +7883,20 @@ async def test_streaming_response_update_overload_11(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_11(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="NAPTR", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -7634,7 +7907,7 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -7646,13 +7919,15 @@ async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7661,7 +7936,7 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy async def test_raw_response_update_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -7677,7 +7952,7 @@ async def test_raw_response_update_overload_12(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -7693,19 +7968,20 @@ async def test_streaming_response_update_overload_12(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_12(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="ns1.example.com", name="example.com", type="NS", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -7716,7 +7992,7 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -7728,13 +8004,15 @@ async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7743,7 +8021,7 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy async def test_raw_response_update_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -7759,7 +8037,7 @@ async def test_raw_response_update_overload_13(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -7775,19 +8053,20 @@ async def test_streaming_response_update_overload_13(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_13(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="example.com", name="example.com", type="PTR", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -7798,7 +8077,7 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -7810,7 +8089,7 @@ async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 0, @@ -7819,9 +8098,11 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy }, name="example.com", type="SMIMEA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7830,7 +8111,7 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy async def test_raw_response_update_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -7846,7 +8127,7 @@ async def test_raw_response_update_overload_14(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -7862,19 +8143,20 @@ async def test_streaming_response_update_overload_14(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_14(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="SMIMEA", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -7885,7 +8167,7 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar async def test_method_update_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -7897,7 +8179,7 @@ async def test_method_update_overload_15(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", "port": 8806, @@ -7909,9 +8191,11 @@ async def test_method_update_with_all_params_overload_15(self, async_client: Asy }, name="_sip._tcp.example.com", type="SRV", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7920,7 +8204,7 @@ async def test_method_update_with_all_params_overload_15(self, async_client: Asy async def test_raw_response_update_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -7936,7 +8220,7 @@ async def test_raw_response_update_overload_15(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -7952,19 +8236,20 @@ async def test_streaming_response_update_overload_15(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_15(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="_sip._tcp.example.com", type="SRV", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -7975,7 +8260,7 @@ async def test_path_params_update_overload_15(self, async_client: AsyncCloudflar async def test_method_update_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -7987,7 +8272,7 @@ async def test_method_update_overload_16(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, "fingerprint": "string", @@ -7995,9 +8280,11 @@ async def test_method_update_with_all_params_overload_16(self, async_client: Asy }, name="example.com", type="SSHFP", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8006,7 +8293,7 @@ async def test_method_update_with_all_params_overload_16(self, async_client: Asy async def test_raw_response_update_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -8022,7 +8309,7 @@ async def test_raw_response_update_overload_16(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -8038,19 +8325,20 @@ async def test_streaming_response_update_overload_16(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_16(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="SSHFP", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -8061,7 +8349,7 @@ async def test_path_params_update_overload_16(self, async_client: AsyncCloudflar async def test_method_update_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -8073,7 +8361,7 @@ async def test_method_update_overload_17(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -8081,9 +8369,11 @@ async def test_method_update_with_all_params_overload_17(self, async_client: Asy }, name="example.com", type="SVCB", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8092,7 +8382,7 @@ async def test_method_update_with_all_params_overload_17(self, async_client: Asy async def test_raw_response_update_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -8108,7 +8398,7 @@ async def test_raw_response_update_overload_17(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -8124,19 +8414,20 @@ async def test_streaming_response_update_overload_17(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_17(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="SVCB", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -8147,7 +8438,7 @@ async def test_path_params_update_overload_17(self, async_client: AsyncCloudflar async def test_method_update_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -8159,7 +8450,7 @@ async def test_method_update_overload_18(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 1, @@ -8168,9 +8459,11 @@ async def test_method_update_with_all_params_overload_18(self, async_client: Asy }, name="example.com", type="TLSA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8179,7 +8472,7 @@ async def test_method_update_with_all_params_overload_18(self, async_client: Asy async def test_raw_response_update_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -8195,7 +8488,7 @@ async def test_raw_response_update_overload_18(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -8211,19 +8504,20 @@ async def test_streaming_response_update_overload_18(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_18(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="TLSA", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -8234,7 +8528,7 @@ async def test_path_params_update_overload_18(self, async_client: AsyncCloudflar async def test_method_update_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -8246,13 +8540,15 @@ async def test_method_update_overload_19(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8261,7 +8557,7 @@ async def test_method_update_with_all_params_overload_19(self, async_client: Asy async def test_raw_response_update_overload_19(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -8277,7 +8573,7 @@ async def test_raw_response_update_overload_19(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_19(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -8293,19 +8589,20 @@ async def test_streaming_response_update_overload_19(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_19(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="example text content", name="example.com", type="TXT", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -8316,7 +8613,7 @@ async def test_path_params_update_overload_19(self, async_client: AsyncCloudflar async def test_method_update_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -8329,7 +8626,7 @@ async def test_method_update_overload_20(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", "weight": 20, @@ -8337,9 +8634,11 @@ async def test_method_update_with_all_params_overload_20(self, async_client: Asy name="example.com", priority=10, type="URI", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8348,7 +8647,7 @@ async def test_method_update_with_all_params_overload_20(self, async_client: Asy async def test_raw_response_update_overload_20(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -8365,7 +8664,7 @@ async def test_raw_response_update_overload_20(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_20(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -8382,20 +8681,21 @@ async def test_streaming_response_update_overload_20(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_20(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", priority=10, type="URI", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -8527,7 +8827,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -8539,14 +8839,16 @@ async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8555,7 +8857,7 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncC async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -8571,7 +8873,7 @@ async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -8587,19 +8889,20 @@ async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="198.51.100.4", name="example.com", type="A", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -8610,7 +8913,7 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -8622,14 +8925,16 @@ async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8638,7 +8943,7 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncC async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -8654,7 +8959,7 @@ async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -8670,19 +8975,20 @@ async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="2400:cb00:2049::1", name="example.com", type="AAAA", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -8693,7 +8999,7 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -8705,7 +9011,7 @@ async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", @@ -8713,9 +9019,11 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC }, name="example.com", type="CAA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8724,7 +9032,7 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -8740,7 +9048,7 @@ async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -8756,19 +9064,20 @@ async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="CAA", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -8779,7 +9088,7 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -8791,7 +9100,7 @@ async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, "certificate": "string", @@ -8800,9 +9109,11 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC }, name="example.com", type="CERT", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8811,7 +9122,7 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -8827,7 +9138,7 @@ async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -8843,19 +9154,20 @@ async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="CERT", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -8866,7 +9178,7 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -8878,14 +9190,16 @@ async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8894,7 +9208,7 @@ async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncC async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -8910,7 +9224,7 @@ async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -8926,19 +9240,20 @@ async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content={}, name="example.com", type="CNAME", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -8949,7 +9264,7 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -8961,7 +9276,7 @@ async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, @@ -8970,9 +9285,11 @@ async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncC }, name="example.com", type="DNSKEY", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8981,7 +9298,7 @@ async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncC async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -8997,7 +9314,7 @@ async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -9013,19 +9330,20 @@ async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="DNSKEY", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -9036,7 +9354,7 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -9048,7 +9366,7 @@ async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, "digest": "string", @@ -9057,9 +9375,11 @@ async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncC }, name="example.com", type="DS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9068,7 +9388,7 @@ async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncC async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -9084,7 +9404,7 @@ async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -9100,19 +9420,20 @@ async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="DS", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -9123,7 +9444,7 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -9135,7 +9456,7 @@ async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -9143,9 +9464,11 @@ async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncC }, name="example.com", type="HTTPS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9154,7 +9477,7 @@ async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncC async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -9170,7 +9493,7 @@ async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -9186,19 +9509,20 @@ async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="HTTPS", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -9209,7 +9533,7 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -9221,7 +9545,7 @@ async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, "lat_degrees": 37, @@ -9238,9 +9562,11 @@ async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncC }, name="example.com", type="LOC", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9249,7 +9575,7 @@ async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncC async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -9265,7 +9591,7 @@ async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -9281,19 +9607,20 @@ async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="LOC", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -9304,7 +9631,7 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -9317,14 +9644,16 @@ async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, type="MX", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9333,7 +9662,7 @@ async def test_method_edit_with_all_params_overload_10(self, async_client: Async async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -9350,7 +9679,7 @@ async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -9367,20 +9696,21 @@ async def test_streaming_response_edit_overload_10(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="mx.example.com", name="example.com", priority=10, type="MX", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -9392,7 +9722,7 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -9404,7 +9734,7 @@ async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": "string", "order": 100, @@ -9415,9 +9745,11 @@ async def test_method_edit_with_all_params_overload_11(self, async_client: Async }, name="example.com", type="NAPTR", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9426,7 +9758,7 @@ async def test_method_edit_with_all_params_overload_11(self, async_client: Async async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -9442,7 +9774,7 @@ async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -9458,19 +9790,20 @@ async def test_streaming_response_edit_overload_11(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="NAPTR", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -9481,7 +9814,7 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -9493,13 +9826,15 @@ async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9508,7 +9843,7 @@ async def test_method_edit_with_all_params_overload_12(self, async_client: Async async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -9524,7 +9859,7 @@ async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -9540,19 +9875,20 @@ async def test_streaming_response_edit_overload_12(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="ns1.example.com", name="example.com", type="NS", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -9563,7 +9899,7 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -9575,13 +9911,15 @@ async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9590,7 +9928,7 @@ async def test_method_edit_with_all_params_overload_13(self, async_client: Async async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -9606,7 +9944,7 @@ async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -9622,19 +9960,20 @@ async def test_streaming_response_edit_overload_13(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="example.com", name="example.com", type="PTR", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -9645,7 +9984,7 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -9657,7 +9996,7 @@ async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 0, @@ -9666,9 +10005,11 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async }, name="example.com", type="SMIMEA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9677,7 +10018,7 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -9693,7 +10034,7 @@ async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -9709,19 +10050,20 @@ async def test_streaming_response_edit_overload_14(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="SMIMEA", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -9732,7 +10074,7 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -9744,7 +10086,7 @@ async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", "port": 8806, @@ -9756,9 +10098,11 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async }, name="_sip._tcp.example.com", type="SRV", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9767,7 +10111,7 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -9783,7 +10127,7 @@ async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -9799,19 +10143,20 @@ async def test_streaming_response_edit_overload_15(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="_sip._tcp.example.com", type="SRV", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -9822,7 +10167,7 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -9834,7 +10179,7 @@ async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, "fingerprint": "string", @@ -9842,9 +10187,11 @@ async def test_method_edit_with_all_params_overload_16(self, async_client: Async }, name="example.com", type="SSHFP", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9853,7 +10200,7 @@ async def test_method_edit_with_all_params_overload_16(self, async_client: Async async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -9869,7 +10216,7 @@ async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -9885,19 +10232,20 @@ async def test_streaming_response_edit_overload_16(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="SSHFP", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -9908,7 +10256,7 @@ async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -9920,7 +10268,7 @@ async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -9928,9 +10276,11 @@ async def test_method_edit_with_all_params_overload_17(self, async_client: Async }, name="example.com", type="SVCB", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9939,7 +10289,7 @@ async def test_method_edit_with_all_params_overload_17(self, async_client: Async async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -9955,7 +10305,7 @@ async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -9971,19 +10321,20 @@ async def test_streaming_response_edit_overload_17(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="SVCB", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -9994,7 +10345,7 @@ async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -10006,7 +10357,7 @@ async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 1, @@ -10015,9 +10366,11 @@ async def test_method_edit_with_all_params_overload_18(self, async_client: Async }, name="example.com", type="TLSA", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -10026,7 +10379,7 @@ async def test_method_edit_with_all_params_overload_18(self, async_client: Async async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -10042,7 +10395,7 @@ async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -10058,19 +10411,20 @@ async def test_streaming_response_edit_overload_18(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", type="TLSA", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -10081,7 +10435,7 @@ async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -10093,13 +10447,15 @@ async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -10108,7 +10464,7 @@ async def test_method_edit_with_all_params_overload_19(self, async_client: Async async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -10124,7 +10480,7 @@ async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_19(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -10140,19 +10496,20 @@ async def test_streaming_response_edit_overload_19(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", content="example text content", name="example.com", type="TXT", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -10163,7 +10520,7 @@ async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -10176,7 +10533,7 @@ async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", "weight": 20, @@ -10184,9 +10541,11 @@ async def test_method_edit_with_all_params_overload_20(self, async_client: Async name="example.com", priority=10, type="URI", + id="023e105f4ecef8ad9ca31a8372d0c353", comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, + body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -10195,7 +10554,7 @@ async def test_method_edit_with_all_params_overload_20(self, async_client: Async async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -10212,7 +10571,7 @@ async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_20(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -10229,20 +10588,21 @@ async def test_streaming_response_edit_overload_20(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - zone_id="", + path_zone_id="", data={}, name="example.com", priority=10, type="URI", + body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, From 9367d593cef36eef75f464930c6e8d5fa97700d5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 14:22:09 +0000 Subject: [PATCH 005/124] feat(api): OpenAPI spec update via Stainless API (#1019) --- .stats.yml | 2 +- api.md | 2 +- .../zero_trust/gateway/configurations.py | 8 +- .../zero_trust/gateway/lists/lists.py | 20 ++++- .../types/zero_trust/gateway/__init__.py | 1 + .../gateway/gateway_configuration_settings.py | 18 ++++- .../gateway_configuration_settings_param.py | 20 ++++- .../zero_trust/gateway/gateway_item_param.py | 8 +- .../zero_trust/gateway/list_list_params.py | 14 ++++ .../types/zero_trust/gateway/rule_setting.py | 17 ++-- .../zero_trust/gateway/rule_setting_param.py | 17 ++-- .../zero_trust/gateway/test_configurations.py | 4 + .../zero_trust/gateway/test_lists.py | 77 ++++++++++++++++++- .../zero_trust/gateway/test_rules.py | 4 + 14 files changed, 183 insertions(+), 29 deletions(-) create mode 100644 src/cloudflare/types/zero_trust/gateway/list_list_params.py diff --git a/.stats.yml b/.stats.yml index 334f00871ce..db0943d3d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4dcc737ab91fdd1e0edc18214494d806b12d41df4d4641e26e718c8b9dced1dc.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml diff --git a/api.md b/api.md index 9fc32242fc8..b610facf969 100644 --- a/api.md +++ b/api.md @@ -6079,7 +6079,7 @@ Methods: - client.zero_trust.gateway.lists.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.gateway.lists.update(list_id, \*, account_id, \*\*params) -> Optional -- client.zero_trust.gateway.lists.list(\*, account_id) -> SyncSinglePage[GatewayList] +- client.zero_trust.gateway.lists.list(\*, account_id, \*\*params) -> SyncSinglePage[GatewayList] - client.zero_trust.gateway.lists.delete(list_id, \*, account_id) -> Optional - client.zero_trust.gateway.lists.edit(list_id, \*, account_id, \*\*params) -> Optional - client.zero_trust.gateway.lists.get(list_id, \*, account_id) -> Optional diff --git a/src/cloudflare/resources/zero_trust/gateway/configurations.py b/src/cloudflare/resources/zero_trust/gateway/configurations.py index ce316798e47..6f30fdb7210 100644 --- a/src/cloudflare/resources/zero_trust/gateway/configurations.py +++ b/src/cloudflare/resources/zero_trust/gateway/configurations.py @@ -102,8 +102,8 @@ def edit( This endpoint can update a single subcollection of settings such as `antivirus`, `tls_decrypt`, `activity_log`, `block_page`, `browser_isolation`, `fips`, `body_scanning`, or - `custom_certificate`, without updating the entire configuration object. Returns - an error if any collection of settings is not properly configured. + `certificate`, without updating the entire configuration object. Returns an + error if any collection of settings is not properly configured. Args: settings: account settings. @@ -238,8 +238,8 @@ async def edit( This endpoint can update a single subcollection of settings such as `antivirus`, `tls_decrypt`, `activity_log`, `block_page`, `browser_isolation`, `fips`, `body_scanning`, or - `custom_certificate`, without updating the entire configuration object. Returns - an error if any collection of settings is not properly configured. + `certificate`, without updating the entire configuration object. Returns an + error if any collection of settings is not properly configured. Args: settings: account settings. diff --git a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py index 0810dafa367..20f88988e72 100644 --- a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py +++ b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py @@ -34,7 +34,7 @@ AsyncPaginator, make_request_options, ) -from .....types.zero_trust.gateway import list_edit_params, list_create_params, list_update_params +from .....types.zero_trust.gateway import list_edit_params, list_list_params, list_create_params, list_update_params from .....types.zero_trust.gateway.gateway_list import GatewayList from .....types.zero_trust.gateway.gateway_item_param import GatewayItemParam from .....types.zero_trust.gateway.list_create_response import ListCreateResponse @@ -173,6 +173,7 @@ def list( self, *, account_id: str, + type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -184,6 +185,8 @@ def list( Fetches all Zero Trust lists for an account. Args: + type: The type of list. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -198,7 +201,11 @@ def list( f"/accounts/{account_id}/gateway/lists", page=SyncSinglePage[GatewayList], options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform({"type": type}, list_list_params.ListListParams), ), model=GatewayList, ) @@ -478,6 +485,7 @@ def list( self, *, account_id: str, + type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -489,6 +497,8 @@ def list( Fetches all Zero Trust lists for an account. Args: + type: The type of list. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -503,7 +513,11 @@ def list( f"/accounts/{account_id}/gateway/lists", page=AsyncSinglePage[GatewayList], options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform({"type": type}, list_list_params.ListListParams), ), model=GatewayList, ) diff --git a/src/cloudflare/types/zero_trust/gateway/__init__.py b/src/cloudflare/types/zero_trust/gateway/__init__.py index c3abd0c2212..c462d3ec6af 100644 --- a/src/cloudflare/types/zero_trust/gateway/__init__.py +++ b/src/cloudflare/types/zero_trust/gateway/__init__.py @@ -19,6 +19,7 @@ from .logging_setting import LoggingSetting as LoggingSetting from .gateway_settings import GatewaySettings as GatewaySettings from .list_edit_params import ListEditParams as ListEditParams +from .list_list_params import ListListParams as ListListParams from .location_network import LocationNetwork as LocationNetwork from .gateway_item_param import GatewayItemParam as GatewayItemParam from .list_create_params import ListCreateParams as ListCreateParams diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py index 13705c996f6..5504ecf870a 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py @@ -14,7 +14,12 @@ from .browser_isolation_settings import BrowserIsolationSettings from .custom_certificate_settings import CustomCertificateSettings -__all__ = ["GatewayConfigurationSettings"] +__all__ = ["GatewayConfigurationSettings", "Certificate"] + + +class Certificate(BaseModel): + id: str + """UUID of certificate to be used for interception.""" class GatewayConfigurationSettings(BaseModel): @@ -33,8 +38,17 @@ class GatewayConfigurationSettings(BaseModel): browser_isolation: Optional[BrowserIsolationSettings] = None """Browser isolation settings.""" + certificate: Optional[Certificate] = None + """Certificate settings for Gateway TLS interception. + + If not specified, the Cloudflare Root CA will be used. + """ + custom_certificate: Optional[CustomCertificateSettings] = None - """Custom certificate settings for BYO-PKI.""" + """Custom certificate settings for BYO-PKI. + + (deprecated and replaced by `certificate`) + """ extended_email_matching: Optional[ExtendedEmailMatching] = None """Extended e-mail matching settings.""" diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py index 8b0b1443581..11cea789954 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing_extensions import Required, TypedDict from .tls_settings_param import TLSSettingsParam from .fips_settings_param import FipsSettingsParam @@ -15,7 +15,12 @@ from .browser_isolation_settings_param import BrowserIsolationSettingsParam from .custom_certificate_settings_param import CustomCertificateSettingsParam -__all__ = ["GatewayConfigurationSettingsParam"] +__all__ = ["GatewayConfigurationSettingsParam", "Certificate"] + + +class Certificate(TypedDict, total=False): + id: Required[str] + """UUID of certificate to be used for interception.""" class GatewayConfigurationSettingsParam(TypedDict, total=False): @@ -34,8 +39,17 @@ class GatewayConfigurationSettingsParam(TypedDict, total=False): browser_isolation: BrowserIsolationSettingsParam """Browser isolation settings.""" + certificate: Certificate + """Certificate settings for Gateway TLS interception. + + If not specified, the Cloudflare Root CA will be used. + """ + custom_certificate: CustomCertificateSettingsParam - """Custom certificate settings for BYO-PKI.""" + """Custom certificate settings for BYO-PKI. + + (deprecated and replaced by `certificate`) + """ extended_email_matching: ExtendedEmailMatchingParam """Extended e-mail matching settings.""" diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py b/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py index 5b5d081859d..819b853caa8 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py @@ -2,11 +2,17 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing import Union +from datetime import datetime +from typing_extensions import Annotated, TypedDict + +from ...._utils import PropertyInfo __all__ = ["GatewayItemParam"] class GatewayItemParam(TypedDict, total=False): + created_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + value: str """The value of the item in a list.""" diff --git a/src/cloudflare/types/zero_trust/gateway/list_list_params.py b/src/cloudflare/types/zero_trust/gateway/list_list_params.py new file mode 100644 index 00000000000..30c9d6123e6 --- /dev/null +++ b/src/cloudflare/types/zero_trust/gateway/list_list_params.py @@ -0,0 +1,14 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ListListParams"] + + +class ListListParams(TypedDict, total=False): + account_id: Required[str] + + type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"] + """The type of list.""" diff --git a/src/cloudflare/types/zero_trust/gateway/rule_setting.py b/src/cloudflare/types/zero_trust/gateway/rule_setting.py index 9af12528729..1e87ca2204e 100644 --- a/src/cloudflare/types/zero_trust/gateway/rule_setting.py +++ b/src/cloudflare/types/zero_trust/gateway/rule_setting.py @@ -28,19 +28,19 @@ class AuditSSH(BaseModel): class BisoAdminControls(BaseModel): dcp: Optional[bool] = None - """Set to true to enable copy-pasting.""" + """Set to false to enable copy-pasting.""" dd: Optional[bool] = None - """Set to true to enable downloading.""" + """Set to false to enable downloading.""" dk: Optional[bool] = None - """Set to true to enable keyboard usage.""" + """Set to false to enable keyboard usage.""" dp: Optional[bool] = None - """Set to true to enable printing.""" + """Set to false to enable printing.""" du: Optional[bool] = None - """Set to true to enable uploading.""" + """Set to false to enable uploading.""" class CheckSession(BaseModel): @@ -153,6 +153,13 @@ class RuleSetting(BaseModel): it to indicate local egress via WARP IPs. """ + ignore_cname_category_matches: Optional[bool] = None + """Set to true, to ignore the category matches at CNAME domains in a response. + + If unchecked, the categories in this rule will be checked against all the CNAME + domain categories in a response. + """ + insecure_disable_dnssec_validation: Optional[bool] = None """INSECURE - disable DNSSEC validation (for Allow actions).""" diff --git a/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py b/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py index 62fe1523f29..0992e550137 100644 --- a/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py +++ b/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py @@ -29,19 +29,19 @@ class AuditSSH(TypedDict, total=False): class BisoAdminControls(TypedDict, total=False): dcp: bool - """Set to true to enable copy-pasting.""" + """Set to false to enable copy-pasting.""" dd: bool - """Set to true to enable downloading.""" + """Set to false to enable downloading.""" dk: bool - """Set to true to enable keyboard usage.""" + """Set to false to enable keyboard usage.""" dp: bool - """Set to true to enable printing.""" + """Set to false to enable printing.""" du: bool - """Set to true to enable uploading.""" + """Set to false to enable uploading.""" class CheckSession(TypedDict, total=False): @@ -154,6 +154,13 @@ class RuleSettingParam(TypedDict, total=False): it to indicate local egress via WARP IPs. """ + ignore_cname_category_matches: bool + """Set to true, to ignore the category matches at CNAME domains in a response. + + If unchecked, the categories in this rule will be checked against all the CNAME + domain categories in a response. + """ + insecure_disable_dnssec_validation: bool """INSECURE - disable DNSSEC validation (for Allow actions).""" diff --git a/tests/api_resources/zero_trust/gateway/test_configurations.py b/tests/api_resources/zero_trust/gateway/test_configurations.py index 62f30e964a0..795445ac228 100644 --- a/tests/api_resources/zero_trust/gateway/test_configurations.py +++ b/tests/api_resources/zero_trust/gateway/test_configurations.py @@ -60,6 +60,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "non_identity_enabled": True, "url_browser_isolation_enabled": True, }, + "certificate": {"id": "d1b364c5-1311-466e-a194-f0e943e0799f"}, "custom_certificate": { "enabled": True, "id": "d1b364c5-1311-466e-a194-f0e943e0799f", @@ -142,6 +143,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "non_identity_enabled": True, "url_browser_isolation_enabled": True, }, + "certificate": {"id": "d1b364c5-1311-466e-a194-f0e943e0799f"}, "custom_certificate": { "enabled": True, "id": "d1b364c5-1311-466e-a194-f0e943e0799f", @@ -266,6 +268,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "non_identity_enabled": True, "url_browser_isolation_enabled": True, }, + "certificate": {"id": "d1b364c5-1311-466e-a194-f0e943e0799f"}, "custom_certificate": { "enabled": True, "id": "d1b364c5-1311-466e-a194-f0e943e0799f", @@ -348,6 +351,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "non_identity_enabled": True, "url_browser_isolation_enabled": True, }, + "certificate": {"id": "d1b364c5-1311-466e-a194-f0e943e0799f"}, "custom_certificate": { "enabled": True, "id": "d1b364c5-1311-466e-a194-f0e943e0799f", diff --git a/tests/api_resources/zero_trust/gateway/test_lists.py b/tests/api_resources/zero_trust/gateway/test_lists.py index cfd4e978d0f..d7fdc097741 100644 --- a/tests/api_resources/zero_trust/gateway/test_lists.py +++ b/tests/api_resources/zero_trust/gateway/test_lists.py @@ -9,6 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.gateway import ( GatewayList, @@ -38,7 +39,20 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: name="Admin Serial Numbers", type="SERIAL", description="The serial numbers for administrators", - items=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], + items=[ + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + ], ) assert_matches_type(Optional[ListCreateResponse], list_, path=["response"]) @@ -149,6 +163,14 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[GatewayList], list_, path=["response"]) + @parametrize + def test_method_list_with_all_params(self, client: Cloudflare) -> None: + list_ = client.zero_trust.gateway.lists.list( + account_id="699d98642c564d2e855e9661899b7252", + type="SERIAL", + ) + assert_matches_type(SyncSinglePage[GatewayList], list_, path=["response"]) + @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.with_raw_response.list( @@ -241,7 +263,20 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: list_ = client.zero_trust.gateway.lists.edit( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - append=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], + append=[ + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + ], remove=["8GE8721REF", "8GE8721REF", "8GE8721REF"], ) assert_matches_type(Optional[GatewayList], list_, path=["response"]) @@ -354,7 +389,20 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare name="Admin Serial Numbers", type="SERIAL", description="The serial numbers for administrators", - items=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], + items=[ + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + ], ) assert_matches_type(Optional[ListCreateResponse], list_, path=["response"]) @@ -465,6 +513,14 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[GatewayList], list_, path=["response"]) + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: + list_ = await async_client.zero_trust.gateway.lists.list( + account_id="699d98642c564d2e855e9661899b7252", + type="SERIAL", + ) + assert_matches_type(AsyncSinglePage[GatewayList], list_, path=["response"]) + @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.with_raw_response.list( @@ -557,7 +613,20 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) list_ = await async_client.zero_trust.gateway.lists.edit( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - append=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], + append=[ + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + ], remove=["8GE8721REF", "8GE8721REF", "8GE8721REF"], ) assert_matches_type(Optional[GatewayList], list_, path=["response"]) diff --git a/tests/api_resources/zero_trust/gateway/test_rules.py b/tests/api_resources/zero_trust/gateway/test_rules.py index b83694ffb9f..924ce1fa37b 100644 --- a/tests/api_resources/zero_trust/gateway/test_rules.py +++ b/tests/api_resources/zero_trust/gateway/test_rules.py @@ -110,6 +110,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "ipv4_fallback": "192.0.2.3", "ipv6": "2001:DB8::/64", }, + "ignore_cname_category_matches": True, "insecure_disable_dnssec_validation": False, "ip_categories": True, "ip_indicator_feeds": True, @@ -270,6 +271,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "ipv4_fallback": "192.0.2.3", "ipv6": "2001:DB8::/64", }, + "ignore_cname_category_matches": True, "insecure_disable_dnssec_validation": False, "ip_categories": True, "ip_indicator_feeds": True, @@ -577,6 +579,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "ipv4_fallback": "192.0.2.3", "ipv6": "2001:DB8::/64", }, + "ignore_cname_category_matches": True, "insecure_disable_dnssec_validation": False, "ip_categories": True, "ip_indicator_feeds": True, @@ -737,6 +740,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "ipv4_fallback": "192.0.2.3", "ipv6": "2001:DB8::/64", }, + "ignore_cname_category_matches": True, "insecure_disable_dnssec_validation": False, "ip_categories": True, "ip_indicator_feeds": True, From 8e20edfc520c31134d110170ff84a927629753dc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 14:24:44 +0000 Subject: [PATCH 006/124] feat(api): OpenAPI spec update via Stainless API (#1020) --- .stats.yml | 2 +- api.md | 2 +- .../zero_trust/gateway/configurations.py | 8 +- .../zero_trust/gateway/lists/lists.py | 20 +---- .../types/zero_trust/gateway/__init__.py | 1 - .../gateway/gateway_configuration_settings.py | 18 +---- .../gateway_configuration_settings_param.py | 20 +---- .../zero_trust/gateway/gateway_item_param.py | 8 +- .../zero_trust/gateway/list_list_params.py | 14 ---- .../types/zero_trust/gateway/rule_setting.py | 17 ++-- .../zero_trust/gateway/rule_setting_param.py | 17 ++-- .../zero_trust/gateway/test_configurations.py | 4 - .../zero_trust/gateway/test_lists.py | 77 +------------------ .../zero_trust/gateway/test_rules.py | 4 - 14 files changed, 29 insertions(+), 183 deletions(-) delete mode 100644 src/cloudflare/types/zero_trust/gateway/list_list_params.py diff --git a/.stats.yml b/.stats.yml index db0943d3d73..d1202adc94a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a4ad69b707d0e14c7a716a22c876ab03c40d8aefa59eec101c5c52260cb860f3.yml diff --git a/api.md b/api.md index b610facf969..9fc32242fc8 100644 --- a/api.md +++ b/api.md @@ -6079,7 +6079,7 @@ Methods: - client.zero_trust.gateway.lists.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.gateway.lists.update(list_id, \*, account_id, \*\*params) -> Optional -- client.zero_trust.gateway.lists.list(\*, account_id, \*\*params) -> SyncSinglePage[GatewayList] +- client.zero_trust.gateway.lists.list(\*, account_id) -> SyncSinglePage[GatewayList] - client.zero_trust.gateway.lists.delete(list_id, \*, account_id) -> Optional - client.zero_trust.gateway.lists.edit(list_id, \*, account_id, \*\*params) -> Optional - client.zero_trust.gateway.lists.get(list_id, \*, account_id) -> Optional diff --git a/src/cloudflare/resources/zero_trust/gateway/configurations.py b/src/cloudflare/resources/zero_trust/gateway/configurations.py index 6f30fdb7210..ce316798e47 100644 --- a/src/cloudflare/resources/zero_trust/gateway/configurations.py +++ b/src/cloudflare/resources/zero_trust/gateway/configurations.py @@ -102,8 +102,8 @@ def edit( This endpoint can update a single subcollection of settings such as `antivirus`, `tls_decrypt`, `activity_log`, `block_page`, `browser_isolation`, `fips`, `body_scanning`, or - `certificate`, without updating the entire configuration object. Returns an - error if any collection of settings is not properly configured. + `custom_certificate`, without updating the entire configuration object. Returns + an error if any collection of settings is not properly configured. Args: settings: account settings. @@ -238,8 +238,8 @@ async def edit( This endpoint can update a single subcollection of settings such as `antivirus`, `tls_decrypt`, `activity_log`, `block_page`, `browser_isolation`, `fips`, `body_scanning`, or - `certificate`, without updating the entire configuration object. Returns an - error if any collection of settings is not properly configured. + `custom_certificate`, without updating the entire configuration object. Returns + an error if any collection of settings is not properly configured. Args: settings: account settings. diff --git a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py index 20f88988e72..0810dafa367 100644 --- a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py +++ b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py @@ -34,7 +34,7 @@ AsyncPaginator, make_request_options, ) -from .....types.zero_trust.gateway import list_edit_params, list_list_params, list_create_params, list_update_params +from .....types.zero_trust.gateway import list_edit_params, list_create_params, list_update_params from .....types.zero_trust.gateway.gateway_list import GatewayList from .....types.zero_trust.gateway.gateway_item_param import GatewayItemParam from .....types.zero_trust.gateway.list_create_response import ListCreateResponse @@ -173,7 +173,6 @@ def list( self, *, account_id: str, - type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -185,8 +184,6 @@ def list( Fetches all Zero Trust lists for an account. Args: - type: The type of list. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -201,11 +198,7 @@ def list( f"/accounts/{account_id}/gateway/lists", page=SyncSinglePage[GatewayList], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform({"type": type}, list_list_params.ListListParams), + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), model=GatewayList, ) @@ -485,7 +478,6 @@ def list( self, *, account_id: str, - type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -497,8 +489,6 @@ def list( Fetches all Zero Trust lists for an account. Args: - type: The type of list. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -513,11 +503,7 @@ def list( f"/accounts/{account_id}/gateway/lists", page=AsyncSinglePage[GatewayList], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform({"type": type}, list_list_params.ListListParams), + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), model=GatewayList, ) diff --git a/src/cloudflare/types/zero_trust/gateway/__init__.py b/src/cloudflare/types/zero_trust/gateway/__init__.py index c462d3ec6af..c3abd0c2212 100644 --- a/src/cloudflare/types/zero_trust/gateway/__init__.py +++ b/src/cloudflare/types/zero_trust/gateway/__init__.py @@ -19,7 +19,6 @@ from .logging_setting import LoggingSetting as LoggingSetting from .gateway_settings import GatewaySettings as GatewaySettings from .list_edit_params import ListEditParams as ListEditParams -from .list_list_params import ListListParams as ListListParams from .location_network import LocationNetwork as LocationNetwork from .gateway_item_param import GatewayItemParam as GatewayItemParam from .list_create_params import ListCreateParams as ListCreateParams diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py index 5504ecf870a..13705c996f6 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py @@ -14,12 +14,7 @@ from .browser_isolation_settings import BrowserIsolationSettings from .custom_certificate_settings import CustomCertificateSettings -__all__ = ["GatewayConfigurationSettings", "Certificate"] - - -class Certificate(BaseModel): - id: str - """UUID of certificate to be used for interception.""" +__all__ = ["GatewayConfigurationSettings"] class GatewayConfigurationSettings(BaseModel): @@ -38,17 +33,8 @@ class GatewayConfigurationSettings(BaseModel): browser_isolation: Optional[BrowserIsolationSettings] = None """Browser isolation settings.""" - certificate: Optional[Certificate] = None - """Certificate settings for Gateway TLS interception. - - If not specified, the Cloudflare Root CA will be used. - """ - custom_certificate: Optional[CustomCertificateSettings] = None - """Custom certificate settings for BYO-PKI. - - (deprecated and replaced by `certificate`) - """ + """Custom certificate settings for BYO-PKI.""" extended_email_matching: Optional[ExtendedEmailMatching] = None """Extended e-mail matching settings.""" diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py index 11cea789954..8b0b1443581 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing_extensions import TypedDict from .tls_settings_param import TLSSettingsParam from .fips_settings_param import FipsSettingsParam @@ -15,12 +15,7 @@ from .browser_isolation_settings_param import BrowserIsolationSettingsParam from .custom_certificate_settings_param import CustomCertificateSettingsParam -__all__ = ["GatewayConfigurationSettingsParam", "Certificate"] - - -class Certificate(TypedDict, total=False): - id: Required[str] - """UUID of certificate to be used for interception.""" +__all__ = ["GatewayConfigurationSettingsParam"] class GatewayConfigurationSettingsParam(TypedDict, total=False): @@ -39,17 +34,8 @@ class GatewayConfigurationSettingsParam(TypedDict, total=False): browser_isolation: BrowserIsolationSettingsParam """Browser isolation settings.""" - certificate: Certificate - """Certificate settings for Gateway TLS interception. - - If not specified, the Cloudflare Root CA will be used. - """ - custom_certificate: CustomCertificateSettingsParam - """Custom certificate settings for BYO-PKI. - - (deprecated and replaced by `certificate`) - """ + """Custom certificate settings for BYO-PKI.""" extended_email_matching: ExtendedEmailMatchingParam """Extended e-mail matching settings.""" diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py b/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py index 819b853caa8..5b5d081859d 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py @@ -2,17 +2,11 @@ from __future__ import annotations -from typing import Union -from datetime import datetime -from typing_extensions import Annotated, TypedDict - -from ...._utils import PropertyInfo +from typing_extensions import TypedDict __all__ = ["GatewayItemParam"] class GatewayItemParam(TypedDict, total=False): - created_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - value: str """The value of the item in a list.""" diff --git a/src/cloudflare/types/zero_trust/gateway/list_list_params.py b/src/cloudflare/types/zero_trust/gateway/list_list_params.py deleted file mode 100644 index 30c9d6123e6..00000000000 --- a/src/cloudflare/types/zero_trust/gateway/list_list_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ListListParams"] - - -class ListListParams(TypedDict, total=False): - account_id: Required[str] - - type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"] - """The type of list.""" diff --git a/src/cloudflare/types/zero_trust/gateway/rule_setting.py b/src/cloudflare/types/zero_trust/gateway/rule_setting.py index 1e87ca2204e..9af12528729 100644 --- a/src/cloudflare/types/zero_trust/gateway/rule_setting.py +++ b/src/cloudflare/types/zero_trust/gateway/rule_setting.py @@ -28,19 +28,19 @@ class AuditSSH(BaseModel): class BisoAdminControls(BaseModel): dcp: Optional[bool] = None - """Set to false to enable copy-pasting.""" + """Set to true to enable copy-pasting.""" dd: Optional[bool] = None - """Set to false to enable downloading.""" + """Set to true to enable downloading.""" dk: Optional[bool] = None - """Set to false to enable keyboard usage.""" + """Set to true to enable keyboard usage.""" dp: Optional[bool] = None - """Set to false to enable printing.""" + """Set to true to enable printing.""" du: Optional[bool] = None - """Set to false to enable uploading.""" + """Set to true to enable uploading.""" class CheckSession(BaseModel): @@ -153,13 +153,6 @@ class RuleSetting(BaseModel): it to indicate local egress via WARP IPs. """ - ignore_cname_category_matches: Optional[bool] = None - """Set to true, to ignore the category matches at CNAME domains in a response. - - If unchecked, the categories in this rule will be checked against all the CNAME - domain categories in a response. - """ - insecure_disable_dnssec_validation: Optional[bool] = None """INSECURE - disable DNSSEC validation (for Allow actions).""" diff --git a/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py b/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py index 0992e550137..62fe1523f29 100644 --- a/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py +++ b/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py @@ -29,19 +29,19 @@ class AuditSSH(TypedDict, total=False): class BisoAdminControls(TypedDict, total=False): dcp: bool - """Set to false to enable copy-pasting.""" + """Set to true to enable copy-pasting.""" dd: bool - """Set to false to enable downloading.""" + """Set to true to enable downloading.""" dk: bool - """Set to false to enable keyboard usage.""" + """Set to true to enable keyboard usage.""" dp: bool - """Set to false to enable printing.""" + """Set to true to enable printing.""" du: bool - """Set to false to enable uploading.""" + """Set to true to enable uploading.""" class CheckSession(TypedDict, total=False): @@ -154,13 +154,6 @@ class RuleSettingParam(TypedDict, total=False): it to indicate local egress via WARP IPs. """ - ignore_cname_category_matches: bool - """Set to true, to ignore the category matches at CNAME domains in a response. - - If unchecked, the categories in this rule will be checked against all the CNAME - domain categories in a response. - """ - insecure_disable_dnssec_validation: bool """INSECURE - disable DNSSEC validation (for Allow actions).""" diff --git a/tests/api_resources/zero_trust/gateway/test_configurations.py b/tests/api_resources/zero_trust/gateway/test_configurations.py index 795445ac228..62f30e964a0 100644 --- a/tests/api_resources/zero_trust/gateway/test_configurations.py +++ b/tests/api_resources/zero_trust/gateway/test_configurations.py @@ -60,7 +60,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "non_identity_enabled": True, "url_browser_isolation_enabled": True, }, - "certificate": {"id": "d1b364c5-1311-466e-a194-f0e943e0799f"}, "custom_certificate": { "enabled": True, "id": "d1b364c5-1311-466e-a194-f0e943e0799f", @@ -143,7 +142,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "non_identity_enabled": True, "url_browser_isolation_enabled": True, }, - "certificate": {"id": "d1b364c5-1311-466e-a194-f0e943e0799f"}, "custom_certificate": { "enabled": True, "id": "d1b364c5-1311-466e-a194-f0e943e0799f", @@ -268,7 +266,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "non_identity_enabled": True, "url_browser_isolation_enabled": True, }, - "certificate": {"id": "d1b364c5-1311-466e-a194-f0e943e0799f"}, "custom_certificate": { "enabled": True, "id": "d1b364c5-1311-466e-a194-f0e943e0799f", @@ -351,7 +348,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "non_identity_enabled": True, "url_browser_isolation_enabled": True, }, - "certificate": {"id": "d1b364c5-1311-466e-a194-f0e943e0799f"}, "custom_certificate": { "enabled": True, "id": "d1b364c5-1311-466e-a194-f0e943e0799f", diff --git a/tests/api_resources/zero_trust/gateway/test_lists.py b/tests/api_resources/zero_trust/gateway/test_lists.py index d7fdc097741..cfd4e978d0f 100644 --- a/tests/api_resources/zero_trust/gateway/test_lists.py +++ b/tests/api_resources/zero_trust/gateway/test_lists.py @@ -9,7 +9,6 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.gateway import ( GatewayList, @@ -39,20 +38,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: name="Admin Serial Numbers", type="SERIAL", description="The serial numbers for administrators", - items=[ - { - "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), - "value": "8GE8721REF", - }, - { - "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), - "value": "8GE8721REF", - }, - { - "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), - "value": "8GE8721REF", - }, - ], + items=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], ) assert_matches_type(Optional[ListCreateResponse], list_, path=["response"]) @@ -163,14 +149,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[GatewayList], list_, path=["response"]) - @parametrize - def test_method_list_with_all_params(self, client: Cloudflare) -> None: - list_ = client.zero_trust.gateway.lists.list( - account_id="699d98642c564d2e855e9661899b7252", - type="SERIAL", - ) - assert_matches_type(SyncSinglePage[GatewayList], list_, path=["response"]) - @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.with_raw_response.list( @@ -263,20 +241,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: list_ = client.zero_trust.gateway.lists.edit( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - append=[ - { - "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), - "value": "8GE8721REF", - }, - { - "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), - "value": "8GE8721REF", - }, - { - "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), - "value": "8GE8721REF", - }, - ], + append=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], remove=["8GE8721REF", "8GE8721REF", "8GE8721REF"], ) assert_matches_type(Optional[GatewayList], list_, path=["response"]) @@ -389,20 +354,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare name="Admin Serial Numbers", type="SERIAL", description="The serial numbers for administrators", - items=[ - { - "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), - "value": "8GE8721REF", - }, - { - "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), - "value": "8GE8721REF", - }, - { - "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), - "value": "8GE8721REF", - }, - ], + items=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], ) assert_matches_type(Optional[ListCreateResponse], list_, path=["response"]) @@ -513,14 +465,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[GatewayList], list_, path=["response"]) - @parametrize - async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: - list_ = await async_client.zero_trust.gateway.lists.list( - account_id="699d98642c564d2e855e9661899b7252", - type="SERIAL", - ) - assert_matches_type(AsyncSinglePage[GatewayList], list_, path=["response"]) - @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.with_raw_response.list( @@ -613,20 +557,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) list_ = await async_client.zero_trust.gateway.lists.edit( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - append=[ - { - "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), - "value": "8GE8721REF", - }, - { - "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), - "value": "8GE8721REF", - }, - { - "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), - "value": "8GE8721REF", - }, - ], + append=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], remove=["8GE8721REF", "8GE8721REF", "8GE8721REF"], ) assert_matches_type(Optional[GatewayList], list_, path=["response"]) diff --git a/tests/api_resources/zero_trust/gateway/test_rules.py b/tests/api_resources/zero_trust/gateway/test_rules.py index 924ce1fa37b..b83694ffb9f 100644 --- a/tests/api_resources/zero_trust/gateway/test_rules.py +++ b/tests/api_resources/zero_trust/gateway/test_rules.py @@ -110,7 +110,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "ipv4_fallback": "192.0.2.3", "ipv6": "2001:DB8::/64", }, - "ignore_cname_category_matches": True, "insecure_disable_dnssec_validation": False, "ip_categories": True, "ip_indicator_feeds": True, @@ -271,7 +270,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "ipv4_fallback": "192.0.2.3", "ipv6": "2001:DB8::/64", }, - "ignore_cname_category_matches": True, "insecure_disable_dnssec_validation": False, "ip_categories": True, "ip_indicator_feeds": True, @@ -579,7 +577,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "ipv4_fallback": "192.0.2.3", "ipv6": "2001:DB8::/64", }, - "ignore_cname_category_matches": True, "insecure_disable_dnssec_validation": False, "ip_categories": True, "ip_indicator_feeds": True, @@ -740,7 +737,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "ipv4_fallback": "192.0.2.3", "ipv6": "2001:DB8::/64", }, - "ignore_cname_category_matches": True, "insecure_disable_dnssec_validation": False, "ip_categories": True, "ip_indicator_feeds": True, From 7d5572aee61a0d57a27878bbdea6e753f08d1021 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 14:27:03 +0000 Subject: [PATCH 007/124] feat(api): OpenAPI spec update via Stainless API (#1021) --- .stats.yml | 2 +- api.md | 2 +- .../zero_trust/gateway/configurations.py | 8 +- .../zero_trust/gateway/lists/lists.py | 20 ++++- .../types/zero_trust/gateway/__init__.py | 1 + .../gateway/gateway_configuration_settings.py | 18 ++++- .../gateway_configuration_settings_param.py | 20 ++++- .../zero_trust/gateway/gateway_item_param.py | 8 +- .../zero_trust/gateway/list_list_params.py | 14 ++++ .../types/zero_trust/gateway/rule_setting.py | 17 ++-- .../zero_trust/gateway/rule_setting_param.py | 17 ++-- .../zero_trust/gateway/test_configurations.py | 4 + .../zero_trust/gateway/test_lists.py | 77 ++++++++++++++++++- .../zero_trust/gateway/test_rules.py | 4 + 14 files changed, 183 insertions(+), 29 deletions(-) create mode 100644 src/cloudflare/types/zero_trust/gateway/list_list_params.py diff --git a/.stats.yml b/.stats.yml index d1202adc94a..6d986a26f7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a4ad69b707d0e14c7a716a22c876ab03c40d8aefa59eec101c5c52260cb860f3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml diff --git a/api.md b/api.md index 9fc32242fc8..b610facf969 100644 --- a/api.md +++ b/api.md @@ -6079,7 +6079,7 @@ Methods: - client.zero_trust.gateway.lists.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.gateway.lists.update(list_id, \*, account_id, \*\*params) -> Optional -- client.zero_trust.gateway.lists.list(\*, account_id) -> SyncSinglePage[GatewayList] +- client.zero_trust.gateway.lists.list(\*, account_id, \*\*params) -> SyncSinglePage[GatewayList] - client.zero_trust.gateway.lists.delete(list_id, \*, account_id) -> Optional - client.zero_trust.gateway.lists.edit(list_id, \*, account_id, \*\*params) -> Optional - client.zero_trust.gateway.lists.get(list_id, \*, account_id) -> Optional diff --git a/src/cloudflare/resources/zero_trust/gateway/configurations.py b/src/cloudflare/resources/zero_trust/gateway/configurations.py index ce316798e47..6f30fdb7210 100644 --- a/src/cloudflare/resources/zero_trust/gateway/configurations.py +++ b/src/cloudflare/resources/zero_trust/gateway/configurations.py @@ -102,8 +102,8 @@ def edit( This endpoint can update a single subcollection of settings such as `antivirus`, `tls_decrypt`, `activity_log`, `block_page`, `browser_isolation`, `fips`, `body_scanning`, or - `custom_certificate`, without updating the entire configuration object. Returns - an error if any collection of settings is not properly configured. + `certificate`, without updating the entire configuration object. Returns an + error if any collection of settings is not properly configured. Args: settings: account settings. @@ -238,8 +238,8 @@ async def edit( This endpoint can update a single subcollection of settings such as `antivirus`, `tls_decrypt`, `activity_log`, `block_page`, `browser_isolation`, `fips`, `body_scanning`, or - `custom_certificate`, without updating the entire configuration object. Returns - an error if any collection of settings is not properly configured. + `certificate`, without updating the entire configuration object. Returns an + error if any collection of settings is not properly configured. Args: settings: account settings. diff --git a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py index 0810dafa367..20f88988e72 100644 --- a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py +++ b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py @@ -34,7 +34,7 @@ AsyncPaginator, make_request_options, ) -from .....types.zero_trust.gateway import list_edit_params, list_create_params, list_update_params +from .....types.zero_trust.gateway import list_edit_params, list_list_params, list_create_params, list_update_params from .....types.zero_trust.gateway.gateway_list import GatewayList from .....types.zero_trust.gateway.gateway_item_param import GatewayItemParam from .....types.zero_trust.gateway.list_create_response import ListCreateResponse @@ -173,6 +173,7 @@ def list( self, *, account_id: str, + type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -184,6 +185,8 @@ def list( Fetches all Zero Trust lists for an account. Args: + type: The type of list. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -198,7 +201,11 @@ def list( f"/accounts/{account_id}/gateway/lists", page=SyncSinglePage[GatewayList], options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform({"type": type}, list_list_params.ListListParams), ), model=GatewayList, ) @@ -478,6 +485,7 @@ def list( self, *, account_id: str, + type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -489,6 +497,8 @@ def list( Fetches all Zero Trust lists for an account. Args: + type: The type of list. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -503,7 +513,11 @@ def list( f"/accounts/{account_id}/gateway/lists", page=AsyncSinglePage[GatewayList], options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform({"type": type}, list_list_params.ListListParams), ), model=GatewayList, ) diff --git a/src/cloudflare/types/zero_trust/gateway/__init__.py b/src/cloudflare/types/zero_trust/gateway/__init__.py index c3abd0c2212..c462d3ec6af 100644 --- a/src/cloudflare/types/zero_trust/gateway/__init__.py +++ b/src/cloudflare/types/zero_trust/gateway/__init__.py @@ -19,6 +19,7 @@ from .logging_setting import LoggingSetting as LoggingSetting from .gateway_settings import GatewaySettings as GatewaySettings from .list_edit_params import ListEditParams as ListEditParams +from .list_list_params import ListListParams as ListListParams from .location_network import LocationNetwork as LocationNetwork from .gateway_item_param import GatewayItemParam as GatewayItemParam from .list_create_params import ListCreateParams as ListCreateParams diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py index 13705c996f6..5504ecf870a 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py @@ -14,7 +14,12 @@ from .browser_isolation_settings import BrowserIsolationSettings from .custom_certificate_settings import CustomCertificateSettings -__all__ = ["GatewayConfigurationSettings"] +__all__ = ["GatewayConfigurationSettings", "Certificate"] + + +class Certificate(BaseModel): + id: str + """UUID of certificate to be used for interception.""" class GatewayConfigurationSettings(BaseModel): @@ -33,8 +38,17 @@ class GatewayConfigurationSettings(BaseModel): browser_isolation: Optional[BrowserIsolationSettings] = None """Browser isolation settings.""" + certificate: Optional[Certificate] = None + """Certificate settings for Gateway TLS interception. + + If not specified, the Cloudflare Root CA will be used. + """ + custom_certificate: Optional[CustomCertificateSettings] = None - """Custom certificate settings for BYO-PKI.""" + """Custom certificate settings for BYO-PKI. + + (deprecated and replaced by `certificate`) + """ extended_email_matching: Optional[ExtendedEmailMatching] = None """Extended e-mail matching settings.""" diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py index 8b0b1443581..11cea789954 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing_extensions import Required, TypedDict from .tls_settings_param import TLSSettingsParam from .fips_settings_param import FipsSettingsParam @@ -15,7 +15,12 @@ from .browser_isolation_settings_param import BrowserIsolationSettingsParam from .custom_certificate_settings_param import CustomCertificateSettingsParam -__all__ = ["GatewayConfigurationSettingsParam"] +__all__ = ["GatewayConfigurationSettingsParam", "Certificate"] + + +class Certificate(TypedDict, total=False): + id: Required[str] + """UUID of certificate to be used for interception.""" class GatewayConfigurationSettingsParam(TypedDict, total=False): @@ -34,8 +39,17 @@ class GatewayConfigurationSettingsParam(TypedDict, total=False): browser_isolation: BrowserIsolationSettingsParam """Browser isolation settings.""" + certificate: Certificate + """Certificate settings for Gateway TLS interception. + + If not specified, the Cloudflare Root CA will be used. + """ + custom_certificate: CustomCertificateSettingsParam - """Custom certificate settings for BYO-PKI.""" + """Custom certificate settings for BYO-PKI. + + (deprecated and replaced by `certificate`) + """ extended_email_matching: ExtendedEmailMatchingParam """Extended e-mail matching settings.""" diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py b/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py index 5b5d081859d..819b853caa8 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py @@ -2,11 +2,17 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing import Union +from datetime import datetime +from typing_extensions import Annotated, TypedDict + +from ...._utils import PropertyInfo __all__ = ["GatewayItemParam"] class GatewayItemParam(TypedDict, total=False): + created_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + value: str """The value of the item in a list.""" diff --git a/src/cloudflare/types/zero_trust/gateway/list_list_params.py b/src/cloudflare/types/zero_trust/gateway/list_list_params.py new file mode 100644 index 00000000000..30c9d6123e6 --- /dev/null +++ b/src/cloudflare/types/zero_trust/gateway/list_list_params.py @@ -0,0 +1,14 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ListListParams"] + + +class ListListParams(TypedDict, total=False): + account_id: Required[str] + + type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"] + """The type of list.""" diff --git a/src/cloudflare/types/zero_trust/gateway/rule_setting.py b/src/cloudflare/types/zero_trust/gateway/rule_setting.py index 9af12528729..1e87ca2204e 100644 --- a/src/cloudflare/types/zero_trust/gateway/rule_setting.py +++ b/src/cloudflare/types/zero_trust/gateway/rule_setting.py @@ -28,19 +28,19 @@ class AuditSSH(BaseModel): class BisoAdminControls(BaseModel): dcp: Optional[bool] = None - """Set to true to enable copy-pasting.""" + """Set to false to enable copy-pasting.""" dd: Optional[bool] = None - """Set to true to enable downloading.""" + """Set to false to enable downloading.""" dk: Optional[bool] = None - """Set to true to enable keyboard usage.""" + """Set to false to enable keyboard usage.""" dp: Optional[bool] = None - """Set to true to enable printing.""" + """Set to false to enable printing.""" du: Optional[bool] = None - """Set to true to enable uploading.""" + """Set to false to enable uploading.""" class CheckSession(BaseModel): @@ -153,6 +153,13 @@ class RuleSetting(BaseModel): it to indicate local egress via WARP IPs. """ + ignore_cname_category_matches: Optional[bool] = None + """Set to true, to ignore the category matches at CNAME domains in a response. + + If unchecked, the categories in this rule will be checked against all the CNAME + domain categories in a response. + """ + insecure_disable_dnssec_validation: Optional[bool] = None """INSECURE - disable DNSSEC validation (for Allow actions).""" diff --git a/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py b/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py index 62fe1523f29..0992e550137 100644 --- a/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py +++ b/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py @@ -29,19 +29,19 @@ class AuditSSH(TypedDict, total=False): class BisoAdminControls(TypedDict, total=False): dcp: bool - """Set to true to enable copy-pasting.""" + """Set to false to enable copy-pasting.""" dd: bool - """Set to true to enable downloading.""" + """Set to false to enable downloading.""" dk: bool - """Set to true to enable keyboard usage.""" + """Set to false to enable keyboard usage.""" dp: bool - """Set to true to enable printing.""" + """Set to false to enable printing.""" du: bool - """Set to true to enable uploading.""" + """Set to false to enable uploading.""" class CheckSession(TypedDict, total=False): @@ -154,6 +154,13 @@ class RuleSettingParam(TypedDict, total=False): it to indicate local egress via WARP IPs. """ + ignore_cname_category_matches: bool + """Set to true, to ignore the category matches at CNAME domains in a response. + + If unchecked, the categories in this rule will be checked against all the CNAME + domain categories in a response. + """ + insecure_disable_dnssec_validation: bool """INSECURE - disable DNSSEC validation (for Allow actions).""" diff --git a/tests/api_resources/zero_trust/gateway/test_configurations.py b/tests/api_resources/zero_trust/gateway/test_configurations.py index 62f30e964a0..795445ac228 100644 --- a/tests/api_resources/zero_trust/gateway/test_configurations.py +++ b/tests/api_resources/zero_trust/gateway/test_configurations.py @@ -60,6 +60,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "non_identity_enabled": True, "url_browser_isolation_enabled": True, }, + "certificate": {"id": "d1b364c5-1311-466e-a194-f0e943e0799f"}, "custom_certificate": { "enabled": True, "id": "d1b364c5-1311-466e-a194-f0e943e0799f", @@ -142,6 +143,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "non_identity_enabled": True, "url_browser_isolation_enabled": True, }, + "certificate": {"id": "d1b364c5-1311-466e-a194-f0e943e0799f"}, "custom_certificate": { "enabled": True, "id": "d1b364c5-1311-466e-a194-f0e943e0799f", @@ -266,6 +268,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "non_identity_enabled": True, "url_browser_isolation_enabled": True, }, + "certificate": {"id": "d1b364c5-1311-466e-a194-f0e943e0799f"}, "custom_certificate": { "enabled": True, "id": "d1b364c5-1311-466e-a194-f0e943e0799f", @@ -348,6 +351,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "non_identity_enabled": True, "url_browser_isolation_enabled": True, }, + "certificate": {"id": "d1b364c5-1311-466e-a194-f0e943e0799f"}, "custom_certificate": { "enabled": True, "id": "d1b364c5-1311-466e-a194-f0e943e0799f", diff --git a/tests/api_resources/zero_trust/gateway/test_lists.py b/tests/api_resources/zero_trust/gateway/test_lists.py index cfd4e978d0f..d7fdc097741 100644 --- a/tests/api_resources/zero_trust/gateway/test_lists.py +++ b/tests/api_resources/zero_trust/gateway/test_lists.py @@ -9,6 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.gateway import ( GatewayList, @@ -38,7 +39,20 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: name="Admin Serial Numbers", type="SERIAL", description="The serial numbers for administrators", - items=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], + items=[ + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + ], ) assert_matches_type(Optional[ListCreateResponse], list_, path=["response"]) @@ -149,6 +163,14 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[GatewayList], list_, path=["response"]) + @parametrize + def test_method_list_with_all_params(self, client: Cloudflare) -> None: + list_ = client.zero_trust.gateway.lists.list( + account_id="699d98642c564d2e855e9661899b7252", + type="SERIAL", + ) + assert_matches_type(SyncSinglePage[GatewayList], list_, path=["response"]) + @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.with_raw_response.list( @@ -241,7 +263,20 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: list_ = client.zero_trust.gateway.lists.edit( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - append=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], + append=[ + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + ], remove=["8GE8721REF", "8GE8721REF", "8GE8721REF"], ) assert_matches_type(Optional[GatewayList], list_, path=["response"]) @@ -354,7 +389,20 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare name="Admin Serial Numbers", type="SERIAL", description="The serial numbers for administrators", - items=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], + items=[ + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + ], ) assert_matches_type(Optional[ListCreateResponse], list_, path=["response"]) @@ -465,6 +513,14 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[GatewayList], list_, path=["response"]) + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: + list_ = await async_client.zero_trust.gateway.lists.list( + account_id="699d98642c564d2e855e9661899b7252", + type="SERIAL", + ) + assert_matches_type(AsyncSinglePage[GatewayList], list_, path=["response"]) + @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.with_raw_response.list( @@ -557,7 +613,20 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) list_ = await async_client.zero_trust.gateway.lists.edit( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", - append=[{"value": "8GE8721REF"}, {"value": "8GE8721REF"}, {"value": "8GE8721REF"}], + append=[ + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + { + "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "value": "8GE8721REF", + }, + ], remove=["8GE8721REF", "8GE8721REF", "8GE8721REF"], ) assert_matches_type(Optional[GatewayList], list_, path=["response"]) diff --git a/tests/api_resources/zero_trust/gateway/test_rules.py b/tests/api_resources/zero_trust/gateway/test_rules.py index b83694ffb9f..924ce1fa37b 100644 --- a/tests/api_resources/zero_trust/gateway/test_rules.py +++ b/tests/api_resources/zero_trust/gateway/test_rules.py @@ -110,6 +110,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "ipv4_fallback": "192.0.2.3", "ipv6": "2001:DB8::/64", }, + "ignore_cname_category_matches": True, "insecure_disable_dnssec_validation": False, "ip_categories": True, "ip_indicator_feeds": True, @@ -270,6 +271,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "ipv4_fallback": "192.0.2.3", "ipv6": "2001:DB8::/64", }, + "ignore_cname_category_matches": True, "insecure_disable_dnssec_validation": False, "ip_categories": True, "ip_indicator_feeds": True, @@ -577,6 +579,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "ipv4_fallback": "192.0.2.3", "ipv6": "2001:DB8::/64", }, + "ignore_cname_category_matches": True, "insecure_disable_dnssec_validation": False, "ip_categories": True, "ip_indicator_feeds": True, @@ -737,6 +740,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "ipv4_fallback": "192.0.2.3", "ipv6": "2001:DB8::/64", }, + "ignore_cname_category_matches": True, "insecure_disable_dnssec_validation": False, "ip_categories": True, "ip_indicator_feeds": True, From c1ed21d227a7d7b543d52dcbcd93a6c3ec0e5e9c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 14:29:18 +0000 Subject: [PATCH 008/124] feat(api): OpenAPI spec update via Stainless API (#1022) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6d986a26f7e..db0943d3d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml From caa36b444894f9f539595b93d66ed5cecf3defe8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 14:34:02 +0000 Subject: [PATCH 009/124] feat(api): OpenAPI spec update via Stainless API (#1023) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index db0943d3d73..6d986a26f7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml From 7371f0fe9cf17803623f77c6ca1e710020dddbb9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 14:36:21 +0000 Subject: [PATCH 010/124] feat(api): OpenAPI spec update via Stainless API (#1024) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6d986a26f7e..e8e96654c41 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml From ed9dd829582c670ab471b3a977cb1bd4fe5c63d3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 14:38:40 +0000 Subject: [PATCH 011/124] feat(api): OpenAPI spec update via Stainless API (#1025) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e8e96654c41..6d986a26f7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml From 4848bd11c2654294cf6a98dc0de66d2f1ae21201 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 14:41:03 +0000 Subject: [PATCH 012/124] feat(api): OpenAPI spec update via Stainless API (#1026) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6d986a26f7e..e8e96654c41 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml From 71e22e2f9b9b9e89d26017c9883ce682e61c0847 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:08:24 +0000 Subject: [PATCH 013/124] feat(api): OpenAPI spec update via Stainless API (#1027) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e8e96654c41..6d986a26f7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml From 500976bfe6fd9056ea0cc3fad90e2868cb49cab7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:13:32 +0000 Subject: [PATCH 014/124] feat(api): OpenAPI spec update via Stainless API (#1028) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6d986a26f7e..db0943d3d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml From 55865cfd42d5a66dbeeb9463a81f6a264597987f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:39:38 +0000 Subject: [PATCH 015/124] feat(api): OpenAPI spec update via Stainless API (#1029) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index db0943d3d73..e8e96654c41 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml From dadf2717c87f37a3c7e79c830b4edd636dc39ea1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:42:58 +0000 Subject: [PATCH 016/124] feat(api): OpenAPI spec update via Stainless API (#1030) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e8e96654c41..db0943d3d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml From e71b38484ff5d03788df92b32407932aec8802ba Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:45:45 +0000 Subject: [PATCH 017/124] feat(api): OpenAPI spec update via Stainless API (#1031) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index db0943d3d73..e8e96654c41 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml From f6ce7db2669cf56cdb5a53bbe4af6ee98cb66cd4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:48:27 +0000 Subject: [PATCH 018/124] feat(api): OpenAPI spec update via Stainless API (#1032) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e8e96654c41..6d986a26f7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml From 4ea82b2757c7aa82a994467bbb32f387730403a8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 17:09:03 +0000 Subject: [PATCH 019/124] feat(api): OpenAPI spec update via Stainless API (#1033) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6d986a26f7e..9a6188f099c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07c6e460b4a34d21b666d639912027e5225b6d5e98748056a269965b196157ec.yml From b1a45398d3e832f18bb3f27733f42373e73b842f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 17:11:33 +0000 Subject: [PATCH 020/124] feat(api): OpenAPI spec update via Stainless API (#1034) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9a6188f099c..6d986a26f7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07c6e460b4a34d21b666d639912027e5225b6d5e98748056a269965b196157ec.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml From 1f88ee5bdecdf429688e9fbdcf6a1bdaf8d8219e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 17:18:34 +0000 Subject: [PATCH 021/124] feat(api): OpenAPI spec update via Stainless API (#1035) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6d986a26f7e..e8e96654c41 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml From e020fef0b68ccc8fcdfdade8ee255dde21c83ef7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 17:26:14 +0000 Subject: [PATCH 022/124] feat(api): OpenAPI spec update via Stainless API (#1036) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e8e96654c41..db0943d3d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml From b63a076dd8a8f235d00cb746bbeb7f9e7ca24341 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 18:41:03 +0000 Subject: [PATCH 023/124] feat(api): OpenAPI spec update via Stainless API (#1037) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index db0943d3d73..6d986a26f7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml From 498913d0e8d68490e6e4b7d8fe63951177386fb3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 18:43:53 +0000 Subject: [PATCH 024/124] feat(api): OpenAPI spec update via Stainless API (#1038) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6d986a26f7e..e8e96654c41 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml From 1a82acfe5e8892f1abdd2b1197df3c6ec5508766 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 18:56:08 +0000 Subject: [PATCH 025/124] feat(api): OpenAPI spec update via Stainless API (#1039) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e8e96654c41..6d986a26f7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml From fe5de84b8800c6d3916a7d979deef16692c8c1d2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 18:58:36 +0000 Subject: [PATCH 026/124] feat(api): OpenAPI spec update via Stainless API (#1040) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6d986a26f7e..e8e96654c41 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml From 5acb02c8c4cbc6c0c70a1f7b796a2025e023eb39 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 19:00:51 +0000 Subject: [PATCH 027/124] feat(api): OpenAPI spec update via Stainless API (#1041) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e8e96654c41..6d986a26f7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml From 997098f3139f95d754fb54261191b9bd450cf14a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 19:03:00 +0000 Subject: [PATCH 028/124] feat(api): OpenAPI spec update via Stainless API (#1042) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6d986a26f7e..9a6188f099c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07c6e460b4a34d21b666d639912027e5225b6d5e98748056a269965b196157ec.yml From 46c4648beb57b43598fb0bdbd30072eacd4aaf46 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 20:32:46 +0000 Subject: [PATCH 029/124] feat(api): OpenAPI spec update via Stainless API (#1043) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9a6188f099c..6d986a26f7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07c6e460b4a34d21b666d639912027e5225b6d5e98748056a269965b196157ec.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml From ef5e7ee79fd11727d9f2e0a272c8799b06181c46 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 20:35:16 +0000 Subject: [PATCH 030/124] feat(api): OpenAPI spec update via Stainless API (#1044) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6d986a26f7e..9a6188f099c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07c6e460b4a34d21b666d639912027e5225b6d5e98748056a269965b196157ec.yml From cd59b4a3c7b1310293fbd5c05b9819be159c0317 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 21:26:38 +0000 Subject: [PATCH 031/124] feat(api): OpenAPI spec update via Stainless API (#1045) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9a6188f099c..6d986a26f7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07c6e460b4a34d21b666d639912027e5225b6d5e98748056a269965b196157ec.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml From 5e4656011ad6384e57a017859a8c0518dbbf7fae Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 21:29:03 +0000 Subject: [PATCH 032/124] feat(api): OpenAPI spec update via Stainless API (#1046) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6d986a26f7e..e8e96654c41 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml From 4a7b51ba9a6d3a8c482a52095f79fb2ad8e71020 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 21:31:41 +0000 Subject: [PATCH 033/124] feat(api): OpenAPI spec update via Stainless API (#1047) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e8e96654c41..9a6188f099c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07c6e460b4a34d21b666d639912027e5225b6d5e98748056a269965b196157ec.yml From 063addb8c350277190beedebe40eeee5e3295169 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 21:37:04 +0000 Subject: [PATCH 034/124] feat(api): OpenAPI spec update via Stainless API (#1048) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9a6188f099c..db0943d3d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07c6e460b4a34d21b666d639912027e5225b6d5e98748056a269965b196157ec.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml From c996cadc39d61dc66e5bdec273365cf06dbee08d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 21:41:28 +0000 Subject: [PATCH 035/124] feat(api): OpenAPI spec update via Stainless API (#1049) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index db0943d3d73..e8e96654c41 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml From 381ebf4a87c30ad03d89f6bd8188d1ebaa8a8267 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 21:46:06 +0000 Subject: [PATCH 036/124] feat(api): OpenAPI spec update via Stainless API (#1050) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e8e96654c41..db0943d3d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml From f6430b7da0306d943b55439b8e796efd083d3e7e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 21:48:21 +0000 Subject: [PATCH 037/124] feat(api): OpenAPI spec update via Stainless API (#1051) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index db0943d3d73..e8e96654c41 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml From 9deb2f41db57d3e30f5fdcd06f893f35cdfbcb72 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 23:28:29 +0000 Subject: [PATCH 038/124] feat(api): update via SDK Studio (#1052) --- mypy.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy.ini b/mypy.ini index ec35df6ad25..1df17ff1948 100644 --- a/mypy.ini +++ b/mypy.ini @@ -5,7 +5,7 @@ show_error_codes = True # Exclude _files.py because mypy isn't smart enough to apply # the correct type narrowing and as this is an internal module # it's fine to just use Pyright. -exclude = ^(src/cloudflare/_files\.py|_dev/.*\.py|src/cloudflare/resources/zero_trust/identity_providers\.py|src/cloudflare/resources/zero_trust/access/applications/applications\.py|src/cloudflare/resources/workers/ai\.py|src/cloudflare/resources/magic_transit/apps\.py)$ +exclude = ^(src/cloudflare/_files\.py|_dev/.*\.py|src/cloudflare/resources/zero_trust/identity_providers\.py|src/cloudflare/resources/zero_trust/access/applications/applications\.py|src/cloudflare/resources/workers/ai\.py)$ strict_equality = True implicit_reexport = True From 3112e777017e66a420039fba934b3bb87bcaa9de Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 00:16:22 +0000 Subject: [PATCH 039/124] feat(api): OpenAPI spec update via Stainless API (#1053) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e8e96654c41..9a6188f099c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07c6e460b4a34d21b666d639912027e5225b6d5e98748056a269965b196157ec.yml From 7b85d2262b210e2f65f08552ba048bf8c3a0f612 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 00:23:17 +0000 Subject: [PATCH 040/124] feat(api): update via SDK Studio (#1054) --- mypy.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy.ini b/mypy.ini index 1df17ff1948..ec35df6ad25 100644 --- a/mypy.ini +++ b/mypy.ini @@ -5,7 +5,7 @@ show_error_codes = True # Exclude _files.py because mypy isn't smart enough to apply # the correct type narrowing and as this is an internal module # it's fine to just use Pyright. -exclude = ^(src/cloudflare/_files\.py|_dev/.*\.py|src/cloudflare/resources/zero_trust/identity_providers\.py|src/cloudflare/resources/zero_trust/access/applications/applications\.py|src/cloudflare/resources/workers/ai\.py)$ +exclude = ^(src/cloudflare/_files\.py|_dev/.*\.py|src/cloudflare/resources/zero_trust/identity_providers\.py|src/cloudflare/resources/zero_trust/access/applications/applications\.py|src/cloudflare/resources/workers/ai\.py|src/cloudflare/resources/magic_transit/apps\.py)$ strict_equality = True implicit_reexport = True From aa12de061769fba111534d81a441279074d56e8c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 00:46:06 +0000 Subject: [PATCH 041/124] feat(api): OpenAPI spec update via Stainless API (#1055) --- api.md | 13 +- .../resources/api_gateway/__init__.py | 14 -- .../resources/api_gateway/api_gateway.py | 32 --- .../api_gateway/schema_validation.py | 211 ------------------ .../api_gateway/settings/schema_validation.py | 140 +++++++++++- src/cloudflare/types/api_gateway/__init__.py | 2 +- .../types/api_gateway/settings/__init__.py | 1 + .../schema_validation_edit_params.py | 0 .../settings/test_schema_validation.py | 98 +++++++- .../api_gateway/test_schema_validation.py | 116 ---------- 10 files changed, 242 insertions(+), 385 deletions(-) delete mode 100644 src/cloudflare/resources/api_gateway/schema_validation.py rename src/cloudflare/types/api_gateway/{ => settings}/schema_validation_edit_params.py (100%) delete mode 100644 tests/api_resources/api_gateway/test_schema_validation.py diff --git a/api.md b/api.md index b610facf969..bc3718ff6b4 100644 --- a/api.md +++ b/api.md @@ -3043,17 +3043,18 @@ Methods: ## Settings -### SchemaValidation - Types: ```python -from cloudflare.types.api_gateway.settings import Settings +from cloudflare.types.api_gateway import Settings ``` +### SchemaValidation + Methods: - client.api_gateway.settings.schema_validation.update(\*, zone_id, \*\*params) -> Settings +- client.api_gateway.settings.schema_validation.edit(\*, zone_id, \*\*params) -> Settings - client.api_gateway.settings.schema_validation.get(\*, zone_id) -> Settings ## UserSchemas @@ -3089,12 +3090,6 @@ Methods: - client.api_gateway.user_schemas.operations.list(schema_id, \*, zone_id, \*\*params) -> SyncSinglePage[OperationListResponse] -## SchemaValidation - -Methods: - -- client.api_gateway.schema_validation.edit(\*, zone_id, \*\*params) -> Settings - # ManagedHeaders Types: diff --git a/src/cloudflare/resources/api_gateway/__init__.py b/src/cloudflare/resources/api_gateway/__init__.py index 4adb2b18211..c92d2837cfb 100644 --- a/src/cloudflare/resources/api_gateway/__init__.py +++ b/src/cloudflare/resources/api_gateway/__init__.py @@ -56,14 +56,6 @@ ConfigurationsResourceWithStreamingResponse, AsyncConfigurationsResourceWithStreamingResponse, ) -from .schema_validation import ( - SchemaValidationResource, - AsyncSchemaValidationResource, - SchemaValidationResourceWithRawResponse, - AsyncSchemaValidationResourceWithRawResponse, - SchemaValidationResourceWithStreamingResponse, - AsyncSchemaValidationResourceWithStreamingResponse, -) __all__ = [ "ConfigurationsResource", @@ -102,12 +94,6 @@ "AsyncUserSchemasResourceWithRawResponse", "UserSchemasResourceWithStreamingResponse", "AsyncUserSchemasResourceWithStreamingResponse", - "SchemaValidationResource", - "AsyncSchemaValidationResource", - "SchemaValidationResourceWithRawResponse", - "AsyncSchemaValidationResourceWithRawResponse", - "SchemaValidationResourceWithStreamingResponse", - "AsyncSchemaValidationResourceWithStreamingResponse", "APIGatewayResource", "AsyncAPIGatewayResource", "APIGatewayResourceWithRawResponse", diff --git a/src/cloudflare/resources/api_gateway/api_gateway.py b/src/cloudflare/resources/api_gateway/api_gateway.py index baae4ee7e3b..5df1917d66b 100644 --- a/src/cloudflare/resources/api_gateway/api_gateway.py +++ b/src/cloudflare/resources/api_gateway/api_gateway.py @@ -52,14 +52,6 @@ ConfigurationsResourceWithStreamingResponse, AsyncConfigurationsResourceWithStreamingResponse, ) -from .schema_validation import ( - SchemaValidationResource, - AsyncSchemaValidationResource, - SchemaValidationResourceWithRawResponse, - AsyncSchemaValidationResourceWithRawResponse, - SchemaValidationResourceWithStreamingResponse, - AsyncSchemaValidationResourceWithStreamingResponse, -) from .settings.settings import SettingsResource, AsyncSettingsResource from .discovery.discovery import DiscoveryResource, AsyncDiscoveryResource from .operations.operations import OperationsResource, AsyncOperationsResource @@ -93,10 +85,6 @@ def settings(self) -> SettingsResource: def user_schemas(self) -> UserSchemasResource: return UserSchemasResource(self._client) - @cached_property - def schema_validation(self) -> SchemaValidationResource: - return SchemaValidationResource(self._client) - @cached_property def with_raw_response(self) -> APIGatewayResourceWithRawResponse: return APIGatewayResourceWithRawResponse(self) @@ -131,10 +119,6 @@ def settings(self) -> AsyncSettingsResource: def user_schemas(self) -> AsyncUserSchemasResource: return AsyncUserSchemasResource(self._client) - @cached_property - def schema_validation(self) -> AsyncSchemaValidationResource: - return AsyncSchemaValidationResource(self._client) - @cached_property def with_raw_response(self) -> AsyncAPIGatewayResourceWithRawResponse: return AsyncAPIGatewayResourceWithRawResponse(self) @@ -172,10 +156,6 @@ def settings(self) -> SettingsResourceWithRawResponse: def user_schemas(self) -> UserSchemasResourceWithRawResponse: return UserSchemasResourceWithRawResponse(self._api_gateway.user_schemas) - @cached_property - def schema_validation(self) -> SchemaValidationResourceWithRawResponse: - return SchemaValidationResourceWithRawResponse(self._api_gateway.schema_validation) - class AsyncAPIGatewayResourceWithRawResponse: def __init__(self, api_gateway: AsyncAPIGatewayResource) -> None: @@ -205,10 +185,6 @@ def settings(self) -> AsyncSettingsResourceWithRawResponse: def user_schemas(self) -> AsyncUserSchemasResourceWithRawResponse: return AsyncUserSchemasResourceWithRawResponse(self._api_gateway.user_schemas) - @cached_property - def schema_validation(self) -> AsyncSchemaValidationResourceWithRawResponse: - return AsyncSchemaValidationResourceWithRawResponse(self._api_gateway.schema_validation) - class APIGatewayResourceWithStreamingResponse: def __init__(self, api_gateway: APIGatewayResource) -> None: @@ -238,10 +214,6 @@ def settings(self) -> SettingsResourceWithStreamingResponse: def user_schemas(self) -> UserSchemasResourceWithStreamingResponse: return UserSchemasResourceWithStreamingResponse(self._api_gateway.user_schemas) - @cached_property - def schema_validation(self) -> SchemaValidationResourceWithStreamingResponse: - return SchemaValidationResourceWithStreamingResponse(self._api_gateway.schema_validation) - class AsyncAPIGatewayResourceWithStreamingResponse: def __init__(self, api_gateway: AsyncAPIGatewayResource) -> None: @@ -270,7 +242,3 @@ def settings(self) -> AsyncSettingsResourceWithStreamingResponse: @cached_property def user_schemas(self) -> AsyncUserSchemasResourceWithStreamingResponse: return AsyncUserSchemasResourceWithStreamingResponse(self._api_gateway.user_schemas) - - @cached_property - def schema_validation(self) -> AsyncSchemaValidationResourceWithStreamingResponse: - return AsyncSchemaValidationResourceWithStreamingResponse(self._api_gateway.schema_validation) diff --git a/src/cloudflare/resources/api_gateway/schema_validation.py b/src/cloudflare/resources/api_gateway/schema_validation.py deleted file mode 100644 index e1d210edd73..00000000000 --- a/src/cloudflare/resources/api_gateway/schema_validation.py +++ /dev/null @@ -1,211 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Optional -from typing_extensions import Literal - -import httpx - -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..._base_client import ( - make_request_options, -) -from ...types.api_gateway import schema_validation_edit_params -from ...types.api_gateway.settings.settings import Settings - -__all__ = ["SchemaValidationResource", "AsyncSchemaValidationResource"] - - -class SchemaValidationResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> SchemaValidationResourceWithRawResponse: - return SchemaValidationResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> SchemaValidationResourceWithStreamingResponse: - return SchemaValidationResourceWithStreamingResponse(self) - - def edit( - self, - *, - zone_id: str, - validation_default_mitigation_action: Optional[Literal["none", "log", "block"]] | NotGiven = NOT_GIVEN, - validation_override_mitigation_action: Optional[Literal["none", "disable_override"]] | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Settings: - """ - Updates zone level schema validation settings on the zone - - Args: - zone_id: Identifier - - validation_default_mitigation_action: The default mitigation action used when there is no mitigation action defined on - the operation Mitigation actions are as follows: - - - `log` - log request when request does not conform to schema - - `block` - deny access to the site when request does not conform to schema - - A special value of of `none` will skip running schema validation entirely for - the request when there is no mitigation action defined on the operation - - `null` will have no effect. - - validation_override_mitigation_action: When set, this overrides both zone level and operation level mitigation actions. - - - `none` will skip running schema validation entirely for the request - - To clear any override, use the special value `disable_override` - - `null` will have no effect. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._patch( - f"/zones/{zone_id}/api_gateway/settings/schema_validation", - body=maybe_transform( - { - "validation_default_mitigation_action": validation_default_mitigation_action, - "validation_override_mitigation_action": validation_override_mitigation_action, - }, - schema_validation_edit_params.SchemaValidationEditParams, - ), - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=Settings, - ) - - -class AsyncSchemaValidationResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncSchemaValidationResourceWithRawResponse: - return AsyncSchemaValidationResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncSchemaValidationResourceWithStreamingResponse: - return AsyncSchemaValidationResourceWithStreamingResponse(self) - - async def edit( - self, - *, - zone_id: str, - validation_default_mitigation_action: Optional[Literal["none", "log", "block"]] | NotGiven = NOT_GIVEN, - validation_override_mitigation_action: Optional[Literal["none", "disable_override"]] | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Settings: - """ - Updates zone level schema validation settings on the zone - - Args: - zone_id: Identifier - - validation_default_mitigation_action: The default mitigation action used when there is no mitigation action defined on - the operation Mitigation actions are as follows: - - - `log` - log request when request does not conform to schema - - `block` - deny access to the site when request does not conform to schema - - A special value of of `none` will skip running schema validation entirely for - the request when there is no mitigation action defined on the operation - - `null` will have no effect. - - validation_override_mitigation_action: When set, this overrides both zone level and operation level mitigation actions. - - - `none` will skip running schema validation entirely for the request - - To clear any override, use the special value `disable_override` - - `null` will have no effect. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._patch( - f"/zones/{zone_id}/api_gateway/settings/schema_validation", - body=await async_maybe_transform( - { - "validation_default_mitigation_action": validation_default_mitigation_action, - "validation_override_mitigation_action": validation_override_mitigation_action, - }, - schema_validation_edit_params.SchemaValidationEditParams, - ), - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=Settings, - ) - - -class SchemaValidationResourceWithRawResponse: - def __init__(self, schema_validation: SchemaValidationResource) -> None: - self._schema_validation = schema_validation - - self.edit = to_raw_response_wrapper( - schema_validation.edit, - ) - - -class AsyncSchemaValidationResourceWithRawResponse: - def __init__(self, schema_validation: AsyncSchemaValidationResource) -> None: - self._schema_validation = schema_validation - - self.edit = async_to_raw_response_wrapper( - schema_validation.edit, - ) - - -class SchemaValidationResourceWithStreamingResponse: - def __init__(self, schema_validation: SchemaValidationResource) -> None: - self._schema_validation = schema_validation - - self.edit = to_streamed_response_wrapper( - schema_validation.edit, - ) - - -class AsyncSchemaValidationResourceWithStreamingResponse: - def __init__(self, schema_validation: AsyncSchemaValidationResource) -> None: - self._schema_validation = schema_validation - - self.edit = async_to_streamed_response_wrapper( - schema_validation.edit, - ) diff --git a/src/cloudflare/resources/api_gateway/settings/schema_validation.py b/src/cloudflare/resources/api_gateway/settings/schema_validation.py index f750f0775b3..74acb51c4a5 100644 --- a/src/cloudflare/resources/api_gateway/settings/schema_validation.py +++ b/src/cloudflare/resources/api_gateway/settings/schema_validation.py @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.api_gateway.settings import schema_validation_update_params +from ....types.api_gateway.settings import schema_validation_edit_params, schema_validation_update_params from ....types.api_gateway.settings.settings import Settings __all__ = ["SchemaValidationResource", "AsyncSchemaValidationResource"] @@ -100,6 +100,69 @@ def update( cast_to=Settings, ) + def edit( + self, + *, + zone_id: str, + validation_default_mitigation_action: Optional[Literal["none", "log", "block"]] | NotGiven = NOT_GIVEN, + validation_override_mitigation_action: Optional[Literal["none", "disable_override"]] | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Settings: + """ + Updates zone level schema validation settings on the zone + + Args: + zone_id: Identifier + + validation_default_mitigation_action: The default mitigation action used when there is no mitigation action defined on + the operation Mitigation actions are as follows: + + - `log` - log request when request does not conform to schema + - `block` - deny access to the site when request does not conform to schema + + A special value of of `none` will skip running schema validation entirely for + the request when there is no mitigation action defined on the operation + + `null` will have no effect. + + validation_override_mitigation_action: When set, this overrides both zone level and operation level mitigation actions. + + - `none` will skip running schema validation entirely for the request + + To clear any override, use the special value `disable_override` + + `null` will have no effect. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + return self._patch( + f"/zones/{zone_id}/api_gateway/settings/schema_validation", + body=maybe_transform( + { + "validation_default_mitigation_action": validation_default_mitigation_action, + "validation_override_mitigation_action": validation_override_mitigation_action, + }, + schema_validation_edit_params.SchemaValidationEditParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=Settings, + ) + def get( self, *, @@ -207,6 +270,69 @@ async def update( cast_to=Settings, ) + async def edit( + self, + *, + zone_id: str, + validation_default_mitigation_action: Optional[Literal["none", "log", "block"]] | NotGiven = NOT_GIVEN, + validation_override_mitigation_action: Optional[Literal["none", "disable_override"]] | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Settings: + """ + Updates zone level schema validation settings on the zone + + Args: + zone_id: Identifier + + validation_default_mitigation_action: The default mitigation action used when there is no mitigation action defined on + the operation Mitigation actions are as follows: + + - `log` - log request when request does not conform to schema + - `block` - deny access to the site when request does not conform to schema + + A special value of of `none` will skip running schema validation entirely for + the request when there is no mitigation action defined on the operation + + `null` will have no effect. + + validation_override_mitigation_action: When set, this overrides both zone level and operation level mitigation actions. + + - `none` will skip running schema validation entirely for the request + + To clear any override, use the special value `disable_override` + + `null` will have no effect. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") + return await self._patch( + f"/zones/{zone_id}/api_gateway/settings/schema_validation", + body=await async_maybe_transform( + { + "validation_default_mitigation_action": validation_default_mitigation_action, + "validation_override_mitigation_action": validation_override_mitigation_action, + }, + schema_validation_edit_params.SchemaValidationEditParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=Settings, + ) + async def get( self, *, @@ -250,6 +376,9 @@ def __init__(self, schema_validation: SchemaValidationResource) -> None: self.update = to_raw_response_wrapper( schema_validation.update, ) + self.edit = to_raw_response_wrapper( + schema_validation.edit, + ) self.get = to_raw_response_wrapper( schema_validation.get, ) @@ -262,6 +391,9 @@ def __init__(self, schema_validation: AsyncSchemaValidationResource) -> None: self.update = async_to_raw_response_wrapper( schema_validation.update, ) + self.edit = async_to_raw_response_wrapper( + schema_validation.edit, + ) self.get = async_to_raw_response_wrapper( schema_validation.get, ) @@ -274,6 +406,9 @@ def __init__(self, schema_validation: SchemaValidationResource) -> None: self.update = to_streamed_response_wrapper( schema_validation.update, ) + self.edit = to_streamed_response_wrapper( + schema_validation.edit, + ) self.get = to_streamed_response_wrapper( schema_validation.get, ) @@ -286,6 +421,9 @@ def __init__(self, schema_validation: AsyncSchemaValidationResource) -> None: self.update = async_to_streamed_response_wrapper( schema_validation.update, ) + self.edit = async_to_streamed_response_wrapper( + schema_validation.edit, + ) self.get = async_to_streamed_response_wrapper( schema_validation.get, ) diff --git a/src/cloudflare/types/api_gateway/__init__.py b/src/cloudflare/types/api_gateway/__init__.py index 15e921a339f..03e7d8be4f3 100644 --- a/src/cloudflare/types/api_gateway/__init__.py +++ b/src/cloudflare/types/api_gateway/__init__.py @@ -3,6 +3,7 @@ from __future__ import annotations from .message import Message as Message +from .settings import Settings as Settings from .api_shield import APIShield as APIShield from .configuration import Configuration as Configuration from .public_schema import PublicSchema as PublicSchema @@ -24,4 +25,3 @@ from .configuration_update_params import ConfigurationUpdateParams as ConfigurationUpdateParams from .user_schema_delete_response import UserSchemaDeleteResponse as UserSchemaDeleteResponse from .configuration_update_response import ConfigurationUpdateResponse as ConfigurationUpdateResponse -from .schema_validation_edit_params import SchemaValidationEditParams as SchemaValidationEditParams diff --git a/src/cloudflare/types/api_gateway/settings/__init__.py b/src/cloudflare/types/api_gateway/settings/__init__.py index 6bf117b4acd..4a0d2fe1880 100644 --- a/src/cloudflare/types/api_gateway/settings/__init__.py +++ b/src/cloudflare/types/api_gateway/settings/__init__.py @@ -3,4 +3,5 @@ from __future__ import annotations from .settings import Settings as Settings +from .schema_validation_edit_params import SchemaValidationEditParams as SchemaValidationEditParams from .schema_validation_update_params import SchemaValidationUpdateParams as SchemaValidationUpdateParams diff --git a/src/cloudflare/types/api_gateway/schema_validation_edit_params.py b/src/cloudflare/types/api_gateway/settings/schema_validation_edit_params.py similarity index 100% rename from src/cloudflare/types/api_gateway/schema_validation_edit_params.py rename to src/cloudflare/types/api_gateway/settings/schema_validation_edit_params.py diff --git a/tests/api_resources/api_gateway/settings/test_schema_validation.py b/tests/api_resources/api_gateway/settings/test_schema_validation.py index f0d5bb47925..2441b86a24c 100644 --- a/tests/api_resources/api_gateway/settings/test_schema_validation.py +++ b/tests/api_resources/api_gateway/settings/test_schema_validation.py @@ -9,7 +9,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.api_gateway.settings import Settings +from cloudflare.types.api_gateway.settings import ( + Settings, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -68,6 +70,53 @@ def test_path_params_update(self, client: Cloudflare) -> None: validation_default_mitigation_action="block", ) + @parametrize + def test_method_edit(self, client: Cloudflare) -> None: + schema_validation = client.api_gateway.settings.schema_validation.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(Settings, schema_validation, path=["response"]) + + @parametrize + def test_method_edit_with_all_params(self, client: Cloudflare) -> None: + schema_validation = client.api_gateway.settings.schema_validation.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + validation_default_mitigation_action="block", + validation_override_mitigation_action="none", + ) + assert_matches_type(Settings, schema_validation, path=["response"]) + + @parametrize + def test_raw_response_edit(self, client: Cloudflare) -> None: + response = client.api_gateway.settings.schema_validation.with_raw_response.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + schema_validation = response.parse() + assert_matches_type(Settings, schema_validation, path=["response"]) + + @parametrize + def test_streaming_response_edit(self, client: Cloudflare) -> None: + with client.api_gateway.settings.schema_validation.with_streaming_response.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + schema_validation = response.parse() + assert_matches_type(Settings, schema_validation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.api_gateway.settings.schema_validation.with_raw_response.edit( + zone_id="", + ) + @parametrize def test_method_get(self, client: Cloudflare) -> None: schema_validation = client.api_gateway.settings.schema_validation.get( @@ -161,6 +210,53 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: validation_default_mitigation_action="block", ) + @parametrize + async def test_method_edit(self, async_client: AsyncCloudflare) -> None: + schema_validation = await async_client.api_gateway.settings.schema_validation.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(Settings, schema_validation, path=["response"]) + + @parametrize + async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: + schema_validation = await async_client.api_gateway.settings.schema_validation.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + validation_default_mitigation_action="block", + validation_override_mitigation_action="none", + ) + assert_matches_type(Settings, schema_validation, path=["response"]) + + @parametrize + async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: + response = await async_client.api_gateway.settings.schema_validation.with_raw_response.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + schema_validation = await response.parse() + assert_matches_type(Settings, schema_validation, path=["response"]) + + @parametrize + async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: + async with async_client.api_gateway.settings.schema_validation.with_streaming_response.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + schema_validation = await response.parse() + assert_matches_type(Settings, schema_validation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.api_gateway.settings.schema_validation.with_raw_response.edit( + zone_id="", + ) + @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: schema_validation = await async_client.api_gateway.settings.schema_validation.get( diff --git a/tests/api_resources/api_gateway/test_schema_validation.py b/tests/api_resources/api_gateway/test_schema_validation.py deleted file mode 100644 index dbe446a6c02..00000000000 --- a/tests/api_resources/api_gateway/test_schema_validation.py +++ /dev/null @@ -1,116 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.api_gateway.settings import Settings - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestSchemaValidation: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - schema_validation = client.api_gateway.schema_validation.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Settings, schema_validation, path=["response"]) - - @parametrize - def test_method_edit_with_all_params(self, client: Cloudflare) -> None: - schema_validation = client.api_gateway.schema_validation.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - validation_default_mitigation_action="block", - validation_override_mitigation_action="none", - ) - assert_matches_type(Settings, schema_validation, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.api_gateway.schema_validation.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - schema_validation = response.parse() - assert_matches_type(Settings, schema_validation, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.api_gateway.schema_validation.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - schema_validation = response.parse() - assert_matches_type(Settings, schema_validation, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_edit(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.api_gateway.schema_validation.with_raw_response.edit( - zone_id="", - ) - - -class TestAsyncSchemaValidation: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - schema_validation = await async_client.api_gateway.schema_validation.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Settings, schema_validation, path=["response"]) - - @parametrize - async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: - schema_validation = await async_client.api_gateway.schema_validation.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - validation_default_mitigation_action="block", - validation_override_mitigation_action="none", - ) - assert_matches_type(Settings, schema_validation, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.api_gateway.schema_validation.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - schema_validation = await response.parse() - assert_matches_type(Settings, schema_validation, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.api_gateway.schema_validation.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - schema_validation = await response.parse() - assert_matches_type(Settings, schema_validation, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.api_gateway.schema_validation.with_raw_response.edit( - zone_id="", - ) From db34d57cbb74e530523d498471c6c4192eefcabe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 05:33:32 +0000 Subject: [PATCH 042/124] feat(api): OpenAPI spec update via Stainless API (#1056) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9a6188f099c..db0943d3d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07c6e460b4a34d21b666d639912027e5225b6d5e98748056a269965b196157ec.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml From ea91ee44ccc83e92367dac1fd2fe71d4ce933be5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 05:35:58 +0000 Subject: [PATCH 043/124] feat(api): OpenAPI spec update via Stainless API (#1057) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index db0943d3d73..6d986a26f7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml From 81b555abc94747badabcdaace26802de98b26e7d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 11:07:12 +0000 Subject: [PATCH 044/124] feat(api): OpenAPI spec update via Stainless API (#1058) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6d986a26f7e..e8e96654c41 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml From 74de52fda87c620fabbbce539312dec6d2d59ff3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 11:21:00 +0000 Subject: [PATCH 045/124] feat(api): OpenAPI spec update via Stainless API (#1059) --- .stats.yml | 2 +- src/cloudflare/_base_client.py | 17 +++++++++++++---- src/cloudflare/_utils/__init__.py | 1 + src/cloudflare/_utils/_reflection.py | 8 ++++++++ src/cloudflare/_utils/_sync.py | 19 ++++++++++++++++++- 5 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 src/cloudflare/_utils/_reflection.py diff --git a/.stats.yml b/.stats.yml index e8e96654c41..db0943d3d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml diff --git a/src/cloudflare/_base_client.py b/src/cloudflare/_base_client.py index ca66d5b4018..d6730dbb3e4 100644 --- a/src/cloudflare/_base_client.py +++ b/src/cloudflare/_base_client.py @@ -60,7 +60,7 @@ RequestOptions, ModelBuilderProtocol, ) -from ._utils import is_dict, is_list, is_given, lru_cache, is_mapping +from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping from ._compat import model_copy, model_dump from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type from ._response import ( @@ -358,6 +358,7 @@ def __init__( self._custom_query = custom_query or {} self._strict_response_validation = _strict_response_validation self._idempotency_header = None + self._platform: Platform | None = None if max_retries is None: # pyright: ignore[reportUnnecessaryComparison] raise TypeError( @@ -622,7 +623,10 @@ def base_url(self, url: URL | str) -> None: self._base_url = self._enforce_trailing_slash(url if isinstance(url, URL) else URL(url)) def platform_headers(self) -> Dict[str, str]: - return platform_headers(self._version) + # the actual implementation is in a separate `lru_cache` decorated + # function because adding `lru_cache` to methods will leak memory + # https://github.com/python/cpython/issues/88476 + return platform_headers(self._version, platform=self._platform) def _parse_retry_after_header(self, response_headers: Optional[httpx.Headers] = None) -> float | None: """Returns a float of the number of seconds (not milliseconds) to wait after retrying, or None if unspecified. @@ -1498,6 +1502,11 @@ async def _request( stream_cls: type[_AsyncStreamT] | None, remaining_retries: int | None, ) -> ResponseT | _AsyncStreamT: + if self._platform is None: + # `get_platform` can make blocking IO calls so we + # execute it earlier while we are in an async context + self._platform = await asyncify(get_platform)() + cast_to = self._maybe_override_cast_to(cast_to, options) await self._prepare_options(options) @@ -1921,11 +1930,11 @@ def get_platform() -> Platform: @lru_cache(maxsize=None) -def platform_headers(version: str) -> Dict[str, str]: +def platform_headers(version: str, *, platform: Platform | None) -> Dict[str, str]: return { "X-Stainless-Lang": "python", "X-Stainless-Package-Version": version, - "X-Stainless-OS": str(get_platform()), + "X-Stainless-OS": str(platform or get_platform()), "X-Stainless-Arch": str(get_architecture()), "X-Stainless-Runtime": get_python_runtime(), "X-Stainless-Runtime-Version": get_python_version(), diff --git a/src/cloudflare/_utils/__init__.py b/src/cloudflare/_utils/__init__.py index 31b5b22799e..667e2473f65 100644 --- a/src/cloudflare/_utils/__init__.py +++ b/src/cloudflare/_utils/__init__.py @@ -49,3 +49,4 @@ maybe_transform as maybe_transform, async_maybe_transform as async_maybe_transform, ) +from ._reflection import function_has_argument as function_has_argument diff --git a/src/cloudflare/_utils/_reflection.py b/src/cloudflare/_utils/_reflection.py new file mode 100644 index 00000000000..e134f58e086 --- /dev/null +++ b/src/cloudflare/_utils/_reflection.py @@ -0,0 +1,8 @@ +import inspect +from typing import Any, Callable + + +def function_has_argument(func: Callable[..., Any], arg_name: str) -> bool: + """Returns whether or not the given function has a specific parameter""" + sig = inspect.signature(func) + return arg_name in sig.parameters diff --git a/src/cloudflare/_utils/_sync.py b/src/cloudflare/_utils/_sync.py index 595924e5b19..d0d810337ec 100644 --- a/src/cloudflare/_utils/_sync.py +++ b/src/cloudflare/_utils/_sync.py @@ -7,6 +7,8 @@ import anyio import anyio.to_thread +from ._reflection import function_has_argument + T_Retval = TypeVar("T_Retval") T_ParamSpec = ParamSpec("T_ParamSpec") @@ -59,6 +61,21 @@ def do_work(arg1, arg2, kwarg1="", kwarg2="") -> str: async def wrapper(*args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs) -> T_Retval: partial_f = functools.partial(function, *args, **kwargs) - return await anyio.to_thread.run_sync(partial_f, cancellable=cancellable, limiter=limiter) + + # In `v4.1.0` anyio added the `abandon_on_cancel` argument and deprecated the old + # `cancellable` argument, so we need to use the new `abandon_on_cancel` to avoid + # surfacing deprecation warnings. + if function_has_argument(anyio.to_thread.run_sync, "abandon_on_cancel"): + return await anyio.to_thread.run_sync( + partial_f, + abandon_on_cancel=cancellable, + limiter=limiter, + ) + + return await anyio.to_thread.run_sync( + partial_f, + cancellable=cancellable, + limiter=limiter, + ) return wrapper From e9e3fd85d8069aa955f9a75f45feb08931cebbfb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 12:44:47 +0000 Subject: [PATCH 046/124] feat(api): OpenAPI spec update via Stainless API (#1060) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index db0943d3d73..e8e96654c41 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml From cd6884d6a929540066973d6c1fb4c037119a7826 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 12:47:17 +0000 Subject: [PATCH 047/124] feat(api): OpenAPI spec update via Stainless API (#1061) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e8e96654c41..db0943d3d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml From 052747aa5cc15791963dc3e36d280bd15763ef54 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 14:02:34 +0000 Subject: [PATCH 048/124] feat(api): OpenAPI spec update via Stainless API (#1062) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index db0943d3d73..6d986a26f7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml From 01a46c58585a06cfbfd88143da063e365da1a360 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 14:04:48 +0000 Subject: [PATCH 049/124] feat(api): OpenAPI spec update via Stainless API (#1063) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6d986a26f7e..9a6188f099c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07c6e460b4a34d21b666d639912027e5225b6d5e98748056a269965b196157ec.yml From 82bbd717741ab44b1d7a381c798c03df47233d89 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 14:11:01 +0000 Subject: [PATCH 050/124] feat(api): OpenAPI spec update via Stainless API (#1064) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9a6188f099c..db0943d3d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07c6e460b4a34d21b666d639912027e5225b6d5e98748056a269965b196157ec.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml From fdeb11cf9867d9c63653385e9430574e4443de5b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 14:13:26 +0000 Subject: [PATCH 051/124] feat(api): OpenAPI spec update via Stainless API (#1065) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index db0943d3d73..9a6188f099c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07c6e460b4a34d21b666d639912027e5225b6d5e98748056a269965b196157ec.yml From 28eaa3806500911a261c6d47e03017f7a9e8eba5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 14:15:46 +0000 Subject: [PATCH 052/124] feat(api): OpenAPI spec update via Stainless API (#1066) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9a6188f099c..db0943d3d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07c6e460b4a34d21b666d639912027e5225b6d5e98748056a269965b196157ec.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml From 6ff321dc3d9160b864d735953e28fd054efcc63b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 15:31:19 +0000 Subject: [PATCH 053/124] feat(api): OpenAPI spec update via Stainless API (#1067) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index db0943d3d73..e8e96654c41 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml From 439a8292e7ba4ff45df84c3cd85a23a0dac89711 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 15:35:45 +0000 Subject: [PATCH 054/124] feat(api): OpenAPI spec update via Stainless API (#1068) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e8e96654c41..db0943d3d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad39d8181627a820e39f80ef9591f6b22b652379be11d473f3840201d66eba38.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml From 82e8ca53c4ec9f0ba6e8c1184eb80a3f3c4e971c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 15:53:24 +0000 Subject: [PATCH 055/124] feat(api): OpenAPI spec update via Stainless API (#1069) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index db0943d3d73..6d986a26f7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml From 22c184ebf312ea3632bf4afcc1d6e4fb25f35902 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 15:58:16 +0000 Subject: [PATCH 056/124] feat(api): OpenAPI spec update via Stainless API (#1070) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6d986a26f7e..db0943d3d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml From 3c1897a47d652c9fc929c4149520418d21acff6f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 16:00:30 +0000 Subject: [PATCH 057/124] feat(api): OpenAPI spec update via Stainless API (#1071) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index db0943d3d73..6d986a26f7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml From 1c766243ebd9f962e451e41230890f6e5930dc93 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 16:20:44 +0000 Subject: [PATCH 058/124] feat(api): OpenAPI spec update via Stainless API (#1072) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6d986a26f7e..db0943d3d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db421d07d58c7abf1af471a342e12789def4e83543dccea6aec34b8667646028.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml From 87037337470772614c0f795684ee6f401c2a7f1c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 16:22:59 +0000 Subject: [PATCH 059/124] feat(api): OpenAPI spec update via Stainless API (#1073) --- .stats.yml | 2 +- src/cloudflare/resources/ai_gateway/ai_gateway.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index db0943d3d73..7f6aa95dfa7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-36a9d717773ebb507fd0744af578aa64b697030857c602c77458156a911fcab9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6cbe8add32f8acdbd62db2535ff05cb698247f12ffc69168fc121409a8b05bec.yml diff --git a/src/cloudflare/resources/ai_gateway/ai_gateway.py b/src/cloudflare/resources/ai_gateway/ai_gateway.py index 2fc5cfcef74..ac5a9237f0b 100644 --- a/src/cloudflare/resources/ai_gateway/ai_gateway.py +++ b/src/cloudflare/resources/ai_gateway/ai_gateway.py @@ -190,7 +190,7 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncV4PagePaginationArray[AIGatewayListResponse]: """ - List Gateway's + List Gateways Args: id: gateway id @@ -457,7 +457,7 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[AIGatewayListResponse, AsyncV4PagePaginationArray[AIGatewayListResponse]]: """ - List Gateway's + List Gateways Args: id: gateway id From cc22cb5b753e6b46ec7518f409e60803d659e074 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 17:35:31 +0000 Subject: [PATCH 060/124] feat(api): OpenAPI spec update via Stainless API (#1074) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 7f6aa95dfa7..6caaf73d9aa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6cbe8add32f8acdbd62db2535ff05cb698247f12ffc69168fc121409a8b05bec.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d273d47730b1e29722af2b6a338260b1fbe80606fc7fedff0c02012bcafa3dec.yml From dc306973d55d184e941fe1c2e676c59cbcca0bf6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 17:39:47 +0000 Subject: [PATCH 061/124] feat(api): OpenAPI spec update via Stainless API (#1075) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6caaf73d9aa..7f6aa95dfa7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d273d47730b1e29722af2b6a338260b1fbe80606fc7fedff0c02012bcafa3dec.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6cbe8add32f8acdbd62db2535ff05cb698247f12ffc69168fc121409a8b05bec.yml From 69d14b389088280354bb9584a0a9228decbc2f7c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 18:03:53 +0000 Subject: [PATCH 062/124] feat(api): OpenAPI spec update via Stainless API (#1076) --- .stats.yml | 2 +- src/cloudflare/types/stream/caption.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 7f6aa95dfa7..b9b76a1a762 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6cbe8add32f8acdbd62db2535ff05cb698247f12ffc69168fc121409a8b05bec.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7c1749e86a3410071f606dc2289ff66d9c63b3fd27fb01c8f67bef49e521170d.yml diff --git a/src/cloudflare/types/stream/caption.py b/src/cloudflare/types/stream/caption.py index 4fc03b8b2f4..296ed927f18 100644 --- a/src/cloudflare/types/stream/caption.py +++ b/src/cloudflare/types/stream/caption.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional +from typing_extensions import Literal from ..._models import BaseModel @@ -8,8 +9,14 @@ class Caption(BaseModel): + generated: Optional[bool] = None + """Whether the caption was generated via AI.""" + 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.""" + + status: Optional[Literal["ready", "inprogress", "error"]] = None + """The status of a generated caption.""" From 51c1d82e653cbcdf365b33d811517484cda1f122 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 18:10:27 +0000 Subject: [PATCH 063/124] feat(api): OpenAPI spec update via Stainless API (#1077) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b9b76a1a762..8a502da2ed1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7c1749e86a3410071f606dc2289ff66d9c63b3fd27fb01c8f67bef49e521170d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-96e7b51d520bfca45b69f59e96ed92b5a5651baa8c10357480befd1d618cd779.yml From ca74a013a70525d4e6bc3e50d0d36896ff9c0302 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 18:25:19 +0000 Subject: [PATCH 064/124] feat(api): OpenAPI spec update via Stainless API (#1078) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8a502da2ed1..37dc67d6cf1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-96e7b51d520bfca45b69f59e96ed92b5a5651baa8c10357480befd1d618cd779.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-aa74ab49bfd7d4404403c0fbedbddc2f1a14121c2f6c1d4ea3c03f17c4f253a5.yml From 547d81dee6c5d49cd7f42029130751bc768024ae Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 18:47:42 +0000 Subject: [PATCH 065/124] feat(api): OpenAPI spec update via Stainless API (#1079) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 37dc67d6cf1..8a502da2ed1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-aa74ab49bfd7d4404403c0fbedbddc2f1a14121c2f6c1d4ea3c03f17c4f253a5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-96e7b51d520bfca45b69f59e96ed92b5a5651baa8c10357480befd1d618cd779.yml From a0a142b7958e791937147c2cc32665034a3bf417 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 18:50:12 +0000 Subject: [PATCH 066/124] feat(api): OpenAPI spec update via Stainless API (#1080) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8a502da2ed1..37dc67d6cf1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-96e7b51d520bfca45b69f59e96ed92b5a5651baa8c10357480befd1d618cd779.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-aa74ab49bfd7d4404403c0fbedbddc2f1a14121c2f6c1d4ea3c03f17c4f253a5.yml From 7932a902ef30c6b4dcb13990a35c156fd0d93469 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 19:33:27 +0000 Subject: [PATCH 067/124] feat(api): OpenAPI spec update via Stainless API (#1081) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 37dc67d6cf1..8a502da2ed1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-aa74ab49bfd7d4404403c0fbedbddc2f1a14121c2f6c1d4ea3c03f17c4f253a5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-96e7b51d520bfca45b69f59e96ed92b5a5651baa8c10357480befd1d618cd779.yml From ece3ecc92770b2e1ee70dae2f4bb362646a889e0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 19:35:39 +0000 Subject: [PATCH 068/124] feat(api): OpenAPI spec update via Stainless API (#1082) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8a502da2ed1..415000d61f9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-96e7b51d520bfca45b69f59e96ed92b5a5651baa8c10357480befd1d618cd779.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-01767a8d22620f0b567bd7808e9f990fac289e1c63335470873f306d42ce69fe.yml From 939d9df3e326eab43aa5606ccc6fc126996035a7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 19:38:00 +0000 Subject: [PATCH 069/124] feat(api): OpenAPI spec update via Stainless API (#1083) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 415000d61f9..a0398485e87 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-01767a8d22620f0b567bd7808e9f990fac289e1c63335470873f306d42ce69fe.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc907ac853f9f492d6e9168c4a32fd2c7ccacbabbcb716280dbaa42a0d9c14f2.yml From eb53bcb83ae0303e1c2b33c659c44fa8879e4c66 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 19:57:03 +0000 Subject: [PATCH 070/124] feat(api): OpenAPI spec update via Stainless API (#1084) --- .stats.yml | 2 +- src/cloudflare/resources/stream/copy.py | 35 ++++++++++++ .../resources/stream/direct_upload.py | 9 +++ src/cloudflare/resources/stream/stream.py | 55 +++++++++++++++++++ .../resources/workers/scripts/content.py | 23 ++++++++ .../dispatch/namespaces/scripts/content.py | 23 ++++++++ .../types/stream/copy_create_params.py | 10 ++++ .../stream/direct_upload_create_params.py | 3 + .../types/stream/stream_create_params.py | 27 ++++++++- .../workers/scripts/content_update_params.py | 4 ++ .../scripts/content_update_params.py | 4 ++ tests/api_resources/stream/test_copy.py | 4 ++ .../stream/test_direct_upload.py | 2 + tests/api_resources/test_stream.py | 42 ++++++++++++++ .../workers/scripts/test_content.py | 4 ++ .../namespaces/scripts/test_content.py | 4 ++ 16 files changed, 249 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a0398485e87..4b802baedab 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc907ac853f9f492d6e9168c4a32fd2c7ccacbabbcb716280dbaa42a0d9c14f2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f2b480625b4e667e5ed9a238c9b5314522dc9be0bf8f514bed4e03a88d09455c.yml diff --git a/src/cloudflare/resources/stream/copy.py b/src/cloudflare/resources/stream/copy.py index 426b93d4b48..e6b85f79d95 100644 --- a/src/cloudflare/resources/stream/copy.py +++ b/src/cloudflare/resources/stream/copy.py @@ -10,6 +10,7 @@ from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, + strip_not_given, async_maybe_transform, ) from ..._compat import cached_property @@ -52,6 +53,8 @@ def create( scheduled_deletion: Union[str, datetime] | NotGiven = NOT_GIVEN, thumbnail_timestamp_pct: float | NotGiven = NOT_GIVEN, watermark: copy_create_params.Watermark | NotGiven = NOT_GIVEN, + upload_creator: str | NotGiven = NOT_GIVEN, + upload_metadata: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -90,6 +93,12 @@ def create( 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. + upload_creator: A user-defined identifier for the media creator. + + upload_metadata: Comma-separated key-value pairs following the TUS protocol specification. Values + are Base-64 encoded. Supported keys: `name`, `requiresignedurls`, + `allowedorigins`, `thumbnailtimestamppct`, `watermark`, `scheduleddeletion`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -100,6 +109,15 @@ def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + extra_headers = { + **strip_not_given( + { + "Upload-Creator": upload_creator, + "Upload-Metadata": upload_metadata, + } + ), + **(extra_headers or {}), + } return self._post( f"/accounts/{account_id}/stream/copy", body=maybe_transform( @@ -147,6 +165,8 @@ async def create( scheduled_deletion: Union[str, datetime] | NotGiven = NOT_GIVEN, thumbnail_timestamp_pct: float | NotGiven = NOT_GIVEN, watermark: copy_create_params.Watermark | NotGiven = NOT_GIVEN, + upload_creator: str | NotGiven = NOT_GIVEN, + upload_metadata: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -185,6 +205,12 @@ async def create( 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. + upload_creator: A user-defined identifier for the media creator. + + upload_metadata: Comma-separated key-value pairs following the TUS protocol specification. Values + are Base-64 encoded. Supported keys: `name`, `requiresignedurls`, + `allowedorigins`, `thumbnailtimestamppct`, `watermark`, `scheduleddeletion`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -195,6 +221,15 @@ async def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + extra_headers = { + **strip_not_given( + { + "Upload-Creator": upload_creator, + "Upload-Metadata": upload_metadata, + } + ), + **(extra_headers or {}), + } return await self._post( f"/accounts/{account_id}/stream/copy", body=await async_maybe_transform( diff --git a/src/cloudflare/resources/stream/direct_upload.py b/src/cloudflare/resources/stream/direct_upload.py index de337332a8c..efa26368eeb 100644 --- a/src/cloudflare/resources/stream/direct_upload.py +++ b/src/cloudflare/resources/stream/direct_upload.py @@ -10,6 +10,7 @@ from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, + strip_not_given, async_maybe_transform, ) from ..._compat import cached_property @@ -53,6 +54,7 @@ def create( scheduled_deletion: Union[str, datetime] | NotGiven = NOT_GIVEN, thumbnail_timestamp_pct: float | NotGiven = NOT_GIVEN, watermark: direct_upload_create_params.Watermark | NotGiven = NOT_GIVEN, + upload_creator: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -94,6 +96,8 @@ def create( 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. + upload_creator: A user-defined identifier for the media creator. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -104,6 +108,7 @@ def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + extra_headers = {**strip_not_given({"Upload-Creator": upload_creator}), **(extra_headers or {})} return self._post( f"/accounts/{account_id}/stream/direct_upload", body=maybe_transform( @@ -153,6 +158,7 @@ async def create( scheduled_deletion: Union[str, datetime] | NotGiven = NOT_GIVEN, thumbnail_timestamp_pct: float | NotGiven = NOT_GIVEN, watermark: direct_upload_create_params.Watermark | NotGiven = NOT_GIVEN, + upload_creator: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -194,6 +200,8 @@ async def create( 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. + upload_creator: A user-defined identifier for the media creator. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -204,6 +212,7 @@ async def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + extra_headers = {**strip_not_given({"Upload-Creator": upload_creator}), **(extra_headers or {})} return await self._post( f"/accounts/{account_id}/stream/direct_upload", body=await async_maybe_transform( diff --git a/src/cloudflare/resources/stream/stream.py b/src/cloudflare/resources/stream/stream.py index 4a66a234404..5c7449705e8 100644 --- a/src/cloudflare/resources/stream/stream.py +++ b/src/cloudflare/resources/stream/stream.py @@ -59,6 +59,7 @@ from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven from ..._utils import ( maybe_transform, + strip_not_given, async_maybe_transform, ) from .captions import ( @@ -205,6 +206,10 @@ def create( *, account_id: str, body: object, + tus_resumable: Literal["1.0.0"], + upload_length: int, + upload_creator: str | NotGiven = NOT_GIVEN, + upload_metadata: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -222,6 +227,18 @@ def create( Args: account_id: The account identifier tag. + tus_resumable: Specifies the TUS protocol version. This value must be included in every upload + request. Notes: The only supported version of TUS protocol is 1.0.0. + + upload_length: Indicates the size of the entire upload in bytes. The value must be a + non-negative integer. + + upload_creator: A user-defined identifier for the media creator. + + upload_metadata: Comma-separated key-value pairs following the TUS protocol specification. Values + are Base-64 encoded. Supported keys: `name`, `requiresignedurls`, + `allowedorigins`, `thumbnailtimestamppct`, `watermark`, `scheduleddeletion`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -233,6 +250,17 @@ def create( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") extra_headers = {"Accept": "*/*", **(extra_headers or {})} + extra_headers = { + **strip_not_given( + { + "Tus-Resumable": str(tus_resumable), + "Upload-Length": str(upload_length), + "Upload-Creator": upload_creator, + "Upload-Metadata": upload_metadata, + } + ), + **(extra_headers or {}), + } return self._post( f"/accounts/{account_id}/stream", body=maybe_transform(body, stream_create_params.StreamCreateParams), @@ -475,6 +503,10 @@ async def create( *, account_id: str, body: object, + tus_resumable: Literal["1.0.0"], + upload_length: int, + upload_creator: str | NotGiven = NOT_GIVEN, + upload_metadata: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -492,6 +524,18 @@ async def create( Args: account_id: The account identifier tag. + tus_resumable: Specifies the TUS protocol version. This value must be included in every upload + request. Notes: The only supported version of TUS protocol is 1.0.0. + + upload_length: Indicates the size of the entire upload in bytes. The value must be a + non-negative integer. + + upload_creator: A user-defined identifier for the media creator. + + upload_metadata: Comma-separated key-value pairs following the TUS protocol specification. Values + are Base-64 encoded. Supported keys: `name`, `requiresignedurls`, + `allowedorigins`, `thumbnailtimestamppct`, `watermark`, `scheduleddeletion`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -503,6 +547,17 @@ async def create( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") extra_headers = {"Accept": "*/*", **(extra_headers or {})} + extra_headers = { + **strip_not_given( + { + "Tus-Resumable": str(tus_resumable), + "Upload-Length": str(upload_length), + "Upload-Creator": upload_creator, + "Upload-Metadata": upload_metadata, + } + ), + **(extra_headers or {}), + } return await self._post( f"/accounts/{account_id}/stream", body=await async_maybe_transform(body, stream_create_params.StreamCreateParams), diff --git a/src/cloudflare/resources/workers/scripts/content.py b/src/cloudflare/resources/workers/scripts/content.py index 04ea3cd8771..381a25fff2d 100644 --- a/src/cloudflare/resources/workers/scripts/content.py +++ b/src/cloudflare/resources/workers/scripts/content.py @@ -10,6 +10,7 @@ from ...._utils import ( extract_files, maybe_transform, + strip_not_given, deepcopy_minimal, async_maybe_transform, ) @@ -56,6 +57,8 @@ def update( account_id: str, any_part_name: List[FileTypes] | NotGiven = NOT_GIVEN, metadata: WorkerMetadataParam | NotGiven = NOT_GIVEN, + cf_worker_body_part: str | NotGiven = NOT_GIVEN, + cf_worker_main_module_part: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -92,6 +95,15 @@ def update( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not script_name: raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}") + extra_headers = { + **strip_not_given( + { + "CF-WORKER-BODY-PART": cf_worker_body_part, + "CF-WORKER-MAIN-MODULE-PART": cf_worker_main_module_part, + } + ), + **(extra_headers or {}), + } body = deepcopy_minimal( { "any_part_name": any_part_name, @@ -176,6 +188,8 @@ async def update( account_id: str, any_part_name: List[FileTypes] | NotGiven = NOT_GIVEN, metadata: WorkerMetadataParam | NotGiven = NOT_GIVEN, + cf_worker_body_part: str | NotGiven = NOT_GIVEN, + cf_worker_main_module_part: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -212,6 +226,15 @@ async def update( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not script_name: raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}") + extra_headers = { + **strip_not_given( + { + "CF-WORKER-BODY-PART": cf_worker_body_part, + "CF-WORKER-MAIN-MODULE-PART": cf_worker_main_module_part, + } + ), + **(extra_headers or {}), + } body = deepcopy_minimal( { "any_part_name": any_part_name, diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py index 66185449605..c0e679c40d1 100644 --- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py +++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py @@ -10,6 +10,7 @@ from ......_utils import ( extract_files, maybe_transform, + strip_not_given, deepcopy_minimal, async_maybe_transform, ) @@ -57,6 +58,8 @@ def update( dispatch_namespace: str, any_part_name: List[FileTypes] | NotGiven = NOT_GIVEN, metadata: WorkerMetadataParam | NotGiven = NOT_GIVEN, + cf_worker_body_part: str | NotGiven = NOT_GIVEN, + cf_worker_main_module_part: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -97,6 +100,15 @@ def update( raise ValueError(f"Expected a non-empty value for `dispatch_namespace` but received {dispatch_namespace!r}") if not script_name: raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}") + extra_headers = { + **strip_not_given( + { + "CF-WORKER-BODY-PART": cf_worker_body_part, + "CF-WORKER-MAIN-MODULE-PART": cf_worker_main_module_part, + } + ), + **(extra_headers or {}), + } body = deepcopy_minimal( { "any_part_name": any_part_name, @@ -188,6 +200,8 @@ async def update( dispatch_namespace: str, any_part_name: List[FileTypes] | NotGiven = NOT_GIVEN, metadata: WorkerMetadataParam | NotGiven = NOT_GIVEN, + cf_worker_body_part: str | NotGiven = NOT_GIVEN, + cf_worker_main_module_part: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -228,6 +242,15 @@ async def update( raise ValueError(f"Expected a non-empty value for `dispatch_namespace` but received {dispatch_namespace!r}") if not script_name: raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}") + extra_headers = { + **strip_not_given( + { + "CF-WORKER-BODY-PART": cf_worker_body_part, + "CF-WORKER-MAIN-MODULE-PART": cf_worker_main_module_part, + } + ), + **(extra_headers or {}), + } body = deepcopy_minimal( { "any_part_name": any_part_name, diff --git a/src/cloudflare/types/stream/copy_create_params.py b/src/cloudflare/types/stream/copy_create_params.py index 7049042d564..94338a1f17b 100644 --- a/src/cloudflare/types/stream/copy_create_params.py +++ b/src/cloudflare/types/stream/copy_create_params.py @@ -65,6 +65,16 @@ class CopyCreateParams(TypedDict, total=False): watermark: Watermark + upload_creator: Annotated[str, PropertyInfo(alias="Upload-Creator")] + """A user-defined identifier for the media creator.""" + + upload_metadata: Annotated[str, PropertyInfo(alias="Upload-Metadata")] + """Comma-separated key-value pairs following the TUS protocol specification. + + Values are Base-64 encoded. Supported keys: `name`, `requiresignedurls`, + `allowedorigins`, `thumbnailtimestamppct`, `watermark`, `scheduleddeletion`. + """ + class Watermark(TypedDict, total=False): uid: str diff --git a/src/cloudflare/types/stream/direct_upload_create_params.py b/src/cloudflare/types/stream/direct_upload_create_params.py index 6689ff92e37..7b4354993a1 100644 --- a/src/cloudflare/types/stream/direct_upload_create_params.py +++ b/src/cloudflare/types/stream/direct_upload_create_params.py @@ -68,6 +68,9 @@ class DirectUploadCreateParams(TypedDict, total=False): watermark: Watermark + upload_creator: Annotated[str, PropertyInfo(alias="Upload-Creator")] + """A user-defined identifier for the media creator.""" + class Watermark(TypedDict, total=False): uid: str diff --git a/src/cloudflare/types/stream/stream_create_params.py b/src/cloudflare/types/stream/stream_create_params.py index 438ac398bc7..9585b05ec41 100644 --- a/src/cloudflare/types/stream/stream_create_params.py +++ b/src/cloudflare/types/stream/stream_create_params.py @@ -2,7 +2,9 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing_extensions import Literal, Required, Annotated, TypedDict + +from ..._utils import PropertyInfo __all__ = ["StreamCreateParams"] @@ -12,3 +14,26 @@ class StreamCreateParams(TypedDict, total=False): """The account identifier tag.""" body: Required[object] + + tus_resumable: Required[Annotated[Literal["1.0.0"], PropertyInfo(alias="Tus-Resumable")]] + """Specifies the TUS protocol version. + + This value must be included in every upload request. Notes: The only supported + version of TUS protocol is 1.0.0. + """ + + upload_length: Required[Annotated[int, PropertyInfo(alias="Upload-Length")]] + """Indicates the size of the entire upload in bytes. + + The value must be a non-negative integer. + """ + + upload_creator: Annotated[str, PropertyInfo(alias="Upload-Creator")] + """A user-defined identifier for the media creator.""" + + upload_metadata: Annotated[str, PropertyInfo(alias="Upload-Metadata")] + """Comma-separated key-value pairs following the TUS protocol specification. + + Values are Base-64 encoded. Supported keys: `name`, `requiresignedurls`, + `allowedorigins`, `thumbnailtimestamppct`, `watermark`, `scheduleddeletion`. + """ diff --git a/src/cloudflare/types/workers/scripts/content_update_params.py b/src/cloudflare/types/workers/scripts/content_update_params.py index 8cc85869cad..f5c5e96e343 100644 --- a/src/cloudflare/types/workers/scripts/content_update_params.py +++ b/src/cloudflare/types/workers/scripts/content_update_params.py @@ -29,3 +29,7 @@ class ContentUpdateParams(TypedDict, total=False): metadata: WorkerMetadataParam """JSON encoded metadata about the uploaded parts and Worker configuration.""" + + cf_worker_body_part: Annotated[str, PropertyInfo(alias="CF-WORKER-BODY-PART")] + + cf_worker_main_module_part: Annotated[str, PropertyInfo(alias="CF-WORKER-MAIN-MODULE-PART")] diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content_update_params.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content_update_params.py index a9f9eceeb85..9f4d3118469 100644 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content_update_params.py +++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content_update_params.py @@ -32,3 +32,7 @@ class ContentUpdateParams(TypedDict, total=False): metadata: WorkerMetadataParam """JSON encoded metadata about the uploaded parts and Worker configuration.""" + + cf_worker_body_part: Annotated[str, PropertyInfo(alias="CF-WORKER-BODY-PART")] + + cf_worker_main_module_part: Annotated[str, PropertyInfo(alias="CF-WORKER-MAIN-MODULE-PART")] diff --git a/tests/api_resources/stream/test_copy.py b/tests/api_resources/stream/test_copy.py index 191a1cc36c3..fa2c1cdd5b1 100644 --- a/tests/api_resources/stream/test_copy.py +++ b/tests/api_resources/stream/test_copy.py @@ -38,6 +38,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: scheduled_deletion=parse_datetime("2014-01-02T02:20:00Z"), thumbnail_timestamp_pct=0.529241, watermark={"uid": "ea95132c15732412d22c1476fa83f27a"}, + upload_creator="creator-id_abcde12345", + upload_metadata="name aGVsbG8gd29ybGQ=, requiresignedurls, allowedorigins ZXhhbXBsZS5jb20sdGVzdC5jb20=", ) assert_matches_type(Optional[Video], copy, path=["response"]) @@ -99,6 +101,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare scheduled_deletion=parse_datetime("2014-01-02T02:20:00Z"), thumbnail_timestamp_pct=0.529241, watermark={"uid": "ea95132c15732412d22c1476fa83f27a"}, + upload_creator="creator-id_abcde12345", + upload_metadata="name aGVsbG8gd29ybGQ=, requiresignedurls, allowedorigins ZXhhbXBsZS5jb20sdGVzdC5jb20=", ) assert_matches_type(Optional[Video], copy, path=["response"]) diff --git a/tests/api_resources/stream/test_direct_upload.py b/tests/api_resources/stream/test_direct_upload.py index 7115e89cc14..54f9c3d0070 100644 --- a/tests/api_resources/stream/test_direct_upload.py +++ b/tests/api_resources/stream/test_direct_upload.py @@ -39,6 +39,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: scheduled_deletion=parse_datetime("2014-01-02T02:20:00Z"), thumbnail_timestamp_pct=0.529241, watermark={"uid": "ea95132c15732412d22c1476fa83f27a"}, + upload_creator="creator-id_abcde12345", ) assert_matches_type(Optional[DirectUploadCreateResponse], direct_upload, path=["response"]) @@ -101,6 +102,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare scheduled_deletion=parse_datetime("2014-01-02T02:20:00Z"), thumbnail_timestamp_pct=0.529241, watermark={"uid": "ea95132c15732412d22c1476fa83f27a"}, + upload_creator="creator-id_abcde12345", ) assert_matches_type(Optional[DirectUploadCreateResponse], direct_upload, path=["response"]) diff --git a/tests/api_resources/test_stream.py b/tests/api_resources/test_stream.py index ee6f6fbfc80..5bab50b63ce 100644 --- a/tests/api_resources/test_stream.py +++ b/tests/api_resources/test_stream.py @@ -25,6 +25,21 @@ def test_method_create(self, client: Cloudflare) -> None: stream = client.stream.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, + tus_resumable="1.0.0", + upload_length=0, + ) + assert stream is None + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + def test_method_create_with_all_params(self, client: Cloudflare) -> None: + stream = client.stream.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + body={}, + tus_resumable="1.0.0", + upload_length=0, + upload_creator="creator-id_abcde12345", + upload_metadata="name aGVsbG8gd29ybGQ=, requiresignedurls, allowedorigins ZXhhbXBsZS5jb20sdGVzdC5jb20=", ) assert stream is None @@ -34,6 +49,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.with_raw_response.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, + tus_resumable="1.0.0", + upload_length=0, ) assert response.is_closed is True @@ -47,6 +64,8 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.with_streaming_response.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, + tus_resumable="1.0.0", + upload_length=0, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -63,6 +82,8 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.stream.with_raw_response.create( account_id="", body={}, + tus_resumable="1.0.0", + upload_length=0, ) @parametrize @@ -224,6 +245,21 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: stream = await async_client.stream.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, + tus_resumable="1.0.0", + upload_length=0, + ) + assert stream is None + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: + stream = await async_client.stream.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + body={}, + tus_resumable="1.0.0", + upload_length=0, + upload_creator="creator-id_abcde12345", + upload_metadata="name aGVsbG8gd29ybGQ=, requiresignedurls, allowedorigins ZXhhbXBsZS5jb20sdGVzdC5jb20=", ) assert stream is None @@ -233,6 +269,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.with_raw_response.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, + tus_resumable="1.0.0", + upload_length=0, ) assert response.is_closed is True @@ -246,6 +284,8 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.stream.with_streaming_response.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, + tus_resumable="1.0.0", + upload_length=0, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -262,6 +302,8 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.stream.with_raw_response.create( account_id="", body={}, + tus_resumable="1.0.0", + upload_length=0, ) @parametrize diff --git a/tests/api_resources/workers/scripts/test_content.py b/tests/api_resources/workers/scripts/test_content.py index 9a748afefda..ade69104c00 100644 --- a/tests/api_resources/workers/scripts/test_content.py +++ b/tests/api_resources/workers/scripts/test_content.py @@ -45,6 +45,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "body_part": "worker.js", "main_module": "worker.js", }, + cf_worker_body_part="string", + cf_worker_main_module_part="string", ) assert_matches_type(Optional[Script], content, path=["response"]) @@ -181,6 +183,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "body_part": "worker.js", "main_module": "worker.js", }, + cf_worker_body_part="string", + cf_worker_main_module_part="string", ) assert_matches_type(Optional[Script], content, path=["response"]) diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py index a9073edfee5..cfbbc556765 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py @@ -47,6 +47,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "body_part": "worker.js", "main_module": "worker.js", }, + cf_worker_body_part="string", + cf_worker_main_module_part="string", ) assert_matches_type(Optional[Script], content, path=["response"]) @@ -208,6 +210,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "body_part": "worker.js", "main_module": "worker.js", }, + cf_worker_body_part="string", + cf_worker_main_module_part="string", ) assert_matches_type(Optional[Script], content, path=["response"]) From 91ca108bd5b1e3d938b5f90a2f1ac5ef7dba32e9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 20:11:58 +0000 Subject: [PATCH 071/124] feat(api): OpenAPI spec update via Stainless API (#1085) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4b802baedab..f6d6d30950e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f2b480625b4e667e5ed9a238c9b5314522dc9be0bf8f514bed4e03a88d09455c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1e032dc3edceb6e4cfdb5a6577acfb07d711fd1b518dd248540f219f12d451fb.yml From 928a6d613753c427a3f7f202a2b52246f679931d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 20:21:58 +0000 Subject: [PATCH 072/124] feat(api): OpenAPI spec update via Stainless API (#1086) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f6d6d30950e..0df12874625 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1e032dc3edceb6e4cfdb5a6577acfb07d711fd1b518dd248540f219f12d451fb.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-08b201ef13ebb4bdf13a4d2e2165229fc6e5a369c64cf4a108835b65996cd957.yml From f4b9ad590f68d749f11166972154a4ccc12a8c0b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 22:11:50 +0000 Subject: [PATCH 073/124] feat(api): OpenAPI spec update via Stainless API (#1087) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0df12874625..f6d6d30950e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-08b201ef13ebb4bdf13a4d2e2165229fc6e5a369c64cf4a108835b65996cd957.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1e032dc3edceb6e4cfdb5a6577acfb07d711fd1b518dd248540f219f12d451fb.yml From 0d97401137b122a6136ee07806a7d6a95d536106 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 23:22:23 +0000 Subject: [PATCH 074/124] feat(api): OpenAPI spec update via Stainless API (#1088) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f6d6d30950e..0df12874625 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1e032dc3edceb6e4cfdb5a6577acfb07d711fd1b518dd248540f219f12d451fb.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-08b201ef13ebb4bdf13a4d2e2165229fc6e5a369c64cf4a108835b65996cd957.yml From b02a3a6c0f71b407dab22e92e018d765f8a62c8c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 05:01:03 +0000 Subject: [PATCH 075/124] feat(api): update via SDK Studio (#1089) --- .stats.yml | 2 +- api.md | 50 +- .../resources/ai_gateway/ai_gateway.py | 1 + .../resources/ai_gateway/logs/__init__.py | 47 ++ .../resources/ai_gateway/{ => logs}/logs.py | 206 +++++++- .../resources/ai_gateway/logs/request.py | 158 ++++++ .../resources/ai_gateway/logs/response.py | 158 ++++++ .../stream/captions/language/language.py | 110 +++++ .../resources/zero_trust/gateway/__init__.py | 14 + .../zero_trust/gateway/certificates.py | 450 ++++++++++++++++++ .../resources/zero_trust/gateway/gateway.py | 32 ++ src/cloudflare/types/ai_gateway/__init__.py | 3 +- .../types/ai_gateway/log_get_response.py | 9 +- .../{log_get_params.py => log_list_params.py} | 4 +- .../types/ai_gateway/log_list_response.py | 46 ++ .../types/ai_gateway/logs/__init__.py | 3 + .../types/zero_trust/gateway/__init__.py | 5 + .../gateway/certificate_create_params.py | 17 + .../gateway/certificate_create_response.py | 31 ++ .../gateway/certificate_delete_response.py | 31 ++ .../gateway/certificate_get_response.py | 31 ++ .../gateway/certificate_list_response.py | 31 ++ .../api_resources/ai_gateway/logs/__init__.py | 1 + .../ai_gateway/logs/test_request.py | 141 ++++++ .../ai_gateway/logs/test_response.py | 141 ++++++ tests/api_resources/ai_gateway/test_logs.py | 155 +++++- .../stream/captions/test_language.py | 120 +++++ .../zero_trust/gateway/test_certificates.py | 388 +++++++++++++++ 28 files changed, 2336 insertions(+), 49 deletions(-) create mode 100644 src/cloudflare/resources/ai_gateway/logs/__init__.py rename src/cloudflare/resources/ai_gateway/{ => logs}/logs.py (51%) create mode 100644 src/cloudflare/resources/ai_gateway/logs/request.py create mode 100644 src/cloudflare/resources/ai_gateway/logs/response.py create mode 100644 src/cloudflare/resources/zero_trust/gateway/certificates.py rename src/cloudflare/types/ai_gateway/{log_get_params.py => log_list_params.py} (89%) create mode 100644 src/cloudflare/types/ai_gateway/log_list_response.py create mode 100644 src/cloudflare/types/ai_gateway/logs/__init__.py create mode 100644 src/cloudflare/types/zero_trust/gateway/certificate_create_params.py create mode 100644 src/cloudflare/types/zero_trust/gateway/certificate_create_response.py create mode 100644 src/cloudflare/types/zero_trust/gateway/certificate_delete_response.py create mode 100644 src/cloudflare/types/zero_trust/gateway/certificate_get_response.py create mode 100644 src/cloudflare/types/zero_trust/gateway/certificate_list_response.py create mode 100644 tests/api_resources/ai_gateway/logs/__init__.py create mode 100644 tests/api_resources/ai_gateway/logs/test_request.py create mode 100644 tests/api_resources/ai_gateway/logs/test_response.py create mode 100644 tests/api_resources/zero_trust/gateway/test_certificates.py diff --git a/.stats.yml b/.stats.yml index 0df12874625..83a45871666 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1348 +configured_endpoints: 1356 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-08b201ef13ebb4bdf13a4d2e2165229fc6e5a369c64cf4a108835b65996cd957.yml diff --git a/api.md b/api.md index bc3718ff6b4..fa00c410812 100644 --- a/api.md +++ b/api.md @@ -4637,6 +4637,7 @@ from cloudflare.types.stream.captions import LanguageDeleteResponse Methods: +- client.stream.captions.language.create(language, \*, account_id, identifier) -> Optional - client.stream.captions.language.update(language, \*, account_id, identifier, \*\*params) -> Optional - client.stream.captions.language.delete(language, \*, account_id, identifier) -> str - client.stream.captions.language.get(language, \*, account_id, identifier) -> Optional @@ -6165,6 +6166,26 @@ Methods: - client.zero_trust.gateway.rules.delete(rule_id, \*, account_id) -> Optional - client.zero_trust.gateway.rules.get(rule_id, \*, account_id) -> Optional +### Certificates + +Types: + +```python +from cloudflare.types.zero_trust.gateway import ( + CertificateCreateResponse, + CertificateListResponse, + CertificateDeleteResponse, + CertificateGetResponse, +) +``` + +Methods: + +- client.zero_trust.gateway.certificates.create(\*, account_id, \*\*params) -> Optional +- client.zero_trust.gateway.certificates.list(\*, account_id) -> SyncSinglePage[CertificateListResponse] +- client.zero_trust.gateway.certificates.delete(certificate_id, \*, account_id) -> Optional +- client.zero_trust.gateway.certificates.get(certificate_id, \*, account_id) -> Optional + ## Networks ### Routes @@ -7865,12 +7886,37 @@ Methods: Types: ```python -from cloudflare.types.ai_gateway import LogGetResponse +from cloudflare.types.ai_gateway import LogListResponse, LogGetResponse +``` + +Methods: + +- client.ai_gateway.logs.list(id, \*, account_id, \*\*params) -> SyncV4PagePaginationArray[LogListResponse] +- client.ai_gateway.logs.get(log_id, \*, account_id, id) -> LogGetResponse + +### Request + +Types: + +```python +from cloudflare.types.ai_gateway.logs import RequestGetResponse +``` + +Methods: + +- client.ai_gateway.logs.request.get(log_id, \*, account_id, id) -> object + +### Response + +Types: + +```python +from cloudflare.types.ai_gateway.logs import ResponseGetResponse ``` Methods: -- client.ai_gateway.logs.get(id, \*, account_id, \*\*params) -> LogGetResponse +- client.ai_gateway.logs.response.get(log_id, \*, account_id, id) -> object # IAM diff --git a/src/cloudflare/resources/ai_gateway/ai_gateway.py b/src/cloudflare/resources/ai_gateway/ai_gateway.py index ac5a9237f0b..2d11d809968 100644 --- a/src/cloudflare/resources/ai_gateway/ai_gateway.py +++ b/src/cloudflare/resources/ai_gateway/ai_gateway.py @@ -21,6 +21,7 @@ async_maybe_transform, ) from ..._compat import cached_property +from .logs.logs import LogsResource, AsyncLogsResource from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( to_raw_response_wrapper, diff --git a/src/cloudflare/resources/ai_gateway/logs/__init__.py b/src/cloudflare/resources/ai_gateway/logs/__init__.py new file mode 100644 index 00000000000..cd50acd99fc --- /dev/null +++ b/src/cloudflare/resources/ai_gateway/logs/__init__.py @@ -0,0 +1,47 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .logs import ( + LogsResource, + AsyncLogsResource, + LogsResourceWithRawResponse, + AsyncLogsResourceWithRawResponse, + LogsResourceWithStreamingResponse, + AsyncLogsResourceWithStreamingResponse, +) +from .request import ( + RequestResource, + AsyncRequestResource, + RequestResourceWithRawResponse, + AsyncRequestResourceWithRawResponse, + RequestResourceWithStreamingResponse, + AsyncRequestResourceWithStreamingResponse, +) +from .response import ( + ResponseResource, + AsyncResponseResource, + ResponseResourceWithRawResponse, + AsyncResponseResourceWithRawResponse, + ResponseResourceWithStreamingResponse, + AsyncResponseResourceWithStreamingResponse, +) + +__all__ = [ + "RequestResource", + "AsyncRequestResource", + "RequestResourceWithRawResponse", + "AsyncRequestResourceWithRawResponse", + "RequestResourceWithStreamingResponse", + "AsyncRequestResourceWithStreamingResponse", + "ResponseResource", + "AsyncResponseResource", + "ResponseResourceWithRawResponse", + "AsyncResponseResourceWithRawResponse", + "ResponseResourceWithStreamingResponse", + "AsyncResponseResourceWithStreamingResponse", + "LogsResource", + "AsyncLogsResource", + "LogsResourceWithRawResponse", + "AsyncLogsResourceWithRawResponse", + "LogsResourceWithStreamingResponse", + "AsyncLogsResourceWithStreamingResponse", +] diff --git a/src/cloudflare/resources/ai_gateway/logs.py b/src/cloudflare/resources/ai_gateway/logs/logs.py similarity index 51% rename from src/cloudflare/resources/ai_gateway/logs.py rename to src/cloudflare/resources/ai_gateway/logs/logs.py index 01650e97aa3..2176d77bef7 100644 --- a/src/cloudflare/resources/ai_gateway/logs.py +++ b/src/cloudflare/resources/ai_gateway/logs/logs.py @@ -8,30 +8,54 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, +from .request import ( + RequestResource, + AsyncRequestResource, + RequestResourceWithRawResponse, + AsyncRequestResourceWithRawResponse, + RequestResourceWithStreamingResponse, + AsyncRequestResourceWithStreamingResponse, ) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( +from .response import ( + ResponseResource, + AsyncResponseResource, + ResponseResourceWithRawResponse, + AsyncResponseResourceWithRawResponse, + ResponseResourceWithStreamingResponse, + AsyncResponseResourceWithStreamingResponse, +) +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._utils import maybe_transform +from ...._compat import cached_property +from ...._resource import SyncAPIResource, AsyncAPIResource +from ...._response import ( to_raw_response_wrapper, to_streamed_response_wrapper, async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._wrappers import ResultWrapper -from ..._base_client import ( +from ...._wrappers import ResultWrapper +from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray +from ...._base_client import ( + AsyncPaginator, make_request_options, ) -from ...types.ai_gateway import log_get_params -from ...types.ai_gateway.log_get_response import LogGetResponse +from ....types.ai_gateway import log_list_params +from ....types.ai_gateway.log_get_response import LogGetResponse +from ....types.ai_gateway.log_list_response import LogListResponse __all__ = ["LogsResource", "AsyncLogsResource"] class LogsResource(SyncAPIResource): + @cached_property + def request(self) -> RequestResource: + return RequestResource(self._client) + + @cached_property + def response(self) -> ResponseResource: + return ResponseResource(self._client) + @cached_property def with_raw_response(self) -> LogsResourceWithRawResponse: return LogsResourceWithRawResponse(self) @@ -40,7 +64,7 @@ def with_raw_response(self) -> LogsResourceWithRawResponse: def with_streaming_response(self) -> LogsResourceWithStreamingResponse: return LogsResourceWithStreamingResponse(self) - def get( + def list( self, id: str, *, @@ -60,7 +84,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LogGetResponse: + ) -> SyncV4PagePaginationArray[LogListResponse]: """ List Gateway Logs @@ -79,8 +103,9 @@ def get( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs", + page=SyncV4PagePaginationArray[LogListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -98,8 +123,52 @@ def get( "start_date": start_date, "success": success, }, - log_get_params.LogGetParams, + log_list_params.LogListParams, ), + ), + model=LogListResponse, + ) + + def get( + self, + log_id: str, + *, + account_id: str, + id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> LogGetResponse: + """ + Get Gateway Log Detail + + Args: + id: gateway id + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + if not log_id: + raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") + return self._get( + f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, post_parser=ResultWrapper[LogGetResponse]._unwrapper, ), cast_to=cast(Type[LogGetResponse], ResultWrapper[LogGetResponse]), @@ -107,6 +176,14 @@ def get( class AsyncLogsResource(AsyncAPIResource): + @cached_property + def request(self) -> AsyncRequestResource: + return AsyncRequestResource(self._client) + + @cached_property + def response(self) -> AsyncResponseResource: + return AsyncResponseResource(self._client) + @cached_property def with_raw_response(self) -> AsyncLogsResourceWithRawResponse: return AsyncLogsResourceWithRawResponse(self) @@ -115,7 +192,7 @@ def with_raw_response(self) -> AsyncLogsResourceWithRawResponse: def with_streaming_response(self) -> AsyncLogsResourceWithStreamingResponse: return AsyncLogsResourceWithStreamingResponse(self) - async def get( + def list( self, id: str, *, @@ -135,7 +212,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LogGetResponse: + ) -> AsyncPaginator[LogListResponse, AsyncV4PagePaginationArray[LogListResponse]]: """ List Gateway Logs @@ -154,14 +231,15 @@ async def get( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs", + page=AsyncV4PagePaginationArray[LogListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "cached": cached, "direction": direction, @@ -173,8 +251,52 @@ async def get( "start_date": start_date, "success": success, }, - log_get_params.LogGetParams, + log_list_params.LogListParams, ), + ), + model=LogListResponse, + ) + + async def get( + self, + log_id: str, + *, + account_id: str, + id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> LogGetResponse: + """ + Get Gateway Log Detail + + Args: + id: gateway id + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + if not log_id: + raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") + return await self._get( + f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, post_parser=ResultWrapper[LogGetResponse]._unwrapper, ), cast_to=cast(Type[LogGetResponse], ResultWrapper[LogGetResponse]), @@ -185,33 +307,77 @@ class LogsResourceWithRawResponse: def __init__(self, logs: LogsResource) -> None: self._logs = logs + self.list = to_raw_response_wrapper( + logs.list, + ) self.get = to_raw_response_wrapper( logs.get, ) + @cached_property + def request(self) -> RequestResourceWithRawResponse: + return RequestResourceWithRawResponse(self._logs.request) + + @cached_property + def response(self) -> ResponseResourceWithRawResponse: + return ResponseResourceWithRawResponse(self._logs.response) + class AsyncLogsResourceWithRawResponse: def __init__(self, logs: AsyncLogsResource) -> None: self._logs = logs + self.list = async_to_raw_response_wrapper( + logs.list, + ) self.get = async_to_raw_response_wrapper( logs.get, ) + @cached_property + def request(self) -> AsyncRequestResourceWithRawResponse: + return AsyncRequestResourceWithRawResponse(self._logs.request) + + @cached_property + def response(self) -> AsyncResponseResourceWithRawResponse: + return AsyncResponseResourceWithRawResponse(self._logs.response) + class LogsResourceWithStreamingResponse: def __init__(self, logs: LogsResource) -> None: self._logs = logs + self.list = to_streamed_response_wrapper( + logs.list, + ) self.get = to_streamed_response_wrapper( logs.get, ) + @cached_property + def request(self) -> RequestResourceWithStreamingResponse: + return RequestResourceWithStreamingResponse(self._logs.request) + + @cached_property + def response(self) -> ResponseResourceWithStreamingResponse: + return ResponseResourceWithStreamingResponse(self._logs.response) + class AsyncLogsResourceWithStreamingResponse: def __init__(self, logs: AsyncLogsResource) -> None: self._logs = logs + self.list = async_to_streamed_response_wrapper( + logs.list, + ) self.get = async_to_streamed_response_wrapper( logs.get, ) + + @cached_property + def request(self) -> AsyncRequestResourceWithStreamingResponse: + return AsyncRequestResourceWithStreamingResponse(self._logs.request) + + @cached_property + def response(self) -> AsyncResponseResourceWithStreamingResponse: + return AsyncResponseResourceWithStreamingResponse(self._logs.response) diff --git a/src/cloudflare/resources/ai_gateway/logs/request.py b/src/cloudflare/resources/ai_gateway/logs/request.py new file mode 100644 index 00000000000..05a85c72ef3 --- /dev/null +++ b/src/cloudflare/resources/ai_gateway/logs/request.py @@ -0,0 +1,158 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._compat import cached_property +from ...._resource import SyncAPIResource, AsyncAPIResource +from ...._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ...._base_client import ( + make_request_options, +) + +__all__ = ["RequestResource", "AsyncRequestResource"] + + +class RequestResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> RequestResourceWithRawResponse: + return RequestResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> RequestResourceWithStreamingResponse: + return RequestResourceWithStreamingResponse(self) + + def get( + self, + log_id: str, + *, + account_id: str, + id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + Get Gateway Log Request + + Args: + id: gateway id + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + if not log_id: + raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") + return self._get( + f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}/request", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=object, + ) + + +class AsyncRequestResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncRequestResourceWithRawResponse: + return AsyncRequestResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncRequestResourceWithStreamingResponse: + return AsyncRequestResourceWithStreamingResponse(self) + + async def get( + self, + log_id: str, + *, + account_id: str, + id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + Get Gateway Log Request + + Args: + id: gateway id + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + if not log_id: + raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") + return await self._get( + f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}/request", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=object, + ) + + +class RequestResourceWithRawResponse: + def __init__(self, request: RequestResource) -> None: + self._request = request + + self.get = to_raw_response_wrapper( + request.get, + ) + + +class AsyncRequestResourceWithRawResponse: + def __init__(self, request: AsyncRequestResource) -> None: + self._request = request + + self.get = async_to_raw_response_wrapper( + request.get, + ) + + +class RequestResourceWithStreamingResponse: + def __init__(self, request: RequestResource) -> None: + self._request = request + + self.get = to_streamed_response_wrapper( + request.get, + ) + + +class AsyncRequestResourceWithStreamingResponse: + def __init__(self, request: AsyncRequestResource) -> None: + self._request = request + + self.get = async_to_streamed_response_wrapper( + request.get, + ) diff --git a/src/cloudflare/resources/ai_gateway/logs/response.py b/src/cloudflare/resources/ai_gateway/logs/response.py new file mode 100644 index 00000000000..e70ec94a87b --- /dev/null +++ b/src/cloudflare/resources/ai_gateway/logs/response.py @@ -0,0 +1,158 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._compat import cached_property +from ...._resource import SyncAPIResource, AsyncAPIResource +from ...._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ...._base_client import ( + make_request_options, +) + +__all__ = ["ResponseResource", "AsyncResponseResource"] + + +class ResponseResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> ResponseResourceWithRawResponse: + return ResponseResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> ResponseResourceWithStreamingResponse: + return ResponseResourceWithStreamingResponse(self) + + def get( + self, + log_id: str, + *, + account_id: str, + id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + Get Gateway Log Response + + Args: + id: gateway id + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + if not log_id: + raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") + return self._get( + f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}/response", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=object, + ) + + +class AsyncResponseResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncResponseResourceWithRawResponse: + return AsyncResponseResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncResponseResourceWithStreamingResponse: + return AsyncResponseResourceWithStreamingResponse(self) + + async def get( + self, + log_id: str, + *, + account_id: str, + id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + Get Gateway Log Response + + Args: + id: gateway id + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + if not log_id: + raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") + return await self._get( + f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}/response", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=object, + ) + + +class ResponseResourceWithRawResponse: + def __init__(self, response: ResponseResource) -> None: + self._response = response + + self.get = to_raw_response_wrapper( + response.get, + ) + + +class AsyncResponseResourceWithRawResponse: + def __init__(self, response: AsyncResponseResource) -> None: + self._response = response + + self.get = async_to_raw_response_wrapper( + response.get, + ) + + +class ResponseResourceWithStreamingResponse: + def __init__(self, response: ResponseResource) -> None: + self._response = response + + self.get = to_streamed_response_wrapper( + response.get, + ) + + +class AsyncResponseResourceWithStreamingResponse: + def __init__(self, response: AsyncResponseResource) -> None: + self._response = response + + self.get = async_to_streamed_response_wrapper( + response.get, + ) diff --git a/src/cloudflare/resources/stream/captions/language/language.py b/src/cloudflare/resources/stream/captions/language/language.py index 34ca70cdff5..3c1bfec470e 100644 --- a/src/cloudflare/resources/stream/captions/language/language.py +++ b/src/cloudflare/resources/stream/captions/language/language.py @@ -51,6 +51,55 @@ def with_raw_response(self) -> LanguageResourceWithRawResponse: def with_streaming_response(self) -> LanguageResourceWithStreamingResponse: return LanguageResourceWithStreamingResponse(self) + def create( + self, + language: str, + *, + account_id: str, + identifier: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[Caption]: + """ + Generate captions or subtitles for provided language via AI. + + Args: + account_id: Identifier + + identifier: A Cloudflare-generated unique identifier for a media item. + + language: The language tag in BCP 47 format. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not identifier: + raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") + if not language: + raise ValueError(f"Expected a non-empty value for `language` but received {language!r}") + return self._post( + f"/accounts/{account_id}/stream/{identifier}/captions/{language}/generate", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[Caption]]._unwrapper, + ), + cast_to=cast(Type[Optional[Caption]], ResultWrapper[Caption]), + ) + def update( self, language: str, @@ -217,6 +266,55 @@ def with_raw_response(self) -> AsyncLanguageResourceWithRawResponse: def with_streaming_response(self) -> AsyncLanguageResourceWithStreamingResponse: return AsyncLanguageResourceWithStreamingResponse(self) + async def create( + self, + language: str, + *, + account_id: str, + identifier: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[Caption]: + """ + Generate captions or subtitles for provided language via AI. + + Args: + account_id: Identifier + + identifier: A Cloudflare-generated unique identifier for a media item. + + language: The language tag in BCP 47 format. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not identifier: + raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") + if not language: + raise ValueError(f"Expected a non-empty value for `language` but received {language!r}") + return await self._post( + f"/accounts/{account_id}/stream/{identifier}/captions/{language}/generate", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[Caption]]._unwrapper, + ), + cast_to=cast(Type[Optional[Caption]], ResultWrapper[Caption]), + ) + async def update( self, language: str, @@ -374,6 +472,9 @@ class LanguageResourceWithRawResponse: def __init__(self, language: LanguageResource) -> None: self._language = language + self.create = to_raw_response_wrapper( + language.create, + ) self.update = to_raw_response_wrapper( language.update, ) @@ -393,6 +494,9 @@ class AsyncLanguageResourceWithRawResponse: def __init__(self, language: AsyncLanguageResource) -> None: self._language = language + self.create = async_to_raw_response_wrapper( + language.create, + ) self.update = async_to_raw_response_wrapper( language.update, ) @@ -412,6 +516,9 @@ class LanguageResourceWithStreamingResponse: def __init__(self, language: LanguageResource) -> None: self._language = language + self.create = to_streamed_response_wrapper( + language.create, + ) self.update = to_streamed_response_wrapper( language.update, ) @@ -431,6 +538,9 @@ class AsyncLanguageResourceWithStreamingResponse: def __init__(self, language: AsyncLanguageResource) -> None: self._language = language + self.create = async_to_streamed_response_wrapper( + language.create, + ) self.update = async_to_streamed_response_wrapper( language.update, ) diff --git a/src/cloudflare/resources/zero_trust/gateway/__init__.py b/src/cloudflare/resources/zero_trust/gateway/__init__.py index e121dd0022f..dd71429636f 100644 --- a/src/cloudflare/resources/zero_trust/gateway/__init__.py +++ b/src/cloudflare/resources/zero_trust/gateway/__init__.py @@ -56,6 +56,14 @@ CategoriesResourceWithStreamingResponse, AsyncCategoriesResourceWithStreamingResponse, ) +from .certificates import ( + CertificatesResource, + AsyncCertificatesResource, + CertificatesResourceWithRawResponse, + AsyncCertificatesResourceWithRawResponse, + CertificatesResourceWithStreamingResponse, + AsyncCertificatesResourceWithStreamingResponse, +) from .configurations import ( ConfigurationsResource, AsyncConfigurationsResource, @@ -136,6 +144,12 @@ "AsyncRulesResourceWithRawResponse", "RulesResourceWithStreamingResponse", "AsyncRulesResourceWithStreamingResponse", + "CertificatesResource", + "AsyncCertificatesResource", + "CertificatesResourceWithRawResponse", + "AsyncCertificatesResourceWithRawResponse", + "CertificatesResourceWithStreamingResponse", + "AsyncCertificatesResourceWithStreamingResponse", "GatewayResource", "AsyncGatewayResource", "GatewayResourceWithRawResponse", diff --git a/src/cloudflare/resources/zero_trust/gateway/certificates.py b/src/cloudflare/resources/zero_trust/gateway/certificates.py new file mode 100644 index 00000000000..8e9b8b954f2 --- /dev/null +++ b/src/cloudflare/resources/zero_trust/gateway/certificates.py @@ -0,0 +1,450 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Type, Optional, cast + +import httpx + +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._utils import ( + maybe_transform, + async_maybe_transform, +) +from ...._compat import cached_property +from ...._resource import SyncAPIResource, AsyncAPIResource +from ...._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage +from ...._base_client import ( + AsyncPaginator, + make_request_options, +) +from ....types.zero_trust.gateway import certificate_create_params +from ....types.zero_trust.gateway.certificate_get_response import CertificateGetResponse +from ....types.zero_trust.gateway.certificate_list_response import CertificateListResponse +from ....types.zero_trust.gateway.certificate_create_response import CertificateCreateResponse +from ....types.zero_trust.gateway.certificate_delete_response import CertificateDeleteResponse + +__all__ = ["CertificatesResource", "AsyncCertificatesResource"] + + +class CertificatesResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CertificatesResourceWithRawResponse: + return CertificatesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CertificatesResourceWithStreamingResponse: + return CertificatesResourceWithStreamingResponse(self) + + def create( + self, + *, + account_id: str, + validity_period_days: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[CertificateCreateResponse]: + """ + Creates a new Zero Trust certificate. + + Args: + validity_period_days: Number of days the generated certificate will be valid, minimum 1 day and + maximum 30 years. Defaults to 5 years. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._post( + f"/accounts/{account_id}/gateway/certificates", + body=maybe_transform( + {"validity_period_days": validity_period_days}, certificate_create_params.CertificateCreateParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[CertificateCreateResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[CertificateCreateResponse]], ResultWrapper[CertificateCreateResponse]), + ) + + def list( + self, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> SyncSinglePage[CertificateListResponse]: + """ + Fetches all Zero Trust certificates for an account. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._get_api_list( + f"/accounts/{account_id}/gateway/certificates", + page=SyncSinglePage[CertificateListResponse], + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + model=CertificateListResponse, + ) + + def delete( + self, + certificate_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[CertificateDeleteResponse]: + """ + Deletes a gateway-managed Zero Trust certificate. + + Args: + certificate_id: Certificate UUID tag. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not certificate_id: + raise ValueError(f"Expected a non-empty value for `certificate_id` but received {certificate_id!r}") + return self._delete( + f"/accounts/{account_id}/gateway/certificates/{certificate_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[CertificateDeleteResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[CertificateDeleteResponse]], ResultWrapper[CertificateDeleteResponse]), + ) + + def get( + self, + certificate_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[CertificateGetResponse]: + """ + Fetches a single Zero Trust certificate. + + Args: + certificate_id: Certificate UUID tag. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not certificate_id: + raise ValueError(f"Expected a non-empty value for `certificate_id` but received {certificate_id!r}") + return self._get( + f"/accounts/{account_id}/gateway/certificates/{certificate_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[CertificateGetResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[CertificateGetResponse]], ResultWrapper[CertificateGetResponse]), + ) + + +class AsyncCertificatesResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCertificatesResourceWithRawResponse: + return AsyncCertificatesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCertificatesResourceWithStreamingResponse: + return AsyncCertificatesResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_id: str, + validity_period_days: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[CertificateCreateResponse]: + """ + Creates a new Zero Trust certificate. + + Args: + validity_period_days: Number of days the generated certificate will be valid, minimum 1 day and + maximum 30 years. Defaults to 5 years. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return await self._post( + f"/accounts/{account_id}/gateway/certificates", + body=await async_maybe_transform( + {"validity_period_days": validity_period_days}, certificate_create_params.CertificateCreateParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[CertificateCreateResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[CertificateCreateResponse]], ResultWrapper[CertificateCreateResponse]), + ) + + def list( + self, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AsyncPaginator[CertificateListResponse, AsyncSinglePage[CertificateListResponse]]: + """ + Fetches all Zero Trust certificates for an account. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._get_api_list( + f"/accounts/{account_id}/gateway/certificates", + page=AsyncSinglePage[CertificateListResponse], + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + model=CertificateListResponse, + ) + + async def delete( + self, + certificate_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[CertificateDeleteResponse]: + """ + Deletes a gateway-managed Zero Trust certificate. + + Args: + certificate_id: Certificate UUID tag. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not certificate_id: + raise ValueError(f"Expected a non-empty value for `certificate_id` but received {certificate_id!r}") + return await self._delete( + f"/accounts/{account_id}/gateway/certificates/{certificate_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[CertificateDeleteResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[CertificateDeleteResponse]], ResultWrapper[CertificateDeleteResponse]), + ) + + async def get( + self, + certificate_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[CertificateGetResponse]: + """ + Fetches a single Zero Trust certificate. + + Args: + certificate_id: Certificate UUID tag. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not certificate_id: + raise ValueError(f"Expected a non-empty value for `certificate_id` but received {certificate_id!r}") + return await self._get( + f"/accounts/{account_id}/gateway/certificates/{certificate_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[CertificateGetResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[CertificateGetResponse]], ResultWrapper[CertificateGetResponse]), + ) + + +class CertificatesResourceWithRawResponse: + def __init__(self, certificates: CertificatesResource) -> None: + self._certificates = certificates + + self.create = to_raw_response_wrapper( + certificates.create, + ) + self.list = to_raw_response_wrapper( + certificates.list, + ) + self.delete = to_raw_response_wrapper( + certificates.delete, + ) + self.get = to_raw_response_wrapper( + certificates.get, + ) + + +class AsyncCertificatesResourceWithRawResponse: + def __init__(self, certificates: AsyncCertificatesResource) -> None: + self._certificates = certificates + + self.create = async_to_raw_response_wrapper( + certificates.create, + ) + self.list = async_to_raw_response_wrapper( + certificates.list, + ) + self.delete = async_to_raw_response_wrapper( + certificates.delete, + ) + self.get = async_to_raw_response_wrapper( + certificates.get, + ) + + +class CertificatesResourceWithStreamingResponse: + def __init__(self, certificates: CertificatesResource) -> None: + self._certificates = certificates + + self.create = to_streamed_response_wrapper( + certificates.create, + ) + self.list = to_streamed_response_wrapper( + certificates.list, + ) + self.delete = to_streamed_response_wrapper( + certificates.delete, + ) + self.get = to_streamed_response_wrapper( + certificates.get, + ) + + +class AsyncCertificatesResourceWithStreamingResponse: + def __init__(self, certificates: AsyncCertificatesResource) -> None: + self._certificates = certificates + + self.create = async_to_streamed_response_wrapper( + certificates.create, + ) + self.list = async_to_streamed_response_wrapper( + certificates.list, + ) + self.delete = async_to_streamed_response_wrapper( + certificates.delete, + ) + self.get = async_to_streamed_response_wrapper( + certificates.get, + ) diff --git a/src/cloudflare/resources/zero_trust/gateway/gateway.py b/src/cloudflare/resources/zero_trust/gateway/gateway.py index a2e994272d9..9d43923083a 100644 --- a/src/cloudflare/resources/zero_trust/gateway/gateway.py +++ b/src/cloudflare/resources/zero_trust/gateway/gateway.py @@ -65,6 +65,14 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from .certificates import ( + CertificatesResource, + AsyncCertificatesResource, + CertificatesResourceWithRawResponse, + AsyncCertificatesResourceWithRawResponse, + CertificatesResourceWithStreamingResponse, + AsyncCertificatesResourceWithStreamingResponse, +) from .configurations import ( ConfigurationsResource, AsyncConfigurationsResource, @@ -135,6 +143,10 @@ def proxy_endpoints(self) -> ProxyEndpointsResource: def rules(self) -> RulesResource: return RulesResource(self._client) + @cached_property + def certificates(self) -> CertificatesResource: + return CertificatesResource(self._client) + @cached_property def with_raw_response(self) -> GatewayResourceWithRawResponse: return GatewayResourceWithRawResponse(self) @@ -255,6 +267,10 @@ def proxy_endpoints(self) -> AsyncProxyEndpointsResource: def rules(self) -> AsyncRulesResource: return AsyncRulesResource(self._client) + @cached_property + def certificates(self) -> AsyncCertificatesResource: + return AsyncCertificatesResource(self._client) + @cached_property def with_raw_response(self) -> AsyncGatewayResourceWithRawResponse: return AsyncGatewayResourceWithRawResponse(self) @@ -385,6 +401,10 @@ def proxy_endpoints(self) -> ProxyEndpointsResourceWithRawResponse: def rules(self) -> RulesResourceWithRawResponse: return RulesResourceWithRawResponse(self._gateway.rules) + @cached_property + def certificates(self) -> CertificatesResourceWithRawResponse: + return CertificatesResourceWithRawResponse(self._gateway.certificates) + class AsyncGatewayResourceWithRawResponse: def __init__(self, gateway: AsyncGatewayResource) -> None: @@ -433,6 +453,10 @@ def proxy_endpoints(self) -> AsyncProxyEndpointsResourceWithRawResponse: def rules(self) -> AsyncRulesResourceWithRawResponse: return AsyncRulesResourceWithRawResponse(self._gateway.rules) + @cached_property + def certificates(self) -> AsyncCertificatesResourceWithRawResponse: + return AsyncCertificatesResourceWithRawResponse(self._gateway.certificates) + class GatewayResourceWithStreamingResponse: def __init__(self, gateway: GatewayResource) -> None: @@ -481,6 +505,10 @@ def proxy_endpoints(self) -> ProxyEndpointsResourceWithStreamingResponse: def rules(self) -> RulesResourceWithStreamingResponse: return RulesResourceWithStreamingResponse(self._gateway.rules) + @cached_property + def certificates(self) -> CertificatesResourceWithStreamingResponse: + return CertificatesResourceWithStreamingResponse(self._gateway.certificates) + class AsyncGatewayResourceWithStreamingResponse: def __init__(self, gateway: AsyncGatewayResource) -> None: @@ -528,3 +556,7 @@ def proxy_endpoints(self) -> AsyncProxyEndpointsResourceWithStreamingResponse: @cached_property def rules(self) -> AsyncRulesResourceWithStreamingResponse: return AsyncRulesResourceWithStreamingResponse(self._gateway.rules) + + @cached_property + def certificates(self) -> AsyncCertificatesResourceWithStreamingResponse: + return AsyncCertificatesResourceWithStreamingResponse(self._gateway.certificates) diff --git a/src/cloudflare/types/ai_gateway/__init__.py b/src/cloudflare/types/ai_gateway/__init__.py index e34365f10eb..afc8501bed2 100644 --- a/src/cloudflare/types/ai_gateway/__init__.py +++ b/src/cloudflare/types/ai_gateway/__init__.py @@ -2,8 +2,9 @@ from __future__ import annotations -from .log_get_params import LogGetParams as LogGetParams +from .log_list_params import LogListParams as LogListParams from .log_get_response import LogGetResponse as LogGetResponse +from .log_list_response import LogListResponse as LogListResponse from .ai_gateway_list_params import AIGatewayListParams as AIGatewayListParams from .ai_gateway_get_response import AIGatewayGetResponse as AIGatewayGetResponse from .ai_gateway_create_params import AIGatewayCreateParams as AIGatewayCreateParams diff --git a/src/cloudflare/types/ai_gateway/log_get_response.py b/src/cloudflare/types/ai_gateway/log_get_response.py index c78976e56d4..ff80ce3414d 100644 --- a/src/cloudflare/types/ai_gateway/log_get_response.py +++ b/src/cloudflare/types/ai_gateway/log_get_response.py @@ -1,14 +1,14 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from datetime import datetime from ..._models import BaseModel -__all__ = ["LogGetResponse", "LogGetResponseItem"] +__all__ = ["LogGetResponse"] -class LogGetResponseItem(BaseModel): +class LogGetResponse(BaseModel): id: str cached: bool @@ -44,6 +44,3 @@ class LogGetResponseItem(BaseModel): status_code: Optional[int] = None step: Optional[int] = None - - -LogGetResponse = List[LogGetResponseItem] diff --git a/src/cloudflare/types/ai_gateway/log_get_params.py b/src/cloudflare/types/ai_gateway/log_list_params.py similarity index 89% rename from src/cloudflare/types/ai_gateway/log_get_params.py rename to src/cloudflare/types/ai_gateway/log_list_params.py index c6503dfd736..3f3bbe5efa6 100644 --- a/src/cloudflare/types/ai_gateway/log_get_params.py +++ b/src/cloudflare/types/ai_gateway/log_list_params.py @@ -8,10 +8,10 @@ from ..._utils import PropertyInfo -__all__ = ["LogGetParams"] +__all__ = ["LogListParams"] -class LogGetParams(TypedDict, total=False): +class LogListParams(TypedDict, total=False): account_id: Required[str] cached: bool diff --git a/src/cloudflare/types/ai_gateway/log_list_response.py b/src/cloudflare/types/ai_gateway/log_list_response.py new file mode 100644 index 00000000000..54366ffe597 --- /dev/null +++ b/src/cloudflare/types/ai_gateway/log_list_response.py @@ -0,0 +1,46 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from ..._models import BaseModel + +__all__ = ["LogListResponse"] + + +class LogListResponse(BaseModel): + id: str + + cached: bool + + created_at: datetime + + duration: int + + model: str + + path: str + + provider: str + + request: str + + response: str + + success: bool + + tokens_in: int + + tokens_out: int + + metadata: Optional[str] = None + + request_content_type: Optional[str] = None + + request_type: Optional[str] = None + + response_content_type: Optional[str] = None + + status_code: Optional[int] = None + + step: Optional[int] = None diff --git a/src/cloudflare/types/ai_gateway/logs/__init__.py b/src/cloudflare/types/ai_gateway/logs/__init__.py new file mode 100644 index 00000000000..f8ee8b14b1c --- /dev/null +++ b/src/cloudflare/types/ai_gateway/logs/__init__.py @@ -0,0 +1,3 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations diff --git a/src/cloudflare/types/zero_trust/gateway/__init__.py b/src/cloudflare/types/zero_trust/gateway/__init__.py index c462d3ec6af..e0f7ea5cf69 100644 --- a/src/cloudflare/types/zero_trust/gateway/__init__.py +++ b/src/cloudflare/types/zero_trust/gateway/__init__.py @@ -43,17 +43,22 @@ from .location_network_param import LocationNetworkParam as LocationNetworkParam from .location_update_params import LocationUpdateParams as LocationUpdateParams from .extended_email_matching import ExtendedEmailMatching as ExtendedEmailMatching +from .certificate_get_response import CertificateGetResponse as CertificateGetResponse from .dns_resolver_settings_v4 import DNSResolverSettingsV4 as DNSResolverSettingsV4 from .dns_resolver_settings_v6 import DNSResolverSettingsV6 as DNSResolverSettingsV6 from .location_delete_response import LocationDeleteResponse as LocationDeleteResponse from .protocol_detection_param import ProtocolDetectionParam as ProtocolDetectionParam from .anti_virus_settings_param import AntiVirusSettingsParam as AntiVirusSettingsParam from .block_page_settings_param import BlockPageSettingsParam as BlockPageSettingsParam +from .certificate_create_params import CertificateCreateParams as CertificateCreateParams +from .certificate_list_response import CertificateListResponse as CertificateListResponse from .configuration_edit_params import ConfigurationEditParams as ConfigurationEditParams from .browser_isolation_settings import BrowserIsolationSettings as BrowserIsolationSettings from .configuration_get_response import ConfigurationGetResponse as ConfigurationGetResponse from .proxy_endpoint_edit_params import ProxyEndpointEditParams as ProxyEndpointEditParams from .activity_log_settings_param import ActivityLogSettingsParam as ActivityLogSettingsParam +from .certificate_create_response import CertificateCreateResponse as CertificateCreateResponse +from .certificate_delete_response import CertificateDeleteResponse as CertificateDeleteResponse from .configuration_edit_response import ConfigurationEditResponse as ConfigurationEditResponse from .configuration_update_params import ConfigurationUpdateParams as ConfigurationUpdateParams from .custom_certificate_settings import CustomCertificateSettings as CustomCertificateSettings diff --git a/src/cloudflare/types/zero_trust/gateway/certificate_create_params.py b/src/cloudflare/types/zero_trust/gateway/certificate_create_params.py new file mode 100644 index 00000000000..1de699e498c --- /dev/null +++ b/src/cloudflare/types/zero_trust/gateway/certificate_create_params.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["CertificateCreateParams"] + + +class CertificateCreateParams(TypedDict, total=False): + account_id: Required[str] + + validity_period_days: int + """ + Number of days the generated certificate will be valid, minimum 1 day and + maximum 30 years. Defaults to 5 years. + """ diff --git a/src/cloudflare/types/zero_trust/gateway/certificate_create_response.py b/src/cloudflare/types/zero_trust/gateway/certificate_create_response.py new file mode 100644 index 00000000000..f80dc62369e --- /dev/null +++ b/src/cloudflare/types/zero_trust/gateway/certificate_create_response.py @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from ...._models import BaseModel + +__all__ = ["CertificateCreateResponse"] + + +class CertificateCreateResponse(BaseModel): + id: Optional[str] = None + """Certificate UUID tag.""" + + binding_status: Optional[Literal["pending_deployment", "active", "pending_deletion", "inactive"]] = None + """The deployment status of the certificate on Cloudflare's edge.""" + + created_at: Optional[datetime] = None + + enabled: Optional[bool] = None + """Use this certificate for Gateway TLS interception""" + + expires_on: Optional[datetime] = None + + type: Optional[Literal["custom", "gateway_managed"]] = None + """The type of certificate, either BYO-PKI (custom) or Gateway-managed.""" + + updated_at: Optional[datetime] = None + + uploaded_on: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/gateway/certificate_delete_response.py b/src/cloudflare/types/zero_trust/gateway/certificate_delete_response.py new file mode 100644 index 00000000000..b8e44b1a35b --- /dev/null +++ b/src/cloudflare/types/zero_trust/gateway/certificate_delete_response.py @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from ...._models import BaseModel + +__all__ = ["CertificateDeleteResponse"] + + +class CertificateDeleteResponse(BaseModel): + id: Optional[str] = None + """Certificate UUID tag.""" + + binding_status: Optional[Literal["pending_deployment", "active", "pending_deletion", "inactive"]] = None + """The deployment status of the certificate on Cloudflare's edge.""" + + created_at: Optional[datetime] = None + + enabled: Optional[bool] = None + """Use this certificate for Gateway TLS interception""" + + expires_on: Optional[datetime] = None + + type: Optional[Literal["custom", "gateway_managed"]] = None + """The type of certificate, either BYO-PKI (custom) or Gateway-managed.""" + + updated_at: Optional[datetime] = None + + uploaded_on: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/gateway/certificate_get_response.py b/src/cloudflare/types/zero_trust/gateway/certificate_get_response.py new file mode 100644 index 00000000000..6a702b1122f --- /dev/null +++ b/src/cloudflare/types/zero_trust/gateway/certificate_get_response.py @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from ...._models import BaseModel + +__all__ = ["CertificateGetResponse"] + + +class CertificateGetResponse(BaseModel): + id: Optional[str] = None + """Certificate UUID tag.""" + + binding_status: Optional[Literal["pending_deployment", "active", "pending_deletion", "inactive"]] = None + """The deployment status of the certificate on Cloudflare's edge.""" + + created_at: Optional[datetime] = None + + enabled: Optional[bool] = None + """Use this certificate for Gateway TLS interception""" + + expires_on: Optional[datetime] = None + + type: Optional[Literal["custom", "gateway_managed"]] = None + """The type of certificate, either BYO-PKI (custom) or Gateway-managed.""" + + updated_at: Optional[datetime] = None + + uploaded_on: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/gateway/certificate_list_response.py b/src/cloudflare/types/zero_trust/gateway/certificate_list_response.py new file mode 100644 index 00000000000..322c092fcaf --- /dev/null +++ b/src/cloudflare/types/zero_trust/gateway/certificate_list_response.py @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from ...._models import BaseModel + +__all__ = ["CertificateListResponse"] + + +class CertificateListResponse(BaseModel): + id: Optional[str] = None + """Certificate UUID tag.""" + + binding_status: Optional[Literal["pending_deployment", "active", "pending_deletion", "inactive"]] = None + """The deployment status of the certificate on Cloudflare's edge.""" + + created_at: Optional[datetime] = None + + enabled: Optional[bool] = None + """Use this certificate for Gateway TLS interception""" + + expires_on: Optional[datetime] = None + + type: Optional[Literal["custom", "gateway_managed"]] = None + """The type of certificate, either BYO-PKI (custom) or Gateway-managed.""" + + updated_at: Optional[datetime] = None + + uploaded_on: Optional[datetime] = None diff --git a/tests/api_resources/ai_gateway/logs/__init__.py b/tests/api_resources/ai_gateway/logs/__init__.py new file mode 100644 index 00000000000..fd8019a9a1a --- /dev/null +++ b/tests/api_resources/ai_gateway/logs/__init__.py @@ -0,0 +1 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/ai_gateway/logs/test_request.py b/tests/api_resources/ai_gateway/logs/test_request.py new file mode 100644 index 00000000000..d7a2c3da764 --- /dev/null +++ b/tests/api_resources/ai_gateway/logs/test_request.py @@ -0,0 +1,141 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestRequest: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + request = client.ai_gateway.logs.request.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + assert_matches_type(object, request, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.ai_gateway.logs.request.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + request = response.parse() + assert_matches_type(object, request, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.ai_gateway.logs.request.with_streaming_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + request = response.parse() + assert_matches_type(object, request, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.ai_gateway.logs.request.with_raw_response.get( + "string", + account_id="", + id="my-gateway", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + client.ai_gateway.logs.request.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): + client.ai_gateway.logs.request.with_raw_response.get( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + + +class TestAsyncRequest: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + request = await async_client.ai_gateway.logs.request.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + assert_matches_type(object, request, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.ai_gateway.logs.request.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + request = await response.parse() + assert_matches_type(object, request, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.ai_gateway.logs.request.with_streaming_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + request = await response.parse() + assert_matches_type(object, request, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.ai_gateway.logs.request.with_raw_response.get( + "string", + account_id="", + id="my-gateway", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + await async_client.ai_gateway.logs.request.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): + await async_client.ai_gateway.logs.request.with_raw_response.get( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) diff --git a/tests/api_resources/ai_gateway/logs/test_response.py b/tests/api_resources/ai_gateway/logs/test_response.py new file mode 100644 index 00000000000..f66bf7c2449 --- /dev/null +++ b/tests/api_resources/ai_gateway/logs/test_response.py @@ -0,0 +1,141 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestResponse: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + response = client.ai_gateway.logs.response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + assert_matches_type(object, response, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + http_response = client.ai_gateway.logs.response.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + + assert http_response.is_closed is True + assert http_response.http_request.headers.get("X-Stainless-Lang") == "python" + response = http_response.parse() + assert_matches_type(object, response, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.ai_gateway.logs.response.with_streaming_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) as http_response: + assert not http_response.is_closed + assert http_response.http_request.headers.get("X-Stainless-Lang") == "python" + + response = http_response.parse() + assert_matches_type(object, response, path=["response"]) + + assert cast(Any, http_response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.ai_gateway.logs.response.with_raw_response.get( + "string", + account_id="", + id="my-gateway", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + client.ai_gateway.logs.response.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): + client.ai_gateway.logs.response.with_raw_response.get( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + + +class TestAsyncResponse: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.ai_gateway.logs.response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + assert_matches_type(object, response, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + http_response = await async_client.ai_gateway.logs.response.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + + assert http_response.is_closed is True + assert http_response.http_request.headers.get("X-Stainless-Lang") == "python" + response = await http_response.parse() + assert_matches_type(object, response, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.ai_gateway.logs.response.with_streaming_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) as http_response: + assert not http_response.is_closed + assert http_response.http_request.headers.get("X-Stainless-Lang") == "python" + + response = await http_response.parse() + assert_matches_type(object, response, path=["response"]) + + assert cast(Any, http_response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.ai_gateway.logs.response.with_raw_response.get( + "string", + account_id="", + id="my-gateway", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + await async_client.ai_gateway.logs.response.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): + await async_client.ai_gateway.logs.response.with_raw_response.get( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) diff --git a/tests/api_resources/ai_gateway/test_logs.py b/tests/api_resources/ai_gateway/test_logs.py index 78439db3a89..485dc79d148 100644 --- a/tests/api_resources/ai_gateway/test_logs.py +++ b/tests/api_resources/ai_gateway/test_logs.py @@ -10,7 +10,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.ai_gateway import LogGetResponse +from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray +from cloudflare.types.ai_gateway import LogGetResponse, LogListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,16 +20,16 @@ class TestLogs: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_get(self, client: Cloudflare) -> None: - log = client.ai_gateway.logs.get( + def test_method_list(self, client: Cloudflare) -> None: + log = client.ai_gateway.logs.list( "my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) - assert_matches_type(LogGetResponse, log, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[LogListResponse], log, path=["response"]) @parametrize - def test_method_get_with_all_params(self, client: Cloudflare) -> None: - log = client.ai_gateway.logs.get( + def test_method_list_with_all_params(self, client: Cloudflare) -> None: + log = client.ai_gateway.logs.list( "my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", cached=True, @@ -41,13 +42,63 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: start_date=parse_datetime("2019-12-27T18:11:19.117Z"), success=True, ) + assert_matches_type(SyncV4PagePaginationArray[LogListResponse], log, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Cloudflare) -> None: + response = client.ai_gateway.logs.with_raw_response.list( + "my-gateway", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + log = response.parse() + assert_matches_type(SyncV4PagePaginationArray[LogListResponse], log, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Cloudflare) -> None: + with client.ai_gateway.logs.with_streaming_response.list( + "my-gateway", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + log = response.parse() + assert_matches_type(SyncV4PagePaginationArray[LogListResponse], log, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_list(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.ai_gateway.logs.with_raw_response.list( + "my-gateway", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + client.ai_gateway.logs.with_raw_response.list( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + log = client.ai_gateway.logs.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) assert_matches_type(LogGetResponse, log, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.ai_gateway.logs.with_raw_response.get( - "my-gateway", + "string", account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", ) assert response.is_closed is True @@ -58,8 +109,9 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.ai_gateway.logs.with_streaming_response.get( - "my-gateway", + "string", account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -73,14 +125,23 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.ai_gateway.logs.with_raw_response.get( - "my-gateway", + "string", account_id="", + id="my-gateway", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + client.ai_gateway.logs.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): client.ai_gateway.logs.with_raw_response.get( "", account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", ) @@ -88,16 +149,16 @@ class TestAsyncLogs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - log = await async_client.ai_gateway.logs.get( + async def test_method_list(self, async_client: AsyncCloudflare) -> None: + log = await async_client.ai_gateway.logs.list( "my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) - assert_matches_type(LogGetResponse, log, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[LogListResponse], log, path=["response"]) @parametrize - async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: - log = await async_client.ai_gateway.logs.get( + async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: + log = await async_client.ai_gateway.logs.list( "my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", cached=True, @@ -110,13 +171,63 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - start_date=parse_datetime("2019-12-27T18:11:19.117Z"), success=True, ) + assert_matches_type(AsyncV4PagePaginationArray[LogListResponse], log, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: + response = await async_client.ai_gateway.logs.with_raw_response.list( + "my-gateway", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + log = await response.parse() + assert_matches_type(AsyncV4PagePaginationArray[LogListResponse], log, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: + async with async_client.ai_gateway.logs.with_streaming_response.list( + "my-gateway", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + log = await response.parse() + assert_matches_type(AsyncV4PagePaginationArray[LogListResponse], log, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.ai_gateway.logs.with_raw_response.list( + "my-gateway", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + await async_client.ai_gateway.logs.with_raw_response.list( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + ) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + log = await async_client.ai_gateway.logs.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) assert_matches_type(LogGetResponse, log, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.logs.with_raw_response.get( - "my-gateway", + "string", account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", ) assert response.is_closed is True @@ -127,8 +238,9 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.logs.with_streaming_response.get( - "my-gateway", + "string", account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -142,12 +254,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.ai_gateway.logs.with_raw_response.get( - "my-gateway", + "string", account_id="", + id="my-gateway", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + await async_client.ai_gateway.logs.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): await async_client.ai_gateway.logs.with_raw_response.get( "", account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", ) diff --git a/tests/api_resources/stream/captions/test_language.py b/tests/api_resources/stream/captions/test_language.py index 15caab5410b..cdcc495bcd5 100644 --- a/tests/api_resources/stream/captions/test_language.py +++ b/tests/api_resources/stream/captions/test_language.py @@ -17,6 +17,66 @@ class TestLanguage: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @parametrize + def test_method_create(self, client: Cloudflare) -> None: + language = client.stream.captions.language.create( + "tr", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + identifier="ea95132c15732412d22c1476fa83f27a", + ) + assert_matches_type(Optional[Caption], language, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Cloudflare) -> None: + response = client.stream.captions.language.with_raw_response.create( + "tr", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + identifier="ea95132c15732412d22c1476fa83f27a", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + language = response.parse() + assert_matches_type(Optional[Caption], language, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Cloudflare) -> None: + with client.stream.captions.language.with_streaming_response.create( + "tr", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + identifier="ea95132c15732412d22c1476fa83f27a", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + language = response.parse() + assert_matches_type(Optional[Caption], language, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_create(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.stream.captions.language.with_raw_response.create( + "tr", + account_id="", + identifier="ea95132c15732412d22c1476fa83f27a", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): + client.stream.captions.language.with_raw_response.create( + "tr", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + identifier="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `language` but received ''"): + client.stream.captions.language.with_raw_response.create( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + identifier="ea95132c15732412d22c1476fa83f27a", + ) + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: @@ -211,6 +271,66 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLanguage: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @parametrize + async def test_method_create(self, async_client: AsyncCloudflare) -> None: + language = await async_client.stream.captions.language.create( + "tr", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + identifier="ea95132c15732412d22c1476fa83f27a", + ) + assert_matches_type(Optional[Caption], language, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: + response = await async_client.stream.captions.language.with_raw_response.create( + "tr", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + identifier="ea95132c15732412d22c1476fa83f27a", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + language = await response.parse() + assert_matches_type(Optional[Caption], language, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: + async with async_client.stream.captions.language.with_streaming_response.create( + "tr", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + identifier="ea95132c15732412d22c1476fa83f27a", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + language = await response.parse() + assert_matches_type(Optional[Caption], language, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.stream.captions.language.with_raw_response.create( + "tr", + account_id="", + identifier="ea95132c15732412d22c1476fa83f27a", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): + await async_client.stream.captions.language.with_raw_response.create( + "tr", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + identifier="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `language` but received ''"): + await async_client.stream.captions.language.with_raw_response.create( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + identifier="ea95132c15732412d22c1476fa83f27a", + ) + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_certificates.py b/tests/api_resources/zero_trust/gateway/test_certificates.py new file mode 100644 index 00000000000..c84aaa00883 --- /dev/null +++ b/tests/api_resources/zero_trust/gateway/test_certificates.py @@ -0,0 +1,388 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, Optional, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.zero_trust.gateway import ( + CertificateGetResponse, + CertificateListResponse, + CertificateCreateResponse, + CertificateDeleteResponse, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCertificates: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Cloudflare) -> None: + certificate = client.zero_trust.gateway.certificates.create( + account_id="699d98642c564d2e855e9661899b7252", + ) + assert_matches_type(Optional[CertificateCreateResponse], certificate, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Cloudflare) -> None: + certificate = client.zero_trust.gateway.certificates.create( + account_id="699d98642c564d2e855e9661899b7252", + validity_period_days=1826, + ) + assert_matches_type(Optional[CertificateCreateResponse], certificate, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Cloudflare) -> None: + response = client.zero_trust.gateway.certificates.with_raw_response.create( + account_id="699d98642c564d2e855e9661899b7252", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + certificate = response.parse() + assert_matches_type(Optional[CertificateCreateResponse], certificate, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Cloudflare) -> None: + with client.zero_trust.gateway.certificates.with_streaming_response.create( + account_id="699d98642c564d2e855e9661899b7252", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + certificate = response.parse() + assert_matches_type(Optional[CertificateCreateResponse], certificate, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_create(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.zero_trust.gateway.certificates.with_raw_response.create( + account_id="", + ) + + @parametrize + def test_method_list(self, client: Cloudflare) -> None: + certificate = client.zero_trust.gateway.certificates.list( + account_id="699d98642c564d2e855e9661899b7252", + ) + assert_matches_type(SyncSinglePage[CertificateListResponse], certificate, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Cloudflare) -> None: + response = client.zero_trust.gateway.certificates.with_raw_response.list( + account_id="699d98642c564d2e855e9661899b7252", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + certificate = response.parse() + assert_matches_type(SyncSinglePage[CertificateListResponse], certificate, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Cloudflare) -> None: + with client.zero_trust.gateway.certificates.with_streaming_response.list( + account_id="699d98642c564d2e855e9661899b7252", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + certificate = response.parse() + assert_matches_type(SyncSinglePage[CertificateListResponse], certificate, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_list(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.zero_trust.gateway.certificates.with_raw_response.list( + account_id="", + ) + + @parametrize + def test_method_delete(self, client: Cloudflare) -> None: + certificate = client.zero_trust.gateway.certificates.delete( + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="699d98642c564d2e855e9661899b7252", + ) + assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) + + @parametrize + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.zero_trust.gateway.certificates.with_raw_response.delete( + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="699d98642c564d2e855e9661899b7252", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + certificate = response.parse() + assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) + + @parametrize + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.zero_trust.gateway.certificates.with_streaming_response.delete( + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="699d98642c564d2e855e9661899b7252", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + certificate = response.parse() + assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_delete(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.zero_trust.gateway.certificates.with_raw_response.delete( + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): + client.zero_trust.gateway.certificates.with_raw_response.delete( + "", + account_id="699d98642c564d2e855e9661899b7252", + ) + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + certificate = client.zero_trust.gateway.certificates.get( + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="699d98642c564d2e855e9661899b7252", + ) + assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.zero_trust.gateway.certificates.with_raw_response.get( + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="699d98642c564d2e855e9661899b7252", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + certificate = response.parse() + assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.zero_trust.gateway.certificates.with_streaming_response.get( + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="699d98642c564d2e855e9661899b7252", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + certificate = response.parse() + assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.zero_trust.gateway.certificates.with_raw_response.get( + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): + client.zero_trust.gateway.certificates.with_raw_response.get( + "", + account_id="699d98642c564d2e855e9661899b7252", + ) + + +class TestAsyncCertificates: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncCloudflare) -> None: + certificate = await async_client.zero_trust.gateway.certificates.create( + account_id="699d98642c564d2e855e9661899b7252", + ) + assert_matches_type(Optional[CertificateCreateResponse], certificate, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: + certificate = await async_client.zero_trust.gateway.certificates.create( + account_id="699d98642c564d2e855e9661899b7252", + validity_period_days=1826, + ) + assert_matches_type(Optional[CertificateCreateResponse], certificate, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zero_trust.gateway.certificates.with_raw_response.create( + account_id="699d98642c564d2e855e9661899b7252", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + certificate = await response.parse() + assert_matches_type(Optional[CertificateCreateResponse], certificate, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: + async with async_client.zero_trust.gateway.certificates.with_streaming_response.create( + account_id="699d98642c564d2e855e9661899b7252", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + certificate = await response.parse() + assert_matches_type(Optional[CertificateCreateResponse], certificate, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.zero_trust.gateway.certificates.with_raw_response.create( + account_id="", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncCloudflare) -> None: + certificate = await async_client.zero_trust.gateway.certificates.list( + account_id="699d98642c564d2e855e9661899b7252", + ) + assert_matches_type(AsyncSinglePage[CertificateListResponse], certificate, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zero_trust.gateway.certificates.with_raw_response.list( + account_id="699d98642c564d2e855e9661899b7252", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + certificate = await response.parse() + assert_matches_type(AsyncSinglePage[CertificateListResponse], certificate, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: + async with async_client.zero_trust.gateway.certificates.with_streaming_response.list( + account_id="699d98642c564d2e855e9661899b7252", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + certificate = await response.parse() + assert_matches_type(AsyncSinglePage[CertificateListResponse], certificate, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.zero_trust.gateway.certificates.with_raw_response.list( + account_id="", + ) + + @parametrize + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + certificate = await async_client.zero_trust.gateway.certificates.delete( + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="699d98642c564d2e855e9661899b7252", + ) + assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zero_trust.gateway.certificates.with_raw_response.delete( + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="699d98642c564d2e855e9661899b7252", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + certificate = await response.parse() + assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.zero_trust.gateway.certificates.with_streaming_response.delete( + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="699d98642c564d2e855e9661899b7252", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + certificate = await response.parse() + assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.zero_trust.gateway.certificates.with_raw_response.delete( + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): + await async_client.zero_trust.gateway.certificates.with_raw_response.delete( + "", + account_id="699d98642c564d2e855e9661899b7252", + ) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + certificate = await async_client.zero_trust.gateway.certificates.get( + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="699d98642c564d2e855e9661899b7252", + ) + assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zero_trust.gateway.certificates.with_raw_response.get( + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="699d98642c564d2e855e9661899b7252", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + certificate = await response.parse() + assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.zero_trust.gateway.certificates.with_streaming_response.get( + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="699d98642c564d2e855e9661899b7252", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + certificate = await response.parse() + assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.zero_trust.gateway.certificates.with_raw_response.get( + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): + await async_client.zero_trust.gateway.certificates.with_raw_response.get( + "", + account_id="699d98642c564d2e855e9661899b7252", + ) From a9fb4bd815fa08e5690369283afc53bdc6235fbd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 07:39:29 +0000 Subject: [PATCH 076/124] feat(api): OpenAPI spec update via Stainless API (#1090) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 83a45871666..4933477825d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1356 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-08b201ef13ebb4bdf13a4d2e2165229fc6e5a369c64cf4a108835b65996cd957.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-62c3b16f6d836d9cc7bca2f54e83f7ed99fbe325b4b6cfec72a71fc7ceee58a6.yml From d0f9b652b6d4acbacc343676c9dcffa9a2f4d1d5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 07:41:48 +0000 Subject: [PATCH 077/124] feat(api): OpenAPI spec update via Stainless API (#1091) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4933477825d..83a45871666 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1356 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-62c3b16f6d836d9cc7bca2f54e83f7ed99fbe325b4b6cfec72a71fc7ceee58a6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-08b201ef13ebb4bdf13a4d2e2165229fc6e5a369c64cf4a108835b65996cd957.yml From 01a5f6dc3e00e2d5a6c2f65343e40880b37adb62 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 08:45:12 +0000 Subject: [PATCH 078/124] feat(api): OpenAPI spec update via Stainless API (#1092) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 83a45871666..4933477825d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1356 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-08b201ef13ebb4bdf13a4d2e2165229fc6e5a369c64cf4a108835b65996cd957.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-62c3b16f6d836d9cc7bca2f54e83f7ed99fbe325b4b6cfec72a71fc7ceee58a6.yml From 8333cc9895fc80d61fd979a18a140ceb32c9b196 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 08:47:42 +0000 Subject: [PATCH 079/124] feat(api): OpenAPI spec update via Stainless API (#1093) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4933477825d..530c539cb5f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1356 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-62c3b16f6d836d9cc7bca2f54e83f7ed99fbe325b4b6cfec72a71fc7ceee58a6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d231a70b72a9832e5f3456a1b3307466fd03b7639578920c7cbd45f03d09e5b3.yml From bbc5c47f99a732bbd7daaa017fe9b82e923507ab Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 08:56:46 +0000 Subject: [PATCH 080/124] feat(api): OpenAPI spec update via Stainless API (#1094) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 530c539cb5f..4933477825d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1356 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d231a70b72a9832e5f3456a1b3307466fd03b7639578920c7cbd45f03d09e5b3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-62c3b16f6d836d9cc7bca2f54e83f7ed99fbe325b4b6cfec72a71fc7ceee58a6.yml From 1bb16681acaa9736a7a3fc7e8273336e740f7805 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 08:59:41 +0000 Subject: [PATCH 081/124] feat(api): OpenAPI spec update via Stainless API (#1095) --- .stats.yml | 4 +- api.md | 27 +-- .../resources/ai_gateway/logs/__init__.py | 28 --- .../resources/ai_gateway/logs/logs.py | 170 +----------------- .../resources/ai_gateway/logs/request.py | 158 ---------------- .../resources/ai_gateway/logs/response.py | 158 ---------------- src/cloudflare/types/ai_gateway/__init__.py | 1 - .../types/ai_gateway/log_get_response.py | 46 ----- .../ai_gateway/logs/test_request.py | 141 --------------- .../ai_gateway/logs/test_response.py | 141 --------------- tests/api_resources/ai_gateway/test_logs.py | 122 +------------ 11 files changed, 5 insertions(+), 991 deletions(-) delete mode 100644 src/cloudflare/resources/ai_gateway/logs/request.py delete mode 100644 src/cloudflare/resources/ai_gateway/logs/response.py delete mode 100644 src/cloudflare/types/ai_gateway/log_get_response.py delete mode 100644 tests/api_resources/ai_gateway/logs/test_request.py delete mode 100644 tests/api_resources/ai_gateway/logs/test_response.py diff --git a/.stats.yml b/.stats.yml index 4933477825d..691540b5bcf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1356 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-62c3b16f6d836d9cc7bca2f54e83f7ed99fbe325b4b6cfec72a71fc7ceee58a6.yml +configured_endpoints: 1353 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e79cc9a74089de5aec2c720b1e3023ea27869883f43c8b0167198f5967128636.yml diff --git a/api.md b/api.md index fa00c410812..8f8c1cbf597 100644 --- a/api.md +++ b/api.md @@ -7886,37 +7886,12 @@ Methods: Types: ```python -from cloudflare.types.ai_gateway import LogListResponse, LogGetResponse +from cloudflare.types.ai_gateway import LogListResponse ``` Methods: - client.ai_gateway.logs.list(id, \*, account_id, \*\*params) -> SyncV4PagePaginationArray[LogListResponse] -- client.ai_gateway.logs.get(log_id, \*, account_id, id) -> LogGetResponse - -### Request - -Types: - -```python -from cloudflare.types.ai_gateway.logs import RequestGetResponse -``` - -Methods: - -- client.ai_gateway.logs.request.get(log_id, \*, account_id, id) -> object - -### Response - -Types: - -```python -from cloudflare.types.ai_gateway.logs import ResponseGetResponse -``` - -Methods: - -- client.ai_gateway.logs.response.get(log_id, \*, account_id, id) -> object # IAM diff --git a/src/cloudflare/resources/ai_gateway/logs/__init__.py b/src/cloudflare/resources/ai_gateway/logs/__init__.py index cd50acd99fc..30876fab694 100644 --- a/src/cloudflare/resources/ai_gateway/logs/__init__.py +++ b/src/cloudflare/resources/ai_gateway/logs/__init__.py @@ -8,36 +8,8 @@ LogsResourceWithStreamingResponse, AsyncLogsResourceWithStreamingResponse, ) -from .request import ( - RequestResource, - AsyncRequestResource, - RequestResourceWithRawResponse, - AsyncRequestResourceWithRawResponse, - RequestResourceWithStreamingResponse, - AsyncRequestResourceWithStreamingResponse, -) -from .response import ( - ResponseResource, - AsyncResponseResource, - ResponseResourceWithRawResponse, - AsyncResponseResourceWithRawResponse, - ResponseResourceWithStreamingResponse, - AsyncResponseResourceWithStreamingResponse, -) __all__ = [ - "RequestResource", - "AsyncRequestResource", - "RequestResourceWithRawResponse", - "AsyncRequestResourceWithRawResponse", - "RequestResourceWithStreamingResponse", - "AsyncRequestResourceWithStreamingResponse", - "ResponseResource", - "AsyncResponseResource", - "ResponseResourceWithRawResponse", - "AsyncResponseResourceWithRawResponse", - "ResponseResourceWithStreamingResponse", - "AsyncResponseResourceWithStreamingResponse", "LogsResource", "AsyncLogsResource", "LogsResourceWithRawResponse", diff --git a/src/cloudflare/resources/ai_gateway/logs/logs.py b/src/cloudflare/resources/ai_gateway/logs/logs.py index 2176d77bef7..d640bb36e6a 100644 --- a/src/cloudflare/resources/ai_gateway/logs/logs.py +++ b/src/cloudflare/resources/ai_gateway/logs/logs.py @@ -2,28 +2,12 @@ from __future__ import annotations -from typing import Type, Union, cast +from typing import Union from datetime import datetime from typing_extensions import Literal import httpx -from .request import ( - RequestResource, - AsyncRequestResource, - RequestResourceWithRawResponse, - AsyncRequestResourceWithRawResponse, - RequestResourceWithStreamingResponse, - AsyncRequestResourceWithStreamingResponse, -) -from .response import ( - ResponseResource, - AsyncResponseResource, - ResponseResourceWithRawResponse, - AsyncResponseResourceWithRawResponse, - ResponseResourceWithStreamingResponse, - AsyncResponseResourceWithStreamingResponse, -) from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ...._utils import maybe_transform from ...._compat import cached_property @@ -34,28 +18,18 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...._wrappers import ResultWrapper from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from ...._base_client import ( AsyncPaginator, make_request_options, ) from ....types.ai_gateway import log_list_params -from ....types.ai_gateway.log_get_response import LogGetResponse from ....types.ai_gateway.log_list_response import LogListResponse __all__ = ["LogsResource", "AsyncLogsResource"] class LogsResource(SyncAPIResource): - @cached_property - def request(self) -> RequestResource: - return RequestResource(self._client) - - @cached_property - def response(self) -> ResponseResource: - return ResponseResource(self._client) - @cached_property def with_raw_response(self) -> LogsResourceWithRawResponse: return LogsResourceWithRawResponse(self) @@ -129,61 +103,8 @@ def list( model=LogListResponse, ) - def get( - self, - log_id: str, - *, - account_id: str, - id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LogGetResponse: - """ - Get Gateway Log Detail - - Args: - id: gateway id - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - if not log_id: - raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") - return self._get( - f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[LogGetResponse]._unwrapper, - ), - cast_to=cast(Type[LogGetResponse], ResultWrapper[LogGetResponse]), - ) - class AsyncLogsResource(AsyncAPIResource): - @cached_property - def request(self) -> AsyncRequestResource: - return AsyncRequestResource(self._client) - - @cached_property - def response(self) -> AsyncResponseResource: - return AsyncResponseResource(self._client) - @cached_property def with_raw_response(self) -> AsyncLogsResourceWithRawResponse: return AsyncLogsResourceWithRawResponse(self) @@ -257,51 +178,6 @@ def list( model=LogListResponse, ) - async def get( - self, - log_id: str, - *, - account_id: str, - id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LogGetResponse: - """ - Get Gateway Log Detail - - Args: - id: gateway id - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - if not log_id: - raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") - return await self._get( - f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[LogGetResponse]._unwrapper, - ), - cast_to=cast(Type[LogGetResponse], ResultWrapper[LogGetResponse]), - ) - class LogsResourceWithRawResponse: def __init__(self, logs: LogsResource) -> None: @@ -310,17 +186,6 @@ def __init__(self, logs: LogsResource) -> None: self.list = to_raw_response_wrapper( logs.list, ) - self.get = to_raw_response_wrapper( - logs.get, - ) - - @cached_property - def request(self) -> RequestResourceWithRawResponse: - return RequestResourceWithRawResponse(self._logs.request) - - @cached_property - def response(self) -> ResponseResourceWithRawResponse: - return ResponseResourceWithRawResponse(self._logs.response) class AsyncLogsResourceWithRawResponse: @@ -330,17 +195,6 @@ def __init__(self, logs: AsyncLogsResource) -> None: self.list = async_to_raw_response_wrapper( logs.list, ) - self.get = async_to_raw_response_wrapper( - logs.get, - ) - - @cached_property - def request(self) -> AsyncRequestResourceWithRawResponse: - return AsyncRequestResourceWithRawResponse(self._logs.request) - - @cached_property - def response(self) -> AsyncResponseResourceWithRawResponse: - return AsyncResponseResourceWithRawResponse(self._logs.response) class LogsResourceWithStreamingResponse: @@ -350,17 +204,6 @@ def __init__(self, logs: LogsResource) -> None: self.list = to_streamed_response_wrapper( logs.list, ) - self.get = to_streamed_response_wrapper( - logs.get, - ) - - @cached_property - def request(self) -> RequestResourceWithStreamingResponse: - return RequestResourceWithStreamingResponse(self._logs.request) - - @cached_property - def response(self) -> ResponseResourceWithStreamingResponse: - return ResponseResourceWithStreamingResponse(self._logs.response) class AsyncLogsResourceWithStreamingResponse: @@ -370,14 +213,3 @@ def __init__(self, logs: AsyncLogsResource) -> None: self.list = async_to_streamed_response_wrapper( logs.list, ) - self.get = async_to_streamed_response_wrapper( - logs.get, - ) - - @cached_property - def request(self) -> AsyncRequestResourceWithStreamingResponse: - return AsyncRequestResourceWithStreamingResponse(self._logs.request) - - @cached_property - def response(self) -> AsyncResponseResourceWithStreamingResponse: - return AsyncResponseResourceWithStreamingResponse(self._logs.response) diff --git a/src/cloudflare/resources/ai_gateway/logs/request.py b/src/cloudflare/resources/ai_gateway/logs/request.py deleted file mode 100644 index 05a85c72ef3..00000000000 --- a/src/cloudflare/resources/ai_gateway/logs/request.py +++ /dev/null @@ -1,158 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._base_client import ( - make_request_options, -) - -__all__ = ["RequestResource", "AsyncRequestResource"] - - -class RequestResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> RequestResourceWithRawResponse: - return RequestResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> RequestResourceWithStreamingResponse: - return RequestResourceWithStreamingResponse(self) - - def get( - self, - log_id: str, - *, - account_id: str, - id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> object: - """ - Get Gateway Log Request - - Args: - id: gateway id - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - if not log_id: - raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") - return self._get( - f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}/request", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=object, - ) - - -class AsyncRequestResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncRequestResourceWithRawResponse: - return AsyncRequestResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncRequestResourceWithStreamingResponse: - return AsyncRequestResourceWithStreamingResponse(self) - - async def get( - self, - log_id: str, - *, - account_id: str, - id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> object: - """ - Get Gateway Log Request - - Args: - id: gateway id - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - if not log_id: - raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") - return await self._get( - f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}/request", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=object, - ) - - -class RequestResourceWithRawResponse: - def __init__(self, request: RequestResource) -> None: - self._request = request - - self.get = to_raw_response_wrapper( - request.get, - ) - - -class AsyncRequestResourceWithRawResponse: - def __init__(self, request: AsyncRequestResource) -> None: - self._request = request - - self.get = async_to_raw_response_wrapper( - request.get, - ) - - -class RequestResourceWithStreamingResponse: - def __init__(self, request: RequestResource) -> None: - self._request = request - - self.get = to_streamed_response_wrapper( - request.get, - ) - - -class AsyncRequestResourceWithStreamingResponse: - def __init__(self, request: AsyncRequestResource) -> None: - self._request = request - - self.get = async_to_streamed_response_wrapper( - request.get, - ) diff --git a/src/cloudflare/resources/ai_gateway/logs/response.py b/src/cloudflare/resources/ai_gateway/logs/response.py deleted file mode 100644 index e70ec94a87b..00000000000 --- a/src/cloudflare/resources/ai_gateway/logs/response.py +++ /dev/null @@ -1,158 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._base_client import ( - make_request_options, -) - -__all__ = ["ResponseResource", "AsyncResponseResource"] - - -class ResponseResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> ResponseResourceWithRawResponse: - return ResponseResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> ResponseResourceWithStreamingResponse: - return ResponseResourceWithStreamingResponse(self) - - def get( - self, - log_id: str, - *, - account_id: str, - id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> object: - """ - Get Gateway Log Response - - Args: - id: gateway id - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - if not log_id: - raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") - return self._get( - f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}/response", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=object, - ) - - -class AsyncResponseResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncResponseResourceWithRawResponse: - return AsyncResponseResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncResponseResourceWithStreamingResponse: - return AsyncResponseResourceWithStreamingResponse(self) - - async def get( - self, - log_id: str, - *, - account_id: str, - id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> object: - """ - Get Gateway Log Response - - Args: - id: gateway id - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - if not log_id: - raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") - return await self._get( - f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}/response", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=object, - ) - - -class ResponseResourceWithRawResponse: - def __init__(self, response: ResponseResource) -> None: - self._response = response - - self.get = to_raw_response_wrapper( - response.get, - ) - - -class AsyncResponseResourceWithRawResponse: - def __init__(self, response: AsyncResponseResource) -> None: - self._response = response - - self.get = async_to_raw_response_wrapper( - response.get, - ) - - -class ResponseResourceWithStreamingResponse: - def __init__(self, response: ResponseResource) -> None: - self._response = response - - self.get = to_streamed_response_wrapper( - response.get, - ) - - -class AsyncResponseResourceWithStreamingResponse: - def __init__(self, response: AsyncResponseResource) -> None: - self._response = response - - self.get = async_to_streamed_response_wrapper( - response.get, - ) diff --git a/src/cloudflare/types/ai_gateway/__init__.py b/src/cloudflare/types/ai_gateway/__init__.py index afc8501bed2..8a4216b8edb 100644 --- a/src/cloudflare/types/ai_gateway/__init__.py +++ b/src/cloudflare/types/ai_gateway/__init__.py @@ -3,7 +3,6 @@ from __future__ import annotations from .log_list_params import LogListParams as LogListParams -from .log_get_response import LogGetResponse as LogGetResponse from .log_list_response import LogListResponse as LogListResponse from .ai_gateway_list_params import AIGatewayListParams as AIGatewayListParams from .ai_gateway_get_response import AIGatewayGetResponse as AIGatewayGetResponse diff --git a/src/cloudflare/types/ai_gateway/log_get_response.py b/src/cloudflare/types/ai_gateway/log_get_response.py deleted file mode 100644 index ff80ce3414d..00000000000 --- a/src/cloudflare/types/ai_gateway/log_get_response.py +++ /dev/null @@ -1,46 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["LogGetResponse"] - - -class LogGetResponse(BaseModel): - id: str - - cached: bool - - created_at: datetime - - duration: int - - model: str - - path: str - - provider: str - - request: str - - response: str - - success: bool - - tokens_in: int - - tokens_out: int - - metadata: Optional[str] = None - - request_content_type: Optional[str] = None - - request_type: Optional[str] = None - - response_content_type: Optional[str] = None - - status_code: Optional[int] = None - - step: Optional[int] = None diff --git a/tests/api_resources/ai_gateway/logs/test_request.py b/tests/api_resources/ai_gateway/logs/test_request.py deleted file mode 100644 index d7a2c3da764..00000000000 --- a/tests/api_resources/ai_gateway/logs/test_request.py +++ /dev/null @@ -1,141 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestRequest: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - request = client.ai_gateway.logs.request.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - assert_matches_type(object, request, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.ai_gateway.logs.request.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - request = response.parse() - assert_matches_type(object, request, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.ai_gateway.logs.request.with_streaming_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - request = response.parse() - assert_matches_type(object, request, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.ai_gateway.logs.request.with_raw_response.get( - "string", - account_id="", - id="my-gateway", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): - client.ai_gateway.logs.request.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): - client.ai_gateway.logs.request.with_raw_response.get( - "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - - -class TestAsyncRequest: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - request = await async_client.ai_gateway.logs.request.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - assert_matches_type(object, request, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.ai_gateway.logs.request.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - request = await response.parse() - assert_matches_type(object, request, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.ai_gateway.logs.request.with_streaming_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - request = await response.parse() - assert_matches_type(object, request, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.ai_gateway.logs.request.with_raw_response.get( - "string", - account_id="", - id="my-gateway", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): - await async_client.ai_gateway.logs.request.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): - await async_client.ai_gateway.logs.request.with_raw_response.get( - "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) diff --git a/tests/api_resources/ai_gateway/logs/test_response.py b/tests/api_resources/ai_gateway/logs/test_response.py deleted file mode 100644 index f66bf7c2449..00000000000 --- a/tests/api_resources/ai_gateway/logs/test_response.py +++ /dev/null @@ -1,141 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestResponse: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - response = client.ai_gateway.logs.response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - assert_matches_type(object, response, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - http_response = client.ai_gateway.logs.response.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - - assert http_response.is_closed is True - assert http_response.http_request.headers.get("X-Stainless-Lang") == "python" - response = http_response.parse() - assert_matches_type(object, response, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.ai_gateway.logs.response.with_streaming_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) as http_response: - assert not http_response.is_closed - assert http_response.http_request.headers.get("X-Stainless-Lang") == "python" - - response = http_response.parse() - assert_matches_type(object, response, path=["response"]) - - assert cast(Any, http_response.is_closed) is True - - @parametrize - def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.ai_gateway.logs.response.with_raw_response.get( - "string", - account_id="", - id="my-gateway", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): - client.ai_gateway.logs.response.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): - client.ai_gateway.logs.response.with_raw_response.get( - "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - - -class TestAsyncResponse: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.ai_gateway.logs.response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - assert_matches_type(object, response, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - http_response = await async_client.ai_gateway.logs.response.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - - assert http_response.is_closed is True - assert http_response.http_request.headers.get("X-Stainless-Lang") == "python" - response = await http_response.parse() - assert_matches_type(object, response, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.ai_gateway.logs.response.with_streaming_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) as http_response: - assert not http_response.is_closed - assert http_response.http_request.headers.get("X-Stainless-Lang") == "python" - - response = await http_response.parse() - assert_matches_type(object, response, path=["response"]) - - assert cast(Any, http_response.is_closed) is True - - @parametrize - async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.ai_gateway.logs.response.with_raw_response.get( - "string", - account_id="", - id="my-gateway", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): - await async_client.ai_gateway.logs.response.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): - await async_client.ai_gateway.logs.response.with_raw_response.get( - "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) diff --git a/tests/api_resources/ai_gateway/test_logs.py b/tests/api_resources/ai_gateway/test_logs.py index 485dc79d148..79fbfbf7ca0 100644 --- a/tests/api_resources/ai_gateway/test_logs.py +++ b/tests/api_resources/ai_gateway/test_logs.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.ai_gateway import LogGetResponse, LogListResponse +from cloudflare.types.ai_gateway import LogListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -84,66 +84,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="0d37909e38d3e99c29fa2cd343ac421a", ) - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - log = client.ai_gateway.logs.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - assert_matches_type(LogGetResponse, log, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.ai_gateway.logs.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - log = response.parse() - assert_matches_type(LogGetResponse, log, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.ai_gateway.logs.with_streaming_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - log = response.parse() - assert_matches_type(LogGetResponse, log, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.ai_gateway.logs.with_raw_response.get( - "string", - account_id="", - id="my-gateway", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): - client.ai_gateway.logs.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): - client.ai_gateway.logs.with_raw_response.get( - "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - class TestAsyncLogs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -212,63 +152,3 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - log = await async_client.ai_gateway.logs.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - assert_matches_type(LogGetResponse, log, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.ai_gateway.logs.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - log = await response.parse() - assert_matches_type(LogGetResponse, log, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.ai_gateway.logs.with_streaming_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - log = await response.parse() - assert_matches_type(LogGetResponse, log, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.ai_gateway.logs.with_raw_response.get( - "string", - account_id="", - id="my-gateway", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): - await async_client.ai_gateway.logs.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): - await async_client.ai_gateway.logs.with_raw_response.get( - "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) From 97a4a6ecfb9a6dbf281956c39ee8c3f4add0b4b3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 09:02:10 +0000 Subject: [PATCH 082/124] feat(api): OpenAPI spec update via Stainless API (#1096) --- .stats.yml | 4 +- api.md | 27 ++- .../resources/ai_gateway/logs/__init__.py | 28 +++ .../resources/ai_gateway/logs/logs.py | 170 +++++++++++++++++- .../resources/ai_gateway/logs/request.py | 158 ++++++++++++++++ .../resources/ai_gateway/logs/response.py | 158 ++++++++++++++++ src/cloudflare/types/ai_gateway/__init__.py | 1 + .../types/ai_gateway/log_get_response.py | 46 +++++ .../ai_gateway/logs/test_request.py | 141 +++++++++++++++ .../ai_gateway/logs/test_response.py | 141 +++++++++++++++ tests/api_resources/ai_gateway/test_logs.py | 122 ++++++++++++- 11 files changed, 991 insertions(+), 5 deletions(-) create mode 100644 src/cloudflare/resources/ai_gateway/logs/request.py create mode 100644 src/cloudflare/resources/ai_gateway/logs/response.py create mode 100644 src/cloudflare/types/ai_gateway/log_get_response.py create mode 100644 tests/api_resources/ai_gateway/logs/test_request.py create mode 100644 tests/api_resources/ai_gateway/logs/test_response.py diff --git a/.stats.yml b/.stats.yml index 691540b5bcf..4933477825d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e79cc9a74089de5aec2c720b1e3023ea27869883f43c8b0167198f5967128636.yml +configured_endpoints: 1356 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-62c3b16f6d836d9cc7bca2f54e83f7ed99fbe325b4b6cfec72a71fc7ceee58a6.yml diff --git a/api.md b/api.md index 8f8c1cbf597..fa00c410812 100644 --- a/api.md +++ b/api.md @@ -7886,12 +7886,37 @@ Methods: Types: ```python -from cloudflare.types.ai_gateway import LogListResponse +from cloudflare.types.ai_gateway import LogListResponse, LogGetResponse ``` Methods: - client.ai_gateway.logs.list(id, \*, account_id, \*\*params) -> SyncV4PagePaginationArray[LogListResponse] +- client.ai_gateway.logs.get(log_id, \*, account_id, id) -> LogGetResponse + +### Request + +Types: + +```python +from cloudflare.types.ai_gateway.logs import RequestGetResponse +``` + +Methods: + +- client.ai_gateway.logs.request.get(log_id, \*, account_id, id) -> object + +### Response + +Types: + +```python +from cloudflare.types.ai_gateway.logs import ResponseGetResponse +``` + +Methods: + +- client.ai_gateway.logs.response.get(log_id, \*, account_id, id) -> object # IAM diff --git a/src/cloudflare/resources/ai_gateway/logs/__init__.py b/src/cloudflare/resources/ai_gateway/logs/__init__.py index 30876fab694..cd50acd99fc 100644 --- a/src/cloudflare/resources/ai_gateway/logs/__init__.py +++ b/src/cloudflare/resources/ai_gateway/logs/__init__.py @@ -8,8 +8,36 @@ LogsResourceWithStreamingResponse, AsyncLogsResourceWithStreamingResponse, ) +from .request import ( + RequestResource, + AsyncRequestResource, + RequestResourceWithRawResponse, + AsyncRequestResourceWithRawResponse, + RequestResourceWithStreamingResponse, + AsyncRequestResourceWithStreamingResponse, +) +from .response import ( + ResponseResource, + AsyncResponseResource, + ResponseResourceWithRawResponse, + AsyncResponseResourceWithRawResponse, + ResponseResourceWithStreamingResponse, + AsyncResponseResourceWithStreamingResponse, +) __all__ = [ + "RequestResource", + "AsyncRequestResource", + "RequestResourceWithRawResponse", + "AsyncRequestResourceWithRawResponse", + "RequestResourceWithStreamingResponse", + "AsyncRequestResourceWithStreamingResponse", + "ResponseResource", + "AsyncResponseResource", + "ResponseResourceWithRawResponse", + "AsyncResponseResourceWithRawResponse", + "ResponseResourceWithStreamingResponse", + "AsyncResponseResourceWithStreamingResponse", "LogsResource", "AsyncLogsResource", "LogsResourceWithRawResponse", diff --git a/src/cloudflare/resources/ai_gateway/logs/logs.py b/src/cloudflare/resources/ai_gateway/logs/logs.py index d640bb36e6a..2176d77bef7 100644 --- a/src/cloudflare/resources/ai_gateway/logs/logs.py +++ b/src/cloudflare/resources/ai_gateway/logs/logs.py @@ -2,12 +2,28 @@ from __future__ import annotations -from typing import Union +from typing import Type, Union, cast from datetime import datetime from typing_extensions import Literal import httpx +from .request import ( + RequestResource, + AsyncRequestResource, + RequestResourceWithRawResponse, + AsyncRequestResourceWithRawResponse, + RequestResourceWithStreamingResponse, + AsyncRequestResourceWithStreamingResponse, +) +from .response import ( + ResponseResource, + AsyncResponseResource, + ResponseResourceWithRawResponse, + AsyncResponseResourceWithRawResponse, + ResponseResourceWithStreamingResponse, + AsyncResponseResourceWithStreamingResponse, +) from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ...._utils import maybe_transform from ...._compat import cached_property @@ -18,18 +34,28 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) +from ...._wrappers import ResultWrapper from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from ...._base_client import ( AsyncPaginator, make_request_options, ) from ....types.ai_gateway import log_list_params +from ....types.ai_gateway.log_get_response import LogGetResponse from ....types.ai_gateway.log_list_response import LogListResponse __all__ = ["LogsResource", "AsyncLogsResource"] class LogsResource(SyncAPIResource): + @cached_property + def request(self) -> RequestResource: + return RequestResource(self._client) + + @cached_property + def response(self) -> ResponseResource: + return ResponseResource(self._client) + @cached_property def with_raw_response(self) -> LogsResourceWithRawResponse: return LogsResourceWithRawResponse(self) @@ -103,8 +129,61 @@ def list( model=LogListResponse, ) + def get( + self, + log_id: str, + *, + account_id: str, + id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> LogGetResponse: + """ + Get Gateway Log Detail + + Args: + id: gateway id + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + if not log_id: + raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") + return self._get( + f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[LogGetResponse]._unwrapper, + ), + cast_to=cast(Type[LogGetResponse], ResultWrapper[LogGetResponse]), + ) + class AsyncLogsResource(AsyncAPIResource): + @cached_property + def request(self) -> AsyncRequestResource: + return AsyncRequestResource(self._client) + + @cached_property + def response(self) -> AsyncResponseResource: + return AsyncResponseResource(self._client) + @cached_property def with_raw_response(self) -> AsyncLogsResourceWithRawResponse: return AsyncLogsResourceWithRawResponse(self) @@ -178,6 +257,51 @@ def list( model=LogListResponse, ) + async def get( + self, + log_id: str, + *, + account_id: str, + id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> LogGetResponse: + """ + Get Gateway Log Detail + + Args: + id: gateway id + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + if not log_id: + raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") + return await self._get( + f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[LogGetResponse]._unwrapper, + ), + cast_to=cast(Type[LogGetResponse], ResultWrapper[LogGetResponse]), + ) + class LogsResourceWithRawResponse: def __init__(self, logs: LogsResource) -> None: @@ -186,6 +310,17 @@ def __init__(self, logs: LogsResource) -> None: self.list = to_raw_response_wrapper( logs.list, ) + self.get = to_raw_response_wrapper( + logs.get, + ) + + @cached_property + def request(self) -> RequestResourceWithRawResponse: + return RequestResourceWithRawResponse(self._logs.request) + + @cached_property + def response(self) -> ResponseResourceWithRawResponse: + return ResponseResourceWithRawResponse(self._logs.response) class AsyncLogsResourceWithRawResponse: @@ -195,6 +330,17 @@ def __init__(self, logs: AsyncLogsResource) -> None: self.list = async_to_raw_response_wrapper( logs.list, ) + self.get = async_to_raw_response_wrapper( + logs.get, + ) + + @cached_property + def request(self) -> AsyncRequestResourceWithRawResponse: + return AsyncRequestResourceWithRawResponse(self._logs.request) + + @cached_property + def response(self) -> AsyncResponseResourceWithRawResponse: + return AsyncResponseResourceWithRawResponse(self._logs.response) class LogsResourceWithStreamingResponse: @@ -204,6 +350,17 @@ def __init__(self, logs: LogsResource) -> None: self.list = to_streamed_response_wrapper( logs.list, ) + self.get = to_streamed_response_wrapper( + logs.get, + ) + + @cached_property + def request(self) -> RequestResourceWithStreamingResponse: + return RequestResourceWithStreamingResponse(self._logs.request) + + @cached_property + def response(self) -> ResponseResourceWithStreamingResponse: + return ResponseResourceWithStreamingResponse(self._logs.response) class AsyncLogsResourceWithStreamingResponse: @@ -213,3 +370,14 @@ def __init__(self, logs: AsyncLogsResource) -> None: self.list = async_to_streamed_response_wrapper( logs.list, ) + self.get = async_to_streamed_response_wrapper( + logs.get, + ) + + @cached_property + def request(self) -> AsyncRequestResourceWithStreamingResponse: + return AsyncRequestResourceWithStreamingResponse(self._logs.request) + + @cached_property + def response(self) -> AsyncResponseResourceWithStreamingResponse: + return AsyncResponseResourceWithStreamingResponse(self._logs.response) diff --git a/src/cloudflare/resources/ai_gateway/logs/request.py b/src/cloudflare/resources/ai_gateway/logs/request.py new file mode 100644 index 00000000000..05a85c72ef3 --- /dev/null +++ b/src/cloudflare/resources/ai_gateway/logs/request.py @@ -0,0 +1,158 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._compat import cached_property +from ...._resource import SyncAPIResource, AsyncAPIResource +from ...._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ...._base_client import ( + make_request_options, +) + +__all__ = ["RequestResource", "AsyncRequestResource"] + + +class RequestResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> RequestResourceWithRawResponse: + return RequestResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> RequestResourceWithStreamingResponse: + return RequestResourceWithStreamingResponse(self) + + def get( + self, + log_id: str, + *, + account_id: str, + id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + Get Gateway Log Request + + Args: + id: gateway id + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + if not log_id: + raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") + return self._get( + f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}/request", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=object, + ) + + +class AsyncRequestResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncRequestResourceWithRawResponse: + return AsyncRequestResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncRequestResourceWithStreamingResponse: + return AsyncRequestResourceWithStreamingResponse(self) + + async def get( + self, + log_id: str, + *, + account_id: str, + id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + Get Gateway Log Request + + Args: + id: gateway id + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + if not log_id: + raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") + return await self._get( + f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}/request", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=object, + ) + + +class RequestResourceWithRawResponse: + def __init__(self, request: RequestResource) -> None: + self._request = request + + self.get = to_raw_response_wrapper( + request.get, + ) + + +class AsyncRequestResourceWithRawResponse: + def __init__(self, request: AsyncRequestResource) -> None: + self._request = request + + self.get = async_to_raw_response_wrapper( + request.get, + ) + + +class RequestResourceWithStreamingResponse: + def __init__(self, request: RequestResource) -> None: + self._request = request + + self.get = to_streamed_response_wrapper( + request.get, + ) + + +class AsyncRequestResourceWithStreamingResponse: + def __init__(self, request: AsyncRequestResource) -> None: + self._request = request + + self.get = async_to_streamed_response_wrapper( + request.get, + ) diff --git a/src/cloudflare/resources/ai_gateway/logs/response.py b/src/cloudflare/resources/ai_gateway/logs/response.py new file mode 100644 index 00000000000..e70ec94a87b --- /dev/null +++ b/src/cloudflare/resources/ai_gateway/logs/response.py @@ -0,0 +1,158 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._compat import cached_property +from ...._resource import SyncAPIResource, AsyncAPIResource +from ...._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ...._base_client import ( + make_request_options, +) + +__all__ = ["ResponseResource", "AsyncResponseResource"] + + +class ResponseResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> ResponseResourceWithRawResponse: + return ResponseResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> ResponseResourceWithStreamingResponse: + return ResponseResourceWithStreamingResponse(self) + + def get( + self, + log_id: str, + *, + account_id: str, + id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + Get Gateway Log Response + + Args: + id: gateway id + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + if not log_id: + raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") + return self._get( + f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}/response", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=object, + ) + + +class AsyncResponseResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncResponseResourceWithRawResponse: + return AsyncResponseResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncResponseResourceWithStreamingResponse: + return AsyncResponseResourceWithStreamingResponse(self) + + async def get( + self, + log_id: str, + *, + account_id: str, + id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + Get Gateway Log Response + + Args: + id: gateway id + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") + if not log_id: + raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") + return await self._get( + f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}/response", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=object, + ) + + +class ResponseResourceWithRawResponse: + def __init__(self, response: ResponseResource) -> None: + self._response = response + + self.get = to_raw_response_wrapper( + response.get, + ) + + +class AsyncResponseResourceWithRawResponse: + def __init__(self, response: AsyncResponseResource) -> None: + self._response = response + + self.get = async_to_raw_response_wrapper( + response.get, + ) + + +class ResponseResourceWithStreamingResponse: + def __init__(self, response: ResponseResource) -> None: + self._response = response + + self.get = to_streamed_response_wrapper( + response.get, + ) + + +class AsyncResponseResourceWithStreamingResponse: + def __init__(self, response: AsyncResponseResource) -> None: + self._response = response + + self.get = async_to_streamed_response_wrapper( + response.get, + ) diff --git a/src/cloudflare/types/ai_gateway/__init__.py b/src/cloudflare/types/ai_gateway/__init__.py index 8a4216b8edb..afc8501bed2 100644 --- a/src/cloudflare/types/ai_gateway/__init__.py +++ b/src/cloudflare/types/ai_gateway/__init__.py @@ -3,6 +3,7 @@ from __future__ import annotations from .log_list_params import LogListParams as LogListParams +from .log_get_response import LogGetResponse as LogGetResponse from .log_list_response import LogListResponse as LogListResponse from .ai_gateway_list_params import AIGatewayListParams as AIGatewayListParams from .ai_gateway_get_response import AIGatewayGetResponse as AIGatewayGetResponse diff --git a/src/cloudflare/types/ai_gateway/log_get_response.py b/src/cloudflare/types/ai_gateway/log_get_response.py new file mode 100644 index 00000000000..ff80ce3414d --- /dev/null +++ b/src/cloudflare/types/ai_gateway/log_get_response.py @@ -0,0 +1,46 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from ..._models import BaseModel + +__all__ = ["LogGetResponse"] + + +class LogGetResponse(BaseModel): + id: str + + cached: bool + + created_at: datetime + + duration: int + + model: str + + path: str + + provider: str + + request: str + + response: str + + success: bool + + tokens_in: int + + tokens_out: int + + metadata: Optional[str] = None + + request_content_type: Optional[str] = None + + request_type: Optional[str] = None + + response_content_type: Optional[str] = None + + status_code: Optional[int] = None + + step: Optional[int] = None diff --git a/tests/api_resources/ai_gateway/logs/test_request.py b/tests/api_resources/ai_gateway/logs/test_request.py new file mode 100644 index 00000000000..d7a2c3da764 --- /dev/null +++ b/tests/api_resources/ai_gateway/logs/test_request.py @@ -0,0 +1,141 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestRequest: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + request = client.ai_gateway.logs.request.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + assert_matches_type(object, request, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.ai_gateway.logs.request.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + request = response.parse() + assert_matches_type(object, request, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.ai_gateway.logs.request.with_streaming_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + request = response.parse() + assert_matches_type(object, request, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.ai_gateway.logs.request.with_raw_response.get( + "string", + account_id="", + id="my-gateway", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + client.ai_gateway.logs.request.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): + client.ai_gateway.logs.request.with_raw_response.get( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + + +class TestAsyncRequest: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + request = await async_client.ai_gateway.logs.request.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + assert_matches_type(object, request, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.ai_gateway.logs.request.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + request = await response.parse() + assert_matches_type(object, request, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.ai_gateway.logs.request.with_streaming_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + request = await response.parse() + assert_matches_type(object, request, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.ai_gateway.logs.request.with_raw_response.get( + "string", + account_id="", + id="my-gateway", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + await async_client.ai_gateway.logs.request.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): + await async_client.ai_gateway.logs.request.with_raw_response.get( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) diff --git a/tests/api_resources/ai_gateway/logs/test_response.py b/tests/api_resources/ai_gateway/logs/test_response.py new file mode 100644 index 00000000000..f66bf7c2449 --- /dev/null +++ b/tests/api_resources/ai_gateway/logs/test_response.py @@ -0,0 +1,141 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestResponse: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + response = client.ai_gateway.logs.response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + assert_matches_type(object, response, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + http_response = client.ai_gateway.logs.response.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + + assert http_response.is_closed is True + assert http_response.http_request.headers.get("X-Stainless-Lang") == "python" + response = http_response.parse() + assert_matches_type(object, response, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.ai_gateway.logs.response.with_streaming_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) as http_response: + assert not http_response.is_closed + assert http_response.http_request.headers.get("X-Stainless-Lang") == "python" + + response = http_response.parse() + assert_matches_type(object, response, path=["response"]) + + assert cast(Any, http_response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.ai_gateway.logs.response.with_raw_response.get( + "string", + account_id="", + id="my-gateway", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + client.ai_gateway.logs.response.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): + client.ai_gateway.logs.response.with_raw_response.get( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + + +class TestAsyncResponse: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.ai_gateway.logs.response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + assert_matches_type(object, response, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + http_response = await async_client.ai_gateway.logs.response.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + + assert http_response.is_closed is True + assert http_response.http_request.headers.get("X-Stainless-Lang") == "python" + response = await http_response.parse() + assert_matches_type(object, response, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.ai_gateway.logs.response.with_streaming_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) as http_response: + assert not http_response.is_closed + assert http_response.http_request.headers.get("X-Stainless-Lang") == "python" + + response = await http_response.parse() + assert_matches_type(object, response, path=["response"]) + + assert cast(Any, http_response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.ai_gateway.logs.response.with_raw_response.get( + "string", + account_id="", + id="my-gateway", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + await async_client.ai_gateway.logs.response.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): + await async_client.ai_gateway.logs.response.with_raw_response.get( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) diff --git a/tests/api_resources/ai_gateway/test_logs.py b/tests/api_resources/ai_gateway/test_logs.py index 79fbfbf7ca0..485dc79d148 100644 --- a/tests/api_resources/ai_gateway/test_logs.py +++ b/tests/api_resources/ai_gateway/test_logs.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.ai_gateway import LogListResponse +from cloudflare.types.ai_gateway import LogGetResponse, LogListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -84,6 +84,66 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="0d37909e38d3e99c29fa2cd343ac421a", ) + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + log = client.ai_gateway.logs.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + assert_matches_type(LogGetResponse, log, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.ai_gateway.logs.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + log = response.parse() + assert_matches_type(LogGetResponse, log, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.ai_gateway.logs.with_streaming_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + log = response.parse() + assert_matches_type(LogGetResponse, log, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.ai_gateway.logs.with_raw_response.get( + "string", + account_id="", + id="my-gateway", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + client.ai_gateway.logs.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): + client.ai_gateway.logs.with_raw_response.get( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + class TestAsyncLogs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -152,3 +212,63 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + log = await async_client.ai_gateway.logs.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + assert_matches_type(LogGetResponse, log, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.ai_gateway.logs.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + log = await response.parse() + assert_matches_type(LogGetResponse, log, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.ai_gateway.logs.with_streaming_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + log = await response.parse() + assert_matches_type(LogGetResponse, log, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.ai_gateway.logs.with_raw_response.get( + "string", + account_id="", + id="my-gateway", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): + await async_client.ai_gateway.logs.with_raw_response.get( + "string", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): + await async_client.ai_gateway.logs.with_raw_response.get( + "", + account_id="0d37909e38d3e99c29fa2cd343ac421a", + id="my-gateway", + ) From d5b6b1e041b9810cd0a25726e4b7174bf3e527ca Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 09:04:37 +0000 Subject: [PATCH 083/124] feat(api): OpenAPI spec update via Stainless API (#1097) --- .stats.yml | 4 +- api.md | 27 +-- .../resources/ai_gateway/logs/__init__.py | 28 --- .../resources/ai_gateway/logs/logs.py | 170 +----------------- .../resources/ai_gateway/logs/request.py | 158 ---------------- .../resources/ai_gateway/logs/response.py | 158 ---------------- src/cloudflare/types/ai_gateway/__init__.py | 1 - .../types/ai_gateway/log_get_response.py | 46 ----- .../ai_gateway/logs/test_request.py | 141 --------------- .../ai_gateway/logs/test_response.py | 141 --------------- tests/api_resources/ai_gateway/test_logs.py | 122 +------------ 11 files changed, 5 insertions(+), 991 deletions(-) delete mode 100644 src/cloudflare/resources/ai_gateway/logs/request.py delete mode 100644 src/cloudflare/resources/ai_gateway/logs/response.py delete mode 100644 src/cloudflare/types/ai_gateway/log_get_response.py delete mode 100644 tests/api_resources/ai_gateway/logs/test_request.py delete mode 100644 tests/api_resources/ai_gateway/logs/test_response.py diff --git a/.stats.yml b/.stats.yml index 4933477825d..691540b5bcf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1356 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-62c3b16f6d836d9cc7bca2f54e83f7ed99fbe325b4b6cfec72a71fc7ceee58a6.yml +configured_endpoints: 1353 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e79cc9a74089de5aec2c720b1e3023ea27869883f43c8b0167198f5967128636.yml diff --git a/api.md b/api.md index fa00c410812..8f8c1cbf597 100644 --- a/api.md +++ b/api.md @@ -7886,37 +7886,12 @@ Methods: Types: ```python -from cloudflare.types.ai_gateway import LogListResponse, LogGetResponse +from cloudflare.types.ai_gateway import LogListResponse ``` Methods: - client.ai_gateway.logs.list(id, \*, account_id, \*\*params) -> SyncV4PagePaginationArray[LogListResponse] -- client.ai_gateway.logs.get(log_id, \*, account_id, id) -> LogGetResponse - -### Request - -Types: - -```python -from cloudflare.types.ai_gateway.logs import RequestGetResponse -``` - -Methods: - -- client.ai_gateway.logs.request.get(log_id, \*, account_id, id) -> object - -### Response - -Types: - -```python -from cloudflare.types.ai_gateway.logs import ResponseGetResponse -``` - -Methods: - -- client.ai_gateway.logs.response.get(log_id, \*, account_id, id) -> object # IAM diff --git a/src/cloudflare/resources/ai_gateway/logs/__init__.py b/src/cloudflare/resources/ai_gateway/logs/__init__.py index cd50acd99fc..30876fab694 100644 --- a/src/cloudflare/resources/ai_gateway/logs/__init__.py +++ b/src/cloudflare/resources/ai_gateway/logs/__init__.py @@ -8,36 +8,8 @@ LogsResourceWithStreamingResponse, AsyncLogsResourceWithStreamingResponse, ) -from .request import ( - RequestResource, - AsyncRequestResource, - RequestResourceWithRawResponse, - AsyncRequestResourceWithRawResponse, - RequestResourceWithStreamingResponse, - AsyncRequestResourceWithStreamingResponse, -) -from .response import ( - ResponseResource, - AsyncResponseResource, - ResponseResourceWithRawResponse, - AsyncResponseResourceWithRawResponse, - ResponseResourceWithStreamingResponse, - AsyncResponseResourceWithStreamingResponse, -) __all__ = [ - "RequestResource", - "AsyncRequestResource", - "RequestResourceWithRawResponse", - "AsyncRequestResourceWithRawResponse", - "RequestResourceWithStreamingResponse", - "AsyncRequestResourceWithStreamingResponse", - "ResponseResource", - "AsyncResponseResource", - "ResponseResourceWithRawResponse", - "AsyncResponseResourceWithRawResponse", - "ResponseResourceWithStreamingResponse", - "AsyncResponseResourceWithStreamingResponse", "LogsResource", "AsyncLogsResource", "LogsResourceWithRawResponse", diff --git a/src/cloudflare/resources/ai_gateway/logs/logs.py b/src/cloudflare/resources/ai_gateway/logs/logs.py index 2176d77bef7..d640bb36e6a 100644 --- a/src/cloudflare/resources/ai_gateway/logs/logs.py +++ b/src/cloudflare/resources/ai_gateway/logs/logs.py @@ -2,28 +2,12 @@ from __future__ import annotations -from typing import Type, Union, cast +from typing import Union from datetime import datetime from typing_extensions import Literal import httpx -from .request import ( - RequestResource, - AsyncRequestResource, - RequestResourceWithRawResponse, - AsyncRequestResourceWithRawResponse, - RequestResourceWithStreamingResponse, - AsyncRequestResourceWithStreamingResponse, -) -from .response import ( - ResponseResource, - AsyncResponseResource, - ResponseResourceWithRawResponse, - AsyncResponseResourceWithRawResponse, - ResponseResourceWithStreamingResponse, - AsyncResponseResourceWithStreamingResponse, -) from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ...._utils import maybe_transform from ...._compat import cached_property @@ -34,28 +18,18 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...._wrappers import ResultWrapper from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from ...._base_client import ( AsyncPaginator, make_request_options, ) from ....types.ai_gateway import log_list_params -from ....types.ai_gateway.log_get_response import LogGetResponse from ....types.ai_gateway.log_list_response import LogListResponse __all__ = ["LogsResource", "AsyncLogsResource"] class LogsResource(SyncAPIResource): - @cached_property - def request(self) -> RequestResource: - return RequestResource(self._client) - - @cached_property - def response(self) -> ResponseResource: - return ResponseResource(self._client) - @cached_property def with_raw_response(self) -> LogsResourceWithRawResponse: return LogsResourceWithRawResponse(self) @@ -129,61 +103,8 @@ def list( model=LogListResponse, ) - def get( - self, - log_id: str, - *, - account_id: str, - id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LogGetResponse: - """ - Get Gateway Log Detail - - Args: - id: gateway id - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - if not log_id: - raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") - return self._get( - f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[LogGetResponse]._unwrapper, - ), - cast_to=cast(Type[LogGetResponse], ResultWrapper[LogGetResponse]), - ) - class AsyncLogsResource(AsyncAPIResource): - @cached_property - def request(self) -> AsyncRequestResource: - return AsyncRequestResource(self._client) - - @cached_property - def response(self) -> AsyncResponseResource: - return AsyncResponseResource(self._client) - @cached_property def with_raw_response(self) -> AsyncLogsResourceWithRawResponse: return AsyncLogsResourceWithRawResponse(self) @@ -257,51 +178,6 @@ def list( model=LogListResponse, ) - async def get( - self, - log_id: str, - *, - account_id: str, - id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LogGetResponse: - """ - Get Gateway Log Detail - - Args: - id: gateway id - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - if not log_id: - raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") - return await self._get( - f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[LogGetResponse]._unwrapper, - ), - cast_to=cast(Type[LogGetResponse], ResultWrapper[LogGetResponse]), - ) - class LogsResourceWithRawResponse: def __init__(self, logs: LogsResource) -> None: @@ -310,17 +186,6 @@ def __init__(self, logs: LogsResource) -> None: self.list = to_raw_response_wrapper( logs.list, ) - self.get = to_raw_response_wrapper( - logs.get, - ) - - @cached_property - def request(self) -> RequestResourceWithRawResponse: - return RequestResourceWithRawResponse(self._logs.request) - - @cached_property - def response(self) -> ResponseResourceWithRawResponse: - return ResponseResourceWithRawResponse(self._logs.response) class AsyncLogsResourceWithRawResponse: @@ -330,17 +195,6 @@ def __init__(self, logs: AsyncLogsResource) -> None: self.list = async_to_raw_response_wrapper( logs.list, ) - self.get = async_to_raw_response_wrapper( - logs.get, - ) - - @cached_property - def request(self) -> AsyncRequestResourceWithRawResponse: - return AsyncRequestResourceWithRawResponse(self._logs.request) - - @cached_property - def response(self) -> AsyncResponseResourceWithRawResponse: - return AsyncResponseResourceWithRawResponse(self._logs.response) class LogsResourceWithStreamingResponse: @@ -350,17 +204,6 @@ def __init__(self, logs: LogsResource) -> None: self.list = to_streamed_response_wrapper( logs.list, ) - self.get = to_streamed_response_wrapper( - logs.get, - ) - - @cached_property - def request(self) -> RequestResourceWithStreamingResponse: - return RequestResourceWithStreamingResponse(self._logs.request) - - @cached_property - def response(self) -> ResponseResourceWithStreamingResponse: - return ResponseResourceWithStreamingResponse(self._logs.response) class AsyncLogsResourceWithStreamingResponse: @@ -370,14 +213,3 @@ def __init__(self, logs: AsyncLogsResource) -> None: self.list = async_to_streamed_response_wrapper( logs.list, ) - self.get = async_to_streamed_response_wrapper( - logs.get, - ) - - @cached_property - def request(self) -> AsyncRequestResourceWithStreamingResponse: - return AsyncRequestResourceWithStreamingResponse(self._logs.request) - - @cached_property - def response(self) -> AsyncResponseResourceWithStreamingResponse: - return AsyncResponseResourceWithStreamingResponse(self._logs.response) diff --git a/src/cloudflare/resources/ai_gateway/logs/request.py b/src/cloudflare/resources/ai_gateway/logs/request.py deleted file mode 100644 index 05a85c72ef3..00000000000 --- a/src/cloudflare/resources/ai_gateway/logs/request.py +++ /dev/null @@ -1,158 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._base_client import ( - make_request_options, -) - -__all__ = ["RequestResource", "AsyncRequestResource"] - - -class RequestResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> RequestResourceWithRawResponse: - return RequestResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> RequestResourceWithStreamingResponse: - return RequestResourceWithStreamingResponse(self) - - def get( - self, - log_id: str, - *, - account_id: str, - id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> object: - """ - Get Gateway Log Request - - Args: - id: gateway id - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - if not log_id: - raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") - return self._get( - f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}/request", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=object, - ) - - -class AsyncRequestResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncRequestResourceWithRawResponse: - return AsyncRequestResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncRequestResourceWithStreamingResponse: - return AsyncRequestResourceWithStreamingResponse(self) - - async def get( - self, - log_id: str, - *, - account_id: str, - id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> object: - """ - Get Gateway Log Request - - Args: - id: gateway id - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - if not log_id: - raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") - return await self._get( - f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}/request", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=object, - ) - - -class RequestResourceWithRawResponse: - def __init__(self, request: RequestResource) -> None: - self._request = request - - self.get = to_raw_response_wrapper( - request.get, - ) - - -class AsyncRequestResourceWithRawResponse: - def __init__(self, request: AsyncRequestResource) -> None: - self._request = request - - self.get = async_to_raw_response_wrapper( - request.get, - ) - - -class RequestResourceWithStreamingResponse: - def __init__(self, request: RequestResource) -> None: - self._request = request - - self.get = to_streamed_response_wrapper( - request.get, - ) - - -class AsyncRequestResourceWithStreamingResponse: - def __init__(self, request: AsyncRequestResource) -> None: - self._request = request - - self.get = async_to_streamed_response_wrapper( - request.get, - ) diff --git a/src/cloudflare/resources/ai_gateway/logs/response.py b/src/cloudflare/resources/ai_gateway/logs/response.py deleted file mode 100644 index e70ec94a87b..00000000000 --- a/src/cloudflare/resources/ai_gateway/logs/response.py +++ /dev/null @@ -1,158 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._base_client import ( - make_request_options, -) - -__all__ = ["ResponseResource", "AsyncResponseResource"] - - -class ResponseResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> ResponseResourceWithRawResponse: - return ResponseResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> ResponseResourceWithStreamingResponse: - return ResponseResourceWithStreamingResponse(self) - - def get( - self, - log_id: str, - *, - account_id: str, - id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> object: - """ - Get Gateway Log Response - - Args: - id: gateway id - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - if not log_id: - raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") - return self._get( - f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}/response", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=object, - ) - - -class AsyncResponseResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncResponseResourceWithRawResponse: - return AsyncResponseResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncResponseResourceWithStreamingResponse: - return AsyncResponseResourceWithStreamingResponse(self) - - async def get( - self, - log_id: str, - *, - account_id: str, - id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> object: - """ - Get Gateway Log Response - - Args: - id: gateway id - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - if not log_id: - raise ValueError(f"Expected a non-empty value for `log_id` but received {log_id!r}") - return await self._get( - f"/accounts/{account_id}/ai-gateway/gateways/{id}/logs/{log_id}/response", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=object, - ) - - -class ResponseResourceWithRawResponse: - def __init__(self, response: ResponseResource) -> None: - self._response = response - - self.get = to_raw_response_wrapper( - response.get, - ) - - -class AsyncResponseResourceWithRawResponse: - def __init__(self, response: AsyncResponseResource) -> None: - self._response = response - - self.get = async_to_raw_response_wrapper( - response.get, - ) - - -class ResponseResourceWithStreamingResponse: - def __init__(self, response: ResponseResource) -> None: - self._response = response - - self.get = to_streamed_response_wrapper( - response.get, - ) - - -class AsyncResponseResourceWithStreamingResponse: - def __init__(self, response: AsyncResponseResource) -> None: - self._response = response - - self.get = async_to_streamed_response_wrapper( - response.get, - ) diff --git a/src/cloudflare/types/ai_gateway/__init__.py b/src/cloudflare/types/ai_gateway/__init__.py index afc8501bed2..8a4216b8edb 100644 --- a/src/cloudflare/types/ai_gateway/__init__.py +++ b/src/cloudflare/types/ai_gateway/__init__.py @@ -3,7 +3,6 @@ from __future__ import annotations from .log_list_params import LogListParams as LogListParams -from .log_get_response import LogGetResponse as LogGetResponse from .log_list_response import LogListResponse as LogListResponse from .ai_gateway_list_params import AIGatewayListParams as AIGatewayListParams from .ai_gateway_get_response import AIGatewayGetResponse as AIGatewayGetResponse diff --git a/src/cloudflare/types/ai_gateway/log_get_response.py b/src/cloudflare/types/ai_gateway/log_get_response.py deleted file mode 100644 index ff80ce3414d..00000000000 --- a/src/cloudflare/types/ai_gateway/log_get_response.py +++ /dev/null @@ -1,46 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["LogGetResponse"] - - -class LogGetResponse(BaseModel): - id: str - - cached: bool - - created_at: datetime - - duration: int - - model: str - - path: str - - provider: str - - request: str - - response: str - - success: bool - - tokens_in: int - - tokens_out: int - - metadata: Optional[str] = None - - request_content_type: Optional[str] = None - - request_type: Optional[str] = None - - response_content_type: Optional[str] = None - - status_code: Optional[int] = None - - step: Optional[int] = None diff --git a/tests/api_resources/ai_gateway/logs/test_request.py b/tests/api_resources/ai_gateway/logs/test_request.py deleted file mode 100644 index d7a2c3da764..00000000000 --- a/tests/api_resources/ai_gateway/logs/test_request.py +++ /dev/null @@ -1,141 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestRequest: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - request = client.ai_gateway.logs.request.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - assert_matches_type(object, request, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.ai_gateway.logs.request.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - request = response.parse() - assert_matches_type(object, request, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.ai_gateway.logs.request.with_streaming_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - request = response.parse() - assert_matches_type(object, request, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.ai_gateway.logs.request.with_raw_response.get( - "string", - account_id="", - id="my-gateway", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): - client.ai_gateway.logs.request.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): - client.ai_gateway.logs.request.with_raw_response.get( - "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - - -class TestAsyncRequest: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - request = await async_client.ai_gateway.logs.request.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - assert_matches_type(object, request, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.ai_gateway.logs.request.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - request = await response.parse() - assert_matches_type(object, request, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.ai_gateway.logs.request.with_streaming_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - request = await response.parse() - assert_matches_type(object, request, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.ai_gateway.logs.request.with_raw_response.get( - "string", - account_id="", - id="my-gateway", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): - await async_client.ai_gateway.logs.request.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): - await async_client.ai_gateway.logs.request.with_raw_response.get( - "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) diff --git a/tests/api_resources/ai_gateway/logs/test_response.py b/tests/api_resources/ai_gateway/logs/test_response.py deleted file mode 100644 index f66bf7c2449..00000000000 --- a/tests/api_resources/ai_gateway/logs/test_response.py +++ /dev/null @@ -1,141 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestResponse: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - response = client.ai_gateway.logs.response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - assert_matches_type(object, response, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - http_response = client.ai_gateway.logs.response.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - - assert http_response.is_closed is True - assert http_response.http_request.headers.get("X-Stainless-Lang") == "python" - response = http_response.parse() - assert_matches_type(object, response, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.ai_gateway.logs.response.with_streaming_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) as http_response: - assert not http_response.is_closed - assert http_response.http_request.headers.get("X-Stainless-Lang") == "python" - - response = http_response.parse() - assert_matches_type(object, response, path=["response"]) - - assert cast(Any, http_response.is_closed) is True - - @parametrize - def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.ai_gateway.logs.response.with_raw_response.get( - "string", - account_id="", - id="my-gateway", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): - client.ai_gateway.logs.response.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): - client.ai_gateway.logs.response.with_raw_response.get( - "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - - -class TestAsyncResponse: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.ai_gateway.logs.response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - assert_matches_type(object, response, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - http_response = await async_client.ai_gateway.logs.response.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - - assert http_response.is_closed is True - assert http_response.http_request.headers.get("X-Stainless-Lang") == "python" - response = await http_response.parse() - assert_matches_type(object, response, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.ai_gateway.logs.response.with_streaming_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) as http_response: - assert not http_response.is_closed - assert http_response.http_request.headers.get("X-Stainless-Lang") == "python" - - response = await http_response.parse() - assert_matches_type(object, response, path=["response"]) - - assert cast(Any, http_response.is_closed) is True - - @parametrize - async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.ai_gateway.logs.response.with_raw_response.get( - "string", - account_id="", - id="my-gateway", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): - await async_client.ai_gateway.logs.response.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): - await async_client.ai_gateway.logs.response.with_raw_response.get( - "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) diff --git a/tests/api_resources/ai_gateway/test_logs.py b/tests/api_resources/ai_gateway/test_logs.py index 485dc79d148..79fbfbf7ca0 100644 --- a/tests/api_resources/ai_gateway/test_logs.py +++ b/tests/api_resources/ai_gateway/test_logs.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.ai_gateway import LogGetResponse, LogListResponse +from cloudflare.types.ai_gateway import LogListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -84,66 +84,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="0d37909e38d3e99c29fa2cd343ac421a", ) - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - log = client.ai_gateway.logs.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - assert_matches_type(LogGetResponse, log, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.ai_gateway.logs.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - log = response.parse() - assert_matches_type(LogGetResponse, log, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.ai_gateway.logs.with_streaming_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - log = response.parse() - assert_matches_type(LogGetResponse, log, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.ai_gateway.logs.with_raw_response.get( - "string", - account_id="", - id="my-gateway", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): - client.ai_gateway.logs.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): - client.ai_gateway.logs.with_raw_response.get( - "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - class TestAsyncLogs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -212,63 +152,3 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - log = await async_client.ai_gateway.logs.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - assert_matches_type(LogGetResponse, log, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.ai_gateway.logs.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - log = await response.parse() - assert_matches_type(LogGetResponse, log, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.ai_gateway.logs.with_streaming_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - log = await response.parse() - assert_matches_type(LogGetResponse, log, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.ai_gateway.logs.with_raw_response.get( - "string", - account_id="", - id="my-gateway", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): - await async_client.ai_gateway.logs.with_raw_response.get( - "string", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `log_id` but received ''"): - await async_client.ai_gateway.logs.with_raw_response.get( - "", - account_id="0d37909e38d3e99c29fa2cd343ac421a", - id="my-gateway", - ) From 0699645b43c2f37b3fcfc0ae1f56bca8b3f413e1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 09:06:54 +0000 Subject: [PATCH 084/124] feat(api): OpenAPI spec update via Stainless API (#1098) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 691540b5bcf..cd119146c07 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e79cc9a74089de5aec2c720b1e3023ea27869883f43c8b0167198f5967128636.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-71b8e696098eb60f16f5e18bf1360a466442029a6c1a820bf4ccce0c1dd1dc80.yml From 6aa6dd76bdf37ea6a41e3931384c02b668c280fa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 11:14:08 +0000 Subject: [PATCH 085/124] feat(api): OpenAPI spec update via Stainless API (#1099) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index cd119146c07..41720aa75bb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-71b8e696098eb60f16f5e18bf1360a466442029a6c1a820bf4ccce0c1dd1dc80.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d89f516ba261461cc96198e0781f67480c4d0dde0f3e2d883d0125266e3c73a8.yml From e13944b5775e0152c29d442c019a30d18f1b5449 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 12:26:11 +0000 Subject: [PATCH 086/124] feat(api): OpenAPI spec update via Stainless API (#1100) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 41720aa75bb..cd119146c07 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d89f516ba261461cc96198e0781f67480c4d0dde0f3e2d883d0125266e3c73a8.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-71b8e696098eb60f16f5e18bf1360a466442029a6c1a820bf4ccce0c1dd1dc80.yml From 109b2408c8e404eefa83db28aa99bc724a77b96b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 12:28:29 +0000 Subject: [PATCH 087/124] feat(api): OpenAPI spec update via Stainless API (#1101) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index cd119146c07..152aa8c53db 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-71b8e696098eb60f16f5e18bf1360a466442029a6c1a820bf4ccce0c1dd1dc80.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0857a12916a347811b8962ef9d2ec41caaad83b23b37ae0a11ef4205ee242ab0.yml From a216e2158452cea410f07ae998b6dc67ba94006d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 12:52:17 +0000 Subject: [PATCH 088/124] feat(api): OpenAPI spec update via Stainless API (#1102) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 152aa8c53db..41720aa75bb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0857a12916a347811b8962ef9d2ec41caaad83b23b37ae0a11ef4205ee242ab0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d89f516ba261461cc96198e0781f67480c4d0dde0f3e2d883d0125266e3c73a8.yml From 42bde1c4bc75403137acd12666e6d127c66cdceb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 12:54:32 +0000 Subject: [PATCH 089/124] feat(api): OpenAPI spec update via Stainless API (#1103) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 41720aa75bb..152aa8c53db 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d89f516ba261461cc96198e0781f67480c4d0dde0f3e2d883d0125266e3c73a8.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0857a12916a347811b8962ef9d2ec41caaad83b23b37ae0a11ef4205ee242ab0.yml From cf616e1770bee61d444780b293eb97706e1b8a2d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 14:44:25 +0000 Subject: [PATCH 090/124] feat(api): OpenAPI spec update via Stainless API (#1104) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 152aa8c53db..41720aa75bb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0857a12916a347811b8962ef9d2ec41caaad83b23b37ae0a11ef4205ee242ab0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d89f516ba261461cc96198e0781f67480c4d0dde0f3e2d883d0125266e3c73a8.yml From 6df8ac087eefa788d940a58f272fb0ed58c8a5b5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 14:47:03 +0000 Subject: [PATCH 091/124] feat(api): OpenAPI spec update via Stainless API (#1105) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 41720aa75bb..691540b5bcf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d89f516ba261461cc96198e0781f67480c4d0dde0f3e2d883d0125266e3c73a8.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e79cc9a74089de5aec2c720b1e3023ea27869883f43c8b0167198f5967128636.yml From 26b8d4d554c2fe8090e255890de9f72bea3e9699 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 14:49:21 +0000 Subject: [PATCH 092/124] feat(api): OpenAPI spec update via Stainless API (#1106) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 691540b5bcf..152aa8c53db 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e79cc9a74089de5aec2c720b1e3023ea27869883f43c8b0167198f5967128636.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0857a12916a347811b8962ef9d2ec41caaad83b23b37ae0a11ef4205ee242ab0.yml From 07a9d1ef9aaf3fc23c9e0a2ed24b9d0445e7aa39 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 15:03:53 +0000 Subject: [PATCH 093/124] feat(api): OpenAPI spec update via Stainless API (#1107) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 152aa8c53db..691540b5bcf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0857a12916a347811b8962ef9d2ec41caaad83b23b37ae0a11ef4205ee242ab0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e79cc9a74089de5aec2c720b1e3023ea27869883f43c8b0167198f5967128636.yml From 913c0585eca2062e1590d5093cea5de67a4ec22a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 15:06:12 +0000 Subject: [PATCH 094/124] feat(api): OpenAPI spec update via Stainless API (#1108) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 691540b5bcf..152aa8c53db 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e79cc9a74089de5aec2c720b1e3023ea27869883f43c8b0167198f5967128636.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0857a12916a347811b8962ef9d2ec41caaad83b23b37ae0a11ef4205ee242ab0.yml From 1585de4614b4181765f07b25b8cb39492a96f429 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 15:08:27 +0000 Subject: [PATCH 095/124] feat(api): OpenAPI spec update via Stainless API (#1109) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 152aa8c53db..cd119146c07 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0857a12916a347811b8962ef9d2ec41caaad83b23b37ae0a11ef4205ee242ab0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-71b8e696098eb60f16f5e18bf1360a466442029a6c1a820bf4ccce0c1dd1dc80.yml From 6d80a4114d6daa16eae1350eceacdba01181df40 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 15:10:46 +0000 Subject: [PATCH 096/124] feat(api): OpenAPI spec update via Stainless API (#1110) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index cd119146c07..152aa8c53db 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-71b8e696098eb60f16f5e18bf1360a466442029a6c1a820bf4ccce0c1dd1dc80.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0857a12916a347811b8962ef9d2ec41caaad83b23b37ae0a11ef4205ee242ab0.yml From e53d3c8c801f6604bc17f137ecff31c6924de3f8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 15:25:02 +0000 Subject: [PATCH 097/124] feat(api): OpenAPI spec update via Stainless API (#1111) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 152aa8c53db..691540b5bcf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0857a12916a347811b8962ef9d2ec41caaad83b23b37ae0a11ef4205ee242ab0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e79cc9a74089de5aec2c720b1e3023ea27869883f43c8b0167198f5967128636.yml From 08aa37f91c4567365f3bdcd0a75f041903a949aa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 16:53:43 +0000 Subject: [PATCH 098/124] feat(api): OpenAPI spec update via Stainless API (#1112) --- .stats.yml | 4 +- api.md | 37 +- .../magic_transit/cf_interconnects.py | 265 -------- .../resources/magic_transit/gre_tunnels.py | 392 +----------- .../resources/magic_transit/ipsec_tunnels.py | 510 +-------------- .../resources/magic_transit/routes.py | 368 +---------- .../resources/magic_transit/sites/acls.py | 546 +--------------- .../types/magic_transit/__init__.py | 18 - .../cf_interconnect_get_response.py | 11 - .../cf_interconnect_update_params.py | 63 -- .../cf_interconnect_update_response.py | 13 - .../gre_tunnel_delete_response.py | 13 - .../magic_transit/gre_tunnel_get_response.py | 11 - .../magic_transit/gre_tunnel_update_params.py | 48 -- .../gre_tunnel_update_response.py | 13 - .../ipsec_tunnel_delete_response.py | 13 - .../ipsec_tunnel_get_response.py | 11 - .../ipsec_tunnel_psk_generate_params.py | 14 - .../ipsec_tunnel_psk_generate_response.py | 19 - .../ipsec_tunnel_update_params.py | 47 -- .../ipsec_tunnel_update_response.py | 13 - .../magic_transit/route_delete_response.py | 13 - .../types/magic_transit/route_get_response.py | 11 - .../magic_transit/route_update_params.py | 32 - .../magic_transit/route_update_response.py | 13 - .../types/magic_transit/scope_param.py | 16 - .../types/magic_transit/sites/__init__.py | 2 - .../magic_transit/sites/acl_edit_params.py | 39 -- .../magic_transit/sites/acl_update_params.py | 39 -- .../magic_transit/sites/test_acls.py | 584 +----------------- .../magic_transit/test_cf_interconnects.py | 234 +------ .../magic_transit/test_gre_tunnels.py | 380 +----------- .../magic_transit/test_ipsec_tunnels.py | 472 -------------- .../magic_transit/test_routes.py | 355 ----------- 34 files changed, 11 insertions(+), 4608 deletions(-) delete mode 100644 src/cloudflare/types/magic_transit/cf_interconnect_get_response.py delete mode 100644 src/cloudflare/types/magic_transit/cf_interconnect_update_params.py delete mode 100644 src/cloudflare/types/magic_transit/cf_interconnect_update_response.py delete mode 100644 src/cloudflare/types/magic_transit/gre_tunnel_delete_response.py delete mode 100644 src/cloudflare/types/magic_transit/gre_tunnel_get_response.py delete mode 100644 src/cloudflare/types/magic_transit/gre_tunnel_update_params.py delete mode 100644 src/cloudflare/types/magic_transit/gre_tunnel_update_response.py delete mode 100644 src/cloudflare/types/magic_transit/ipsec_tunnel_delete_response.py delete mode 100644 src/cloudflare/types/magic_transit/ipsec_tunnel_get_response.py delete mode 100644 src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_params.py delete mode 100644 src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_response.py delete mode 100644 src/cloudflare/types/magic_transit/ipsec_tunnel_update_params.py delete mode 100644 src/cloudflare/types/magic_transit/ipsec_tunnel_update_response.py delete mode 100644 src/cloudflare/types/magic_transit/route_delete_response.py delete mode 100644 src/cloudflare/types/magic_transit/route_get_response.py delete mode 100644 src/cloudflare/types/magic_transit/route_update_params.py delete mode 100644 src/cloudflare/types/magic_transit/route_update_response.py delete mode 100644 src/cloudflare/types/magic_transit/scope_param.py delete mode 100644 src/cloudflare/types/magic_transit/sites/acl_edit_params.py delete mode 100644 src/cloudflare/types/magic_transit/sites/acl_update_params.py diff --git a/.stats.yml b/.stats.yml index 691540b5bcf..cfe7672b318 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e79cc9a74089de5aec2c720b1e3023ea27869883f43c8b0167198f5967128636.yml +configured_endpoints: 1337 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8127f6c197e7f17e9eb9d99add7dff6ecbc8b5a90e298269e2070738ed4368e9.yml diff --git a/api.md b/api.md index 8f8c1cbf597..c3139edde1c 100644 --- a/api.md +++ b/api.md @@ -3988,40 +3988,25 @@ Methods: Types: ```python -from cloudflare.types.magic_transit import ( - CfInterconnectUpdateResponse, - CfInterconnectListResponse, - CfInterconnectGetResponse, -) +from cloudflare.types.magic_transit import CfInterconnectListResponse ``` Methods: -- client.magic_transit.cf_interconnects.update(tunnel_identifier, \*, account_id, \*\*params) -> CfInterconnectUpdateResponse - client.magic_transit.cf_interconnects.list(\*, account_id) -> CfInterconnectListResponse -- client.magic_transit.cf_interconnects.get(tunnel_identifier, \*, account_id) -> CfInterconnectGetResponse ## GRETunnels Types: ```python -from cloudflare.types.magic_transit import ( - GRETunnelCreateResponse, - GRETunnelUpdateResponse, - GRETunnelListResponse, - GRETunnelDeleteResponse, - GRETunnelGetResponse, -) +from cloudflare.types.magic_transit import GRETunnelCreateResponse, GRETunnelListResponse ``` Methods: - client.magic_transit.gre_tunnels.create(\*, account_id, \*\*params) -> GRETunnelCreateResponse -- client.magic_transit.gre_tunnels.update(tunnel_identifier, \*, account_id, \*\*params) -> GRETunnelUpdateResponse - client.magic_transit.gre_tunnels.list(\*, account_id) -> GRETunnelListResponse -- client.magic_transit.gre_tunnels.delete(tunnel_identifier, \*, account_id) -> GRETunnelDeleteResponse -- client.magic_transit.gre_tunnels.get(tunnel_identifier, \*, account_id) -> GRETunnelGetResponse ## IPSECTunnels @@ -4031,22 +4016,14 @@ Types: from cloudflare.types.magic_transit import ( PSKMetadata, IPSECTunnelCreateResponse, - IPSECTunnelUpdateResponse, IPSECTunnelListResponse, - IPSECTunnelDeleteResponse, - IPSECTunnelGetResponse, - IPSECTunnelPSKGenerateResponse, ) ``` Methods: - client.magic_transit.ipsec_tunnels.create(\*, account_id, \*\*params) -> IPSECTunnelCreateResponse -- client.magic_transit.ipsec_tunnels.update(tunnel_identifier, \*, account_id, \*\*params) -> IPSECTunnelUpdateResponse - client.magic_transit.ipsec_tunnels.list(\*, account_id) -> IPSECTunnelListResponse -- client.magic_transit.ipsec_tunnels.delete(tunnel_identifier, \*, account_id) -> IPSECTunnelDeleteResponse -- client.magic_transit.ipsec_tunnels.get(tunnel_identifier, \*, account_id) -> IPSECTunnelGetResponse -- client.magic_transit.ipsec_tunnels.psk_generate(tunnel_identifier, \*, account_id, \*\*params) -> IPSECTunnelPSKGenerateResponse ## Routes @@ -4056,22 +4033,16 @@ Types: from cloudflare.types.magic_transit import ( Scope, RouteCreateResponse, - RouteUpdateResponse, RouteListResponse, - RouteDeleteResponse, RouteEmptyResponse, - RouteGetResponse, ) ``` Methods: - client.magic_transit.routes.create(\*, account_id, \*\*params) -> RouteCreateResponse -- client.magic_transit.routes.update(route_identifier, \*, account_id, \*\*params) -> RouteUpdateResponse - client.magic_transit.routes.list(\*, account_id) -> RouteListResponse -- client.magic_transit.routes.delete(route_identifier, \*, account_id) -> RouteDeleteResponse - client.magic_transit.routes.empty(\*, account_id) -> RouteEmptyResponse -- client.magic_transit.routes.get(route_identifier, \*, account_id) -> RouteGetResponse ## Sites @@ -4101,11 +4072,7 @@ from cloudflare.types.magic_transit.sites import ACL, ACLConfiguration, AllowedP Methods: - client.magic_transit.sites.acls.create(site_id, \*, account_id, \*\*params) -> ACL -- client.magic_transit.sites.acls.update(acl_identifier, \*, account_id, site_id, \*\*params) -> ACL - client.magic_transit.sites.acls.list(site_id, \*, account_id) -> SyncSinglePage[ACL] -- client.magic_transit.sites.acls.delete(acl_identifier, \*, account_id, site_id) -> ACL -- client.magic_transit.sites.acls.edit(acl_identifier, \*, account_id, site_id, \*\*params) -> ACL -- client.magic_transit.sites.acls.get(acl_identifier, \*, account_id, site_id) -> ACL ### LANs diff --git a/src/cloudflare/resources/magic_transit/cf_interconnects.py b/src/cloudflare/resources/magic_transit/cf_interconnects.py index 753c1abf218..18f79e0181f 100644 --- a/src/cloudflare/resources/magic_transit/cf_interconnects.py +++ b/src/cloudflare/resources/magic_transit/cf_interconnects.py @@ -7,10 +7,6 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -23,10 +19,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.magic_transit import cf_interconnect_update_params -from ...types.magic_transit.cf_interconnect_get_response import CfInterconnectGetResponse from ...types.magic_transit.cf_interconnect_list_response import CfInterconnectListResponse -from ...types.magic_transit.cf_interconnect_update_response import CfInterconnectUpdateResponse __all__ = ["CfInterconnectsResource", "AsyncCfInterconnectsResource"] @@ -40,79 +33,6 @@ def with_raw_response(self) -> CfInterconnectsResourceWithRawResponse: def with_streaming_response(self) -> CfInterconnectsResourceWithStreamingResponse: return CfInterconnectsResourceWithStreamingResponse(self) - def update( - self, - tunnel_identifier: str, - *, - account_id: str, - description: str | NotGiven = NOT_GIVEN, - gre: cf_interconnect_update_params.GRE | NotGiven = NOT_GIVEN, - health_check: cf_interconnect_update_params.HealthCheck | NotGiven = NOT_GIVEN, - interface_address: str | NotGiven = NOT_GIVEN, - mtu: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CfInterconnectUpdateResponse: - """Updates a specific interconnect associated with an account. - - Use - `?validate_only=true` as an optional query parameter to only run validation - without persisting changes. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - description: An optional description of the interconnect. - - gre: The configuration specific to GRE interconnects. - - interface_address: A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side - of the tunnel. Select the subnet from the following private IP space: - 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. - - mtu: The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum - value is 576. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return self._put( - f"/accounts/{account_id}/magic/cf_interconnects/{tunnel_identifier}", - body=maybe_transform( - { - "description": description, - "gre": gre, - "health_check": health_check, - "interface_address": interface_address, - "mtu": mtu, - }, - cf_interconnect_update_params.CfInterconnectUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[CfInterconnectUpdateResponse]._unwrapper, - ), - cast_to=cast(Type[CfInterconnectUpdateResponse], ResultWrapper[CfInterconnectUpdateResponse]), - ) - def list( self, *, @@ -152,50 +72,6 @@ def list( cast_to=cast(Type[CfInterconnectListResponse], ResultWrapper[CfInterconnectListResponse]), ) - def get( - self, - tunnel_identifier: str, - *, - account_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CfInterconnectGetResponse: - """ - Lists details for a specific interconnect. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return self._get( - f"/accounts/{account_id}/magic/cf_interconnects/{tunnel_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[CfInterconnectGetResponse]._unwrapper, - ), - cast_to=cast(Type[CfInterconnectGetResponse], ResultWrapper[CfInterconnectGetResponse]), - ) - class AsyncCfInterconnectsResource(AsyncAPIResource): @cached_property @@ -206,79 +82,6 @@ def with_raw_response(self) -> AsyncCfInterconnectsResourceWithRawResponse: def with_streaming_response(self) -> AsyncCfInterconnectsResourceWithStreamingResponse: return AsyncCfInterconnectsResourceWithStreamingResponse(self) - async def update( - self, - tunnel_identifier: str, - *, - account_id: str, - description: str | NotGiven = NOT_GIVEN, - gre: cf_interconnect_update_params.GRE | NotGiven = NOT_GIVEN, - health_check: cf_interconnect_update_params.HealthCheck | NotGiven = NOT_GIVEN, - interface_address: str | NotGiven = NOT_GIVEN, - mtu: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CfInterconnectUpdateResponse: - """Updates a specific interconnect associated with an account. - - Use - `?validate_only=true` as an optional query parameter to only run validation - without persisting changes. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - description: An optional description of the interconnect. - - gre: The configuration specific to GRE interconnects. - - interface_address: A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side - of the tunnel. Select the subnet from the following private IP space: - 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. - - mtu: The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum - value is 576. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return await self._put( - f"/accounts/{account_id}/magic/cf_interconnects/{tunnel_identifier}", - body=await async_maybe_transform( - { - "description": description, - "gre": gre, - "health_check": health_check, - "interface_address": interface_address, - "mtu": mtu, - }, - cf_interconnect_update_params.CfInterconnectUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[CfInterconnectUpdateResponse]._unwrapper, - ), - cast_to=cast(Type[CfInterconnectUpdateResponse], ResultWrapper[CfInterconnectUpdateResponse]), - ) - async def list( self, *, @@ -318,106 +121,38 @@ async def list( cast_to=cast(Type[CfInterconnectListResponse], ResultWrapper[CfInterconnectListResponse]), ) - async def get( - self, - tunnel_identifier: str, - *, - account_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CfInterconnectGetResponse: - """ - Lists details for a specific interconnect. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return await self._get( - f"/accounts/{account_id}/magic/cf_interconnects/{tunnel_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[CfInterconnectGetResponse]._unwrapper, - ), - cast_to=cast(Type[CfInterconnectGetResponse], ResultWrapper[CfInterconnectGetResponse]), - ) - class CfInterconnectsResourceWithRawResponse: def __init__(self, cf_interconnects: CfInterconnectsResource) -> None: self._cf_interconnects = cf_interconnects - self.update = to_raw_response_wrapper( - cf_interconnects.update, - ) self.list = to_raw_response_wrapper( cf_interconnects.list, ) - self.get = to_raw_response_wrapper( - cf_interconnects.get, - ) class AsyncCfInterconnectsResourceWithRawResponse: def __init__(self, cf_interconnects: AsyncCfInterconnectsResource) -> None: self._cf_interconnects = cf_interconnects - self.update = async_to_raw_response_wrapper( - cf_interconnects.update, - ) self.list = async_to_raw_response_wrapper( cf_interconnects.list, ) - self.get = async_to_raw_response_wrapper( - cf_interconnects.get, - ) class CfInterconnectsResourceWithStreamingResponse: def __init__(self, cf_interconnects: CfInterconnectsResource) -> None: self._cf_interconnects = cf_interconnects - self.update = to_streamed_response_wrapper( - cf_interconnects.update, - ) self.list = to_streamed_response_wrapper( cf_interconnects.list, ) - self.get = to_streamed_response_wrapper( - cf_interconnects.get, - ) class AsyncCfInterconnectsResourceWithStreamingResponse: def __init__(self, cf_interconnects: AsyncCfInterconnectsResource) -> None: self._cf_interconnects = cf_interconnects - self.update = async_to_streamed_response_wrapper( - cf_interconnects.update, - ) self.list = async_to_streamed_response_wrapper( cf_interconnects.list, ) - self.get = async_to_streamed_response_wrapper( - cf_interconnects.get, - ) diff --git a/src/cloudflare/resources/magic_transit/gre_tunnels.py b/src/cloudflare/resources/magic_transit/gre_tunnels.py index 7129aeb334e..fcb6f9c3a58 100644 --- a/src/cloudflare/resources/magic_transit/gre_tunnels.py +++ b/src/cloudflare/resources/magic_transit/gre_tunnels.py @@ -23,13 +23,9 @@ from ..._base_client import ( make_request_options, ) -from ...types.magic_transit import gre_tunnel_create_params, gre_tunnel_update_params -from ...types.magic_transit.health_check_param import HealthCheckParam -from ...types.magic_transit.gre_tunnel_get_response import GRETunnelGetResponse +from ...types.magic_transit import gre_tunnel_create_params from ...types.magic_transit.gre_tunnel_list_response import GRETunnelListResponse from ...types.magic_transit.gre_tunnel_create_response import GRETunnelCreateResponse -from ...types.magic_transit.gre_tunnel_delete_response import GRETunnelDeleteResponse -from ...types.magic_transit.gre_tunnel_update_response import GRETunnelUpdateResponse __all__ = ["GRETunnelsResource", "AsyncGRETunnelsResource"] @@ -86,91 +82,6 @@ def create( cast_to=cast(Type[GRETunnelCreateResponse], ResultWrapper[GRETunnelCreateResponse]), ) - def update( - self, - tunnel_identifier: str, - *, - account_id: str, - cloudflare_gre_endpoint: str, - customer_gre_endpoint: str, - interface_address: str, - name: str, - description: str | NotGiven = NOT_GIVEN, - health_check: HealthCheckParam | NotGiven = NOT_GIVEN, - mtu: int | NotGiven = NOT_GIVEN, - ttl: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> GRETunnelUpdateResponse: - """Updates a specific GRE tunnel. - - Use `?validate_only=true` as an optional query - parameter to only run validation without persisting changes. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - cloudflare_gre_endpoint: The IP address assigned to the Cloudflare side of the GRE tunnel. - - customer_gre_endpoint: The IP address assigned to the customer side of the GRE tunnel. - - interface_address: A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side - of the tunnel. Select the subnet from the following private IP space: - 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. - - name: The name of the tunnel. The name cannot contain spaces or special characters, - must be 15 characters or less, and cannot share a name with another GRE tunnel. - - description: An optional description of the GRE tunnel. - - mtu: Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value - is 576. - - ttl: Time To Live (TTL) in number of hops of the GRE tunnel. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return self._put( - f"/accounts/{account_id}/magic/gre_tunnels/{tunnel_identifier}", - body=maybe_transform( - { - "cloudflare_gre_endpoint": cloudflare_gre_endpoint, - "customer_gre_endpoint": customer_gre_endpoint, - "interface_address": interface_address, - "name": name, - "description": description, - "health_check": health_check, - "mtu": mtu, - "ttl": ttl, - }, - gre_tunnel_update_params.GRETunnelUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[GRETunnelUpdateResponse]._unwrapper, - ), - cast_to=cast(Type[GRETunnelUpdateResponse], ResultWrapper[GRETunnelUpdateResponse]), - ) - def list( self, *, @@ -210,96 +121,6 @@ def list( cast_to=cast(Type[GRETunnelListResponse], ResultWrapper[GRETunnelListResponse]), ) - def delete( - self, - tunnel_identifier: str, - *, - account_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> GRETunnelDeleteResponse: - """Disables and removes a specific static GRE tunnel. - - Use `?validate_only=true` as - an optional query parameter to only run validation without persisting changes. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return self._delete( - f"/accounts/{account_id}/magic/gre_tunnels/{tunnel_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[GRETunnelDeleteResponse]._unwrapper, - ), - cast_to=cast(Type[GRETunnelDeleteResponse], ResultWrapper[GRETunnelDeleteResponse]), - ) - - def get( - self, - tunnel_identifier: str, - *, - account_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> GRETunnelGetResponse: - """ - Lists informtion for a specific GRE tunnel. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return self._get( - f"/accounts/{account_id}/magic/gre_tunnels/{tunnel_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[GRETunnelGetResponse]._unwrapper, - ), - cast_to=cast(Type[GRETunnelGetResponse], ResultWrapper[GRETunnelGetResponse]), - ) - class AsyncGRETunnelsResource(AsyncAPIResource): @cached_property @@ -353,91 +174,6 @@ async def create( cast_to=cast(Type[GRETunnelCreateResponse], ResultWrapper[GRETunnelCreateResponse]), ) - async def update( - self, - tunnel_identifier: str, - *, - account_id: str, - cloudflare_gre_endpoint: str, - customer_gre_endpoint: str, - interface_address: str, - name: str, - description: str | NotGiven = NOT_GIVEN, - health_check: HealthCheckParam | NotGiven = NOT_GIVEN, - mtu: int | NotGiven = NOT_GIVEN, - ttl: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> GRETunnelUpdateResponse: - """Updates a specific GRE tunnel. - - Use `?validate_only=true` as an optional query - parameter to only run validation without persisting changes. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - cloudflare_gre_endpoint: The IP address assigned to the Cloudflare side of the GRE tunnel. - - customer_gre_endpoint: The IP address assigned to the customer side of the GRE tunnel. - - interface_address: A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side - of the tunnel. Select the subnet from the following private IP space: - 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. - - name: The name of the tunnel. The name cannot contain spaces or special characters, - must be 15 characters or less, and cannot share a name with another GRE tunnel. - - description: An optional description of the GRE tunnel. - - mtu: Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value - is 576. - - ttl: Time To Live (TTL) in number of hops of the GRE tunnel. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return await self._put( - f"/accounts/{account_id}/magic/gre_tunnels/{tunnel_identifier}", - body=await async_maybe_transform( - { - "cloudflare_gre_endpoint": cloudflare_gre_endpoint, - "customer_gre_endpoint": customer_gre_endpoint, - "interface_address": interface_address, - "name": name, - "description": description, - "health_check": health_check, - "mtu": mtu, - "ttl": ttl, - }, - gre_tunnel_update_params.GRETunnelUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[GRETunnelUpdateResponse]._unwrapper, - ), - cast_to=cast(Type[GRETunnelUpdateResponse], ResultWrapper[GRETunnelUpdateResponse]), - ) - async def list( self, *, @@ -477,96 +213,6 @@ async def list( cast_to=cast(Type[GRETunnelListResponse], ResultWrapper[GRETunnelListResponse]), ) - async def delete( - self, - tunnel_identifier: str, - *, - account_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> GRETunnelDeleteResponse: - """Disables and removes a specific static GRE tunnel. - - Use `?validate_only=true` as - an optional query parameter to only run validation without persisting changes. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return await self._delete( - f"/accounts/{account_id}/magic/gre_tunnels/{tunnel_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[GRETunnelDeleteResponse]._unwrapper, - ), - cast_to=cast(Type[GRETunnelDeleteResponse], ResultWrapper[GRETunnelDeleteResponse]), - ) - - async def get( - self, - tunnel_identifier: str, - *, - account_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> GRETunnelGetResponse: - """ - Lists informtion for a specific GRE tunnel. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return await self._get( - f"/accounts/{account_id}/magic/gre_tunnels/{tunnel_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[GRETunnelGetResponse]._unwrapper, - ), - cast_to=cast(Type[GRETunnelGetResponse], ResultWrapper[GRETunnelGetResponse]), - ) - class GRETunnelsResourceWithRawResponse: def __init__(self, gre_tunnels: GRETunnelsResource) -> None: @@ -575,18 +221,9 @@ def __init__(self, gre_tunnels: GRETunnelsResource) -> None: self.create = to_raw_response_wrapper( gre_tunnels.create, ) - self.update = to_raw_response_wrapper( - gre_tunnels.update, - ) self.list = to_raw_response_wrapper( gre_tunnels.list, ) - self.delete = to_raw_response_wrapper( - gre_tunnels.delete, - ) - self.get = to_raw_response_wrapper( - gre_tunnels.get, - ) class AsyncGRETunnelsResourceWithRawResponse: @@ -596,18 +233,9 @@ def __init__(self, gre_tunnels: AsyncGRETunnelsResource) -> None: self.create = async_to_raw_response_wrapper( gre_tunnels.create, ) - self.update = async_to_raw_response_wrapper( - gre_tunnels.update, - ) self.list = async_to_raw_response_wrapper( gre_tunnels.list, ) - self.delete = async_to_raw_response_wrapper( - gre_tunnels.delete, - ) - self.get = async_to_raw_response_wrapper( - gre_tunnels.get, - ) class GRETunnelsResourceWithStreamingResponse: @@ -617,18 +245,9 @@ def __init__(self, gre_tunnels: GRETunnelsResource) -> None: self.create = to_streamed_response_wrapper( gre_tunnels.create, ) - self.update = to_streamed_response_wrapper( - gre_tunnels.update, - ) self.list = to_streamed_response_wrapper( gre_tunnels.list, ) - self.delete = to_streamed_response_wrapper( - gre_tunnels.delete, - ) - self.get = to_streamed_response_wrapper( - gre_tunnels.get, - ) class AsyncGRETunnelsResourceWithStreamingResponse: @@ -638,15 +257,6 @@ def __init__(self, gre_tunnels: AsyncGRETunnelsResource) -> None: self.create = async_to_streamed_response_wrapper( gre_tunnels.create, ) - self.update = async_to_streamed_response_wrapper( - gre_tunnels.update, - ) self.list = async_to_streamed_response_wrapper( gre_tunnels.list, ) - self.delete = async_to_streamed_response_wrapper( - gre_tunnels.delete, - ) - self.get = async_to_streamed_response_wrapper( - gre_tunnels.get, - ) diff --git a/src/cloudflare/resources/magic_transit/ipsec_tunnels.py b/src/cloudflare/resources/magic_transit/ipsec_tunnels.py index 02240b292b4..847d54acb25 100644 --- a/src/cloudflare/resources/magic_transit/ipsec_tunnels.py +++ b/src/cloudflare/resources/magic_transit/ipsec_tunnels.py @@ -23,18 +23,10 @@ from ..._base_client import ( make_request_options, ) -from ...types.magic_transit import ( - ipsec_tunnel_create_params, - ipsec_tunnel_update_params, - ipsec_tunnel_psk_generate_params, -) +from ...types.magic_transit import ipsec_tunnel_create_params from ...types.magic_transit.health_check_param import HealthCheckParam -from ...types.magic_transit.ipsec_tunnel_get_response import IPSECTunnelGetResponse from ...types.magic_transit.ipsec_tunnel_list_response import IPSECTunnelListResponse from ...types.magic_transit.ipsec_tunnel_create_response import IPSECTunnelCreateResponse -from ...types.magic_transit.ipsec_tunnel_delete_response import IPSECTunnelDeleteResponse -from ...types.magic_transit.ipsec_tunnel_update_response import IPSECTunnelUpdateResponse -from ...types.magic_transit.ipsec_tunnel_psk_generate_response import IPSECTunnelPSKGenerateResponse __all__ = ["IPSECTunnelsResource", "AsyncIPSECTunnelsResource"] @@ -129,92 +121,6 @@ def create( cast_to=cast(Type[IPSECTunnelCreateResponse], ResultWrapper[IPSECTunnelCreateResponse]), ) - def update( - self, - tunnel_identifier: str, - *, - account_id: str, - cloudflare_endpoint: str, - interface_address: str, - name: str, - customer_endpoint: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - health_check: HealthCheckParam | NotGiven = NOT_GIVEN, - psk: str | NotGiven = NOT_GIVEN, - replay_protection: bool | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IPSECTunnelUpdateResponse: - """Updates a specific IPsec tunnel associated with an account. - - Use - `?validate_only=true` as an optional query parameter to only run validation - without persisting changes. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - cloudflare_endpoint: The IP address assigned to the Cloudflare side of the IPsec tunnel. - - interface_address: A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side - of the tunnel. Select the subnet from the following private IP space: - 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. - - name: The name of the IPsec tunnel. The name cannot share a name with other tunnels. - - customer_endpoint: The IP address assigned to the customer side of the IPsec tunnel. Not required, - but must be set for proactive traceroutes to work. - - description: An optional description forthe IPsec tunnel. - - psk: A randomly generated or provided string for use in the IPsec tunnel. - - replay_protection: If `true`, then IPsec replay protection will be supported in the - Cloudflare-to-customer direction. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return self._put( - f"/accounts/{account_id}/magic/ipsec_tunnels/{tunnel_identifier}", - body=maybe_transform( - { - "cloudflare_endpoint": cloudflare_endpoint, - "interface_address": interface_address, - "name": name, - "customer_endpoint": customer_endpoint, - "description": description, - "health_check": health_check, - "psk": psk, - "replay_protection": replay_protection, - }, - ipsec_tunnel_update_params.IPSECTunnelUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[IPSECTunnelUpdateResponse]._unwrapper, - ), - cast_to=cast(Type[IPSECTunnelUpdateResponse], ResultWrapper[IPSECTunnelUpdateResponse]), - ) - def list( self, *, @@ -254,146 +160,6 @@ def list( cast_to=cast(Type[IPSECTunnelListResponse], ResultWrapper[IPSECTunnelListResponse]), ) - def delete( - self, - tunnel_identifier: str, - *, - account_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IPSECTunnelDeleteResponse: - """ - Disables and removes a specific static IPsec Tunnel associated with an account. - Use `?validate_only=true` as an optional query parameter to only run validation - without persisting changes. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return self._delete( - f"/accounts/{account_id}/magic/ipsec_tunnels/{tunnel_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[IPSECTunnelDeleteResponse]._unwrapper, - ), - cast_to=cast(Type[IPSECTunnelDeleteResponse], ResultWrapper[IPSECTunnelDeleteResponse]), - ) - - def get( - self, - tunnel_identifier: str, - *, - account_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IPSECTunnelGetResponse: - """ - Lists details for a specific IPsec tunnel. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return self._get( - f"/accounts/{account_id}/magic/ipsec_tunnels/{tunnel_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[IPSECTunnelGetResponse]._unwrapper, - ), - cast_to=cast(Type[IPSECTunnelGetResponse], ResultWrapper[IPSECTunnelGetResponse]), - ) - - def psk_generate( - self, - tunnel_identifier: str, - *, - account_id: str, - body: object, - # 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, - ) -> IPSECTunnelPSKGenerateResponse: - """ - Generates a Pre Shared Key for a specific IPsec tunnel used in the IKE session. - Use `?validate_only=true` as an optional query parameter to only run validation - without persisting changes. After a PSK is generated, the PSK is immediately - persisted to Cloudflare's edge and cannot be retrieved later. Note the PSK in a - safe place. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return self._post( - f"/accounts/{account_id}/magic/ipsec_tunnels/{tunnel_identifier}/psk_generate", - body=maybe_transform(body, ipsec_tunnel_psk_generate_params.IPSECTunnelPSKGenerateParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[IPSECTunnelPSKGenerateResponse]._unwrapper, - ), - cast_to=cast(Type[IPSECTunnelPSKGenerateResponse], ResultWrapper[IPSECTunnelPSKGenerateResponse]), - ) - class AsyncIPSECTunnelsResource(AsyncAPIResource): @cached_property @@ -485,92 +251,6 @@ async def create( cast_to=cast(Type[IPSECTunnelCreateResponse], ResultWrapper[IPSECTunnelCreateResponse]), ) - async def update( - self, - tunnel_identifier: str, - *, - account_id: str, - cloudflare_endpoint: str, - interface_address: str, - name: str, - customer_endpoint: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - health_check: HealthCheckParam | NotGiven = NOT_GIVEN, - psk: str | NotGiven = NOT_GIVEN, - replay_protection: bool | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IPSECTunnelUpdateResponse: - """Updates a specific IPsec tunnel associated with an account. - - Use - `?validate_only=true` as an optional query parameter to only run validation - without persisting changes. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - cloudflare_endpoint: The IP address assigned to the Cloudflare side of the IPsec tunnel. - - interface_address: A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side - of the tunnel. Select the subnet from the following private IP space: - 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. - - name: The name of the IPsec tunnel. The name cannot share a name with other tunnels. - - customer_endpoint: The IP address assigned to the customer side of the IPsec tunnel. Not required, - but must be set for proactive traceroutes to work. - - description: An optional description forthe IPsec tunnel. - - psk: A randomly generated or provided string for use in the IPsec tunnel. - - replay_protection: If `true`, then IPsec replay protection will be supported in the - Cloudflare-to-customer direction. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return await self._put( - f"/accounts/{account_id}/magic/ipsec_tunnels/{tunnel_identifier}", - body=await async_maybe_transform( - { - "cloudflare_endpoint": cloudflare_endpoint, - "interface_address": interface_address, - "name": name, - "customer_endpoint": customer_endpoint, - "description": description, - "health_check": health_check, - "psk": psk, - "replay_protection": replay_protection, - }, - ipsec_tunnel_update_params.IPSECTunnelUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[IPSECTunnelUpdateResponse]._unwrapper, - ), - cast_to=cast(Type[IPSECTunnelUpdateResponse], ResultWrapper[IPSECTunnelUpdateResponse]), - ) - async def list( self, *, @@ -610,146 +290,6 @@ async def list( cast_to=cast(Type[IPSECTunnelListResponse], ResultWrapper[IPSECTunnelListResponse]), ) - async def delete( - self, - tunnel_identifier: str, - *, - account_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IPSECTunnelDeleteResponse: - """ - Disables and removes a specific static IPsec Tunnel associated with an account. - Use `?validate_only=true` as an optional query parameter to only run validation - without persisting changes. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return await self._delete( - f"/accounts/{account_id}/magic/ipsec_tunnels/{tunnel_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[IPSECTunnelDeleteResponse]._unwrapper, - ), - cast_to=cast(Type[IPSECTunnelDeleteResponse], ResultWrapper[IPSECTunnelDeleteResponse]), - ) - - async def get( - self, - tunnel_identifier: str, - *, - account_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IPSECTunnelGetResponse: - """ - Lists details for a specific IPsec tunnel. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return await self._get( - f"/accounts/{account_id}/magic/ipsec_tunnels/{tunnel_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[IPSECTunnelGetResponse]._unwrapper, - ), - cast_to=cast(Type[IPSECTunnelGetResponse], ResultWrapper[IPSECTunnelGetResponse]), - ) - - async def psk_generate( - self, - tunnel_identifier: str, - *, - account_id: str, - body: object, - # 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, - ) -> IPSECTunnelPSKGenerateResponse: - """ - Generates a Pre Shared Key for a specific IPsec tunnel used in the IKE session. - Use `?validate_only=true` as an optional query parameter to only run validation - without persisting changes. After a PSK is generated, the PSK is immediately - persisted to Cloudflare's edge and cannot be retrieved later. Note the PSK in a - safe place. - - Args: - account_id: Identifier - - tunnel_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not tunnel_identifier: - raise ValueError(f"Expected a non-empty value for `tunnel_identifier` but received {tunnel_identifier!r}") - return await self._post( - f"/accounts/{account_id}/magic/ipsec_tunnels/{tunnel_identifier}/psk_generate", - body=await async_maybe_transform(body, ipsec_tunnel_psk_generate_params.IPSECTunnelPSKGenerateParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[IPSECTunnelPSKGenerateResponse]._unwrapper, - ), - cast_to=cast(Type[IPSECTunnelPSKGenerateResponse], ResultWrapper[IPSECTunnelPSKGenerateResponse]), - ) - class IPSECTunnelsResourceWithRawResponse: def __init__(self, ipsec_tunnels: IPSECTunnelsResource) -> None: @@ -758,21 +298,9 @@ def __init__(self, ipsec_tunnels: IPSECTunnelsResource) -> None: self.create = to_raw_response_wrapper( ipsec_tunnels.create, ) - self.update = to_raw_response_wrapper( - ipsec_tunnels.update, - ) self.list = to_raw_response_wrapper( ipsec_tunnels.list, ) - self.delete = to_raw_response_wrapper( - ipsec_tunnels.delete, - ) - self.get = to_raw_response_wrapper( - ipsec_tunnels.get, - ) - self.psk_generate = to_raw_response_wrapper( - ipsec_tunnels.psk_generate, - ) class AsyncIPSECTunnelsResourceWithRawResponse: @@ -782,21 +310,9 @@ def __init__(self, ipsec_tunnels: AsyncIPSECTunnelsResource) -> None: self.create = async_to_raw_response_wrapper( ipsec_tunnels.create, ) - self.update = async_to_raw_response_wrapper( - ipsec_tunnels.update, - ) self.list = async_to_raw_response_wrapper( ipsec_tunnels.list, ) - self.delete = async_to_raw_response_wrapper( - ipsec_tunnels.delete, - ) - self.get = async_to_raw_response_wrapper( - ipsec_tunnels.get, - ) - self.psk_generate = async_to_raw_response_wrapper( - ipsec_tunnels.psk_generate, - ) class IPSECTunnelsResourceWithStreamingResponse: @@ -806,21 +322,9 @@ def __init__(self, ipsec_tunnels: IPSECTunnelsResource) -> None: self.create = to_streamed_response_wrapper( ipsec_tunnels.create, ) - self.update = to_streamed_response_wrapper( - ipsec_tunnels.update, - ) self.list = to_streamed_response_wrapper( ipsec_tunnels.list, ) - self.delete = to_streamed_response_wrapper( - ipsec_tunnels.delete, - ) - self.get = to_streamed_response_wrapper( - ipsec_tunnels.get, - ) - self.psk_generate = to_streamed_response_wrapper( - ipsec_tunnels.psk_generate, - ) class AsyncIPSECTunnelsResourceWithStreamingResponse: @@ -830,18 +334,6 @@ def __init__(self, ipsec_tunnels: AsyncIPSECTunnelsResource) -> None: self.create = async_to_streamed_response_wrapper( ipsec_tunnels.create, ) - self.update = async_to_streamed_response_wrapper( - ipsec_tunnels.update, - ) self.list = async_to_streamed_response_wrapper( ipsec_tunnels.list, ) - self.delete = async_to_streamed_response_wrapper( - ipsec_tunnels.delete, - ) - self.get = async_to_streamed_response_wrapper( - ipsec_tunnels.get, - ) - self.psk_generate = async_to_streamed_response_wrapper( - ipsec_tunnels.psk_generate, - ) diff --git a/src/cloudflare/resources/magic_transit/routes.py b/src/cloudflare/resources/magic_transit/routes.py index d8eef542fc5..f8c1f1bb62a 100644 --- a/src/cloudflare/resources/magic_transit/routes.py +++ b/src/cloudflare/resources/magic_transit/routes.py @@ -23,14 +23,10 @@ from ..._base_client import ( make_request_options, ) -from ...types.magic_transit import route_create_params, route_update_params -from ...types.magic_transit.scope_param import ScopeParam -from ...types.magic_transit.route_get_response import RouteGetResponse +from ...types.magic_transit import route_create_params from ...types.magic_transit.route_list_response import RouteListResponse from ...types.magic_transit.route_empty_response import RouteEmptyResponse from ...types.magic_transit.route_create_response import RouteCreateResponse -from ...types.magic_transit.route_delete_response import RouteDeleteResponse -from ...types.magic_transit.route_update_response import RouteUpdateResponse __all__ = ["RoutesResource", "AsyncRoutesResource"] @@ -87,81 +83,6 @@ def create( cast_to=cast(Type[RouteCreateResponse], ResultWrapper[RouteCreateResponse]), ) - def update( - self, - route_identifier: str, - *, - account_id: str, - nexthop: str, - prefix: str, - priority: int, - description: str | NotGiven = NOT_GIVEN, - scope: ScopeParam | NotGiven = NOT_GIVEN, - weight: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteUpdateResponse: - """Update a specific Magic static route. - - Use `?validate_only=true` as an optional - query parameter to run validation only without persisting changes. - - Args: - account_id: Identifier - - route_identifier: Identifier - - nexthop: The next-hop IP Address for the static route. - - prefix: IP Prefix in Classless Inter-Domain Routing format. - - priority: Priority of the static route. - - description: An optional human provided description of the static route. - - scope: Used only for ECMP routes. - - weight: Optional weight of the ECMP scope - if provided. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not route_identifier: - raise ValueError(f"Expected a non-empty value for `route_identifier` but received {route_identifier!r}") - return self._put( - f"/accounts/{account_id}/magic/routes/{route_identifier}", - body=maybe_transform( - { - "nexthop": nexthop, - "prefix": prefix, - "priority": priority, - "description": description, - "scope": scope, - "weight": weight, - }, - route_update_params.RouteUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[RouteUpdateResponse]._unwrapper, - ), - cast_to=cast(Type[RouteUpdateResponse], ResultWrapper[RouteUpdateResponse]), - ) - def list( self, *, @@ -201,50 +122,6 @@ def list( cast_to=cast(Type[RouteListResponse], ResultWrapper[RouteListResponse]), ) - def delete( - self, - route_identifier: str, - *, - account_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteDeleteResponse: - """ - Disable and remove a specific Magic static route. - - Args: - account_id: Identifier - - route_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not route_identifier: - raise ValueError(f"Expected a non-empty value for `route_identifier` but received {route_identifier!r}") - return self._delete( - f"/accounts/{account_id}/magic/routes/{route_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[RouteDeleteResponse]._unwrapper, - ), - cast_to=cast(Type[RouteDeleteResponse], ResultWrapper[RouteDeleteResponse]), - ) - def empty( self, *, @@ -284,50 +161,6 @@ def empty( cast_to=cast(Type[RouteEmptyResponse], ResultWrapper[RouteEmptyResponse]), ) - def get( - self, - route_identifier: str, - *, - account_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteGetResponse: - """ - Get a specific Magic static route. - - Args: - account_id: Identifier - - route_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not route_identifier: - raise ValueError(f"Expected a non-empty value for `route_identifier` but received {route_identifier!r}") - return self._get( - f"/accounts/{account_id}/magic/routes/{route_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[RouteGetResponse]._unwrapper, - ), - cast_to=cast(Type[RouteGetResponse], ResultWrapper[RouteGetResponse]), - ) - class AsyncRoutesResource(AsyncAPIResource): @cached_property @@ -381,81 +214,6 @@ async def create( cast_to=cast(Type[RouteCreateResponse], ResultWrapper[RouteCreateResponse]), ) - async def update( - self, - route_identifier: str, - *, - account_id: str, - nexthop: str, - prefix: str, - priority: int, - description: str | NotGiven = NOT_GIVEN, - scope: ScopeParam | NotGiven = NOT_GIVEN, - weight: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteUpdateResponse: - """Update a specific Magic static route. - - Use `?validate_only=true` as an optional - query parameter to run validation only without persisting changes. - - Args: - account_id: Identifier - - route_identifier: Identifier - - nexthop: The next-hop IP Address for the static route. - - prefix: IP Prefix in Classless Inter-Domain Routing format. - - priority: Priority of the static route. - - description: An optional human provided description of the static route. - - scope: Used only for ECMP routes. - - weight: Optional weight of the ECMP scope - if provided. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not route_identifier: - raise ValueError(f"Expected a non-empty value for `route_identifier` but received {route_identifier!r}") - return await self._put( - f"/accounts/{account_id}/magic/routes/{route_identifier}", - body=await async_maybe_transform( - { - "nexthop": nexthop, - "prefix": prefix, - "priority": priority, - "description": description, - "scope": scope, - "weight": weight, - }, - route_update_params.RouteUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[RouteUpdateResponse]._unwrapper, - ), - cast_to=cast(Type[RouteUpdateResponse], ResultWrapper[RouteUpdateResponse]), - ) - async def list( self, *, @@ -495,50 +253,6 @@ async def list( cast_to=cast(Type[RouteListResponse], ResultWrapper[RouteListResponse]), ) - async def delete( - self, - route_identifier: str, - *, - account_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteDeleteResponse: - """ - Disable and remove a specific Magic static route. - - Args: - account_id: Identifier - - route_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not route_identifier: - raise ValueError(f"Expected a non-empty value for `route_identifier` but received {route_identifier!r}") - return await self._delete( - f"/accounts/{account_id}/magic/routes/{route_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[RouteDeleteResponse]._unwrapper, - ), - cast_to=cast(Type[RouteDeleteResponse], ResultWrapper[RouteDeleteResponse]), - ) - async def empty( self, *, @@ -578,50 +292,6 @@ async def empty( cast_to=cast(Type[RouteEmptyResponse], ResultWrapper[RouteEmptyResponse]), ) - async def get( - self, - route_identifier: str, - *, - account_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteGetResponse: - """ - Get a specific Magic static route. - - Args: - account_id: Identifier - - route_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not route_identifier: - raise ValueError(f"Expected a non-empty value for `route_identifier` but received {route_identifier!r}") - return await self._get( - f"/accounts/{account_id}/magic/routes/{route_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[RouteGetResponse]._unwrapper, - ), - cast_to=cast(Type[RouteGetResponse], ResultWrapper[RouteGetResponse]), - ) - class RoutesResourceWithRawResponse: def __init__(self, routes: RoutesResource) -> None: @@ -630,21 +300,12 @@ def __init__(self, routes: RoutesResource) -> None: self.create = to_raw_response_wrapper( routes.create, ) - self.update = to_raw_response_wrapper( - routes.update, - ) self.list = to_raw_response_wrapper( routes.list, ) - self.delete = to_raw_response_wrapper( - routes.delete, - ) self.empty = to_raw_response_wrapper( routes.empty, ) - self.get = to_raw_response_wrapper( - routes.get, - ) class AsyncRoutesResourceWithRawResponse: @@ -654,21 +315,12 @@ def __init__(self, routes: AsyncRoutesResource) -> None: self.create = async_to_raw_response_wrapper( routes.create, ) - self.update = async_to_raw_response_wrapper( - routes.update, - ) self.list = async_to_raw_response_wrapper( routes.list, ) - self.delete = async_to_raw_response_wrapper( - routes.delete, - ) self.empty = async_to_raw_response_wrapper( routes.empty, ) - self.get = async_to_raw_response_wrapper( - routes.get, - ) class RoutesResourceWithStreamingResponse: @@ -678,21 +330,12 @@ def __init__(self, routes: RoutesResource) -> None: self.create = to_streamed_response_wrapper( routes.create, ) - self.update = to_streamed_response_wrapper( - routes.update, - ) self.list = to_streamed_response_wrapper( routes.list, ) - self.delete = to_streamed_response_wrapper( - routes.delete, - ) self.empty = to_streamed_response_wrapper( routes.empty, ) - self.get = to_streamed_response_wrapper( - routes.get, - ) class AsyncRoutesResourceWithStreamingResponse: @@ -702,18 +345,9 @@ def __init__(self, routes: AsyncRoutesResource) -> None: self.create = async_to_streamed_response_wrapper( routes.create, ) - self.update = async_to_streamed_response_wrapper( - routes.update, - ) self.list = async_to_streamed_response_wrapper( routes.list, ) - self.delete = async_to_streamed_response_wrapper( - routes.delete, - ) self.empty = async_to_streamed_response_wrapper( routes.empty, ) - self.get = async_to_streamed_response_wrapper( - routes.get, - ) diff --git a/src/cloudflare/resources/magic_transit/sites/acls.py b/src/cloudflare/resources/magic_transit/sites/acls.py index 8c6e537f60b..c5ac6f1d672 100644 --- a/src/cloudflare/resources/magic_transit/sites/acls.py +++ b/src/cloudflare/resources/magic_transit/sites/acls.py @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ....types.magic_transit.sites import acl_edit_params, acl_create_params, acl_update_params +from ....types.magic_transit.sites import acl_create_params from ....types.magic_transit.sites.acl import ACL from ....types.magic_transit.sites.allowed_protocol import AllowedProtocol from ....types.magic_transit.sites.acl_configuration_param import ACLConfigurationParam @@ -112,81 +112,6 @@ def create( cast_to=cast(Type[ACL], ResultWrapper[ACL]), ) - def update( - self, - acl_identifier: str, - *, - account_id: str, - site_id: str, - description: str | NotGiven = NOT_GIVEN, - forward_locally: bool | NotGiven = NOT_GIVEN, - lan_1: ACLConfigurationParam | NotGiven = NOT_GIVEN, - lan_2: ACLConfigurationParam | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - protocols: List[AllowedProtocol] | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ACL: - """ - Update a specific Site ACL. - - Args: - account_id: Identifier - - site_id: Identifier - - acl_identifier: Identifier - - description: Description for the ACL. - - forward_locally: The desired forwarding action for this ACL policy. If set to "false", the policy - will forward traffic to Cloudflare. If set to "true", the policy will forward - traffic locally on the Magic Connector. If not included in request, will default - to false. - - name: The name of the ACL. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not site_id: - raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") - if not acl_identifier: - raise ValueError(f"Expected a non-empty value for `acl_identifier` but received {acl_identifier!r}") - return self._put( - f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_identifier}", - body=maybe_transform( - { - "description": description, - "forward_locally": forward_locally, - "lan_1": lan_1, - "lan_2": lan_2, - "name": name, - "protocols": protocols, - }, - acl_update_params.ACLUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ACL]._unwrapper, - ), - cast_to=cast(Type[ACL], ResultWrapper[ACL]), - ) - def list( self, site_id: str, @@ -228,179 +153,6 @@ def list( model=ACL, ) - def delete( - self, - acl_identifier: str, - *, - account_id: str, - site_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ACL: - """ - Remove a specific Site ACL. - - Args: - account_id: Identifier - - site_id: Identifier - - acl_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not site_id: - raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") - if not acl_identifier: - raise ValueError(f"Expected a non-empty value for `acl_identifier` but received {acl_identifier!r}") - return self._delete( - f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ACL]._unwrapper, - ), - cast_to=cast(Type[ACL], ResultWrapper[ACL]), - ) - - def edit( - self, - acl_identifier: str, - *, - account_id: str, - site_id: str, - description: str | NotGiven = NOT_GIVEN, - forward_locally: bool | NotGiven = NOT_GIVEN, - lan_1: ACLConfigurationParam | NotGiven = NOT_GIVEN, - lan_2: ACLConfigurationParam | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - protocols: List[AllowedProtocol] | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ACL: - """ - Patch a specific Site ACL. - - Args: - account_id: Identifier - - site_id: Identifier - - acl_identifier: Identifier - - description: Description for the ACL. - - forward_locally: The desired forwarding action for this ACL policy. If set to "false", the policy - will forward traffic to Cloudflare. If set to "true", the policy will forward - traffic locally on the Magic Connector. If not included in request, will default - to false. - - name: The name of the ACL. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not site_id: - raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") - if not acl_identifier: - raise ValueError(f"Expected a non-empty value for `acl_identifier` but received {acl_identifier!r}") - return self._patch( - f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_identifier}", - body=maybe_transform( - { - "description": description, - "forward_locally": forward_locally, - "lan_1": lan_1, - "lan_2": lan_2, - "name": name, - "protocols": protocols, - }, - acl_edit_params.ACLEditParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ACL]._unwrapper, - ), - cast_to=cast(Type[ACL], ResultWrapper[ACL]), - ) - - def get( - self, - acl_identifier: str, - *, - account_id: str, - site_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ACL: - """ - Get a specific Site ACL. - - Args: - account_id: Identifier - - site_id: Identifier - - acl_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not site_id: - raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") - if not acl_identifier: - raise ValueError(f"Expected a non-empty value for `acl_identifier` but received {acl_identifier!r}") - return self._get( - f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ACL]._unwrapper, - ), - cast_to=cast(Type[ACL], ResultWrapper[ACL]), - ) - class AsyncACLsResource(AsyncAPIResource): @cached_property @@ -481,81 +233,6 @@ async def create( cast_to=cast(Type[ACL], ResultWrapper[ACL]), ) - async def update( - self, - acl_identifier: str, - *, - account_id: str, - site_id: str, - description: str | NotGiven = NOT_GIVEN, - forward_locally: bool | NotGiven = NOT_GIVEN, - lan_1: ACLConfigurationParam | NotGiven = NOT_GIVEN, - lan_2: ACLConfigurationParam | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - protocols: List[AllowedProtocol] | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ACL: - """ - Update a specific Site ACL. - - Args: - account_id: Identifier - - site_id: Identifier - - acl_identifier: Identifier - - description: Description for the ACL. - - forward_locally: The desired forwarding action for this ACL policy. If set to "false", the policy - will forward traffic to Cloudflare. If set to "true", the policy will forward - traffic locally on the Magic Connector. If not included in request, will default - to false. - - name: The name of the ACL. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not site_id: - raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") - if not acl_identifier: - raise ValueError(f"Expected a non-empty value for `acl_identifier` but received {acl_identifier!r}") - return await self._put( - f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_identifier}", - body=await async_maybe_transform( - { - "description": description, - "forward_locally": forward_locally, - "lan_1": lan_1, - "lan_2": lan_2, - "name": name, - "protocols": protocols, - }, - acl_update_params.ACLUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ACL]._unwrapper, - ), - cast_to=cast(Type[ACL], ResultWrapper[ACL]), - ) - def list( self, site_id: str, @@ -597,179 +274,6 @@ def list( model=ACL, ) - async def delete( - self, - acl_identifier: str, - *, - account_id: str, - site_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ACL: - """ - Remove a specific Site ACL. - - Args: - account_id: Identifier - - site_id: Identifier - - acl_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not site_id: - raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") - if not acl_identifier: - raise ValueError(f"Expected a non-empty value for `acl_identifier` but received {acl_identifier!r}") - return await self._delete( - f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ACL]._unwrapper, - ), - cast_to=cast(Type[ACL], ResultWrapper[ACL]), - ) - - async def edit( - self, - acl_identifier: str, - *, - account_id: str, - site_id: str, - description: str | NotGiven = NOT_GIVEN, - forward_locally: bool | NotGiven = NOT_GIVEN, - lan_1: ACLConfigurationParam | NotGiven = NOT_GIVEN, - lan_2: ACLConfigurationParam | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - protocols: List[AllowedProtocol] | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ACL: - """ - Patch a specific Site ACL. - - Args: - account_id: Identifier - - site_id: Identifier - - acl_identifier: Identifier - - description: Description for the ACL. - - forward_locally: The desired forwarding action for this ACL policy. If set to "false", the policy - will forward traffic to Cloudflare. If set to "true", the policy will forward - traffic locally on the Magic Connector. If not included in request, will default - to false. - - name: The name of the ACL. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not site_id: - raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") - if not acl_identifier: - raise ValueError(f"Expected a non-empty value for `acl_identifier` but received {acl_identifier!r}") - return await self._patch( - f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_identifier}", - body=await async_maybe_transform( - { - "description": description, - "forward_locally": forward_locally, - "lan_1": lan_1, - "lan_2": lan_2, - "name": name, - "protocols": protocols, - }, - acl_edit_params.ACLEditParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ACL]._unwrapper, - ), - cast_to=cast(Type[ACL], ResultWrapper[ACL]), - ) - - async def get( - self, - acl_identifier: str, - *, - account_id: str, - site_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ACL: - """ - Get a specific Site ACL. - - Args: - account_id: Identifier - - site_id: Identifier - - acl_identifier: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not site_id: - raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") - if not acl_identifier: - raise ValueError(f"Expected a non-empty value for `acl_identifier` but received {acl_identifier!r}") - return await self._get( - f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_identifier}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ACL]._unwrapper, - ), - cast_to=cast(Type[ACL], ResultWrapper[ACL]), - ) - class ACLsResourceWithRawResponse: def __init__(self, acls: ACLsResource) -> None: @@ -778,21 +282,9 @@ def __init__(self, acls: ACLsResource) -> None: self.create = to_raw_response_wrapper( acls.create, ) - self.update = to_raw_response_wrapper( - acls.update, - ) self.list = to_raw_response_wrapper( acls.list, ) - self.delete = to_raw_response_wrapper( - acls.delete, - ) - self.edit = to_raw_response_wrapper( - acls.edit, - ) - self.get = to_raw_response_wrapper( - acls.get, - ) class AsyncACLsResourceWithRawResponse: @@ -802,21 +294,9 @@ def __init__(self, acls: AsyncACLsResource) -> None: self.create = async_to_raw_response_wrapper( acls.create, ) - self.update = async_to_raw_response_wrapper( - acls.update, - ) self.list = async_to_raw_response_wrapper( acls.list, ) - self.delete = async_to_raw_response_wrapper( - acls.delete, - ) - self.edit = async_to_raw_response_wrapper( - acls.edit, - ) - self.get = async_to_raw_response_wrapper( - acls.get, - ) class ACLsResourceWithStreamingResponse: @@ -826,21 +306,9 @@ def __init__(self, acls: ACLsResource) -> None: self.create = to_streamed_response_wrapper( acls.create, ) - self.update = to_streamed_response_wrapper( - acls.update, - ) self.list = to_streamed_response_wrapper( acls.list, ) - self.delete = to_streamed_response_wrapper( - acls.delete, - ) - self.edit = to_streamed_response_wrapper( - acls.edit, - ) - self.get = to_streamed_response_wrapper( - acls.get, - ) class AsyncACLsResourceWithStreamingResponse: @@ -850,18 +318,6 @@ def __init__(self, acls: AsyncACLsResource) -> None: self.create = async_to_streamed_response_wrapper( acls.create, ) - self.update = async_to_streamed_response_wrapper( - acls.update, - ) self.list = async_to_streamed_response_wrapper( acls.list, ) - self.delete = async_to_streamed_response_wrapper( - acls.delete, - ) - self.edit = async_to_streamed_response_wrapper( - acls.edit, - ) - self.get = async_to_streamed_response_wrapper( - acls.get, - ) diff --git a/src/cloudflare/types/magic_transit/__init__.py b/src/cloudflare/types/magic_transit/__init__.py index ad2327c5724..446a433bc84 100644 --- a/src/cloudflare/types/magic_transit/__init__.py +++ b/src/cloudflare/types/magic_transit/__init__.py @@ -4,7 +4,6 @@ from .site import Site as Site from .scope import Scope as Scope -from .scope_param import ScopeParam as ScopeParam from .health_check import HealthCheck as HealthCheck from .psk_metadata import PSKMetadata as PSKMetadata from .site_location import SiteLocation as SiteLocation @@ -16,7 +15,6 @@ from .health_check_rate import HealthCheckRate as HealthCheckRate from .health_check_type import HealthCheckType as HealthCheckType from .health_check_param import HealthCheckParam as HealthCheckParam -from .route_get_response import RouteGetResponse as RouteGetResponse from .site_create_params import SiteCreateParams as SiteCreateParams from .site_update_params import SiteUpdateParams as SiteUpdateParams from .app_create_response import AppCreateResponse as AppCreateResponse @@ -24,35 +22,19 @@ from .app_update_response import AppUpdateResponse as AppUpdateResponse from .route_create_params import RouteCreateParams as RouteCreateParams from .route_list_response import RouteListResponse as RouteListResponse -from .route_update_params import RouteUpdateParams as RouteUpdateParams from .site_location_param import SiteLocationParam as SiteLocationParam from .route_empty_response import RouteEmptyResponse as RouteEmptyResponse from .connector_edit_params import ConnectorEditParams as ConnectorEditParams 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 .connector_get_response import ConnectorGetResponse as ConnectorGetResponse from .connector_edit_response import ConnectorEditResponse as ConnectorEditResponse from .connector_list_response import ConnectorListResponse as ConnectorListResponse from .connector_update_params import ConnectorUpdateParams as ConnectorUpdateParams -from .gre_tunnel_get_response import GRETunnelGetResponse as GRETunnelGetResponse from .gre_tunnel_create_params import GRETunnelCreateParams as GRETunnelCreateParams from .gre_tunnel_list_response import GRETunnelListResponse as GRETunnelListResponse -from .gre_tunnel_update_params import GRETunnelUpdateParams as GRETunnelUpdateParams from .connector_update_response import ConnectorUpdateResponse as ConnectorUpdateResponse -from .ipsec_tunnel_get_response import IPSECTunnelGetResponse as IPSECTunnelGetResponse from .gre_tunnel_create_response import GRETunnelCreateResponse as GRETunnelCreateResponse -from .gre_tunnel_delete_response import GRETunnelDeleteResponse as GRETunnelDeleteResponse -from .gre_tunnel_update_response import GRETunnelUpdateResponse as GRETunnelUpdateResponse from .ipsec_tunnel_create_params import IPSECTunnelCreateParams as IPSECTunnelCreateParams from .ipsec_tunnel_list_response import IPSECTunnelListResponse as IPSECTunnelListResponse -from .ipsec_tunnel_update_params import IPSECTunnelUpdateParams as IPSECTunnelUpdateParams -from .cf_interconnect_get_response import CfInterconnectGetResponse as CfInterconnectGetResponse from .ipsec_tunnel_create_response import IPSECTunnelCreateResponse as IPSECTunnelCreateResponse -from .ipsec_tunnel_delete_response import IPSECTunnelDeleteResponse as IPSECTunnelDeleteResponse -from .ipsec_tunnel_update_response import IPSECTunnelUpdateResponse as IPSECTunnelUpdateResponse from .cf_interconnect_list_response import CfInterconnectListResponse as CfInterconnectListResponse -from .cf_interconnect_update_params import CfInterconnectUpdateParams as CfInterconnectUpdateParams -from .cf_interconnect_update_response import CfInterconnectUpdateResponse as CfInterconnectUpdateResponse -from .ipsec_tunnel_psk_generate_params import IPSECTunnelPSKGenerateParams as IPSECTunnelPSKGenerateParams -from .ipsec_tunnel_psk_generate_response import IPSECTunnelPSKGenerateResponse as IPSECTunnelPSKGenerateResponse diff --git a/src/cloudflare/types/magic_transit/cf_interconnect_get_response.py b/src/cloudflare/types/magic_transit/cf_interconnect_get_response.py deleted file mode 100644 index 1693571a82a..00000000000 --- a/src/cloudflare/types/magic_transit/cf_interconnect_get_response.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["CfInterconnectGetResponse"] - - -class CfInterconnectGetResponse(BaseModel): - interconnect: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/cf_interconnect_update_params.py b/src/cloudflare/types/magic_transit/cf_interconnect_update_params.py deleted file mode 100644 index 00fca27a8f2..00000000000 --- a/src/cloudflare/types/magic_transit/cf_interconnect_update_params.py +++ /dev/null @@ -1,63 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -from .health_check_rate import HealthCheckRate -from .health_check_type import HealthCheckType - -__all__ = ["CfInterconnectUpdateParams", "GRE", "HealthCheck"] - - -class CfInterconnectUpdateParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - description: str - """An optional description of the interconnect.""" - - gre: GRE - """The configuration specific to GRE interconnects.""" - - health_check: HealthCheck - - interface_address: str - """ - A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side - of the tunnel. Select the subnet from the following private IP space: - 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. - """ - - mtu: int - """The Maximum Transmission Unit (MTU) in bytes for the interconnect. - - The minimum value is 576. - """ - - -class GRE(TypedDict, total=False): - cloudflare_endpoint: str - """ - The IP address assigned to the Cloudflare side of the GRE tunnel created as part - of the Interconnect. - """ - - -class HealthCheck(TypedDict, total=False): - enabled: bool - """Determines whether to run healthchecks for a tunnel.""" - - rate: HealthCheckRate - """How frequent the health check is run. The default value is `mid`.""" - - target: str - """The destination address in a request type health check. - - After the healthcheck is decapsulated at the customer end of the tunnel, the - ICMP echo will be forwarded to this address. This field defaults to - `customer_gre_endpoint address`. - """ - - type: HealthCheckType - """The type of healthcheck to run, reply or request. The default value is `reply`.""" diff --git a/src/cloudflare/types/magic_transit/cf_interconnect_update_response.py b/src/cloudflare/types/magic_transit/cf_interconnect_update_response.py deleted file mode 100644 index e21d22dbd40..00000000000 --- a/src/cloudflare/types/magic_transit/cf_interconnect_update_response.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["CfInterconnectUpdateResponse"] - - -class CfInterconnectUpdateResponse(BaseModel): - modified: Optional[bool] = None - - modified_interconnect: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_delete_response.py b/src/cloudflare/types/magic_transit/gre_tunnel_delete_response.py deleted file mode 100644 index 5165f2dcc3b..00000000000 --- a/src/cloudflare/types/magic_transit/gre_tunnel_delete_response.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["GRETunnelDeleteResponse"] - - -class GRETunnelDeleteResponse(BaseModel): - deleted: Optional[bool] = None - - deleted_gre_tunnel: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_get_response.py b/src/cloudflare/types/magic_transit/gre_tunnel_get_response.py deleted file mode 100644 index 141c70992f1..00000000000 --- a/src/cloudflare/types/magic_transit/gre_tunnel_get_response.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["GRETunnelGetResponse"] - - -class GRETunnelGetResponse(BaseModel): - gre_tunnel: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_update_params.py b/src/cloudflare/types/magic_transit/gre_tunnel_update_params.py deleted file mode 100644 index 6d891bbe546..00000000000 --- a/src/cloudflare/types/magic_transit/gre_tunnel_update_params.py +++ /dev/null @@ -1,48 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -from .health_check_param import HealthCheckParam - -__all__ = ["GRETunnelUpdateParams"] - - -class GRETunnelUpdateParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - cloudflare_gre_endpoint: Required[str] - """The IP address assigned to the Cloudflare side of the GRE tunnel.""" - - customer_gre_endpoint: Required[str] - """The IP address assigned to the customer side of the GRE tunnel.""" - - interface_address: Required[str] - """ - A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side - of the tunnel. Select the subnet from the following private IP space: - 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. - """ - - name: Required[str] - """The name of the tunnel. - - The name cannot contain spaces or special characters, must be 15 characters or - less, and cannot share a name with another GRE tunnel. - """ - - description: str - """An optional description of the GRE tunnel.""" - - health_check: HealthCheckParam - - mtu: int - """Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. - - The minimum value is 576. - """ - - ttl: int - """Time To Live (TTL) in number of hops of the GRE tunnel.""" diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_update_response.py b/src/cloudflare/types/magic_transit/gre_tunnel_update_response.py deleted file mode 100644 index c84ba582d7e..00000000000 --- a/src/cloudflare/types/magic_transit/gre_tunnel_update_response.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["GRETunnelUpdateResponse"] - - -class GRETunnelUpdateResponse(BaseModel): - modified: Optional[bool] = None - - modified_gre_tunnel: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_delete_response.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_delete_response.py deleted file mode 100644 index b39ba183f72..00000000000 --- a/src/cloudflare/types/magic_transit/ipsec_tunnel_delete_response.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["IPSECTunnelDeleteResponse"] - - -class IPSECTunnelDeleteResponse(BaseModel): - deleted: Optional[bool] = None - - deleted_ipsec_tunnel: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_get_response.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_get_response.py deleted file mode 100644 index 816098c9ead..00000000000 --- a/src/cloudflare/types/magic_transit/ipsec_tunnel_get_response.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["IPSECTunnelGetResponse"] - - -class IPSECTunnelGetResponse(BaseModel): - ipsec_tunnel: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_params.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_params.py deleted file mode 100644 index 1066fa603d1..00000000000 --- a/src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["IPSECTunnelPSKGenerateParams"] - - -class IPSECTunnelPSKGenerateParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - body: Required[object] diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_response.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_response.py deleted file mode 100644 index 9c4438b1456..00000000000 --- a/src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_response.py +++ /dev/null @@ -1,19 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel -from .psk_metadata import PSKMetadata - -__all__ = ["IPSECTunnelPSKGenerateResponse"] - - -class IPSECTunnelPSKGenerateResponse(BaseModel): - ipsec_tunnel_id: Optional[str] = None - """Identifier""" - - psk: Optional[str] = None - """A randomly generated or provided string for use in the IPsec tunnel.""" - - psk_metadata: Optional[PSKMetadata] = None - """The PSK metadata that includes when the PSK was generated.""" diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_update_params.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_update_params.py deleted file mode 100644 index 8a0170e0345..00000000000 --- a/src/cloudflare/types/magic_transit/ipsec_tunnel_update_params.py +++ /dev/null @@ -1,47 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -from .health_check_param import HealthCheckParam - -__all__ = ["IPSECTunnelUpdateParams"] - - -class IPSECTunnelUpdateParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - cloudflare_endpoint: Required[str] - """The IP address assigned to the Cloudflare side of the IPsec tunnel.""" - - interface_address: Required[str] - """ - A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side - of the tunnel. Select the subnet from the following private IP space: - 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. - """ - - name: Required[str] - """The name of the IPsec tunnel. The name cannot share a name with other tunnels.""" - - customer_endpoint: str - """The IP address assigned to the customer side of the IPsec tunnel. - - Not required, but must be set for proactive traceroutes to work. - """ - - description: str - """An optional description forthe IPsec tunnel.""" - - health_check: HealthCheckParam - - psk: str - """A randomly generated or provided string for use in the IPsec tunnel.""" - - replay_protection: bool - """ - If `true`, then IPsec replay protection will be supported in the - Cloudflare-to-customer direction. - """ diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_update_response.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_update_response.py deleted file mode 100644 index 8a7b92e2b11..00000000000 --- a/src/cloudflare/types/magic_transit/ipsec_tunnel_update_response.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["IPSECTunnelUpdateResponse"] - - -class IPSECTunnelUpdateResponse(BaseModel): - modified: Optional[bool] = None - - modified_ipsec_tunnel: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/route_delete_response.py b/src/cloudflare/types/magic_transit/route_delete_response.py deleted file mode 100644 index 096e4ece8f1..00000000000 --- a/src/cloudflare/types/magic_transit/route_delete_response.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["RouteDeleteResponse"] - - -class RouteDeleteResponse(BaseModel): - deleted: Optional[bool] = None - - deleted_route: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/route_get_response.py b/src/cloudflare/types/magic_transit/route_get_response.py deleted file mode 100644 index f23ba2c2ec4..00000000000 --- a/src/cloudflare/types/magic_transit/route_get_response.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["RouteGetResponse"] - - -class RouteGetResponse(BaseModel): - route: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/route_update_params.py b/src/cloudflare/types/magic_transit/route_update_params.py deleted file mode 100644 index 14d10ad42c0..00000000000 --- a/src/cloudflare/types/magic_transit/route_update_params.py +++ /dev/null @@ -1,32 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -from .scope_param import ScopeParam - -__all__ = ["RouteUpdateParams"] - - -class RouteUpdateParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - nexthop: Required[str] - """The next-hop IP Address for the static route.""" - - prefix: Required[str] - """IP Prefix in Classless Inter-Domain Routing format.""" - - priority: Required[int] - """Priority of the static route.""" - - description: str - """An optional human provided description of the static route.""" - - scope: ScopeParam - """Used only for ECMP routes.""" - - weight: int - """Optional weight of the ECMP scope - if provided.""" diff --git a/src/cloudflare/types/magic_transit/route_update_response.py b/src/cloudflare/types/magic_transit/route_update_response.py deleted file mode 100644 index 33b497d969f..00000000000 --- a/src/cloudflare/types/magic_transit/route_update_response.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["RouteUpdateResponse"] - - -class RouteUpdateResponse(BaseModel): - modified: Optional[bool] = None - - modified_route: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/scope_param.py b/src/cloudflare/types/magic_transit/scope_param.py deleted file mode 100644 index 95df559e364..00000000000 --- a/src/cloudflare/types/magic_transit/scope_param.py +++ /dev/null @@ -1,16 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List -from typing_extensions import TypedDict - -__all__ = ["ScopeParam"] - - -class ScopeParam(TypedDict, total=False): - colo_names: List[str] - """List of colo names for the ECMP scope.""" - - colo_regions: List[str] - """List of colo regions for the ECMP scope.""" diff --git a/src/cloudflare/types/magic_transit/sites/__init__.py b/src/cloudflare/types/magic_transit/sites/__init__.py index 38f592bb4e6..14816eed960 100644 --- a/src/cloudflare/types/magic_transit/sites/__init__.py +++ b/src/cloudflare/types/magic_transit/sites/__init__.py @@ -12,14 +12,12 @@ from .dhcp_server import DHCPServer as DHCPServer from .subnet_param import SubnetParam as SubnetParam from .routed_subnet import RoutedSubnet as RoutedSubnet -from .acl_edit_params import ACLEditParams as ACLEditParams from .lan_edit_params import LANEditParams as LANEditParams from .wan_edit_params import WANEditParams as WANEditParams from .allowed_protocol import AllowedProtocol as AllowedProtocol from .dhcp_relay_param import DHCPRelayParam as DHCPRelayParam from .acl_configuration import ACLConfiguration as ACLConfiguration from .acl_create_params import ACLCreateParams as ACLCreateParams -from .acl_update_params import ACLUpdateParams as ACLUpdateParams from .dhcp_server_param import DHCPServerParam as DHCPServerParam from .lan_create_params import LANCreateParams as LANCreateParams from .lan_update_params import LANUpdateParams as LANUpdateParams diff --git a/src/cloudflare/types/magic_transit/sites/acl_edit_params.py b/src/cloudflare/types/magic_transit/sites/acl_edit_params.py deleted file mode 100644 index 8a6c7b0f5c6..00000000000 --- a/src/cloudflare/types/magic_transit/sites/acl_edit_params.py +++ /dev/null @@ -1,39 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List -from typing_extensions import Required, TypedDict - -from .allowed_protocol import AllowedProtocol -from .acl_configuration_param import ACLConfigurationParam - -__all__ = ["ACLEditParams"] - - -class ACLEditParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - site_id: Required[str] - """Identifier""" - - description: str - """Description for the ACL.""" - - forward_locally: bool - """The desired forwarding action for this ACL policy. - - If set to "false", the policy will forward traffic to Cloudflare. If set to - "true", the policy will forward traffic locally on the Magic Connector. If not - included in request, will default to false. - """ - - lan_1: ACLConfigurationParam - - lan_2: ACLConfigurationParam - - name: str - """The name of the ACL.""" - - protocols: List[AllowedProtocol] diff --git a/src/cloudflare/types/magic_transit/sites/acl_update_params.py b/src/cloudflare/types/magic_transit/sites/acl_update_params.py deleted file mode 100644 index 5abc70c2329..00000000000 --- a/src/cloudflare/types/magic_transit/sites/acl_update_params.py +++ /dev/null @@ -1,39 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List -from typing_extensions import Required, TypedDict - -from .allowed_protocol import AllowedProtocol -from .acl_configuration_param import ACLConfigurationParam - -__all__ = ["ACLUpdateParams"] - - -class ACLUpdateParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - site_id: Required[str] - """Identifier""" - - description: str - """Description for the ACL.""" - - forward_locally: bool - """The desired forwarding action for this ACL policy. - - If set to "false", the policy will forward traffic to Cloudflare. If set to - "true", the policy will forward traffic locally on the Magic Connector. If not - included in request, will default to false. - """ - - lan_1: ACLConfigurationParam - - lan_2: ACLConfigurationParam - - name: str - """The name of the ACL.""" - - protocols: List[AllowedProtocol] diff --git a/tests/api_resources/magic_transit/sites/test_acls.py b/tests/api_resources/magic_transit/sites/test_acls.py index 4bcac3f4126..10ffc357c63 100644 --- a/tests/api_resources/magic_transit/sites/test_acls.py +++ b/tests/api_resources/magic_transit/sites/test_acls.py @@ -10,9 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.magic_transit.sites import ( - ACL, -) +from cloudflare.types.magic_transit.sites import ACL base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -107,91 +105,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="PIN Pad - Cash Register", ) - @parametrize - def test_method_update(self, client: Cloudflare) -> None: - acl = client.magic_transit.sites.acls.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - def test_method_update_with_all_params(self, client: Cloudflare) -> None: - acl = client.magic_transit.sites.acls.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - description="Allows local traffic between PIN pads and cash register.", - forward_locally=True, - lan_1={ - "lan_id": "string", - "lan_name": "string", - "ports": [1, 1, 1], - "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], - }, - lan_2={ - "lan_id": "string", - "lan_name": "string", - "ports": [1, 1, 1], - "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], - }, - name="PIN Pad - Cash Register", - protocols=["tcp", "udp", "icmp"], - ) - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - def test_raw_response_update(self, client: Cloudflare) -> None: - response = client.magic_transit.sites.acls.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - acl = response.parse() - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - def test_streaming_response_update(self, client: Cloudflare) -> None: - with client.magic_transit.sites.acls.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - acl = response.parse() - assert_matches_type(ACL, acl, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_update(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.magic_transit.sites.acls.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): - client.magic_transit.sites.acls.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_identifier` but received ''"): - client.magic_transit.sites.acls.with_raw_response.update( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - @parametrize def test_method_list(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.list( @@ -240,211 +153,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - @parametrize - def test_method_delete(self, client: Cloudflare) -> None: - acl = client.magic_transit.sites.acls.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - def test_raw_response_delete(self, client: Cloudflare) -> None: - response = client.magic_transit.sites.acls.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - acl = response.parse() - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - def test_streaming_response_delete(self, client: Cloudflare) -> None: - with client.magic_transit.sites.acls.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - acl = response.parse() - assert_matches_type(ACL, acl, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_delete(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.magic_transit.sites.acls.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): - client.magic_transit.sites.acls.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_identifier` but received ''"): - client.magic_transit.sites.acls.with_raw_response.delete( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - acl = client.magic_transit.sites.acls.edit( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - def test_method_edit_with_all_params(self, client: Cloudflare) -> None: - acl = client.magic_transit.sites.acls.edit( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - description="Allows local traffic between PIN pads and cash register.", - forward_locally=True, - lan_1={ - "lan_id": "string", - "lan_name": "string", - "ports": [1, 1, 1], - "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], - }, - lan_2={ - "lan_id": "string", - "lan_name": "string", - "ports": [1, 1, 1], - "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], - }, - name="PIN Pad - Cash Register", - protocols=["tcp", "udp", "icmp"], - ) - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.magic_transit.sites.acls.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - acl = response.parse() - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.magic_transit.sites.acls.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - acl = response.parse() - assert_matches_type(ACL, acl, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_edit(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.magic_transit.sites.acls.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): - client.magic_transit.sites.acls.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_identifier` but received ''"): - client.magic_transit.sites.acls.with_raw_response.edit( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - acl = client.magic_transit.sites.acls.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.magic_transit.sites.acls.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - acl = response.parse() - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.magic_transit.sites.acls.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - acl = response.parse() - assert_matches_type(ACL, acl, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.magic_transit.sites.acls.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): - client.magic_transit.sites.acls.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_identifier` but received ''"): - client.magic_transit.sites.acls.with_raw_response.get( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - class TestAsyncACLs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -536,91 +244,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="PIN Pad - Cash Register", ) - @parametrize - async def test_method_update(self, async_client: AsyncCloudflare) -> None: - acl = await async_client.magic_transit.sites.acls.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: - acl = await async_client.magic_transit.sites.acls.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - description="Allows local traffic between PIN pads and cash register.", - forward_locally=True, - lan_1={ - "lan_id": "string", - "lan_name": "string", - "ports": [1, 1, 1], - "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], - }, - lan_2={ - "lan_id": "string", - "lan_name": "string", - "ports": [1, 1, 1], - "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], - }, - name="PIN Pad - Cash Register", - protocols=["tcp", "udp", "icmp"], - ) - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: - response = await async_client.magic_transit.sites.acls.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - acl = await response.parse() - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: - async with async_client.magic_transit.sites.acls.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - acl = await response.parse() - assert_matches_type(ACL, acl, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.magic_transit.sites.acls.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): - await async_client.magic_transit.sites.acls.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_identifier` but received ''"): - await async_client.magic_transit.sites.acls.with_raw_response.update( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.list( @@ -668,208 +291,3 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - - @parametrize - async def test_method_delete(self, async_client: AsyncCloudflare) -> None: - acl = await async_client.magic_transit.sites.acls.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: - response = await async_client.magic_transit.sites.acls.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - acl = await response.parse() - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: - async with async_client.magic_transit.sites.acls.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - acl = await response.parse() - assert_matches_type(ACL, acl, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.magic_transit.sites.acls.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): - await async_client.magic_transit.sites.acls.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_identifier` but received ''"): - await async_client.magic_transit.sites.acls.with_raw_response.delete( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - acl = await async_client.magic_transit.sites.acls.edit( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: - acl = await async_client.magic_transit.sites.acls.edit( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - description="Allows local traffic between PIN pads and cash register.", - forward_locally=True, - lan_1={ - "lan_id": "string", - "lan_name": "string", - "ports": [1, 1, 1], - "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], - }, - lan_2={ - "lan_id": "string", - "lan_name": "string", - "ports": [1, 1, 1], - "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], - }, - name="PIN Pad - Cash Register", - protocols=["tcp", "udp", "icmp"], - ) - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.magic_transit.sites.acls.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - acl = await response.parse() - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.magic_transit.sites.acls.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - acl = await response.parse() - assert_matches_type(ACL, acl, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.magic_transit.sites.acls.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): - await async_client.magic_transit.sites.acls.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_identifier` but received ''"): - await async_client.magic_transit.sites.acls.with_raw_response.edit( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - acl = await async_client.magic_transit.sites.acls.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.magic_transit.sites.acls.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - acl = await response.parse() - assert_matches_type(ACL, acl, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.magic_transit.sites.acls.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - acl = await response.parse() - assert_matches_type(ACL, acl, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.magic_transit.sites.acls.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): - await async_client.magic_transit.sites.acls.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_identifier` but received ''"): - await async_client.magic_transit.sites.acls.with_raw_response.get( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - site_id="023e105f4ecef8ad9ca31a8372d0c353", - ) diff --git a/tests/api_resources/magic_transit/test_cf_interconnects.py b/tests/api_resources/magic_transit/test_cf_interconnects.py index 8869b789a89..836520620fb 100644 --- a/tests/api_resources/magic_transit/test_cf_interconnects.py +++ b/tests/api_resources/magic_transit/test_cf_interconnects.py @@ -9,11 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_transit import ( - CfInterconnectGetResponse, - CfInterconnectListResponse, - CfInterconnectUpdateResponse, -) +from cloudflare.types.magic_transit import CfInterconnectListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,72 +17,6 @@ class TestCfInterconnects: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @parametrize - def test_method_update(self, client: Cloudflare) -> None: - cf_interconnect = client.magic_transit.cf_interconnects.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) - - @parametrize - def test_method_update_with_all_params(self, client: Cloudflare) -> None: - cf_interconnect = client.magic_transit.cf_interconnects.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - description="Tunnel for Interconnect to ORD", - gre={"cloudflare_endpoint": "203.0.113.1"}, - health_check={ - "enabled": True, - "rate": "low", - "target": "203.0.113.1", - "type": "request", - }, - interface_address="192.0.2.0/31", - mtu=0, - ) - assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) - - @parametrize - def test_raw_response_update(self, client: Cloudflare) -> None: - response = client.magic_transit.cf_interconnects.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - cf_interconnect = response.parse() - assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) - - @parametrize - def test_streaming_response_update(self, client: Cloudflare) -> None: - with client.magic_transit.cf_interconnects.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - cf_interconnect = response.parse() - assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_update(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.magic_transit.cf_interconnects.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - client.magic_transit.cf_interconnects.with_raw_response.update( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - @parametrize def test_method_list(self, client: Cloudflare) -> None: cf_interconnect = client.magic_transit.cf_interconnects.list( @@ -125,124 +55,10 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - cf_interconnect = client.magic_transit.cf_interconnects.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.magic_transit.cf_interconnects.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - cf_interconnect = response.parse() - assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.magic_transit.cf_interconnects.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - cf_interconnect = response.parse() - assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.magic_transit.cf_interconnects.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - client.magic_transit.cf_interconnects.with_raw_response.get( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - class TestAsyncCfInterconnects: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @parametrize - async def test_method_update(self, async_client: AsyncCloudflare) -> None: - cf_interconnect = await async_client.magic_transit.cf_interconnects.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) - - @parametrize - async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: - cf_interconnect = await async_client.magic_transit.cf_interconnects.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - description="Tunnel for Interconnect to ORD", - gre={"cloudflare_endpoint": "203.0.113.1"}, - health_check={ - "enabled": True, - "rate": "low", - "target": "203.0.113.1", - "type": "request", - }, - interface_address="192.0.2.0/31", - mtu=0, - ) - assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) - - @parametrize - async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: - response = await async_client.magic_transit.cf_interconnects.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - cf_interconnect = await response.parse() - assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) - - @parametrize - async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: - async with async_client.magic_transit.cf_interconnects.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - cf_interconnect = await response.parse() - assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.magic_transit.cf_interconnects.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - await async_client.magic_transit.cf_interconnects.with_raw_response.update( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: cf_interconnect = await async_client.magic_transit.cf_interconnects.list( @@ -280,51 +96,3 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: await async_client.magic_transit.cf_interconnects.with_raw_response.list( account_id="", ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - cf_interconnect = await async_client.magic_transit.cf_interconnects.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.magic_transit.cf_interconnects.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - cf_interconnect = await response.parse() - assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.magic_transit.cf_interconnects.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - cf_interconnect = await response.parse() - assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.magic_transit.cf_interconnects.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - await async_client.magic_transit.cf_interconnects.with_raw_response.get( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) diff --git a/tests/api_resources/magic_transit/test_gre_tunnels.py b/tests/api_resources/magic_transit/test_gre_tunnels.py index 4b34df6809b..7cbc640a0f5 100644 --- a/tests/api_resources/magic_transit/test_gre_tunnels.py +++ b/tests/api_resources/magic_transit/test_gre_tunnels.py @@ -9,13 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_transit import ( - GRETunnelGetResponse, - GRETunnelListResponse, - GRETunnelCreateResponse, - GRETunnelDeleteResponse, - GRETunnelUpdateResponse, -) +from cloudflare.types.magic_transit import GRETunnelListResponse, GRETunnelCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -69,96 +63,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @parametrize - def test_method_update(self, client: Cloudflare) -> None: - gre_tunnel = client.magic_transit.gre_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_gre_endpoint="203.0.113.1", - customer_gre_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="GRE_1", - ) - assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) - - @parametrize - def test_method_update_with_all_params(self, client: Cloudflare) -> None: - gre_tunnel = client.magic_transit.gre_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_gre_endpoint="203.0.113.1", - customer_gre_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="GRE_1", - description="Tunnel for ISP X", - health_check={ - "direction": "bidirectional", - "enabled": True, - "rate": "low", - "target": "203.0.113.1", - "type": "request", - }, - mtu=0, - ttl=0, - ) - assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) - - @parametrize - def test_raw_response_update(self, client: Cloudflare) -> None: - response = client.magic_transit.gre_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_gre_endpoint="203.0.113.1", - customer_gre_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="GRE_1", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - gre_tunnel = response.parse() - assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) - - @parametrize - def test_streaming_response_update(self, client: Cloudflare) -> None: - with client.magic_transit.gre_tunnels.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_gre_endpoint="203.0.113.1", - customer_gre_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="GRE_1", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - gre_tunnel = response.parse() - assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_update(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.magic_transit.gre_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - cloudflare_gre_endpoint="203.0.113.1", - customer_gre_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="GRE_1", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - client.magic_transit.gre_tunnels.with_raw_response.update( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_gre_endpoint="203.0.113.1", - customer_gre_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="GRE_1", - ) - @parametrize def test_method_list(self, client: Cloudflare) -> None: gre_tunnel = client.magic_transit.gre_tunnels.list( @@ -197,102 +101,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @parametrize - def test_method_delete(self, client: Cloudflare) -> None: - gre_tunnel = client.magic_transit.gre_tunnels.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) - - @parametrize - def test_raw_response_delete(self, client: Cloudflare) -> None: - response = client.magic_transit.gre_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - gre_tunnel = response.parse() - assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) - - @parametrize - def test_streaming_response_delete(self, client: Cloudflare) -> None: - with client.magic_transit.gre_tunnels.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - gre_tunnel = response.parse() - assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_delete(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.magic_transit.gre_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - client.magic_transit.gre_tunnels.with_raw_response.delete( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - gre_tunnel = client.magic_transit.gre_tunnels.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.magic_transit.gre_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - gre_tunnel = response.parse() - assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.magic_transit.gre_tunnels.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - gre_tunnel = response.parse() - assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.magic_transit.gre_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - client.magic_transit.gre_tunnels.with_raw_response.get( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - class TestAsyncGRETunnels: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -343,96 +151,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @parametrize - async def test_method_update(self, async_client: AsyncCloudflare) -> None: - gre_tunnel = await async_client.magic_transit.gre_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_gre_endpoint="203.0.113.1", - customer_gre_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="GRE_1", - ) - assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) - - @parametrize - async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: - gre_tunnel = await async_client.magic_transit.gre_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_gre_endpoint="203.0.113.1", - customer_gre_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="GRE_1", - description="Tunnel for ISP X", - health_check={ - "direction": "bidirectional", - "enabled": True, - "rate": "low", - "target": "203.0.113.1", - "type": "request", - }, - mtu=0, - ttl=0, - ) - assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) - - @parametrize - async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: - response = await async_client.magic_transit.gre_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_gre_endpoint="203.0.113.1", - customer_gre_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="GRE_1", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - gre_tunnel = await response.parse() - assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) - - @parametrize - async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: - async with async_client.magic_transit.gre_tunnels.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_gre_endpoint="203.0.113.1", - customer_gre_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="GRE_1", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - gre_tunnel = await response.parse() - assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.magic_transit.gre_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - cloudflare_gre_endpoint="203.0.113.1", - customer_gre_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="GRE_1", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - await async_client.magic_transit.gre_tunnels.with_raw_response.update( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_gre_endpoint="203.0.113.1", - customer_gre_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="GRE_1", - ) - @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await async_client.magic_transit.gre_tunnels.list( @@ -470,99 +188,3 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: await async_client.magic_transit.gre_tunnels.with_raw_response.list( account_id="", ) - - @parametrize - async def test_method_delete(self, async_client: AsyncCloudflare) -> None: - gre_tunnel = await async_client.magic_transit.gre_tunnels.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) - - @parametrize - async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: - response = await async_client.magic_transit.gre_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - gre_tunnel = await response.parse() - assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) - - @parametrize - async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: - async with async_client.magic_transit.gre_tunnels.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - gre_tunnel = await response.parse() - assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.magic_transit.gre_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - await async_client.magic_transit.gre_tunnels.with_raw_response.delete( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - gre_tunnel = await async_client.magic_transit.gre_tunnels.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.magic_transit.gre_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - gre_tunnel = await response.parse() - assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.magic_transit.gre_tunnels.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - gre_tunnel = await response.parse() - assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.magic_transit.gre_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - await async_client.magic_transit.gre_tunnels.with_raw_response.get( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) diff --git a/tests/api_resources/magic_transit/test_ipsec_tunnels.py b/tests/api_resources/magic_transit/test_ipsec_tunnels.py index e4ea142af03..9f0d27fcfa5 100644 --- a/tests/api_resources/magic_transit/test_ipsec_tunnels.py +++ b/tests/api_resources/magic_transit/test_ipsec_tunnels.py @@ -10,12 +10,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.magic_transit import ( - IPSECTunnelGetResponse, IPSECTunnelListResponse, IPSECTunnelCreateResponse, - IPSECTunnelDeleteResponse, - IPSECTunnelUpdateResponse, - IPSECTunnelPSKGenerateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -95,91 +91,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="IPsec_1", ) - @parametrize - def test_method_update(self, client: Cloudflare) -> None: - ipsec_tunnel = client.magic_transit.ipsec_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="IPsec_1", - ) - assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) - - @parametrize - def test_method_update_with_all_params(self, client: Cloudflare) -> None: - ipsec_tunnel = client.magic_transit.ipsec_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="IPsec_1", - customer_endpoint="203.0.113.1", - description="Tunnel for ISP X", - health_check={ - "direction": "bidirectional", - "enabled": True, - "rate": "low", - "target": "203.0.113.1", - "type": "request", - }, - psk="O3bwKSjnaoCxDoUxjcq4Rk8ZKkezQUiy", - replay_protection=False, - ) - assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) - - @parametrize - def test_raw_response_update(self, client: Cloudflare) -> None: - response = client.magic_transit.ipsec_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="IPsec_1", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ipsec_tunnel = response.parse() - assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) - - @parametrize - def test_streaming_response_update(self, client: Cloudflare) -> None: - with client.magic_transit.ipsec_tunnels.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="IPsec_1", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ipsec_tunnel = response.parse() - assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_update(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.magic_transit.ipsec_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - cloudflare_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="IPsec_1", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - client.magic_transit.ipsec_tunnels.with_raw_response.update( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="IPsec_1", - ) - @parametrize def test_method_list(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.list( @@ -218,155 +129,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @parametrize - def test_method_delete(self, client: Cloudflare) -> None: - ipsec_tunnel = client.magic_transit.ipsec_tunnels.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) - - @parametrize - def test_raw_response_delete(self, client: Cloudflare) -> None: - response = client.magic_transit.ipsec_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ipsec_tunnel = response.parse() - assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) - - @parametrize - def test_streaming_response_delete(self, client: Cloudflare) -> None: - with client.magic_transit.ipsec_tunnels.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ipsec_tunnel = response.parse() - assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_delete(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.magic_transit.ipsec_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - client.magic_transit.ipsec_tunnels.with_raw_response.delete( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - ipsec_tunnel = client.magic_transit.ipsec_tunnels.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.magic_transit.ipsec_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ipsec_tunnel = response.parse() - assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.magic_transit.ipsec_tunnels.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ipsec_tunnel = response.parse() - assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.magic_transit.ipsec_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - client.magic_transit.ipsec_tunnels.with_raw_response.get( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - @parametrize - def test_method_psk_generate(self, client: Cloudflare) -> None: - ipsec_tunnel = client.magic_transit.ipsec_tunnels.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) - assert_matches_type(IPSECTunnelPSKGenerateResponse, ipsec_tunnel, path=["response"]) - - @parametrize - def test_raw_response_psk_generate(self, client: Cloudflare) -> None: - response = client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ipsec_tunnel = response.parse() - assert_matches_type(IPSECTunnelPSKGenerateResponse, ipsec_tunnel, path=["response"]) - - @parametrize - def test_streaming_response_psk_generate(self, client: Cloudflare) -> None: - with client.magic_transit.ipsec_tunnels.with_streaming_response.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ipsec_tunnel = response.parse() - assert_matches_type(IPSECTunnelPSKGenerateResponse, ipsec_tunnel, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_psk_generate(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - body={}, - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) - class TestAsyncIPSECTunnels: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -442,91 +204,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="IPsec_1", ) - @parametrize - async def test_method_update(self, async_client: AsyncCloudflare) -> None: - ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="IPsec_1", - ) - assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) - - @parametrize - async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: - ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="IPsec_1", - customer_endpoint="203.0.113.1", - description="Tunnel for ISP X", - health_check={ - "direction": "bidirectional", - "enabled": True, - "rate": "low", - "target": "203.0.113.1", - "type": "request", - }, - psk="O3bwKSjnaoCxDoUxjcq4Rk8ZKkezQUiy", - replay_protection=False, - ) - assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) - - @parametrize - async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: - response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="IPsec_1", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ipsec_tunnel = await response.parse() - assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) - - @parametrize - async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: - async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="IPsec_1", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ipsec_tunnel = await response.parse() - assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.magic_transit.ipsec_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - cloudflare_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="IPsec_1", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - await async_client.magic_transit.ipsec_tunnels.with_raw_response.update( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - cloudflare_endpoint="203.0.113.1", - interface_address="192.0.2.0/31", - name="IPsec_1", - ) - @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.list( @@ -564,152 +241,3 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: await async_client.magic_transit.ipsec_tunnels.with_raw_response.list( account_id="", ) - - @parametrize - async def test_method_delete(self, async_client: AsyncCloudflare) -> None: - ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) - - @parametrize - async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: - response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ipsec_tunnel = await response.parse() - assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) - - @parametrize - async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: - async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ipsec_tunnel = await response.parse() - assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.magic_transit.ipsec_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - await async_client.magic_transit.ipsec_tunnels.with_raw_response.delete( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ipsec_tunnel = await response.parse() - assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ipsec_tunnel = await response.parse() - assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.magic_transit.ipsec_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - await async_client.magic_transit.ipsec_tunnels.with_raw_response.get( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - @parametrize - async def test_method_psk_generate(self, async_client: AsyncCloudflare) -> None: - ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) - assert_matches_type(IPSECTunnelPSKGenerateResponse, ipsec_tunnel, path=["response"]) - - @parametrize - async def test_raw_response_psk_generate(self, async_client: AsyncCloudflare) -> None: - response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ipsec_tunnel = await response.parse() - assert_matches_type(IPSECTunnelPSKGenerateResponse, ipsec_tunnel, path=["response"]) - - @parametrize - async def test_streaming_response_psk_generate(self, async_client: AsyncCloudflare) -> None: - async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ipsec_tunnel = await response.parse() - assert_matches_type(IPSECTunnelPSKGenerateResponse, ipsec_tunnel, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_psk_generate(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - body={}, - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_identifier` but received ''"): - await async_client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body={}, - ) diff --git a/tests/api_resources/magic_transit/test_routes.py b/tests/api_resources/magic_transit/test_routes.py index 20866b7a330..78985a57c3d 100644 --- a/tests/api_resources/magic_transit/test_routes.py +++ b/tests/api_resources/magic_transit/test_routes.py @@ -10,12 +10,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.magic_transit import ( - RouteGetResponse, RouteListResponse, RouteEmptyResponse, RouteCreateResponse, - RouteDeleteResponse, - RouteUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -70,86 +67,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) - @parametrize - def test_method_update(self, client: Cloudflare) -> None: - route = client.magic_transit.routes.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - nexthop="203.0.113.1", - prefix="192.0.2.0/24", - priority=0, - ) - assert_matches_type(RouteUpdateResponse, route, path=["response"]) - - @parametrize - def test_method_update_with_all_params(self, client: Cloudflare) -> None: - route = client.magic_transit.routes.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - nexthop="203.0.113.1", - prefix="192.0.2.0/24", - priority=0, - description="New route for new prefix 203.0.113.1", - scope={ - "colo_names": ["den01", "den01", "den01"], - "colo_regions": ["APAC", "APAC", "APAC"], - }, - weight=0, - ) - assert_matches_type(RouteUpdateResponse, route, path=["response"]) - - @parametrize - def test_raw_response_update(self, client: Cloudflare) -> None: - response = client.magic_transit.routes.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - nexthop="203.0.113.1", - prefix="192.0.2.0/24", - priority=0, - ) - - 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"]) - - @parametrize - def test_streaming_response_update(self, client: Cloudflare) -> None: - with client.magic_transit.routes.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - nexthop="203.0.113.1", - prefix="192.0.2.0/24", - priority=0, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - route = response.parse() - assert_matches_type(RouteUpdateResponse, route, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_update(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.magic_transit.routes.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - nexthop="203.0.113.1", - prefix="192.0.2.0/24", - priority=0, - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_identifier` but received ''"): - client.magic_transit.routes.with_raw_response.update( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - nexthop="203.0.113.1", - prefix="192.0.2.0/24", - priority=0, - ) - @parametrize def test_method_list(self, client: Cloudflare) -> None: route = client.magic_transit.routes.list( @@ -188,54 +105,6 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) - @parametrize - def test_method_delete(self, client: Cloudflare) -> None: - route = client.magic_transit.routes.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(RouteDeleteResponse, route, path=["response"]) - - @parametrize - def test_raw_response_delete(self, client: Cloudflare) -> None: - response = client.magic_transit.routes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - 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"]) - - @parametrize - def test_streaming_response_delete(self, client: Cloudflare) -> None: - with client.magic_transit.routes.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - route = response.parse() - assert_matches_type(RouteDeleteResponse, route, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_delete(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.magic_transit.routes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_identifier` but received ''"): - client.magic_transit.routes.with_raw_response.delete( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - @parametrize def test_method_empty(self, client: Cloudflare) -> None: route = client.magic_transit.routes.empty( @@ -274,54 +143,6 @@ def test_path_params_empty(self, client: Cloudflare) -> None: account_id="", ) - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - route = client.magic_transit.routes.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(RouteGetResponse, route, path=["response"]) - - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.magic_transit.routes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - 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"]) - - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.magic_transit.routes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - route = response.parse() - assert_matches_type(RouteGetResponse, route, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.magic_transit.routes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_identifier` but received ''"): - client.magic_transit.routes.with_raw_response.get( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - class TestAsyncRoutes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -372,86 +193,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) - @parametrize - async def test_method_update(self, async_client: AsyncCloudflare) -> None: - route = await async_client.magic_transit.routes.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - nexthop="203.0.113.1", - prefix="192.0.2.0/24", - priority=0, - ) - assert_matches_type(RouteUpdateResponse, route, path=["response"]) - - @parametrize - async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: - route = await async_client.magic_transit.routes.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - nexthop="203.0.113.1", - prefix="192.0.2.0/24", - priority=0, - description="New route for new prefix 203.0.113.1", - scope={ - "colo_names": ["den01", "den01", "den01"], - "colo_regions": ["APAC", "APAC", "APAC"], - }, - weight=0, - ) - assert_matches_type(RouteUpdateResponse, route, path=["response"]) - - @parametrize - async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: - response = await async_client.magic_transit.routes.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - nexthop="203.0.113.1", - prefix="192.0.2.0/24", - priority=0, - ) - - 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"]) - - @parametrize - async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: - async with async_client.magic_transit.routes.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - nexthop="203.0.113.1", - prefix="192.0.2.0/24", - priority=0, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - route = await response.parse() - assert_matches_type(RouteUpdateResponse, route, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.magic_transit.routes.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - nexthop="203.0.113.1", - prefix="192.0.2.0/24", - priority=0, - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_identifier` but received ''"): - await async_client.magic_transit.routes.with_raw_response.update( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - nexthop="203.0.113.1", - prefix="192.0.2.0/24", - priority=0, - ) - @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.list( @@ -490,54 +231,6 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) - @parametrize - async def test_method_delete(self, async_client: AsyncCloudflare) -> None: - route = await async_client.magic_transit.routes.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(RouteDeleteResponse, route, path=["response"]) - - @parametrize - async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: - response = await async_client.magic_transit.routes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - 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"]) - - @parametrize - async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: - async with async_client.magic_transit.routes.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - route = await response.parse() - assert_matches_type(RouteDeleteResponse, route, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.magic_transit.routes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_identifier` but received ''"): - await async_client.magic_transit.routes.with_raw_response.delete( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - @parametrize async def test_method_empty(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.empty( @@ -575,51 +268,3 @@ async def test_path_params_empty(self, async_client: AsyncCloudflare) -> None: await async_client.magic_transit.routes.with_raw_response.empty( account_id="", ) - - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - route = await async_client.magic_transit.routes.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(RouteGetResponse, route, path=["response"]) - - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.magic_transit.routes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - 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"]) - - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.magic_transit.routes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - route = await response.parse() - assert_matches_type(RouteGetResponse, route, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.magic_transit.routes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_identifier` but received ''"): - await async_client.magic_transit.routes.with_raw_response.get( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) From ecf909a83d252f12fef614dd75665cb7d3bb7e6d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 17:10:31 +0000 Subject: [PATCH 099/124] feat(api): OpenAPI spec update via Stainless API (#1113) --- .stats.yml | 2 +- .../types/zero_trust/gateway/gateway_item.py | 3 +++ .../types/zero_trust/gateway/gateway_item_param.py | 3 +++ tests/api_resources/zero_trust/gateway/test_lists.py | 12 ++++++++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index cfe7672b318..21d48660c43 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1337 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8127f6c197e7f17e9eb9d99add7dff6ecbc8b5a90e298269e2070738ed4368e9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-319be066e6772a95f120a1535c5606744bfbe0d4a5d0a17161f4369d5faf325c.yml diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_item.py b/src/cloudflare/types/zero_trust/gateway/gateway_item.py index 44efdae06e5..7d6c7f3cdd1 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_item.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_item.py @@ -11,5 +11,8 @@ class GatewayItem(BaseModel): created_at: Optional[datetime] = None + description: Optional[str] = None + """The description of the list item, if present""" + value: Optional[str] = None """The value of the item in a list.""" diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py b/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py index 819b853caa8..b9354f12b21 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py @@ -14,5 +14,8 @@ class GatewayItemParam(TypedDict, total=False): created_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + description: str + """The description of the list item, if present""" + value: str """The value of the item in a list.""" diff --git a/tests/api_resources/zero_trust/gateway/test_lists.py b/tests/api_resources/zero_trust/gateway/test_lists.py index d7fdc097741..08692169cfc 100644 --- a/tests/api_resources/zero_trust/gateway/test_lists.py +++ b/tests/api_resources/zero_trust/gateway/test_lists.py @@ -42,14 +42,17 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: items=[ { "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "description": "Austin office IP", "value": "8GE8721REF", }, { "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "description": "Austin office IP", "value": "8GE8721REF", }, { "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "description": "Austin office IP", "value": "8GE8721REF", }, ], @@ -266,14 +269,17 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: append=[ { "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "description": "Austin office IP", "value": "8GE8721REF", }, { "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "description": "Austin office IP", "value": "8GE8721REF", }, { "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "description": "Austin office IP", "value": "8GE8721REF", }, ], @@ -392,14 +398,17 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare items=[ { "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "description": "Austin office IP", "value": "8GE8721REF", }, { "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "description": "Austin office IP", "value": "8GE8721REF", }, { "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "description": "Austin office IP", "value": "8GE8721REF", }, ], @@ -616,14 +625,17 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) append=[ { "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "description": "Austin office IP", "value": "8GE8721REF", }, { "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "description": "Austin office IP", "value": "8GE8721REF", }, { "created_at": parse_datetime("2014-01-01T05:20:00.12345Z"), + "description": "Austin office IP", "value": "8GE8721REF", }, ], From 5ab518014558a829c8011921cfcd99b20cc9d64f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 20:20:59 +0000 Subject: [PATCH 100/124] feat(api): OpenAPI spec update via Stainless API (#1114) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 21d48660c43..b90960bb625 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1337 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-319be066e6772a95f120a1535c5606744bfbe0d4a5d0a17161f4369d5faf325c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-595dd9be6f7a4f66159cb75d3e80634ae9d1ad0bf0901a1e97a57937dcfaa79a.yml From 30991e5f82470586e3ff05973c7d51d6f0c4debf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 21:44:55 +0000 Subject: [PATCH 101/124] feat(api): OpenAPI spec update via Stainless API (#1115) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b90960bb625..0735ab69b20 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1337 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-595dd9be6f7a4f66159cb75d3e80634ae9d1ad0bf0901a1e97a57937dcfaa79a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-411fc42706796f9d708196eed9f4ad709877cf110b7c3a7a1ec4254ea41e1767.yml From aa928602e2ffecead9cae4382d8dba724c90844f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 22:50:18 +0000 Subject: [PATCH 102/124] feat(api): OpenAPI spec update via Stainless API (#1116) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0735ab69b20..21d48660c43 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1337 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-411fc42706796f9d708196eed9f4ad709877cf110b7c3a7a1ec4254ea41e1767.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-319be066e6772a95f120a1535c5606744bfbe0d4a5d0a17161f4369d5faf325c.yml From 5d7efed6050d9d71ca4cc699b88011b68ba38855 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 22:52:33 +0000 Subject: [PATCH 103/124] feat(api): OpenAPI spec update via Stainless API (#1117) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 21d48660c43..0735ab69b20 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1337 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-319be066e6772a95f120a1535c5606744bfbe0d4a5d0a17161f4369d5faf325c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-411fc42706796f9d708196eed9f4ad709877cf110b7c3a7a1ec4254ea41e1767.yml From 8bc99ae68944cedbc668a80efe5a8ac9dae916cf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 23:15:27 +0000 Subject: [PATCH 104/124] feat(api): update via SDK Studio (#1118) --- .stats.yml | 2 +- api.md | 39 +- .../resources/ai_gateway/ai_gateway.py | 1 - .../resources/ai_gateway/{logs => }/logs.py | 18 +- .../resources/ai_gateway/logs/__init__.py | 19 - .../magic_transit/cf_interconnects.py | 265 ++++++++ .../resources/magic_transit/gre_tunnels.py | 392 +++++++++++- .../resources/magic_transit/ipsec_tunnels.py | 510 ++++++++++++++- .../resources/magic_transit/routes.py | 368 ++++++++++- .../resources/magic_transit/sites/acls.py | 546 +++++++++++++++- .../types/ai_gateway/logs/__init__.py | 3 - .../types/magic_transit/__init__.py | 18 + .../cf_interconnect_get_response.py | 11 + .../cf_interconnect_update_params.py | 63 ++ .../cf_interconnect_update_response.py | 13 + .../gre_tunnel_delete_response.py | 13 + .../magic_transit/gre_tunnel_get_response.py | 11 + .../magic_transit/gre_tunnel_update_params.py | 48 ++ .../gre_tunnel_update_response.py | 13 + .../ipsec_tunnel_delete_response.py | 13 + .../ipsec_tunnel_get_response.py | 11 + .../ipsec_tunnel_psk_generate_params.py | 14 + .../ipsec_tunnel_psk_generate_response.py | 19 + .../ipsec_tunnel_update_params.py | 47 ++ .../ipsec_tunnel_update_response.py | 13 + .../magic_transit/route_delete_response.py | 13 + .../types/magic_transit/route_get_response.py | 11 + .../magic_transit/route_update_params.py | 32 + .../magic_transit/route_update_response.py | 13 + .../types/magic_transit/scope_param.py | 16 + .../types/magic_transit/sites/__init__.py | 2 + .../magic_transit/sites/acl_edit_params.py | 39 ++ .../magic_transit/sites/acl_update_params.py | 39 ++ .../api_resources/ai_gateway/logs/__init__.py | 1 - .../magic_transit/sites/test_acls.py | 584 +++++++++++++++++- .../magic_transit/test_cf_interconnects.py | 234 ++++++- .../magic_transit/test_gre_tunnels.py | 380 +++++++++++- .../magic_transit/test_ipsec_tunnels.py | 472 ++++++++++++++ .../magic_transit/test_routes.py | 355 +++++++++++ 39 files changed, 4617 insertions(+), 44 deletions(-) rename src/cloudflare/resources/ai_gateway/{logs => }/logs.py (94%) delete mode 100644 src/cloudflare/resources/ai_gateway/logs/__init__.py delete mode 100644 src/cloudflare/types/ai_gateway/logs/__init__.py create mode 100644 src/cloudflare/types/magic_transit/cf_interconnect_get_response.py create mode 100644 src/cloudflare/types/magic_transit/cf_interconnect_update_params.py create mode 100644 src/cloudflare/types/magic_transit/cf_interconnect_update_response.py create mode 100644 src/cloudflare/types/magic_transit/gre_tunnel_delete_response.py create mode 100644 src/cloudflare/types/magic_transit/gre_tunnel_get_response.py create mode 100644 src/cloudflare/types/magic_transit/gre_tunnel_update_params.py create mode 100644 src/cloudflare/types/magic_transit/gre_tunnel_update_response.py create mode 100644 src/cloudflare/types/magic_transit/ipsec_tunnel_delete_response.py create mode 100644 src/cloudflare/types/magic_transit/ipsec_tunnel_get_response.py create mode 100644 src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_params.py create mode 100644 src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_response.py create mode 100644 src/cloudflare/types/magic_transit/ipsec_tunnel_update_params.py create mode 100644 src/cloudflare/types/magic_transit/ipsec_tunnel_update_response.py create mode 100644 src/cloudflare/types/magic_transit/route_delete_response.py create mode 100644 src/cloudflare/types/magic_transit/route_get_response.py create mode 100644 src/cloudflare/types/magic_transit/route_update_params.py create mode 100644 src/cloudflare/types/magic_transit/route_update_response.py create mode 100644 src/cloudflare/types/magic_transit/scope_param.py create mode 100644 src/cloudflare/types/magic_transit/sites/acl_edit_params.py create mode 100644 src/cloudflare/types/magic_transit/sites/acl_update_params.py delete mode 100644 tests/api_resources/ai_gateway/logs/__init__.py diff --git a/.stats.yml b/.stats.yml index 0735ab69b20..eaf5c444b01 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1337 +configured_endpoints: 1353 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-411fc42706796f9d708196eed9f4ad709877cf110b7c3a7a1ec4254ea41e1767.yml diff --git a/api.md b/api.md index c3139edde1c..5cf9fd9a98e 100644 --- a/api.md +++ b/api.md @@ -3988,25 +3988,40 @@ Methods: Types: ```python -from cloudflare.types.magic_transit import CfInterconnectListResponse +from cloudflare.types.magic_transit import ( + CfInterconnectUpdateResponse, + CfInterconnectListResponse, + CfInterconnectGetResponse, +) ``` Methods: +- client.magic_transit.cf_interconnects.update(cf_interconnect_id, \*, account_id, \*\*params) -> CfInterconnectUpdateResponse - client.magic_transit.cf_interconnects.list(\*, account_id) -> CfInterconnectListResponse +- client.magic_transit.cf_interconnects.get(cf_interconnect_id, \*, account_id) -> CfInterconnectGetResponse ## GRETunnels Types: ```python -from cloudflare.types.magic_transit import GRETunnelCreateResponse, GRETunnelListResponse +from cloudflare.types.magic_transit import ( + GRETunnelCreateResponse, + GRETunnelUpdateResponse, + GRETunnelListResponse, + GRETunnelDeleteResponse, + GRETunnelGetResponse, +) ``` Methods: - client.magic_transit.gre_tunnels.create(\*, account_id, \*\*params) -> GRETunnelCreateResponse +- client.magic_transit.gre_tunnels.update(gre_tunnel_id, \*, account_id, \*\*params) -> GRETunnelUpdateResponse - client.magic_transit.gre_tunnels.list(\*, account_id) -> GRETunnelListResponse +- client.magic_transit.gre_tunnels.delete(gre_tunnel_id, \*, account_id) -> GRETunnelDeleteResponse +- client.magic_transit.gre_tunnels.get(gre_tunnel_id, \*, account_id) -> GRETunnelGetResponse ## IPSECTunnels @@ -4016,14 +4031,22 @@ Types: from cloudflare.types.magic_transit import ( PSKMetadata, IPSECTunnelCreateResponse, + IPSECTunnelUpdateResponse, IPSECTunnelListResponse, + IPSECTunnelDeleteResponse, + IPSECTunnelGetResponse, + IPSECTunnelPSKGenerateResponse, ) ``` Methods: - client.magic_transit.ipsec_tunnels.create(\*, account_id, \*\*params) -> IPSECTunnelCreateResponse +- client.magic_transit.ipsec_tunnels.update(ipsec_tunnel_id, \*, account_id, \*\*params) -> IPSECTunnelUpdateResponse - client.magic_transit.ipsec_tunnels.list(\*, account_id) -> IPSECTunnelListResponse +- client.magic_transit.ipsec_tunnels.delete(ipsec_tunnel_id, \*, account_id) -> IPSECTunnelDeleteResponse +- client.magic_transit.ipsec_tunnels.get(ipsec_tunnel_id, \*, account_id) -> IPSECTunnelGetResponse +- client.magic_transit.ipsec_tunnels.psk_generate(ipsec_tunnel_id, \*, account_id, \*\*params) -> IPSECTunnelPSKGenerateResponse ## Routes @@ -4033,16 +4056,22 @@ Types: from cloudflare.types.magic_transit import ( Scope, RouteCreateResponse, + RouteUpdateResponse, RouteListResponse, + RouteDeleteResponse, RouteEmptyResponse, + RouteGetResponse, ) ``` Methods: - client.magic_transit.routes.create(\*, account_id, \*\*params) -> RouteCreateResponse +- client.magic_transit.routes.update(route_id, \*, account_id, \*\*params) -> RouteUpdateResponse - client.magic_transit.routes.list(\*, account_id) -> RouteListResponse +- client.magic_transit.routes.delete(route_id, \*, account_id) -> RouteDeleteResponse - client.magic_transit.routes.empty(\*, account_id) -> RouteEmptyResponse +- client.magic_transit.routes.get(route_id, \*, account_id) -> RouteGetResponse ## Sites @@ -4072,7 +4101,11 @@ from cloudflare.types.magic_transit.sites import ACL, ACLConfiguration, AllowedP Methods: - client.magic_transit.sites.acls.create(site_id, \*, account_id, \*\*params) -> ACL +- client.magic_transit.sites.acls.update(acl_id, \*, account_id, site_id, \*\*params) -> ACL - client.magic_transit.sites.acls.list(site_id, \*, account_id) -> SyncSinglePage[ACL] +- client.magic_transit.sites.acls.delete(acl_id, \*, account_id, site_id) -> ACL +- client.magic_transit.sites.acls.edit(acl_id, \*, account_id, site_id, \*\*params) -> ACL +- client.magic_transit.sites.acls.get(acl_id, \*, account_id, site_id) -> ACL ### LANs @@ -7858,7 +7891,7 @@ from cloudflare.types.ai_gateway import LogListResponse Methods: -- client.ai_gateway.logs.list(id, \*, account_id, \*\*params) -> SyncV4PagePaginationArray[LogListResponse] +- client.ai_gateway.logs.list(id, \*, account_id, \*\*params) -> SyncV4PagePaginationArray[LogListResponse] # IAM diff --git a/src/cloudflare/resources/ai_gateway/ai_gateway.py b/src/cloudflare/resources/ai_gateway/ai_gateway.py index 2d11d809968..ac5a9237f0b 100644 --- a/src/cloudflare/resources/ai_gateway/ai_gateway.py +++ b/src/cloudflare/resources/ai_gateway/ai_gateway.py @@ -21,7 +21,6 @@ async_maybe_transform, ) from ..._compat import cached_property -from .logs.logs import LogsResource, AsyncLogsResource from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( to_raw_response_wrapper, diff --git a/src/cloudflare/resources/ai_gateway/logs/logs.py b/src/cloudflare/resources/ai_gateway/logs.py similarity index 94% rename from src/cloudflare/resources/ai_gateway/logs/logs.py rename to src/cloudflare/resources/ai_gateway/logs.py index d640bb36e6a..58f38d09fbc 100644 --- a/src/cloudflare/resources/ai_gateway/logs/logs.py +++ b/src/cloudflare/resources/ai_gateway/logs.py @@ -8,23 +8,23 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import maybe_transform -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import maybe_transform +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( to_raw_response_wrapper, to_streamed_response_wrapper, async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ...._base_client import ( +from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray +from ..._base_client import ( AsyncPaginator, make_request_options, ) -from ....types.ai_gateway import log_list_params -from ....types.ai_gateway.log_list_response import LogListResponse +from ...types.ai_gateway import log_list_params +from ...types.ai_gateway.log_list_response import LogListResponse __all__ = ["LogsResource", "AsyncLogsResource"] diff --git a/src/cloudflare/resources/ai_gateway/logs/__init__.py b/src/cloudflare/resources/ai_gateway/logs/__init__.py deleted file mode 100644 index 30876fab694..00000000000 --- a/src/cloudflare/resources/ai_gateway/logs/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from .logs import ( - LogsResource, - AsyncLogsResource, - LogsResourceWithRawResponse, - AsyncLogsResourceWithRawResponse, - LogsResourceWithStreamingResponse, - AsyncLogsResourceWithStreamingResponse, -) - -__all__ = [ - "LogsResource", - "AsyncLogsResource", - "LogsResourceWithRawResponse", - "AsyncLogsResourceWithRawResponse", - "LogsResourceWithStreamingResponse", - "AsyncLogsResourceWithStreamingResponse", -] diff --git a/src/cloudflare/resources/magic_transit/cf_interconnects.py b/src/cloudflare/resources/magic_transit/cf_interconnects.py index 18f79e0181f..e06f3339eaa 100644 --- a/src/cloudflare/resources/magic_transit/cf_interconnects.py +++ b/src/cloudflare/resources/magic_transit/cf_interconnects.py @@ -7,6 +7,10 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -19,7 +23,10 @@ from ..._base_client import ( make_request_options, ) +from ...types.magic_transit import cf_interconnect_update_params +from ...types.magic_transit.cf_interconnect_get_response import CfInterconnectGetResponse from ...types.magic_transit.cf_interconnect_list_response import CfInterconnectListResponse +from ...types.magic_transit.cf_interconnect_update_response import CfInterconnectUpdateResponse __all__ = ["CfInterconnectsResource", "AsyncCfInterconnectsResource"] @@ -33,6 +40,79 @@ def with_raw_response(self) -> CfInterconnectsResourceWithRawResponse: def with_streaming_response(self) -> CfInterconnectsResourceWithStreamingResponse: return CfInterconnectsResourceWithStreamingResponse(self) + def update( + self, + cf_interconnect_id: str, + *, + account_id: str, + description: str | NotGiven = NOT_GIVEN, + gre: cf_interconnect_update_params.GRE | NotGiven = NOT_GIVEN, + health_check: cf_interconnect_update_params.HealthCheck | NotGiven = NOT_GIVEN, + interface_address: str | NotGiven = NOT_GIVEN, + mtu: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> CfInterconnectUpdateResponse: + """Updates a specific interconnect associated with an account. + + Use + `?validate_only=true` as an optional query parameter to only run validation + without persisting changes. + + Args: + account_id: Identifier + + cf_interconnect_id: Identifier + + description: An optional description of the interconnect. + + gre: The configuration specific to GRE interconnects. + + interface_address: A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side + of the tunnel. Select the subnet from the following private IP space: + 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. + + mtu: The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum + value is 576. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not cf_interconnect_id: + raise ValueError(f"Expected a non-empty value for `cf_interconnect_id` but received {cf_interconnect_id!r}") + return self._put( + f"/accounts/{account_id}/magic/cf_interconnects/{cf_interconnect_id}", + body=maybe_transform( + { + "description": description, + "gre": gre, + "health_check": health_check, + "interface_address": interface_address, + "mtu": mtu, + }, + cf_interconnect_update_params.CfInterconnectUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[CfInterconnectUpdateResponse]._unwrapper, + ), + cast_to=cast(Type[CfInterconnectUpdateResponse], ResultWrapper[CfInterconnectUpdateResponse]), + ) + def list( self, *, @@ -72,6 +152,50 @@ def list( cast_to=cast(Type[CfInterconnectListResponse], ResultWrapper[CfInterconnectListResponse]), ) + def get( + self, + cf_interconnect_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> CfInterconnectGetResponse: + """ + Lists details for a specific interconnect. + + Args: + account_id: Identifier + + cf_interconnect_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not cf_interconnect_id: + raise ValueError(f"Expected a non-empty value for `cf_interconnect_id` but received {cf_interconnect_id!r}") + return self._get( + f"/accounts/{account_id}/magic/cf_interconnects/{cf_interconnect_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[CfInterconnectGetResponse]._unwrapper, + ), + cast_to=cast(Type[CfInterconnectGetResponse], ResultWrapper[CfInterconnectGetResponse]), + ) + class AsyncCfInterconnectsResource(AsyncAPIResource): @cached_property @@ -82,6 +206,79 @@ def with_raw_response(self) -> AsyncCfInterconnectsResourceWithRawResponse: def with_streaming_response(self) -> AsyncCfInterconnectsResourceWithStreamingResponse: return AsyncCfInterconnectsResourceWithStreamingResponse(self) + async def update( + self, + cf_interconnect_id: str, + *, + account_id: str, + description: str | NotGiven = NOT_GIVEN, + gre: cf_interconnect_update_params.GRE | NotGiven = NOT_GIVEN, + health_check: cf_interconnect_update_params.HealthCheck | NotGiven = NOT_GIVEN, + interface_address: str | NotGiven = NOT_GIVEN, + mtu: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> CfInterconnectUpdateResponse: + """Updates a specific interconnect associated with an account. + + Use + `?validate_only=true` as an optional query parameter to only run validation + without persisting changes. + + Args: + account_id: Identifier + + cf_interconnect_id: Identifier + + description: An optional description of the interconnect. + + gre: The configuration specific to GRE interconnects. + + interface_address: A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side + of the tunnel. Select the subnet from the following private IP space: + 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. + + mtu: The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum + value is 576. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not cf_interconnect_id: + raise ValueError(f"Expected a non-empty value for `cf_interconnect_id` but received {cf_interconnect_id!r}") + return await self._put( + f"/accounts/{account_id}/magic/cf_interconnects/{cf_interconnect_id}", + body=await async_maybe_transform( + { + "description": description, + "gre": gre, + "health_check": health_check, + "interface_address": interface_address, + "mtu": mtu, + }, + cf_interconnect_update_params.CfInterconnectUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[CfInterconnectUpdateResponse]._unwrapper, + ), + cast_to=cast(Type[CfInterconnectUpdateResponse], ResultWrapper[CfInterconnectUpdateResponse]), + ) + async def list( self, *, @@ -121,38 +318,106 @@ async def list( cast_to=cast(Type[CfInterconnectListResponse], ResultWrapper[CfInterconnectListResponse]), ) + async def get( + self, + cf_interconnect_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> CfInterconnectGetResponse: + """ + Lists details for a specific interconnect. + + Args: + account_id: Identifier + + cf_interconnect_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not cf_interconnect_id: + raise ValueError(f"Expected a non-empty value for `cf_interconnect_id` but received {cf_interconnect_id!r}") + return await self._get( + f"/accounts/{account_id}/magic/cf_interconnects/{cf_interconnect_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[CfInterconnectGetResponse]._unwrapper, + ), + cast_to=cast(Type[CfInterconnectGetResponse], ResultWrapper[CfInterconnectGetResponse]), + ) + class CfInterconnectsResourceWithRawResponse: def __init__(self, cf_interconnects: CfInterconnectsResource) -> None: self._cf_interconnects = cf_interconnects + self.update = to_raw_response_wrapper( + cf_interconnects.update, + ) self.list = to_raw_response_wrapper( cf_interconnects.list, ) + self.get = to_raw_response_wrapper( + cf_interconnects.get, + ) class AsyncCfInterconnectsResourceWithRawResponse: def __init__(self, cf_interconnects: AsyncCfInterconnectsResource) -> None: self._cf_interconnects = cf_interconnects + self.update = async_to_raw_response_wrapper( + cf_interconnects.update, + ) self.list = async_to_raw_response_wrapper( cf_interconnects.list, ) + self.get = async_to_raw_response_wrapper( + cf_interconnects.get, + ) class CfInterconnectsResourceWithStreamingResponse: def __init__(self, cf_interconnects: CfInterconnectsResource) -> None: self._cf_interconnects = cf_interconnects + self.update = to_streamed_response_wrapper( + cf_interconnects.update, + ) self.list = to_streamed_response_wrapper( cf_interconnects.list, ) + self.get = to_streamed_response_wrapper( + cf_interconnects.get, + ) class AsyncCfInterconnectsResourceWithStreamingResponse: def __init__(self, cf_interconnects: AsyncCfInterconnectsResource) -> None: self._cf_interconnects = cf_interconnects + self.update = async_to_streamed_response_wrapper( + cf_interconnects.update, + ) self.list = async_to_streamed_response_wrapper( cf_interconnects.list, ) + self.get = async_to_streamed_response_wrapper( + cf_interconnects.get, + ) diff --git a/src/cloudflare/resources/magic_transit/gre_tunnels.py b/src/cloudflare/resources/magic_transit/gre_tunnels.py index fcb6f9c3a58..0a0ecac6b40 100644 --- a/src/cloudflare/resources/magic_transit/gre_tunnels.py +++ b/src/cloudflare/resources/magic_transit/gre_tunnels.py @@ -23,9 +23,13 @@ from ..._base_client import ( make_request_options, ) -from ...types.magic_transit import gre_tunnel_create_params +from ...types.magic_transit import gre_tunnel_create_params, gre_tunnel_update_params +from ...types.magic_transit.health_check_param import HealthCheckParam +from ...types.magic_transit.gre_tunnel_get_response import GRETunnelGetResponse from ...types.magic_transit.gre_tunnel_list_response import GRETunnelListResponse from ...types.magic_transit.gre_tunnel_create_response import GRETunnelCreateResponse +from ...types.magic_transit.gre_tunnel_delete_response import GRETunnelDeleteResponse +from ...types.magic_transit.gre_tunnel_update_response import GRETunnelUpdateResponse __all__ = ["GRETunnelsResource", "AsyncGRETunnelsResource"] @@ -82,6 +86,91 @@ def create( cast_to=cast(Type[GRETunnelCreateResponse], ResultWrapper[GRETunnelCreateResponse]), ) + def update( + self, + gre_tunnel_id: str, + *, + account_id: str, + cloudflare_gre_endpoint: str, + customer_gre_endpoint: str, + interface_address: str, + name: str, + description: str | NotGiven = NOT_GIVEN, + health_check: HealthCheckParam | NotGiven = NOT_GIVEN, + mtu: int | NotGiven = NOT_GIVEN, + ttl: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> GRETunnelUpdateResponse: + """Updates a specific GRE tunnel. + + Use `?validate_only=true` as an optional query + parameter to only run validation without persisting changes. + + Args: + account_id: Identifier + + gre_tunnel_id: Identifier + + cloudflare_gre_endpoint: The IP address assigned to the Cloudflare side of the GRE tunnel. + + customer_gre_endpoint: The IP address assigned to the customer side of the GRE tunnel. + + interface_address: A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side + of the tunnel. Select the subnet from the following private IP space: + 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. + + name: The name of the tunnel. The name cannot contain spaces or special characters, + must be 15 characters or less, and cannot share a name with another GRE tunnel. + + description: An optional description of the GRE tunnel. + + mtu: Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value + is 576. + + ttl: Time To Live (TTL) in number of hops of the GRE tunnel. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not gre_tunnel_id: + raise ValueError(f"Expected a non-empty value for `gre_tunnel_id` but received {gre_tunnel_id!r}") + return self._put( + f"/accounts/{account_id}/magic/gre_tunnels/{gre_tunnel_id}", + body=maybe_transform( + { + "cloudflare_gre_endpoint": cloudflare_gre_endpoint, + "customer_gre_endpoint": customer_gre_endpoint, + "interface_address": interface_address, + "name": name, + "description": description, + "health_check": health_check, + "mtu": mtu, + "ttl": ttl, + }, + gre_tunnel_update_params.GRETunnelUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[GRETunnelUpdateResponse]._unwrapper, + ), + cast_to=cast(Type[GRETunnelUpdateResponse], ResultWrapper[GRETunnelUpdateResponse]), + ) + def list( self, *, @@ -121,6 +210,96 @@ def list( cast_to=cast(Type[GRETunnelListResponse], ResultWrapper[GRETunnelListResponse]), ) + def delete( + self, + gre_tunnel_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> GRETunnelDeleteResponse: + """Disables and removes a specific static GRE tunnel. + + Use `?validate_only=true` as + an optional query parameter to only run validation without persisting changes. + + Args: + account_id: Identifier + + gre_tunnel_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not gre_tunnel_id: + raise ValueError(f"Expected a non-empty value for `gre_tunnel_id` but received {gre_tunnel_id!r}") + return self._delete( + f"/accounts/{account_id}/magic/gre_tunnels/{gre_tunnel_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[GRETunnelDeleteResponse]._unwrapper, + ), + cast_to=cast(Type[GRETunnelDeleteResponse], ResultWrapper[GRETunnelDeleteResponse]), + ) + + def get( + self, + gre_tunnel_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> GRETunnelGetResponse: + """ + Lists informtion for a specific GRE tunnel. + + Args: + account_id: Identifier + + gre_tunnel_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not gre_tunnel_id: + raise ValueError(f"Expected a non-empty value for `gre_tunnel_id` but received {gre_tunnel_id!r}") + return self._get( + f"/accounts/{account_id}/magic/gre_tunnels/{gre_tunnel_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[GRETunnelGetResponse]._unwrapper, + ), + cast_to=cast(Type[GRETunnelGetResponse], ResultWrapper[GRETunnelGetResponse]), + ) + class AsyncGRETunnelsResource(AsyncAPIResource): @cached_property @@ -174,6 +353,91 @@ async def create( cast_to=cast(Type[GRETunnelCreateResponse], ResultWrapper[GRETunnelCreateResponse]), ) + async def update( + self, + gre_tunnel_id: str, + *, + account_id: str, + cloudflare_gre_endpoint: str, + customer_gre_endpoint: str, + interface_address: str, + name: str, + description: str | NotGiven = NOT_GIVEN, + health_check: HealthCheckParam | NotGiven = NOT_GIVEN, + mtu: int | NotGiven = NOT_GIVEN, + ttl: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> GRETunnelUpdateResponse: + """Updates a specific GRE tunnel. + + Use `?validate_only=true` as an optional query + parameter to only run validation without persisting changes. + + Args: + account_id: Identifier + + gre_tunnel_id: Identifier + + cloudflare_gre_endpoint: The IP address assigned to the Cloudflare side of the GRE tunnel. + + customer_gre_endpoint: The IP address assigned to the customer side of the GRE tunnel. + + interface_address: A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side + of the tunnel. Select the subnet from the following private IP space: + 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. + + name: The name of the tunnel. The name cannot contain spaces or special characters, + must be 15 characters or less, and cannot share a name with another GRE tunnel. + + description: An optional description of the GRE tunnel. + + mtu: Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value + is 576. + + ttl: Time To Live (TTL) in number of hops of the GRE tunnel. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not gre_tunnel_id: + raise ValueError(f"Expected a non-empty value for `gre_tunnel_id` but received {gre_tunnel_id!r}") + return await self._put( + f"/accounts/{account_id}/magic/gre_tunnels/{gre_tunnel_id}", + body=await async_maybe_transform( + { + "cloudflare_gre_endpoint": cloudflare_gre_endpoint, + "customer_gre_endpoint": customer_gre_endpoint, + "interface_address": interface_address, + "name": name, + "description": description, + "health_check": health_check, + "mtu": mtu, + "ttl": ttl, + }, + gre_tunnel_update_params.GRETunnelUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[GRETunnelUpdateResponse]._unwrapper, + ), + cast_to=cast(Type[GRETunnelUpdateResponse], ResultWrapper[GRETunnelUpdateResponse]), + ) + async def list( self, *, @@ -213,6 +477,96 @@ async def list( cast_to=cast(Type[GRETunnelListResponse], ResultWrapper[GRETunnelListResponse]), ) + async def delete( + self, + gre_tunnel_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> GRETunnelDeleteResponse: + """Disables and removes a specific static GRE tunnel. + + Use `?validate_only=true` as + an optional query parameter to only run validation without persisting changes. + + Args: + account_id: Identifier + + gre_tunnel_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not gre_tunnel_id: + raise ValueError(f"Expected a non-empty value for `gre_tunnel_id` but received {gre_tunnel_id!r}") + return await self._delete( + f"/accounts/{account_id}/magic/gre_tunnels/{gre_tunnel_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[GRETunnelDeleteResponse]._unwrapper, + ), + cast_to=cast(Type[GRETunnelDeleteResponse], ResultWrapper[GRETunnelDeleteResponse]), + ) + + async def get( + self, + gre_tunnel_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> GRETunnelGetResponse: + """ + Lists informtion for a specific GRE tunnel. + + Args: + account_id: Identifier + + gre_tunnel_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not gre_tunnel_id: + raise ValueError(f"Expected a non-empty value for `gre_tunnel_id` but received {gre_tunnel_id!r}") + return await self._get( + f"/accounts/{account_id}/magic/gre_tunnels/{gre_tunnel_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[GRETunnelGetResponse]._unwrapper, + ), + cast_to=cast(Type[GRETunnelGetResponse], ResultWrapper[GRETunnelGetResponse]), + ) + class GRETunnelsResourceWithRawResponse: def __init__(self, gre_tunnels: GRETunnelsResource) -> None: @@ -221,9 +575,18 @@ def __init__(self, gre_tunnels: GRETunnelsResource) -> None: self.create = to_raw_response_wrapper( gre_tunnels.create, ) + self.update = to_raw_response_wrapper( + gre_tunnels.update, + ) self.list = to_raw_response_wrapper( gre_tunnels.list, ) + self.delete = to_raw_response_wrapper( + gre_tunnels.delete, + ) + self.get = to_raw_response_wrapper( + gre_tunnels.get, + ) class AsyncGRETunnelsResourceWithRawResponse: @@ -233,9 +596,18 @@ def __init__(self, gre_tunnels: AsyncGRETunnelsResource) -> None: self.create = async_to_raw_response_wrapper( gre_tunnels.create, ) + self.update = async_to_raw_response_wrapper( + gre_tunnels.update, + ) self.list = async_to_raw_response_wrapper( gre_tunnels.list, ) + self.delete = async_to_raw_response_wrapper( + gre_tunnels.delete, + ) + self.get = async_to_raw_response_wrapper( + gre_tunnels.get, + ) class GRETunnelsResourceWithStreamingResponse: @@ -245,9 +617,18 @@ def __init__(self, gre_tunnels: GRETunnelsResource) -> None: self.create = to_streamed_response_wrapper( gre_tunnels.create, ) + self.update = to_streamed_response_wrapper( + gre_tunnels.update, + ) self.list = to_streamed_response_wrapper( gre_tunnels.list, ) + self.delete = to_streamed_response_wrapper( + gre_tunnels.delete, + ) + self.get = to_streamed_response_wrapper( + gre_tunnels.get, + ) class AsyncGRETunnelsResourceWithStreamingResponse: @@ -257,6 +638,15 @@ def __init__(self, gre_tunnels: AsyncGRETunnelsResource) -> None: self.create = async_to_streamed_response_wrapper( gre_tunnels.create, ) + self.update = async_to_streamed_response_wrapper( + gre_tunnels.update, + ) self.list = async_to_streamed_response_wrapper( gre_tunnels.list, ) + self.delete = async_to_streamed_response_wrapper( + gre_tunnels.delete, + ) + self.get = async_to_streamed_response_wrapper( + gre_tunnels.get, + ) diff --git a/src/cloudflare/resources/magic_transit/ipsec_tunnels.py b/src/cloudflare/resources/magic_transit/ipsec_tunnels.py index 847d54acb25..5628e089a81 100644 --- a/src/cloudflare/resources/magic_transit/ipsec_tunnels.py +++ b/src/cloudflare/resources/magic_transit/ipsec_tunnels.py @@ -23,10 +23,18 @@ from ..._base_client import ( make_request_options, ) -from ...types.magic_transit import ipsec_tunnel_create_params +from ...types.magic_transit import ( + ipsec_tunnel_create_params, + ipsec_tunnel_update_params, + ipsec_tunnel_psk_generate_params, +) from ...types.magic_transit.health_check_param import HealthCheckParam +from ...types.magic_transit.ipsec_tunnel_get_response import IPSECTunnelGetResponse from ...types.magic_transit.ipsec_tunnel_list_response import IPSECTunnelListResponse from ...types.magic_transit.ipsec_tunnel_create_response import IPSECTunnelCreateResponse +from ...types.magic_transit.ipsec_tunnel_delete_response import IPSECTunnelDeleteResponse +from ...types.magic_transit.ipsec_tunnel_update_response import IPSECTunnelUpdateResponse +from ...types.magic_transit.ipsec_tunnel_psk_generate_response import IPSECTunnelPSKGenerateResponse __all__ = ["IPSECTunnelsResource", "AsyncIPSECTunnelsResource"] @@ -121,6 +129,92 @@ def create( cast_to=cast(Type[IPSECTunnelCreateResponse], ResultWrapper[IPSECTunnelCreateResponse]), ) + def update( + self, + ipsec_tunnel_id: str, + *, + account_id: str, + cloudflare_endpoint: str, + interface_address: str, + name: str, + customer_endpoint: str | NotGiven = NOT_GIVEN, + description: str | NotGiven = NOT_GIVEN, + health_check: HealthCheckParam | NotGiven = NOT_GIVEN, + psk: str | NotGiven = NOT_GIVEN, + replay_protection: bool | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> IPSECTunnelUpdateResponse: + """Updates a specific IPsec tunnel associated with an account. + + Use + `?validate_only=true` as an optional query parameter to only run validation + without persisting changes. + + Args: + account_id: Identifier + + ipsec_tunnel_id: Identifier + + cloudflare_endpoint: The IP address assigned to the Cloudflare side of the IPsec tunnel. + + interface_address: A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side + of the tunnel. Select the subnet from the following private IP space: + 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. + + name: The name of the IPsec tunnel. The name cannot share a name with other tunnels. + + customer_endpoint: The IP address assigned to the customer side of the IPsec tunnel. Not required, + but must be set for proactive traceroutes to work. + + description: An optional description forthe IPsec tunnel. + + psk: A randomly generated or provided string for use in the IPsec tunnel. + + replay_protection: If `true`, then IPsec replay protection will be supported in the + Cloudflare-to-customer direction. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not ipsec_tunnel_id: + raise ValueError(f"Expected a non-empty value for `ipsec_tunnel_id` but received {ipsec_tunnel_id!r}") + return self._put( + f"/accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}", + body=maybe_transform( + { + "cloudflare_endpoint": cloudflare_endpoint, + "interface_address": interface_address, + "name": name, + "customer_endpoint": customer_endpoint, + "description": description, + "health_check": health_check, + "psk": psk, + "replay_protection": replay_protection, + }, + ipsec_tunnel_update_params.IPSECTunnelUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[IPSECTunnelUpdateResponse]._unwrapper, + ), + cast_to=cast(Type[IPSECTunnelUpdateResponse], ResultWrapper[IPSECTunnelUpdateResponse]), + ) + def list( self, *, @@ -160,6 +254,146 @@ def list( cast_to=cast(Type[IPSECTunnelListResponse], ResultWrapper[IPSECTunnelListResponse]), ) + def delete( + self, + ipsec_tunnel_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> IPSECTunnelDeleteResponse: + """ + Disables and removes a specific static IPsec Tunnel associated with an account. + Use `?validate_only=true` as an optional query parameter to only run validation + without persisting changes. + + Args: + account_id: Identifier + + ipsec_tunnel_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not ipsec_tunnel_id: + raise ValueError(f"Expected a non-empty value for `ipsec_tunnel_id` but received {ipsec_tunnel_id!r}") + return self._delete( + f"/accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[IPSECTunnelDeleteResponse]._unwrapper, + ), + cast_to=cast(Type[IPSECTunnelDeleteResponse], ResultWrapper[IPSECTunnelDeleteResponse]), + ) + + def get( + self, + ipsec_tunnel_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> IPSECTunnelGetResponse: + """ + Lists details for a specific IPsec tunnel. + + Args: + account_id: Identifier + + ipsec_tunnel_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not ipsec_tunnel_id: + raise ValueError(f"Expected a non-empty value for `ipsec_tunnel_id` but received {ipsec_tunnel_id!r}") + return self._get( + f"/accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[IPSECTunnelGetResponse]._unwrapper, + ), + cast_to=cast(Type[IPSECTunnelGetResponse], ResultWrapper[IPSECTunnelGetResponse]), + ) + + def psk_generate( + self, + ipsec_tunnel_id: str, + *, + account_id: str, + body: object, + # 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, + ) -> IPSECTunnelPSKGenerateResponse: + """ + Generates a Pre Shared Key for a specific IPsec tunnel used in the IKE session. + Use `?validate_only=true` as an optional query parameter to only run validation + without persisting changes. After a PSK is generated, the PSK is immediately + persisted to Cloudflare's edge and cannot be retrieved later. Note the PSK in a + safe place. + + Args: + account_id: Identifier + + ipsec_tunnel_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not ipsec_tunnel_id: + raise ValueError(f"Expected a non-empty value for `ipsec_tunnel_id` but received {ipsec_tunnel_id!r}") + return self._post( + f"/accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}/psk_generate", + body=maybe_transform(body, ipsec_tunnel_psk_generate_params.IPSECTunnelPSKGenerateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[IPSECTunnelPSKGenerateResponse]._unwrapper, + ), + cast_to=cast(Type[IPSECTunnelPSKGenerateResponse], ResultWrapper[IPSECTunnelPSKGenerateResponse]), + ) + class AsyncIPSECTunnelsResource(AsyncAPIResource): @cached_property @@ -251,6 +485,92 @@ async def create( cast_to=cast(Type[IPSECTunnelCreateResponse], ResultWrapper[IPSECTunnelCreateResponse]), ) + async def update( + self, + ipsec_tunnel_id: str, + *, + account_id: str, + cloudflare_endpoint: str, + interface_address: str, + name: str, + customer_endpoint: str | NotGiven = NOT_GIVEN, + description: str | NotGiven = NOT_GIVEN, + health_check: HealthCheckParam | NotGiven = NOT_GIVEN, + psk: str | NotGiven = NOT_GIVEN, + replay_protection: bool | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> IPSECTunnelUpdateResponse: + """Updates a specific IPsec tunnel associated with an account. + + Use + `?validate_only=true` as an optional query parameter to only run validation + without persisting changes. + + Args: + account_id: Identifier + + ipsec_tunnel_id: Identifier + + cloudflare_endpoint: The IP address assigned to the Cloudflare side of the IPsec tunnel. + + interface_address: A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side + of the tunnel. Select the subnet from the following private IP space: + 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. + + name: The name of the IPsec tunnel. The name cannot share a name with other tunnels. + + customer_endpoint: The IP address assigned to the customer side of the IPsec tunnel. Not required, + but must be set for proactive traceroutes to work. + + description: An optional description forthe IPsec tunnel. + + psk: A randomly generated or provided string for use in the IPsec tunnel. + + replay_protection: If `true`, then IPsec replay protection will be supported in the + Cloudflare-to-customer direction. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not ipsec_tunnel_id: + raise ValueError(f"Expected a non-empty value for `ipsec_tunnel_id` but received {ipsec_tunnel_id!r}") + return await self._put( + f"/accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}", + body=await async_maybe_transform( + { + "cloudflare_endpoint": cloudflare_endpoint, + "interface_address": interface_address, + "name": name, + "customer_endpoint": customer_endpoint, + "description": description, + "health_check": health_check, + "psk": psk, + "replay_protection": replay_protection, + }, + ipsec_tunnel_update_params.IPSECTunnelUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[IPSECTunnelUpdateResponse]._unwrapper, + ), + cast_to=cast(Type[IPSECTunnelUpdateResponse], ResultWrapper[IPSECTunnelUpdateResponse]), + ) + async def list( self, *, @@ -290,6 +610,146 @@ async def list( cast_to=cast(Type[IPSECTunnelListResponse], ResultWrapper[IPSECTunnelListResponse]), ) + async def delete( + self, + ipsec_tunnel_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> IPSECTunnelDeleteResponse: + """ + Disables and removes a specific static IPsec Tunnel associated with an account. + Use `?validate_only=true` as an optional query parameter to only run validation + without persisting changes. + + Args: + account_id: Identifier + + ipsec_tunnel_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not ipsec_tunnel_id: + raise ValueError(f"Expected a non-empty value for `ipsec_tunnel_id` but received {ipsec_tunnel_id!r}") + return await self._delete( + f"/accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[IPSECTunnelDeleteResponse]._unwrapper, + ), + cast_to=cast(Type[IPSECTunnelDeleteResponse], ResultWrapper[IPSECTunnelDeleteResponse]), + ) + + async def get( + self, + ipsec_tunnel_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> IPSECTunnelGetResponse: + """ + Lists details for a specific IPsec tunnel. + + Args: + account_id: Identifier + + ipsec_tunnel_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not ipsec_tunnel_id: + raise ValueError(f"Expected a non-empty value for `ipsec_tunnel_id` but received {ipsec_tunnel_id!r}") + return await self._get( + f"/accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[IPSECTunnelGetResponse]._unwrapper, + ), + cast_to=cast(Type[IPSECTunnelGetResponse], ResultWrapper[IPSECTunnelGetResponse]), + ) + + async def psk_generate( + self, + ipsec_tunnel_id: str, + *, + account_id: str, + body: object, + # 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, + ) -> IPSECTunnelPSKGenerateResponse: + """ + Generates a Pre Shared Key for a specific IPsec tunnel used in the IKE session. + Use `?validate_only=true` as an optional query parameter to only run validation + without persisting changes. After a PSK is generated, the PSK is immediately + persisted to Cloudflare's edge and cannot be retrieved later. Note the PSK in a + safe place. + + Args: + account_id: Identifier + + ipsec_tunnel_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not ipsec_tunnel_id: + raise ValueError(f"Expected a non-empty value for `ipsec_tunnel_id` but received {ipsec_tunnel_id!r}") + return await self._post( + f"/accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}/psk_generate", + body=await async_maybe_transform(body, ipsec_tunnel_psk_generate_params.IPSECTunnelPSKGenerateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[IPSECTunnelPSKGenerateResponse]._unwrapper, + ), + cast_to=cast(Type[IPSECTunnelPSKGenerateResponse], ResultWrapper[IPSECTunnelPSKGenerateResponse]), + ) + class IPSECTunnelsResourceWithRawResponse: def __init__(self, ipsec_tunnels: IPSECTunnelsResource) -> None: @@ -298,9 +758,21 @@ def __init__(self, ipsec_tunnels: IPSECTunnelsResource) -> None: self.create = to_raw_response_wrapper( ipsec_tunnels.create, ) + self.update = to_raw_response_wrapper( + ipsec_tunnels.update, + ) self.list = to_raw_response_wrapper( ipsec_tunnels.list, ) + self.delete = to_raw_response_wrapper( + ipsec_tunnels.delete, + ) + self.get = to_raw_response_wrapper( + ipsec_tunnels.get, + ) + self.psk_generate = to_raw_response_wrapper( + ipsec_tunnels.psk_generate, + ) class AsyncIPSECTunnelsResourceWithRawResponse: @@ -310,9 +782,21 @@ def __init__(self, ipsec_tunnels: AsyncIPSECTunnelsResource) -> None: self.create = async_to_raw_response_wrapper( ipsec_tunnels.create, ) + self.update = async_to_raw_response_wrapper( + ipsec_tunnels.update, + ) self.list = async_to_raw_response_wrapper( ipsec_tunnels.list, ) + self.delete = async_to_raw_response_wrapper( + ipsec_tunnels.delete, + ) + self.get = async_to_raw_response_wrapper( + ipsec_tunnels.get, + ) + self.psk_generate = async_to_raw_response_wrapper( + ipsec_tunnels.psk_generate, + ) class IPSECTunnelsResourceWithStreamingResponse: @@ -322,9 +806,21 @@ def __init__(self, ipsec_tunnels: IPSECTunnelsResource) -> None: self.create = to_streamed_response_wrapper( ipsec_tunnels.create, ) + self.update = to_streamed_response_wrapper( + ipsec_tunnels.update, + ) self.list = to_streamed_response_wrapper( ipsec_tunnels.list, ) + self.delete = to_streamed_response_wrapper( + ipsec_tunnels.delete, + ) + self.get = to_streamed_response_wrapper( + ipsec_tunnels.get, + ) + self.psk_generate = to_streamed_response_wrapper( + ipsec_tunnels.psk_generate, + ) class AsyncIPSECTunnelsResourceWithStreamingResponse: @@ -334,6 +830,18 @@ def __init__(self, ipsec_tunnels: AsyncIPSECTunnelsResource) -> None: self.create = async_to_streamed_response_wrapper( ipsec_tunnels.create, ) + self.update = async_to_streamed_response_wrapper( + ipsec_tunnels.update, + ) self.list = async_to_streamed_response_wrapper( ipsec_tunnels.list, ) + self.delete = async_to_streamed_response_wrapper( + ipsec_tunnels.delete, + ) + self.get = async_to_streamed_response_wrapper( + ipsec_tunnels.get, + ) + self.psk_generate = async_to_streamed_response_wrapper( + ipsec_tunnels.psk_generate, + ) diff --git a/src/cloudflare/resources/magic_transit/routes.py b/src/cloudflare/resources/magic_transit/routes.py index f8c1f1bb62a..be721725cbc 100644 --- a/src/cloudflare/resources/magic_transit/routes.py +++ b/src/cloudflare/resources/magic_transit/routes.py @@ -23,10 +23,14 @@ from ..._base_client import ( make_request_options, ) -from ...types.magic_transit import route_create_params +from ...types.magic_transit import route_create_params, route_update_params +from ...types.magic_transit.scope_param import ScopeParam +from ...types.magic_transit.route_get_response import RouteGetResponse from ...types.magic_transit.route_list_response import RouteListResponse from ...types.magic_transit.route_empty_response import RouteEmptyResponse from ...types.magic_transit.route_create_response import RouteCreateResponse +from ...types.magic_transit.route_delete_response import RouteDeleteResponse +from ...types.magic_transit.route_update_response import RouteUpdateResponse __all__ = ["RoutesResource", "AsyncRoutesResource"] @@ -83,6 +87,81 @@ def create( cast_to=cast(Type[RouteCreateResponse], ResultWrapper[RouteCreateResponse]), ) + def update( + self, + route_id: str, + *, + account_id: str, + nexthop: str, + prefix: str, + priority: int, + description: str | NotGiven = NOT_GIVEN, + scope: ScopeParam | NotGiven = NOT_GIVEN, + weight: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> RouteUpdateResponse: + """Update a specific Magic static route. + + Use `?validate_only=true` as an optional + query parameter to run validation only without persisting changes. + + Args: + account_id: Identifier + + route_id: Identifier + + nexthop: The next-hop IP Address for the static route. + + prefix: IP Prefix in Classless Inter-Domain Routing format. + + priority: Priority of the static route. + + description: An optional human provided description of the static route. + + scope: Used only for ECMP routes. + + weight: Optional weight of the ECMP scope - if provided. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not route_id: + raise ValueError(f"Expected a non-empty value for `route_id` but received {route_id!r}") + return self._put( + f"/accounts/{account_id}/magic/routes/{route_id}", + body=maybe_transform( + { + "nexthop": nexthop, + "prefix": prefix, + "priority": priority, + "description": description, + "scope": scope, + "weight": weight, + }, + route_update_params.RouteUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[RouteUpdateResponse]._unwrapper, + ), + cast_to=cast(Type[RouteUpdateResponse], ResultWrapper[RouteUpdateResponse]), + ) + def list( self, *, @@ -122,6 +201,50 @@ def list( cast_to=cast(Type[RouteListResponse], ResultWrapper[RouteListResponse]), ) + def delete( + self, + route_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> RouteDeleteResponse: + """ + Disable and remove a specific Magic static route. + + Args: + account_id: Identifier + + route_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not route_id: + raise ValueError(f"Expected a non-empty value for `route_id` but received {route_id!r}") + return self._delete( + f"/accounts/{account_id}/magic/routes/{route_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[RouteDeleteResponse]._unwrapper, + ), + cast_to=cast(Type[RouteDeleteResponse], ResultWrapper[RouteDeleteResponse]), + ) + def empty( self, *, @@ -161,6 +284,50 @@ def empty( cast_to=cast(Type[RouteEmptyResponse], ResultWrapper[RouteEmptyResponse]), ) + def get( + self, + route_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> RouteGetResponse: + """ + Get a specific Magic static route. + + Args: + account_id: Identifier + + route_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not route_id: + raise ValueError(f"Expected a non-empty value for `route_id` but received {route_id!r}") + return self._get( + f"/accounts/{account_id}/magic/routes/{route_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[RouteGetResponse]._unwrapper, + ), + cast_to=cast(Type[RouteGetResponse], ResultWrapper[RouteGetResponse]), + ) + class AsyncRoutesResource(AsyncAPIResource): @cached_property @@ -214,6 +381,81 @@ async def create( cast_to=cast(Type[RouteCreateResponse], ResultWrapper[RouteCreateResponse]), ) + async def update( + self, + route_id: str, + *, + account_id: str, + nexthop: str, + prefix: str, + priority: int, + description: str | NotGiven = NOT_GIVEN, + scope: ScopeParam | NotGiven = NOT_GIVEN, + weight: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> RouteUpdateResponse: + """Update a specific Magic static route. + + Use `?validate_only=true` as an optional + query parameter to run validation only without persisting changes. + + Args: + account_id: Identifier + + route_id: Identifier + + nexthop: The next-hop IP Address for the static route. + + prefix: IP Prefix in Classless Inter-Domain Routing format. + + priority: Priority of the static route. + + description: An optional human provided description of the static route. + + scope: Used only for ECMP routes. + + weight: Optional weight of the ECMP scope - if provided. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not route_id: + raise ValueError(f"Expected a non-empty value for `route_id` but received {route_id!r}") + return await self._put( + f"/accounts/{account_id}/magic/routes/{route_id}", + body=await async_maybe_transform( + { + "nexthop": nexthop, + "prefix": prefix, + "priority": priority, + "description": description, + "scope": scope, + "weight": weight, + }, + route_update_params.RouteUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[RouteUpdateResponse]._unwrapper, + ), + cast_to=cast(Type[RouteUpdateResponse], ResultWrapper[RouteUpdateResponse]), + ) + async def list( self, *, @@ -253,6 +495,50 @@ async def list( cast_to=cast(Type[RouteListResponse], ResultWrapper[RouteListResponse]), ) + async def delete( + self, + route_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> RouteDeleteResponse: + """ + Disable and remove a specific Magic static route. + + Args: + account_id: Identifier + + route_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not route_id: + raise ValueError(f"Expected a non-empty value for `route_id` but received {route_id!r}") + return await self._delete( + f"/accounts/{account_id}/magic/routes/{route_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[RouteDeleteResponse]._unwrapper, + ), + cast_to=cast(Type[RouteDeleteResponse], ResultWrapper[RouteDeleteResponse]), + ) + async def empty( self, *, @@ -292,6 +578,50 @@ async def empty( cast_to=cast(Type[RouteEmptyResponse], ResultWrapper[RouteEmptyResponse]), ) + async def get( + self, + route_id: str, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> RouteGetResponse: + """ + Get a specific Magic static route. + + Args: + account_id: Identifier + + route_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not route_id: + raise ValueError(f"Expected a non-empty value for `route_id` but received {route_id!r}") + return await self._get( + f"/accounts/{account_id}/magic/routes/{route_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[RouteGetResponse]._unwrapper, + ), + cast_to=cast(Type[RouteGetResponse], ResultWrapper[RouteGetResponse]), + ) + class RoutesResourceWithRawResponse: def __init__(self, routes: RoutesResource) -> None: @@ -300,12 +630,21 @@ def __init__(self, routes: RoutesResource) -> None: self.create = to_raw_response_wrapper( routes.create, ) + self.update = to_raw_response_wrapper( + routes.update, + ) self.list = to_raw_response_wrapper( routes.list, ) + self.delete = to_raw_response_wrapper( + routes.delete, + ) self.empty = to_raw_response_wrapper( routes.empty, ) + self.get = to_raw_response_wrapper( + routes.get, + ) class AsyncRoutesResourceWithRawResponse: @@ -315,12 +654,21 @@ def __init__(self, routes: AsyncRoutesResource) -> None: self.create = async_to_raw_response_wrapper( routes.create, ) + self.update = async_to_raw_response_wrapper( + routes.update, + ) self.list = async_to_raw_response_wrapper( routes.list, ) + self.delete = async_to_raw_response_wrapper( + routes.delete, + ) self.empty = async_to_raw_response_wrapper( routes.empty, ) + self.get = async_to_raw_response_wrapper( + routes.get, + ) class RoutesResourceWithStreamingResponse: @@ -330,12 +678,21 @@ def __init__(self, routes: RoutesResource) -> None: self.create = to_streamed_response_wrapper( routes.create, ) + self.update = to_streamed_response_wrapper( + routes.update, + ) self.list = to_streamed_response_wrapper( routes.list, ) + self.delete = to_streamed_response_wrapper( + routes.delete, + ) self.empty = to_streamed_response_wrapper( routes.empty, ) + self.get = to_streamed_response_wrapper( + routes.get, + ) class AsyncRoutesResourceWithStreamingResponse: @@ -345,9 +702,18 @@ def __init__(self, routes: AsyncRoutesResource) -> None: self.create = async_to_streamed_response_wrapper( routes.create, ) + self.update = async_to_streamed_response_wrapper( + routes.update, + ) self.list = async_to_streamed_response_wrapper( routes.list, ) + self.delete = async_to_streamed_response_wrapper( + routes.delete, + ) self.empty = async_to_streamed_response_wrapper( routes.empty, ) + self.get = async_to_streamed_response_wrapper( + routes.get, + ) diff --git a/src/cloudflare/resources/magic_transit/sites/acls.py b/src/cloudflare/resources/magic_transit/sites/acls.py index c5ac6f1d672..6d675b5378a 100644 --- a/src/cloudflare/resources/magic_transit/sites/acls.py +++ b/src/cloudflare/resources/magic_transit/sites/acls.py @@ -25,7 +25,7 @@ AsyncPaginator, make_request_options, ) -from ....types.magic_transit.sites import acl_create_params +from ....types.magic_transit.sites import acl_edit_params, acl_create_params, acl_update_params from ....types.magic_transit.sites.acl import ACL from ....types.magic_transit.sites.allowed_protocol import AllowedProtocol from ....types.magic_transit.sites.acl_configuration_param import ACLConfigurationParam @@ -112,6 +112,81 @@ def create( cast_to=cast(Type[ACL], ResultWrapper[ACL]), ) + def update( + self, + acl_id: str, + *, + account_id: str, + site_id: str, + description: str | NotGiven = NOT_GIVEN, + forward_locally: bool | NotGiven = NOT_GIVEN, + lan_1: ACLConfigurationParam | NotGiven = NOT_GIVEN, + lan_2: ACLConfigurationParam | NotGiven = NOT_GIVEN, + name: str | NotGiven = NOT_GIVEN, + protocols: List[AllowedProtocol] | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> ACL: + """ + Update a specific Site ACL. + + Args: + account_id: Identifier + + site_id: Identifier + + acl_id: Identifier + + description: Description for the ACL. + + forward_locally: The desired forwarding action for this ACL policy. If set to "false", the policy + will forward traffic to Cloudflare. If set to "true", the policy will forward + traffic locally on the Magic Connector. If not included in request, will default + to false. + + name: The name of the ACL. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not site_id: + raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") + if not acl_id: + raise ValueError(f"Expected a non-empty value for `acl_id` but received {acl_id!r}") + return self._put( + f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}", + body=maybe_transform( + { + "description": description, + "forward_locally": forward_locally, + "lan_1": lan_1, + "lan_2": lan_2, + "name": name, + "protocols": protocols, + }, + acl_update_params.ACLUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ACL]._unwrapper, + ), + cast_to=cast(Type[ACL], ResultWrapper[ACL]), + ) + def list( self, site_id: str, @@ -153,6 +228,179 @@ def list( model=ACL, ) + def delete( + self, + acl_id: str, + *, + account_id: str, + site_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> ACL: + """ + Remove a specific Site ACL. + + Args: + account_id: Identifier + + site_id: Identifier + + acl_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not site_id: + raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") + if not acl_id: + raise ValueError(f"Expected a non-empty value for `acl_id` but received {acl_id!r}") + return self._delete( + f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ACL]._unwrapper, + ), + cast_to=cast(Type[ACL], ResultWrapper[ACL]), + ) + + def edit( + self, + acl_id: str, + *, + account_id: str, + site_id: str, + description: str | NotGiven = NOT_GIVEN, + forward_locally: bool | NotGiven = NOT_GIVEN, + lan_1: ACLConfigurationParam | NotGiven = NOT_GIVEN, + lan_2: ACLConfigurationParam | NotGiven = NOT_GIVEN, + name: str | NotGiven = NOT_GIVEN, + protocols: List[AllowedProtocol] | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> ACL: + """ + Patch a specific Site ACL. + + Args: + account_id: Identifier + + site_id: Identifier + + acl_id: Identifier + + description: Description for the ACL. + + forward_locally: The desired forwarding action for this ACL policy. If set to "false", the policy + will forward traffic to Cloudflare. If set to "true", the policy will forward + traffic locally on the Magic Connector. If not included in request, will default + to false. + + name: The name of the ACL. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not site_id: + raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") + if not acl_id: + raise ValueError(f"Expected a non-empty value for `acl_id` but received {acl_id!r}") + return self._patch( + f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}", + body=maybe_transform( + { + "description": description, + "forward_locally": forward_locally, + "lan_1": lan_1, + "lan_2": lan_2, + "name": name, + "protocols": protocols, + }, + acl_edit_params.ACLEditParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ACL]._unwrapper, + ), + cast_to=cast(Type[ACL], ResultWrapper[ACL]), + ) + + def get( + self, + acl_id: str, + *, + account_id: str, + site_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> ACL: + """ + Get a specific Site ACL. + + Args: + account_id: Identifier + + site_id: Identifier + + acl_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not site_id: + raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") + if not acl_id: + raise ValueError(f"Expected a non-empty value for `acl_id` but received {acl_id!r}") + return self._get( + f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ACL]._unwrapper, + ), + cast_to=cast(Type[ACL], ResultWrapper[ACL]), + ) + class AsyncACLsResource(AsyncAPIResource): @cached_property @@ -233,6 +481,81 @@ async def create( cast_to=cast(Type[ACL], ResultWrapper[ACL]), ) + async def update( + self, + acl_id: str, + *, + account_id: str, + site_id: str, + description: str | NotGiven = NOT_GIVEN, + forward_locally: bool | NotGiven = NOT_GIVEN, + lan_1: ACLConfigurationParam | NotGiven = NOT_GIVEN, + lan_2: ACLConfigurationParam | NotGiven = NOT_GIVEN, + name: str | NotGiven = NOT_GIVEN, + protocols: List[AllowedProtocol] | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> ACL: + """ + Update a specific Site ACL. + + Args: + account_id: Identifier + + site_id: Identifier + + acl_id: Identifier + + description: Description for the ACL. + + forward_locally: The desired forwarding action for this ACL policy. If set to "false", the policy + will forward traffic to Cloudflare. If set to "true", the policy will forward + traffic locally on the Magic Connector. If not included in request, will default + to false. + + name: The name of the ACL. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not site_id: + raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") + if not acl_id: + raise ValueError(f"Expected a non-empty value for `acl_id` but received {acl_id!r}") + return await self._put( + f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}", + body=await async_maybe_transform( + { + "description": description, + "forward_locally": forward_locally, + "lan_1": lan_1, + "lan_2": lan_2, + "name": name, + "protocols": protocols, + }, + acl_update_params.ACLUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ACL]._unwrapper, + ), + cast_to=cast(Type[ACL], ResultWrapper[ACL]), + ) + def list( self, site_id: str, @@ -274,6 +597,179 @@ def list( model=ACL, ) + async def delete( + self, + acl_id: str, + *, + account_id: str, + site_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> ACL: + """ + Remove a specific Site ACL. + + Args: + account_id: Identifier + + site_id: Identifier + + acl_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not site_id: + raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") + if not acl_id: + raise ValueError(f"Expected a non-empty value for `acl_id` but received {acl_id!r}") + return await self._delete( + f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ACL]._unwrapper, + ), + cast_to=cast(Type[ACL], ResultWrapper[ACL]), + ) + + async def edit( + self, + acl_id: str, + *, + account_id: str, + site_id: str, + description: str | NotGiven = NOT_GIVEN, + forward_locally: bool | NotGiven = NOT_GIVEN, + lan_1: ACLConfigurationParam | NotGiven = NOT_GIVEN, + lan_2: ACLConfigurationParam | NotGiven = NOT_GIVEN, + name: str | NotGiven = NOT_GIVEN, + protocols: List[AllowedProtocol] | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> ACL: + """ + Patch a specific Site ACL. + + Args: + account_id: Identifier + + site_id: Identifier + + acl_id: Identifier + + description: Description for the ACL. + + forward_locally: The desired forwarding action for this ACL policy. If set to "false", the policy + will forward traffic to Cloudflare. If set to "true", the policy will forward + traffic locally on the Magic Connector. If not included in request, will default + to false. + + name: The name of the ACL. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not site_id: + raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") + if not acl_id: + raise ValueError(f"Expected a non-empty value for `acl_id` but received {acl_id!r}") + return await self._patch( + f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}", + body=await async_maybe_transform( + { + "description": description, + "forward_locally": forward_locally, + "lan_1": lan_1, + "lan_2": lan_2, + "name": name, + "protocols": protocols, + }, + acl_edit_params.ACLEditParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ACL]._unwrapper, + ), + cast_to=cast(Type[ACL], ResultWrapper[ACL]), + ) + + async def get( + self, + acl_id: str, + *, + account_id: str, + site_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> ACL: + """ + Get a specific Site ACL. + + Args: + account_id: Identifier + + site_id: Identifier + + acl_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not site_id: + raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}") + if not acl_id: + raise ValueError(f"Expected a non-empty value for `acl_id` but received {acl_id!r}") + return await self._get( + f"/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ACL]._unwrapper, + ), + cast_to=cast(Type[ACL], ResultWrapper[ACL]), + ) + class ACLsResourceWithRawResponse: def __init__(self, acls: ACLsResource) -> None: @@ -282,9 +778,21 @@ def __init__(self, acls: ACLsResource) -> None: self.create = to_raw_response_wrapper( acls.create, ) + self.update = to_raw_response_wrapper( + acls.update, + ) self.list = to_raw_response_wrapper( acls.list, ) + self.delete = to_raw_response_wrapper( + acls.delete, + ) + self.edit = to_raw_response_wrapper( + acls.edit, + ) + self.get = to_raw_response_wrapper( + acls.get, + ) class AsyncACLsResourceWithRawResponse: @@ -294,9 +802,21 @@ def __init__(self, acls: AsyncACLsResource) -> None: self.create = async_to_raw_response_wrapper( acls.create, ) + self.update = async_to_raw_response_wrapper( + acls.update, + ) self.list = async_to_raw_response_wrapper( acls.list, ) + self.delete = async_to_raw_response_wrapper( + acls.delete, + ) + self.edit = async_to_raw_response_wrapper( + acls.edit, + ) + self.get = async_to_raw_response_wrapper( + acls.get, + ) class ACLsResourceWithStreamingResponse: @@ -306,9 +826,21 @@ def __init__(self, acls: ACLsResource) -> None: self.create = to_streamed_response_wrapper( acls.create, ) + self.update = to_streamed_response_wrapper( + acls.update, + ) self.list = to_streamed_response_wrapper( acls.list, ) + self.delete = to_streamed_response_wrapper( + acls.delete, + ) + self.edit = to_streamed_response_wrapper( + acls.edit, + ) + self.get = to_streamed_response_wrapper( + acls.get, + ) class AsyncACLsResourceWithStreamingResponse: @@ -318,6 +850,18 @@ def __init__(self, acls: AsyncACLsResource) -> None: self.create = async_to_streamed_response_wrapper( acls.create, ) + self.update = async_to_streamed_response_wrapper( + acls.update, + ) self.list = async_to_streamed_response_wrapper( acls.list, ) + self.delete = async_to_streamed_response_wrapper( + acls.delete, + ) + self.edit = async_to_streamed_response_wrapper( + acls.edit, + ) + self.get = async_to_streamed_response_wrapper( + acls.get, + ) diff --git a/src/cloudflare/types/ai_gateway/logs/__init__.py b/src/cloudflare/types/ai_gateway/logs/__init__.py deleted file mode 100644 index f8ee8b14b1c..00000000000 --- a/src/cloudflare/types/ai_gateway/logs/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations diff --git a/src/cloudflare/types/magic_transit/__init__.py b/src/cloudflare/types/magic_transit/__init__.py index 446a433bc84..ad2327c5724 100644 --- a/src/cloudflare/types/magic_transit/__init__.py +++ b/src/cloudflare/types/magic_transit/__init__.py @@ -4,6 +4,7 @@ from .site import Site as Site from .scope import Scope as Scope +from .scope_param import ScopeParam as ScopeParam from .health_check import HealthCheck as HealthCheck from .psk_metadata import PSKMetadata as PSKMetadata from .site_location import SiteLocation as SiteLocation @@ -15,6 +16,7 @@ from .health_check_rate import HealthCheckRate as HealthCheckRate from .health_check_type import HealthCheckType as HealthCheckType from .health_check_param import HealthCheckParam as HealthCheckParam +from .route_get_response import RouteGetResponse as RouteGetResponse from .site_create_params import SiteCreateParams as SiteCreateParams from .site_update_params import SiteUpdateParams as SiteUpdateParams from .app_create_response import AppCreateResponse as AppCreateResponse @@ -22,19 +24,35 @@ from .app_update_response import AppUpdateResponse as AppUpdateResponse from .route_create_params import RouteCreateParams as RouteCreateParams from .route_list_response import RouteListResponse as RouteListResponse +from .route_update_params import RouteUpdateParams as RouteUpdateParams from .site_location_param import SiteLocationParam as SiteLocationParam from .route_empty_response import RouteEmptyResponse as RouteEmptyResponse from .connector_edit_params import ConnectorEditParams as ConnectorEditParams 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 .connector_get_response import ConnectorGetResponse as ConnectorGetResponse from .connector_edit_response import ConnectorEditResponse as ConnectorEditResponse from .connector_list_response import ConnectorListResponse as ConnectorListResponse from .connector_update_params import ConnectorUpdateParams as ConnectorUpdateParams +from .gre_tunnel_get_response import GRETunnelGetResponse as GRETunnelGetResponse from .gre_tunnel_create_params import GRETunnelCreateParams as GRETunnelCreateParams from .gre_tunnel_list_response import GRETunnelListResponse as GRETunnelListResponse +from .gre_tunnel_update_params import GRETunnelUpdateParams as GRETunnelUpdateParams from .connector_update_response import ConnectorUpdateResponse as ConnectorUpdateResponse +from .ipsec_tunnel_get_response import IPSECTunnelGetResponse as IPSECTunnelGetResponse from .gre_tunnel_create_response import GRETunnelCreateResponse as GRETunnelCreateResponse +from .gre_tunnel_delete_response import GRETunnelDeleteResponse as GRETunnelDeleteResponse +from .gre_tunnel_update_response import GRETunnelUpdateResponse as GRETunnelUpdateResponse from .ipsec_tunnel_create_params import IPSECTunnelCreateParams as IPSECTunnelCreateParams from .ipsec_tunnel_list_response import IPSECTunnelListResponse as IPSECTunnelListResponse +from .ipsec_tunnel_update_params import IPSECTunnelUpdateParams as IPSECTunnelUpdateParams +from .cf_interconnect_get_response import CfInterconnectGetResponse as CfInterconnectGetResponse from .ipsec_tunnel_create_response import IPSECTunnelCreateResponse as IPSECTunnelCreateResponse +from .ipsec_tunnel_delete_response import IPSECTunnelDeleteResponse as IPSECTunnelDeleteResponse +from .ipsec_tunnel_update_response import IPSECTunnelUpdateResponse as IPSECTunnelUpdateResponse from .cf_interconnect_list_response import CfInterconnectListResponse as CfInterconnectListResponse +from .cf_interconnect_update_params import CfInterconnectUpdateParams as CfInterconnectUpdateParams +from .cf_interconnect_update_response import CfInterconnectUpdateResponse as CfInterconnectUpdateResponse +from .ipsec_tunnel_psk_generate_params import IPSECTunnelPSKGenerateParams as IPSECTunnelPSKGenerateParams +from .ipsec_tunnel_psk_generate_response import IPSECTunnelPSKGenerateResponse as IPSECTunnelPSKGenerateResponse diff --git a/src/cloudflare/types/magic_transit/cf_interconnect_get_response.py b/src/cloudflare/types/magic_transit/cf_interconnect_get_response.py new file mode 100644 index 00000000000..1693571a82a --- /dev/null +++ b/src/cloudflare/types/magic_transit/cf_interconnect_get_response.py @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["CfInterconnectGetResponse"] + + +class CfInterconnectGetResponse(BaseModel): + interconnect: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/cf_interconnect_update_params.py b/src/cloudflare/types/magic_transit/cf_interconnect_update_params.py new file mode 100644 index 00000000000..00fca27a8f2 --- /dev/null +++ b/src/cloudflare/types/magic_transit/cf_interconnect_update_params.py @@ -0,0 +1,63 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +from .health_check_rate import HealthCheckRate +from .health_check_type import HealthCheckType + +__all__ = ["CfInterconnectUpdateParams", "GRE", "HealthCheck"] + + +class CfInterconnectUpdateParams(TypedDict, total=False): + account_id: Required[str] + """Identifier""" + + description: str + """An optional description of the interconnect.""" + + gre: GRE + """The configuration specific to GRE interconnects.""" + + health_check: HealthCheck + + interface_address: str + """ + A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side + of the tunnel. Select the subnet from the following private IP space: + 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. + """ + + mtu: int + """The Maximum Transmission Unit (MTU) in bytes for the interconnect. + + The minimum value is 576. + """ + + +class GRE(TypedDict, total=False): + cloudflare_endpoint: str + """ + The IP address assigned to the Cloudflare side of the GRE tunnel created as part + of the Interconnect. + """ + + +class HealthCheck(TypedDict, total=False): + enabled: bool + """Determines whether to run healthchecks for a tunnel.""" + + rate: HealthCheckRate + """How frequent the health check is run. The default value is `mid`.""" + + target: str + """The destination address in a request type health check. + + After the healthcheck is decapsulated at the customer end of the tunnel, the + ICMP echo will be forwarded to this address. This field defaults to + `customer_gre_endpoint address`. + """ + + type: HealthCheckType + """The type of healthcheck to run, reply or request. The default value is `reply`.""" diff --git a/src/cloudflare/types/magic_transit/cf_interconnect_update_response.py b/src/cloudflare/types/magic_transit/cf_interconnect_update_response.py new file mode 100644 index 00000000000..e21d22dbd40 --- /dev/null +++ b/src/cloudflare/types/magic_transit/cf_interconnect_update_response.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["CfInterconnectUpdateResponse"] + + +class CfInterconnectUpdateResponse(BaseModel): + modified: Optional[bool] = None + + modified_interconnect: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_delete_response.py b/src/cloudflare/types/magic_transit/gre_tunnel_delete_response.py new file mode 100644 index 00000000000..5165f2dcc3b --- /dev/null +++ b/src/cloudflare/types/magic_transit/gre_tunnel_delete_response.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["GRETunnelDeleteResponse"] + + +class GRETunnelDeleteResponse(BaseModel): + deleted: Optional[bool] = None + + deleted_gre_tunnel: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_get_response.py b/src/cloudflare/types/magic_transit/gre_tunnel_get_response.py new file mode 100644 index 00000000000..141c70992f1 --- /dev/null +++ b/src/cloudflare/types/magic_transit/gre_tunnel_get_response.py @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["GRETunnelGetResponse"] + + +class GRETunnelGetResponse(BaseModel): + gre_tunnel: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_update_params.py b/src/cloudflare/types/magic_transit/gre_tunnel_update_params.py new file mode 100644 index 00000000000..6d891bbe546 --- /dev/null +++ b/src/cloudflare/types/magic_transit/gre_tunnel_update_params.py @@ -0,0 +1,48 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +from .health_check_param import HealthCheckParam + +__all__ = ["GRETunnelUpdateParams"] + + +class GRETunnelUpdateParams(TypedDict, total=False): + account_id: Required[str] + """Identifier""" + + cloudflare_gre_endpoint: Required[str] + """The IP address assigned to the Cloudflare side of the GRE tunnel.""" + + customer_gre_endpoint: Required[str] + """The IP address assigned to the customer side of the GRE tunnel.""" + + interface_address: Required[str] + """ + A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side + of the tunnel. Select the subnet from the following private IP space: + 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. + """ + + name: Required[str] + """The name of the tunnel. + + The name cannot contain spaces or special characters, must be 15 characters or + less, and cannot share a name with another GRE tunnel. + """ + + description: str + """An optional description of the GRE tunnel.""" + + health_check: HealthCheckParam + + mtu: int + """Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. + + The minimum value is 576. + """ + + ttl: int + """Time To Live (TTL) in number of hops of the GRE tunnel.""" diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_update_response.py b/src/cloudflare/types/magic_transit/gre_tunnel_update_response.py new file mode 100644 index 00000000000..c84ba582d7e --- /dev/null +++ b/src/cloudflare/types/magic_transit/gre_tunnel_update_response.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["GRETunnelUpdateResponse"] + + +class GRETunnelUpdateResponse(BaseModel): + modified: Optional[bool] = None + + modified_gre_tunnel: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_delete_response.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_delete_response.py new file mode 100644 index 00000000000..b39ba183f72 --- /dev/null +++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_delete_response.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["IPSECTunnelDeleteResponse"] + + +class IPSECTunnelDeleteResponse(BaseModel): + deleted: Optional[bool] = None + + deleted_ipsec_tunnel: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_get_response.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_get_response.py new file mode 100644 index 00000000000..816098c9ead --- /dev/null +++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_get_response.py @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["IPSECTunnelGetResponse"] + + +class IPSECTunnelGetResponse(BaseModel): + ipsec_tunnel: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_params.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_params.py new file mode 100644 index 00000000000..1066fa603d1 --- /dev/null +++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_params.py @@ -0,0 +1,14 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["IPSECTunnelPSKGenerateParams"] + + +class IPSECTunnelPSKGenerateParams(TypedDict, total=False): + account_id: Required[str] + """Identifier""" + + body: Required[object] diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_response.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_response.py new file mode 100644 index 00000000000..9c4438b1456 --- /dev/null +++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_response.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel +from .psk_metadata import PSKMetadata + +__all__ = ["IPSECTunnelPSKGenerateResponse"] + + +class IPSECTunnelPSKGenerateResponse(BaseModel): + ipsec_tunnel_id: Optional[str] = None + """Identifier""" + + psk: Optional[str] = None + """A randomly generated or provided string for use in the IPsec tunnel.""" + + psk_metadata: Optional[PSKMetadata] = None + """The PSK metadata that includes when the PSK was generated.""" diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_update_params.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_update_params.py new file mode 100644 index 00000000000..8a0170e0345 --- /dev/null +++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_update_params.py @@ -0,0 +1,47 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +from .health_check_param import HealthCheckParam + +__all__ = ["IPSECTunnelUpdateParams"] + + +class IPSECTunnelUpdateParams(TypedDict, total=False): + account_id: Required[str] + """Identifier""" + + cloudflare_endpoint: Required[str] + """The IP address assigned to the Cloudflare side of the IPsec tunnel.""" + + interface_address: Required[str] + """ + A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side + of the tunnel. Select the subnet from the following private IP space: + 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. + """ + + name: Required[str] + """The name of the IPsec tunnel. The name cannot share a name with other tunnels.""" + + customer_endpoint: str + """The IP address assigned to the customer side of the IPsec tunnel. + + Not required, but must be set for proactive traceroutes to work. + """ + + description: str + """An optional description forthe IPsec tunnel.""" + + health_check: HealthCheckParam + + psk: str + """A randomly generated or provided string for use in the IPsec tunnel.""" + + replay_protection: bool + """ + If `true`, then IPsec replay protection will be supported in the + Cloudflare-to-customer direction. + """ diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_update_response.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_update_response.py new file mode 100644 index 00000000000..8a7b92e2b11 --- /dev/null +++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_update_response.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["IPSECTunnelUpdateResponse"] + + +class IPSECTunnelUpdateResponse(BaseModel): + modified: Optional[bool] = None + + modified_ipsec_tunnel: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/route_delete_response.py b/src/cloudflare/types/magic_transit/route_delete_response.py new file mode 100644 index 00000000000..096e4ece8f1 --- /dev/null +++ b/src/cloudflare/types/magic_transit/route_delete_response.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["RouteDeleteResponse"] + + +class RouteDeleteResponse(BaseModel): + deleted: Optional[bool] = None + + deleted_route: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/route_get_response.py b/src/cloudflare/types/magic_transit/route_get_response.py new file mode 100644 index 00000000000..f23ba2c2ec4 --- /dev/null +++ b/src/cloudflare/types/magic_transit/route_get_response.py @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["RouteGetResponse"] + + +class RouteGetResponse(BaseModel): + route: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/route_update_params.py b/src/cloudflare/types/magic_transit/route_update_params.py new file mode 100644 index 00000000000..14d10ad42c0 --- /dev/null +++ b/src/cloudflare/types/magic_transit/route_update_params.py @@ -0,0 +1,32 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +from .scope_param import ScopeParam + +__all__ = ["RouteUpdateParams"] + + +class RouteUpdateParams(TypedDict, total=False): + account_id: Required[str] + """Identifier""" + + nexthop: Required[str] + """The next-hop IP Address for the static route.""" + + prefix: Required[str] + """IP Prefix in Classless Inter-Domain Routing format.""" + + priority: Required[int] + """Priority of the static route.""" + + description: str + """An optional human provided description of the static route.""" + + scope: ScopeParam + """Used only for ECMP routes.""" + + weight: int + """Optional weight of the ECMP scope - if provided.""" diff --git a/src/cloudflare/types/magic_transit/route_update_response.py b/src/cloudflare/types/magic_transit/route_update_response.py new file mode 100644 index 00000000000..33b497d969f --- /dev/null +++ b/src/cloudflare/types/magic_transit/route_update_response.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["RouteUpdateResponse"] + + +class RouteUpdateResponse(BaseModel): + modified: Optional[bool] = None + + modified_route: Optional[object] = None diff --git a/src/cloudflare/types/magic_transit/scope_param.py b/src/cloudflare/types/magic_transit/scope_param.py new file mode 100644 index 00000000000..95df559e364 --- /dev/null +++ b/src/cloudflare/types/magic_transit/scope_param.py @@ -0,0 +1,16 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List +from typing_extensions import TypedDict + +__all__ = ["ScopeParam"] + + +class ScopeParam(TypedDict, total=False): + colo_names: List[str] + """List of colo names for the ECMP scope.""" + + colo_regions: List[str] + """List of colo regions for the ECMP scope.""" diff --git a/src/cloudflare/types/magic_transit/sites/__init__.py b/src/cloudflare/types/magic_transit/sites/__init__.py index 14816eed960..38f592bb4e6 100644 --- a/src/cloudflare/types/magic_transit/sites/__init__.py +++ b/src/cloudflare/types/magic_transit/sites/__init__.py @@ -12,12 +12,14 @@ from .dhcp_server import DHCPServer as DHCPServer from .subnet_param import SubnetParam as SubnetParam from .routed_subnet import RoutedSubnet as RoutedSubnet +from .acl_edit_params import ACLEditParams as ACLEditParams from .lan_edit_params import LANEditParams as LANEditParams from .wan_edit_params import WANEditParams as WANEditParams from .allowed_protocol import AllowedProtocol as AllowedProtocol from .dhcp_relay_param import DHCPRelayParam as DHCPRelayParam from .acl_configuration import ACLConfiguration as ACLConfiguration from .acl_create_params import ACLCreateParams as ACLCreateParams +from .acl_update_params import ACLUpdateParams as ACLUpdateParams from .dhcp_server_param import DHCPServerParam as DHCPServerParam from .lan_create_params import LANCreateParams as LANCreateParams from .lan_update_params import LANUpdateParams as LANUpdateParams diff --git a/src/cloudflare/types/magic_transit/sites/acl_edit_params.py b/src/cloudflare/types/magic_transit/sites/acl_edit_params.py new file mode 100644 index 00000000000..8a6c7b0f5c6 --- /dev/null +++ b/src/cloudflare/types/magic_transit/sites/acl_edit_params.py @@ -0,0 +1,39 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List +from typing_extensions import Required, TypedDict + +from .allowed_protocol import AllowedProtocol +from .acl_configuration_param import ACLConfigurationParam + +__all__ = ["ACLEditParams"] + + +class ACLEditParams(TypedDict, total=False): + account_id: Required[str] + """Identifier""" + + site_id: Required[str] + """Identifier""" + + description: str + """Description for the ACL.""" + + forward_locally: bool + """The desired forwarding action for this ACL policy. + + If set to "false", the policy will forward traffic to Cloudflare. If set to + "true", the policy will forward traffic locally on the Magic Connector. If not + included in request, will default to false. + """ + + lan_1: ACLConfigurationParam + + lan_2: ACLConfigurationParam + + name: str + """The name of the ACL.""" + + protocols: List[AllowedProtocol] diff --git a/src/cloudflare/types/magic_transit/sites/acl_update_params.py b/src/cloudflare/types/magic_transit/sites/acl_update_params.py new file mode 100644 index 00000000000..5abc70c2329 --- /dev/null +++ b/src/cloudflare/types/magic_transit/sites/acl_update_params.py @@ -0,0 +1,39 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List +from typing_extensions import Required, TypedDict + +from .allowed_protocol import AllowedProtocol +from .acl_configuration_param import ACLConfigurationParam + +__all__ = ["ACLUpdateParams"] + + +class ACLUpdateParams(TypedDict, total=False): + account_id: Required[str] + """Identifier""" + + site_id: Required[str] + """Identifier""" + + description: str + """Description for the ACL.""" + + forward_locally: bool + """The desired forwarding action for this ACL policy. + + If set to "false", the policy will forward traffic to Cloudflare. If set to + "true", the policy will forward traffic locally on the Magic Connector. If not + included in request, will default to false. + """ + + lan_1: ACLConfigurationParam + + lan_2: ACLConfigurationParam + + name: str + """The name of the ACL.""" + + protocols: List[AllowedProtocol] diff --git a/tests/api_resources/ai_gateway/logs/__init__.py b/tests/api_resources/ai_gateway/logs/__init__.py deleted file mode 100644 index fd8019a9a1a..00000000000 --- a/tests/api_resources/ai_gateway/logs/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/magic_transit/sites/test_acls.py b/tests/api_resources/magic_transit/sites/test_acls.py index 10ffc357c63..9cac4c6dee6 100644 --- a/tests/api_resources/magic_transit/sites/test_acls.py +++ b/tests/api_resources/magic_transit/sites/test_acls.py @@ -10,7 +10,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.magic_transit.sites import ACL +from cloudflare.types.magic_transit.sites import ( + ACL, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -105,6 +107,91 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="PIN Pad - Cash Register", ) + @parametrize + def test_method_update(self, client: Cloudflare) -> None: + acl = client.magic_transit.sites.acls.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + def test_method_update_with_all_params(self, client: Cloudflare) -> None: + acl = client.magic_transit.sites.acls.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + description="Allows local traffic between PIN pads and cash register.", + forward_locally=True, + lan_1={ + "lan_id": "string", + "lan_name": "string", + "ports": [1, 1, 1], + "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], + }, + lan_2={ + "lan_id": "string", + "lan_name": "string", + "ports": [1, 1, 1], + "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], + }, + name="PIN Pad - Cash Register", + protocols=["tcp", "udp", "icmp"], + ) + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + def test_raw_response_update(self, client: Cloudflare) -> None: + response = client.magic_transit.sites.acls.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + acl = response.parse() + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + def test_streaming_response_update(self, client: Cloudflare) -> None: + with client.magic_transit.sites.acls.with_streaming_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + acl = response.parse() + assert_matches_type(ACL, acl, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.sites.acls.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): + client.magic_transit.sites.acls.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): + client.magic_transit.sites.acls.with_raw_response.update( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + @parametrize def test_method_list(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.list( @@ -153,6 +240,211 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", ) + @parametrize + def test_method_delete(self, client: Cloudflare) -> None: + acl = client.magic_transit.sites.acls.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.magic_transit.sites.acls.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + acl = response.parse() + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.magic_transit.sites.acls.with_streaming_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + acl = response.parse() + assert_matches_type(ACL, acl, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_delete(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.sites.acls.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): + client.magic_transit.sites.acls.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): + client.magic_transit.sites.acls.with_raw_response.delete( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + @parametrize + def test_method_edit(self, client: Cloudflare) -> None: + acl = client.magic_transit.sites.acls.edit( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + def test_method_edit_with_all_params(self, client: Cloudflare) -> None: + acl = client.magic_transit.sites.acls.edit( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + description="Allows local traffic between PIN pads and cash register.", + forward_locally=True, + lan_1={ + "lan_id": "string", + "lan_name": "string", + "ports": [1, 1, 1], + "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], + }, + lan_2={ + "lan_id": "string", + "lan_name": "string", + "ports": [1, 1, 1], + "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], + }, + name="PIN Pad - Cash Register", + protocols=["tcp", "udp", "icmp"], + ) + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + def test_raw_response_edit(self, client: Cloudflare) -> None: + response = client.magic_transit.sites.acls.with_raw_response.edit( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + acl = response.parse() + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + def test_streaming_response_edit(self, client: Cloudflare) -> None: + with client.magic_transit.sites.acls.with_streaming_response.edit( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + acl = response.parse() + assert_matches_type(ACL, acl, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.sites.acls.with_raw_response.edit( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): + client.magic_transit.sites.acls.with_raw_response.edit( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): + client.magic_transit.sites.acls.with_raw_response.edit( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + acl = client.magic_transit.sites.acls.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.magic_transit.sites.acls.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + acl = response.parse() + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.magic_transit.sites.acls.with_streaming_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + acl = response.parse() + assert_matches_type(ACL, acl, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.sites.acls.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): + client.magic_transit.sites.acls.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): + client.magic_transit.sites.acls.with_raw_response.get( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + class TestAsyncACLs: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -244,6 +536,91 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="PIN Pad - Cash Register", ) + @parametrize + async def test_method_update(self, async_client: AsyncCloudflare) -> None: + acl = await async_client.magic_transit.sites.acls.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: + acl = await async_client.magic_transit.sites.acls.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + description="Allows local traffic between PIN pads and cash register.", + forward_locally=True, + lan_1={ + "lan_id": "string", + "lan_name": "string", + "ports": [1, 1, 1], + "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], + }, + lan_2={ + "lan_id": "string", + "lan_name": "string", + "ports": [1, 1, 1], + "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], + }, + name="PIN Pad - Cash Register", + protocols=["tcp", "udp", "icmp"], + ) + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.sites.acls.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + acl = await response.parse() + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.sites.acls.with_streaming_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + acl = await response.parse() + assert_matches_type(ACL, acl, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.sites.acls.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): + await async_client.magic_transit.sites.acls.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): + await async_client.magic_transit.sites.acls.with_raw_response.update( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.list( @@ -291,3 +668,208 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: "", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) + + @parametrize + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + acl = await async_client.magic_transit.sites.acls.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.sites.acls.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + acl = await response.parse() + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.sites.acls.with_streaming_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + acl = await response.parse() + assert_matches_type(ACL, acl, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.sites.acls.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): + await async_client.magic_transit.sites.acls.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): + await async_client.magic_transit.sites.acls.with_raw_response.delete( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + @parametrize + async def test_method_edit(self, async_client: AsyncCloudflare) -> None: + acl = await async_client.magic_transit.sites.acls.edit( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: + acl = await async_client.magic_transit.sites.acls.edit( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + description="Allows local traffic between PIN pads and cash register.", + forward_locally=True, + lan_1={ + "lan_id": "string", + "lan_name": "string", + "ports": [1, 1, 1], + "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], + }, + lan_2={ + "lan_id": "string", + "lan_name": "string", + "ports": [1, 1, 1], + "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], + }, + name="PIN Pad - Cash Register", + protocols=["tcp", "udp", "icmp"], + ) + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.sites.acls.with_raw_response.edit( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + acl = await response.parse() + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.sites.acls.with_streaming_response.edit( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + acl = await response.parse() + assert_matches_type(ACL, acl, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.sites.acls.with_raw_response.edit( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): + await async_client.magic_transit.sites.acls.with_raw_response.edit( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): + await async_client.magic_transit.sites.acls.with_raw_response.edit( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + acl = await async_client.magic_transit.sites.acls.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.sites.acls.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + acl = await response.parse() + assert_matches_type(ACL, acl, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.sites.acls.with_streaming_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + acl = await response.parse() + assert_matches_type(ACL, acl, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.sites.acls.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): + await async_client.magic_transit.sites.acls.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): + await async_client.magic_transit.sites.acls.with_raw_response.get( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", + ) diff --git a/tests/api_resources/magic_transit/test_cf_interconnects.py b/tests/api_resources/magic_transit/test_cf_interconnects.py index 836520620fb..efb8610882b 100644 --- a/tests/api_resources/magic_transit/test_cf_interconnects.py +++ b/tests/api_resources/magic_transit/test_cf_interconnects.py @@ -9,7 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_transit import CfInterconnectListResponse +from cloudflare.types.magic_transit import ( + CfInterconnectGetResponse, + CfInterconnectListResponse, + CfInterconnectUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -17,6 +21,72 @@ class TestCfInterconnects: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @parametrize + def test_method_update(self, client: Cloudflare) -> None: + cf_interconnect = client.magic_transit.cf_interconnects.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) + + @parametrize + def test_method_update_with_all_params(self, client: Cloudflare) -> None: + cf_interconnect = client.magic_transit.cf_interconnects.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + description="Tunnel for Interconnect to ORD", + gre={"cloudflare_endpoint": "203.0.113.1"}, + health_check={ + "enabled": True, + "rate": "low", + "target": "203.0.113.1", + "type": "request", + }, + interface_address="192.0.2.0/31", + mtu=0, + ) + assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) + + @parametrize + def test_raw_response_update(self, client: Cloudflare) -> None: + response = client.magic_transit.cf_interconnects.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + cf_interconnect = response.parse() + assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) + + @parametrize + def test_streaming_response_update(self, client: Cloudflare) -> None: + with client.magic_transit.cf_interconnects.with_streaming_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + cf_interconnect = response.parse() + assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.cf_interconnects.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `cf_interconnect_id` but received ''"): + client.magic_transit.cf_interconnects.with_raw_response.update( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + @parametrize def test_method_list(self, client: Cloudflare) -> None: cf_interconnect = client.magic_transit.cf_interconnects.list( @@ -55,10 +125,124 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + cf_interconnect = client.magic_transit.cf_interconnects.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.magic_transit.cf_interconnects.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + cf_interconnect = response.parse() + assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.magic_transit.cf_interconnects.with_streaming_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + cf_interconnect = response.parse() + assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.cf_interconnects.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `cf_interconnect_id` but received ''"): + client.magic_transit.cf_interconnects.with_raw_response.get( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + class TestAsyncCfInterconnects: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @parametrize + async def test_method_update(self, async_client: AsyncCloudflare) -> None: + cf_interconnect = await async_client.magic_transit.cf_interconnects.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) + + @parametrize + async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: + cf_interconnect = await async_client.magic_transit.cf_interconnects.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + description="Tunnel for Interconnect to ORD", + gre={"cloudflare_endpoint": "203.0.113.1"}, + health_check={ + "enabled": True, + "rate": "low", + "target": "203.0.113.1", + "type": "request", + }, + interface_address="192.0.2.0/31", + mtu=0, + ) + assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) + + @parametrize + async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.cf_interconnects.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + cf_interconnect = await response.parse() + assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) + + @parametrize + async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.cf_interconnects.with_streaming_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + cf_interconnect = await response.parse() + assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.cf_interconnects.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `cf_interconnect_id` but received ''"): + await async_client.magic_transit.cf_interconnects.with_raw_response.update( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: cf_interconnect = await async_client.magic_transit.cf_interconnects.list( @@ -96,3 +280,51 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: await async_client.magic_transit.cf_interconnects.with_raw_response.list( account_id="", ) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + cf_interconnect = await async_client.magic_transit.cf_interconnects.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.cf_interconnects.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + cf_interconnect = await response.parse() + assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.cf_interconnects.with_streaming_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + cf_interconnect = await response.parse() + assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.cf_interconnects.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `cf_interconnect_id` but received ''"): + await async_client.magic_transit.cf_interconnects.with_raw_response.get( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) diff --git a/tests/api_resources/magic_transit/test_gre_tunnels.py b/tests/api_resources/magic_transit/test_gre_tunnels.py index 7cbc640a0f5..512d2d01880 100644 --- a/tests/api_resources/magic_transit/test_gre_tunnels.py +++ b/tests/api_resources/magic_transit/test_gre_tunnels.py @@ -9,7 +9,13 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_transit import GRETunnelListResponse, GRETunnelCreateResponse +from cloudflare.types.magic_transit import ( + GRETunnelGetResponse, + GRETunnelListResponse, + GRETunnelCreateResponse, + GRETunnelDeleteResponse, + GRETunnelUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -63,6 +69,96 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) + @parametrize + def test_method_update(self, client: Cloudflare) -> None: + gre_tunnel = client.magic_transit.gre_tunnels.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_gre_endpoint="203.0.113.1", + customer_gre_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="GRE_1", + ) + assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) + + @parametrize + def test_method_update_with_all_params(self, client: Cloudflare) -> None: + gre_tunnel = client.magic_transit.gre_tunnels.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_gre_endpoint="203.0.113.1", + customer_gre_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="GRE_1", + description="Tunnel for ISP X", + health_check={ + "direction": "bidirectional", + "enabled": True, + "rate": "low", + "target": "203.0.113.1", + "type": "request", + }, + mtu=0, + ttl=0, + ) + assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) + + @parametrize + def test_raw_response_update(self, client: Cloudflare) -> None: + response = client.magic_transit.gre_tunnels.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_gre_endpoint="203.0.113.1", + customer_gre_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="GRE_1", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + gre_tunnel = response.parse() + assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) + + @parametrize + def test_streaming_response_update(self, client: Cloudflare) -> None: + with client.magic_transit.gre_tunnels.with_streaming_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_gre_endpoint="203.0.113.1", + customer_gre_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="GRE_1", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + gre_tunnel = response.parse() + assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.gre_tunnels.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + cloudflare_gre_endpoint="203.0.113.1", + customer_gre_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="GRE_1", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `gre_tunnel_id` but received ''"): + client.magic_transit.gre_tunnels.with_raw_response.update( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_gre_endpoint="203.0.113.1", + customer_gre_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="GRE_1", + ) + @parametrize def test_method_list(self, client: Cloudflare) -> None: gre_tunnel = client.magic_transit.gre_tunnels.list( @@ -101,6 +197,102 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) + @parametrize + def test_method_delete(self, client: Cloudflare) -> None: + gre_tunnel = client.magic_transit.gre_tunnels.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) + + @parametrize + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.magic_transit.gre_tunnels.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + gre_tunnel = response.parse() + assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) + + @parametrize + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.magic_transit.gre_tunnels.with_streaming_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + gre_tunnel = response.parse() + assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_delete(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.gre_tunnels.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `gre_tunnel_id` but received ''"): + client.magic_transit.gre_tunnels.with_raw_response.delete( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + gre_tunnel = client.magic_transit.gre_tunnels.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.magic_transit.gre_tunnels.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + gre_tunnel = response.parse() + assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.magic_transit.gre_tunnels.with_streaming_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + gre_tunnel = response.parse() + assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.gre_tunnels.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `gre_tunnel_id` but received ''"): + client.magic_transit.gre_tunnels.with_raw_response.get( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + class TestAsyncGRETunnels: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -151,6 +343,96 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) + @parametrize + async def test_method_update(self, async_client: AsyncCloudflare) -> None: + gre_tunnel = await async_client.magic_transit.gre_tunnels.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_gre_endpoint="203.0.113.1", + customer_gre_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="GRE_1", + ) + assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) + + @parametrize + async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: + gre_tunnel = await async_client.magic_transit.gre_tunnels.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_gre_endpoint="203.0.113.1", + customer_gre_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="GRE_1", + description="Tunnel for ISP X", + health_check={ + "direction": "bidirectional", + "enabled": True, + "rate": "low", + "target": "203.0.113.1", + "type": "request", + }, + mtu=0, + ttl=0, + ) + assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) + + @parametrize + async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.gre_tunnels.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_gre_endpoint="203.0.113.1", + customer_gre_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="GRE_1", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + gre_tunnel = await response.parse() + assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) + + @parametrize + async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.gre_tunnels.with_streaming_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_gre_endpoint="203.0.113.1", + customer_gre_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="GRE_1", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + gre_tunnel = await response.parse() + assert_matches_type(GRETunnelUpdateResponse, gre_tunnel, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.gre_tunnels.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + cloudflare_gre_endpoint="203.0.113.1", + customer_gre_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="GRE_1", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `gre_tunnel_id` but received ''"): + await async_client.magic_transit.gre_tunnels.with_raw_response.update( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_gre_endpoint="203.0.113.1", + customer_gre_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="GRE_1", + ) + @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await async_client.magic_transit.gre_tunnels.list( @@ -188,3 +470,99 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: await async_client.magic_transit.gre_tunnels.with_raw_response.list( account_id="", ) + + @parametrize + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + gre_tunnel = await async_client.magic_transit.gre_tunnels.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.gre_tunnels.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + gre_tunnel = await response.parse() + assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.gre_tunnels.with_streaming_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + gre_tunnel = await response.parse() + assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.gre_tunnels.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `gre_tunnel_id` but received ''"): + await async_client.magic_transit.gre_tunnels.with_raw_response.delete( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + gre_tunnel = await async_client.magic_transit.gre_tunnels.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.gre_tunnels.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + gre_tunnel = await response.parse() + assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.gre_tunnels.with_streaming_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + gre_tunnel = await response.parse() + assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.gre_tunnels.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `gre_tunnel_id` but received ''"): + await async_client.magic_transit.gre_tunnels.with_raw_response.get( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) diff --git a/tests/api_resources/magic_transit/test_ipsec_tunnels.py b/tests/api_resources/magic_transit/test_ipsec_tunnels.py index 9f0d27fcfa5..18965ec738e 100644 --- a/tests/api_resources/magic_transit/test_ipsec_tunnels.py +++ b/tests/api_resources/magic_transit/test_ipsec_tunnels.py @@ -10,8 +10,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.magic_transit import ( + IPSECTunnelGetResponse, IPSECTunnelListResponse, IPSECTunnelCreateResponse, + IPSECTunnelDeleteResponse, + IPSECTunnelUpdateResponse, + IPSECTunnelPSKGenerateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -91,6 +95,91 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="IPsec_1", ) + @parametrize + def test_method_update(self, client: Cloudflare) -> None: + ipsec_tunnel = client.magic_transit.ipsec_tunnels.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="IPsec_1", + ) + assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) + + @parametrize + def test_method_update_with_all_params(self, client: Cloudflare) -> None: + ipsec_tunnel = client.magic_transit.ipsec_tunnels.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="IPsec_1", + customer_endpoint="203.0.113.1", + description="Tunnel for ISP X", + health_check={ + "direction": "bidirectional", + "enabled": True, + "rate": "low", + "target": "203.0.113.1", + "type": "request", + }, + psk="O3bwKSjnaoCxDoUxjcq4Rk8ZKkezQUiy", + replay_protection=False, + ) + assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) + + @parametrize + def test_raw_response_update(self, client: Cloudflare) -> None: + response = client.magic_transit.ipsec_tunnels.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="IPsec_1", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ipsec_tunnel = response.parse() + assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) + + @parametrize + def test_streaming_response_update(self, client: Cloudflare) -> None: + with client.magic_transit.ipsec_tunnels.with_streaming_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="IPsec_1", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ipsec_tunnel = response.parse() + assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.ipsec_tunnels.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + cloudflare_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="IPsec_1", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `ipsec_tunnel_id` but received ''"): + client.magic_transit.ipsec_tunnels.with_raw_response.update( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="IPsec_1", + ) + @parametrize def test_method_list(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.list( @@ -129,6 +218,155 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) + @parametrize + def test_method_delete(self, client: Cloudflare) -> None: + ipsec_tunnel = client.magic_transit.ipsec_tunnels.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) + + @parametrize + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.magic_transit.ipsec_tunnels.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ipsec_tunnel = response.parse() + assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) + + @parametrize + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.magic_transit.ipsec_tunnels.with_streaming_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ipsec_tunnel = response.parse() + assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_delete(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.ipsec_tunnels.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `ipsec_tunnel_id` but received ''"): + client.magic_transit.ipsec_tunnels.with_raw_response.delete( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + ipsec_tunnel = client.magic_transit.ipsec_tunnels.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.magic_transit.ipsec_tunnels.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ipsec_tunnel = response.parse() + assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.magic_transit.ipsec_tunnels.with_streaming_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ipsec_tunnel = response.parse() + assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.ipsec_tunnels.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `ipsec_tunnel_id` but received ''"): + client.magic_transit.ipsec_tunnels.with_raw_response.get( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + @parametrize + def test_method_psk_generate(self, client: Cloudflare) -> None: + ipsec_tunnel = client.magic_transit.ipsec_tunnels.psk_generate( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + body={}, + ) + assert_matches_type(IPSECTunnelPSKGenerateResponse, ipsec_tunnel, path=["response"]) + + @parametrize + def test_raw_response_psk_generate(self, client: Cloudflare) -> None: + response = client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + body={}, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ipsec_tunnel = response.parse() + assert_matches_type(IPSECTunnelPSKGenerateResponse, ipsec_tunnel, path=["response"]) + + @parametrize + def test_streaming_response_psk_generate(self, client: Cloudflare) -> None: + with client.magic_transit.ipsec_tunnels.with_streaming_response.psk_generate( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + body={}, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ipsec_tunnel = response.parse() + assert_matches_type(IPSECTunnelPSKGenerateResponse, ipsec_tunnel, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_psk_generate(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + body={}, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `ipsec_tunnel_id` but received ''"): + client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + body={}, + ) + class TestAsyncIPSECTunnels: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -204,6 +442,91 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="IPsec_1", ) + @parametrize + async def test_method_update(self, async_client: AsyncCloudflare) -> None: + ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="IPsec_1", + ) + assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) + + @parametrize + async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: + ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="IPsec_1", + customer_endpoint="203.0.113.1", + description="Tunnel for ISP X", + health_check={ + "direction": "bidirectional", + "enabled": True, + "rate": "low", + "target": "203.0.113.1", + "type": "request", + }, + psk="O3bwKSjnaoCxDoUxjcq4Rk8ZKkezQUiy", + replay_protection=False, + ) + assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) + + @parametrize + async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="IPsec_1", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ipsec_tunnel = await response.parse() + assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) + + @parametrize + async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="IPsec_1", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ipsec_tunnel = await response.parse() + assert_matches_type(IPSECTunnelUpdateResponse, ipsec_tunnel, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.ipsec_tunnels.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + cloudflare_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="IPsec_1", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `ipsec_tunnel_id` but received ''"): + await async_client.magic_transit.ipsec_tunnels.with_raw_response.update( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + cloudflare_endpoint="203.0.113.1", + interface_address="192.0.2.0/31", + name="IPsec_1", + ) + @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.list( @@ -241,3 +564,152 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: await async_client.magic_transit.ipsec_tunnels.with_raw_response.list( account_id="", ) + + @parametrize + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ipsec_tunnel = await response.parse() + assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ipsec_tunnel = await response.parse() + assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.ipsec_tunnels.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `ipsec_tunnel_id` but received ''"): + await async_client.magic_transit.ipsec_tunnels.with_raw_response.delete( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ipsec_tunnel = await response.parse() + assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ipsec_tunnel = await response.parse() + assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.ipsec_tunnels.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `ipsec_tunnel_id` but received ''"): + await async_client.magic_transit.ipsec_tunnels.with_raw_response.get( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + @parametrize + async def test_method_psk_generate(self, async_client: AsyncCloudflare) -> None: + ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.psk_generate( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + body={}, + ) + assert_matches_type(IPSECTunnelPSKGenerateResponse, ipsec_tunnel, path=["response"]) + + @parametrize + async def test_raw_response_psk_generate(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + body={}, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ipsec_tunnel = await response.parse() + assert_matches_type(IPSECTunnelPSKGenerateResponse, ipsec_tunnel, path=["response"]) + + @parametrize + async def test_streaming_response_psk_generate(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.psk_generate( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + body={}, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ipsec_tunnel = await response.parse() + assert_matches_type(IPSECTunnelPSKGenerateResponse, ipsec_tunnel, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_psk_generate(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + body={}, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `ipsec_tunnel_id` but received ''"): + await async_client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + body={}, + ) diff --git a/tests/api_resources/magic_transit/test_routes.py b/tests/api_resources/magic_transit/test_routes.py index 78985a57c3d..c72aba2ffde 100644 --- a/tests/api_resources/magic_transit/test_routes.py +++ b/tests/api_resources/magic_transit/test_routes.py @@ -10,9 +10,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.magic_transit import ( + RouteGetResponse, RouteListResponse, RouteEmptyResponse, RouteCreateResponse, + RouteDeleteResponse, + RouteUpdateResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -67,6 +70,86 @@ def test_path_params_create(self, client: Cloudflare) -> None: body={}, ) + @parametrize + def test_method_update(self, client: Cloudflare) -> None: + route = client.magic_transit.routes.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + nexthop="203.0.113.1", + prefix="192.0.2.0/24", + priority=0, + ) + assert_matches_type(RouteUpdateResponse, route, path=["response"]) + + @parametrize + def test_method_update_with_all_params(self, client: Cloudflare) -> None: + route = client.magic_transit.routes.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + nexthop="203.0.113.1", + prefix="192.0.2.0/24", + priority=0, + description="New route for new prefix 203.0.113.1", + scope={ + "colo_names": ["den01", "den01", "den01"], + "colo_regions": ["APAC", "APAC", "APAC"], + }, + weight=0, + ) + assert_matches_type(RouteUpdateResponse, route, path=["response"]) + + @parametrize + def test_raw_response_update(self, client: Cloudflare) -> None: + response = client.magic_transit.routes.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + nexthop="203.0.113.1", + prefix="192.0.2.0/24", + priority=0, + ) + + 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"]) + + @parametrize + def test_streaming_response_update(self, client: Cloudflare) -> None: + with client.magic_transit.routes.with_streaming_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + nexthop="203.0.113.1", + prefix="192.0.2.0/24", + priority=0, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + route = response.parse() + assert_matches_type(RouteUpdateResponse, route, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.routes.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + nexthop="203.0.113.1", + prefix="192.0.2.0/24", + priority=0, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): + client.magic_transit.routes.with_raw_response.update( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + nexthop="203.0.113.1", + prefix="192.0.2.0/24", + priority=0, + ) + @parametrize def test_method_list(self, client: Cloudflare) -> None: route = client.magic_transit.routes.list( @@ -105,6 +188,54 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) + @parametrize + def test_method_delete(self, client: Cloudflare) -> None: + route = client.magic_transit.routes.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(RouteDeleteResponse, route, path=["response"]) + + @parametrize + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.magic_transit.routes.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + 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"]) + + @parametrize + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.magic_transit.routes.with_streaming_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + route = response.parse() + assert_matches_type(RouteDeleteResponse, route, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_delete(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.routes.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): + client.magic_transit.routes.with_raw_response.delete( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + @parametrize def test_method_empty(self, client: Cloudflare) -> None: route = client.magic_transit.routes.empty( @@ -143,6 +274,54 @@ def test_path_params_empty(self, client: Cloudflare) -> None: account_id="", ) + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + route = client.magic_transit.routes.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(RouteGetResponse, route, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.magic_transit.routes.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + 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"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.magic_transit.routes.with_streaming_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + route = response.parse() + assert_matches_type(RouteGetResponse, route, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.routes.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): + client.magic_transit.routes.with_raw_response.get( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + class TestAsyncRoutes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -193,6 +372,86 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: body={}, ) + @parametrize + async def test_method_update(self, async_client: AsyncCloudflare) -> None: + route = await async_client.magic_transit.routes.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + nexthop="203.0.113.1", + prefix="192.0.2.0/24", + priority=0, + ) + assert_matches_type(RouteUpdateResponse, route, path=["response"]) + + @parametrize + async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: + route = await async_client.magic_transit.routes.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + nexthop="203.0.113.1", + prefix="192.0.2.0/24", + priority=0, + description="New route for new prefix 203.0.113.1", + scope={ + "colo_names": ["den01", "den01", "den01"], + "colo_regions": ["APAC", "APAC", "APAC"], + }, + weight=0, + ) + assert_matches_type(RouteUpdateResponse, route, path=["response"]) + + @parametrize + async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.routes.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + nexthop="203.0.113.1", + prefix="192.0.2.0/24", + priority=0, + ) + + 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"]) + + @parametrize + async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.routes.with_streaming_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + nexthop="203.0.113.1", + prefix="192.0.2.0/24", + priority=0, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + route = await response.parse() + assert_matches_type(RouteUpdateResponse, route, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.routes.with_raw_response.update( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + nexthop="203.0.113.1", + prefix="192.0.2.0/24", + priority=0, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): + await async_client.magic_transit.routes.with_raw_response.update( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + nexthop="203.0.113.1", + prefix="192.0.2.0/24", + priority=0, + ) + @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.list( @@ -231,6 +490,54 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) + @parametrize + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + route = await async_client.magic_transit.routes.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(RouteDeleteResponse, route, path=["response"]) + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.routes.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + 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"]) + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.routes.with_streaming_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + route = await response.parse() + assert_matches_type(RouteDeleteResponse, route, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.routes.with_raw_response.delete( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): + await async_client.magic_transit.routes.with_raw_response.delete( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + @parametrize async def test_method_empty(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.empty( @@ -268,3 +575,51 @@ async def test_path_params_empty(self, async_client: AsyncCloudflare) -> None: await async_client.magic_transit.routes.with_raw_response.empty( account_id="", ) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + route = await async_client.magic_transit.routes.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(RouteGetResponse, route, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.routes.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + 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"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.routes.with_streaming_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + route = await response.parse() + assert_matches_type(RouteGetResponse, route, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.routes.with_raw_response.get( + "023e105f4ecef8ad9ca31a8372d0c353", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): + await async_client.magic_transit.routes.with_raw_response.get( + "", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) From e91b22d78f5febfb73004c28afc0ff37369c5cd0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 03:43:00 +0000 Subject: [PATCH 105/124] feat(api): OpenAPI spec update via Stainless API (#1119) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index eaf5c444b01..ea1127a060c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-411fc42706796f9d708196eed9f4ad709877cf110b7c3a7a1ec4254ea41e1767.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b08744cc72a6a0538b81cebc0779ae8bcad774e16194cfad3050d741995479a5.yml From e088fa35be70b61e682c38505d186d55c526b41a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 08:40:21 +0000 Subject: [PATCH 106/124] feat(api): OpenAPI spec update via Stainless API (#1120) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index ea1127a060c..eaf5c444b01 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b08744cc72a6a0538b81cebc0779ae8bcad774e16194cfad3050d741995479a5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-411fc42706796f9d708196eed9f4ad709877cf110b7c3a7a1ec4254ea41e1767.yml From e5f8fab9950504ff8698fa7829691dada3b050ad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 09:11:33 +0000 Subject: [PATCH 107/124] feat(api): OpenAPI spec update via Stainless API (#1121) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index eaf5c444b01..5bdda214dc7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-411fc42706796f9d708196eed9f4ad709877cf110b7c3a7a1ec4254ea41e1767.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-595dd9be6f7a4f66159cb75d3e80634ae9d1ad0bf0901a1e97a57937dcfaa79a.yml From 406cd146437080265845e1c624bed4e4cbc506ae Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 10:20:13 +0000 Subject: [PATCH 108/124] feat(api): OpenAPI spec update via Stainless API (#1122) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 5bdda214dc7..ea1127a060c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-595dd9be6f7a4f66159cb75d3e80634ae9d1ad0bf0901a1e97a57937dcfaa79a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b08744cc72a6a0538b81cebc0779ae8bcad774e16194cfad3050d741995479a5.yml From 4d07c9279f476bd900fa730e714116d07eef7302 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 10:22:35 +0000 Subject: [PATCH 109/124] feat(api): OpenAPI spec update via Stainless API (#1123) --- .stats.yml | 2 +- api.md | 2 +- src/cloudflare/resources/url_scanner/scans.py | 10 +++++++++- src/cloudflare/types/url_scanner/__init__.py | 1 + .../types/url_scanner/scan_get_params.py | 17 +++++++++++++++++ tests/api_resources/url_scanner/test_scans.py | 18 ++++++++++++++++++ 6 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 src/cloudflare/types/url_scanner/scan_get_params.py diff --git a/.stats.yml b/.stats.yml index ea1127a060c..8ba209714d5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b08744cc72a6a0538b81cebc0779ae8bcad774e16194cfad3050d741995479a5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e3d243830285383252b295328e3dd96610460dd746c9a668c767961bebe05156.yml diff --git a/api.md b/api.md index 5cf9fd9a98e..1a3f90bc81a 100644 --- a/api.md +++ b/api.md @@ -6447,7 +6447,7 @@ from cloudflare.types.url_scanner import ( Methods: - client.url_scanner.scans.create(account_id, \*\*params) -> ScanCreateResponse -- client.url_scanner.scans.get(scan_id, \*, account_id) -> ScanGetResponse +- client.url_scanner.scans.get(scan_id, \*, account_id, \*\*params) -> ScanGetResponse - client.url_scanner.scans.har(scan_id, \*, account_id) -> ScanHarResponse - client.url_scanner.scans.screenshot(scan_id, \*, account_id, \*\*params) -> BinaryAPIResponse diff --git a/src/cloudflare/resources/url_scanner/scans.py b/src/cloudflare/resources/url_scanner/scans.py index 5708cfda794..54764c566f1 100644 --- a/src/cloudflare/resources/url_scanner/scans.py +++ b/src/cloudflare/resources/url_scanner/scans.py @@ -32,7 +32,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.url_scanner import scan_create_params, scan_screenshot_params +from ...types.url_scanner import scan_get_params, scan_create_params, scan_screenshot_params from ...types.url_scanner.scan_get_response import ScanGetResponse from ...types.url_scanner.scan_har_response import ScanHarResponse from ...types.url_scanner.scan_create_response import ScanCreateResponse @@ -119,6 +119,7 @@ def get( scan_id: str, *, account_id: str, + full: bool | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -134,6 +135,8 @@ def get( scan_id: Scan uuid + full: Whether to return full report (scan summary and network log). + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -153,6 +156,7 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + query=maybe_transform({"full": full}, scan_get_params.ScanGetParams), post_parser=ResultWrapper[ScanGetResponse]._unwrapper, ), cast_to=cast(Type[ScanGetResponse], ResultWrapper[ScanGetResponse]), @@ -332,6 +336,7 @@ async def get( scan_id: str, *, account_id: str, + full: bool | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -347,6 +352,8 @@ async def get( scan_id: Scan uuid + full: Whether to return full report (scan summary and network log). + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -366,6 +373,7 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + query=await async_maybe_transform({"full": full}, scan_get_params.ScanGetParams), post_parser=ResultWrapper[ScanGetResponse]._unwrapper, ), cast_to=cast(Type[ScanGetResponse], ResultWrapper[ScanGetResponse]), diff --git a/src/cloudflare/types/url_scanner/__init__.py b/src/cloudflare/types/url_scanner/__init__.py index dc7c82ec8f9..a533b1cdeb9 100644 --- a/src/cloudflare/types/url_scanner/__init__.py +++ b/src/cloudflare/types/url_scanner/__init__.py @@ -2,6 +2,7 @@ from __future__ import annotations +from .scan_get_params import ScanGetParams as ScanGetParams from .scan_get_response import ScanGetResponse as ScanGetResponse from .scan_har_response import ScanHarResponse as ScanHarResponse from .scan_create_params import ScanCreateParams as ScanCreateParams diff --git a/src/cloudflare/types/url_scanner/scan_get_params.py b/src/cloudflare/types/url_scanner/scan_get_params.py new file mode 100644 index 00000000000..3e19b2920f1 --- /dev/null +++ b/src/cloudflare/types/url_scanner/scan_get_params.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["ScanGetParams"] + + +class ScanGetParams(TypedDict, total=False): + account_id: Required[Annotated[str, PropertyInfo(alias="accountId")]] + """Account Id""" + + full: bool + """Whether to return full report (scan summary and network log).""" diff --git a/tests/api_resources/url_scanner/test_scans.py b/tests/api_resources/url_scanner/test_scans.py index f58a63f883e..8a33a5f10ce 100644 --- a/tests/api_resources/url_scanner/test_scans.py +++ b/tests/api_resources/url_scanner/test_scans.py @@ -90,6 +90,15 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(ScanGetResponse, scan, path=["response"]) + @parametrize + def test_method_get_with_all_params(self, client: Cloudflare) -> None: + scan = client.url_scanner.scans.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="string", + full=True, + ) + assert_matches_type(ScanGetResponse, scan, path=["response"]) + @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.url_scanner.scans.with_raw_response.get( @@ -325,6 +334,15 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ScanGetResponse, scan, path=["response"]) + @parametrize + async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: + scan = await async_client.url_scanner.scans.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="string", + full=True, + ) + assert_matches_type(ScanGetResponse, scan, path=["response"]) + @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.url_scanner.scans.with_raw_response.get( From 3f4305f5e07486a5457974970699092ae377cc28 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 10:44:30 +0000 Subject: [PATCH 110/124] feat(api): OpenAPI spec update via Stainless API (#1124) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8ba209714d5..082cdee84eb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e3d243830285383252b295328e3dd96610460dd746c9a668c767961bebe05156.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7f27b98e70e52a70b2e06d8be0c5b2a43b7b6849f858e7808a1d60b042044f79.yml From 1c8fc9c76e9a8d1272855f13d05d4e2709223a56 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 11:28:23 +0000 Subject: [PATCH 111/124] feat(api): OpenAPI spec update via Stainless API (#1125) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 082cdee84eb..45bbb0058a9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7f27b98e70e52a70b2e06d8be0c5b2a43b7b6849f858e7808a1d60b042044f79.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bcd92a7cfc8916729e8ebb8965318cec3f7645bdef2532a492e72985682044ee.yml From 5fee6993f6d19ac7c3a5e5882ac624539b2daf5d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 11:38:01 +0000 Subject: [PATCH 112/124] feat(api): OpenAPI spec update via Stainless API (#1126) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 45bbb0058a9..082cdee84eb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bcd92a7cfc8916729e8ebb8965318cec3f7645bdef2532a492e72985682044ee.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7f27b98e70e52a70b2e06d8be0c5b2a43b7b6849f858e7808a1d60b042044f79.yml From d9b6345797c9bcf41e496d3bf4d50a1c0e6ec82d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 11:40:17 +0000 Subject: [PATCH 113/124] feat(api): OpenAPI spec update via Stainless API (#1127) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 082cdee84eb..45bbb0058a9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7f27b98e70e52a70b2e06d8be0c5b2a43b7b6849f858e7808a1d60b042044f79.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bcd92a7cfc8916729e8ebb8965318cec3f7645bdef2532a492e72985682044ee.yml From 82081277f560979c861108a1504433c0b1fcafb6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 12:45:12 +0000 Subject: [PATCH 114/124] feat(api): OpenAPI spec update via Stainless API (#1128) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 45bbb0058a9..082cdee84eb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bcd92a7cfc8916729e8ebb8965318cec3f7645bdef2532a492e72985682044ee.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7f27b98e70e52a70b2e06d8be0c5b2a43b7b6849f858e7808a1d60b042044f79.yml From a1f52251ef825cd2917c8ca2dd15e0fe9ce8ed95 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 12:47:29 +0000 Subject: [PATCH 115/124] feat(api): OpenAPI spec update via Stainless API (#1129) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 082cdee84eb..f8d455f3eed 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7f27b98e70e52a70b2e06d8be0c5b2a43b7b6849f858e7808a1d60b042044f79.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2915621ef0bc80d29fd47f1d1433e4a56ab0fbeeed8849660a2c2a1cbc0bbfea.yml From 0fbad95a26fd182ca9431ea26c17affa87ce6f36 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 13:11:01 +0000 Subject: [PATCH 116/124] feat(api): OpenAPI spec update via Stainless API (#1130) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f8d455f3eed..8ba209714d5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2915621ef0bc80d29fd47f1d1433e4a56ab0fbeeed8849660a2c2a1cbc0bbfea.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e3d243830285383252b295328e3dd96610460dd746c9a668c767961bebe05156.yml From 5399fe786fa075c154e4f3aeb18b2d3af24f11a4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 16:22:54 +0000 Subject: [PATCH 117/124] feat(api): OpenAPI spec update via Stainless API (#1131) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8ba209714d5..082cdee84eb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e3d243830285383252b295328e3dd96610460dd746c9a668c767961bebe05156.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7f27b98e70e52a70b2e06d8be0c5b2a43b7b6849f858e7808a1d60b042044f79.yml From 06c6fbbdfc2af5364bae50137c5f63785af9bad3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 18:15:59 +0000 Subject: [PATCH 118/124] feat(api): OpenAPI spec update via Stainless API (#1132) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 082cdee84eb..8ba209714d5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7f27b98e70e52a70b2e06d8be0c5b2a43b7b6849f858e7808a1d60b042044f79.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e3d243830285383252b295328e3dd96610460dd746c9a668c767961bebe05156.yml From cc58279d91f03df3d94bcd818022b1ba080dc951 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 22 Jun 2024 04:47:31 +0000 Subject: [PATCH 119/124] feat(api): OpenAPI spec update via Stainless API (#1133) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8ba209714d5..45bbb0058a9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e3d243830285383252b295328e3dd96610460dd746c9a668c767961bebe05156.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bcd92a7cfc8916729e8ebb8965318cec3f7645bdef2532a492e72985682044ee.yml From 410724701368ba7b53132156b36f0f4aea3659fe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 01:28:01 +0000 Subject: [PATCH 120/124] feat(api): update via SDK Studio (#1134) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 45bbb0058a9..7cafb43135f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bcd92a7cfc8916729e8ebb8965318cec3f7645bdef2532a492e72985682044ee.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d0fe5cd9929c3c4036183a0a69b6012e931b6d7b85a39d74cbf7b963b5269436.yml From d459a477e6f0d587aba59d2bf785685b641ccd9f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 01:42:53 +0000 Subject: [PATCH 121/124] feat(api): update via SDK Studio (#1135) --- .stats.yml | 2 +- api.md | 6 +- src/cloudflare/resources/dns/records.py | 930 +++------ src/cloudflare/types/dns/a_record.py | 6 - src/cloudflare/types/dns/aaaa_record.py | 6 - src/cloudflare/types/dns/caa_record.py | 6 - src/cloudflare/types/dns/cert_record.py | 6 - src/cloudflare/types/dns/cname_record.py | 6 - src/cloudflare/types/dns/dnskey_record.py | 6 - src/cloudflare/types/dns/ds_record.py | 6 - src/cloudflare/types/dns/https_record.py | 6 - src/cloudflare/types/dns/loc_record.py | 6 - src/cloudflare/types/dns/mx_record.py | 6 - src/cloudflare/types/dns/naptr_record.py | 6 - src/cloudflare/types/dns/ns_record.py | 6 - src/cloudflare/types/dns/ptr_record.py | 6 - .../types/dns/record_create_params.py | 103 +- .../types/dns/record_edit_params.py | 103 +- .../types/dns/record_update_params.py | 103 +- src/cloudflare/types/dns/smimea_record.py | 6 - src/cloudflare/types/dns/srv_record.py | 6 - src/cloudflare/types/dns/sshfp_record.py | 6 - src/cloudflare/types/dns/svcb_record.py | 6 - src/cloudflare/types/dns/tlsa_record.py | 6 - src/cloudflare/types/dns/txt_record.py | 6 - src/cloudflare/types/dns/uri_record.py | 6 - tests/api_resources/dns/test_records.py | 1840 +++++++---------- 27 files changed, 1149 insertions(+), 2058 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7cafb43135f..65dd286b402 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d0fe5cd9929c3c4036183a0a69b6012e931b6d7b85a39d74cbf7b963b5269436.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cfad07b19358cd949055b19f0b3018c59d6d432d441c6ce1f1bfba4fe2ceb344.yml diff --git a/api.md b/api.md index 1a3f90bc81a..3f970882269 100644 --- a/api.md +++ b/api.md @@ -1634,11 +1634,11 @@ from cloudflare.types.dns import ( Methods: -- client.dns.records.create(\*, path_zone_id, \*\*params) -> Optional -- client.dns.records.update(dns_record_id, \*, path_zone_id, \*\*params) -> Optional +- client.dns.records.create(\*, zone_id, \*\*params) -> Optional +- client.dns.records.update(dns_record_id, \*, zone_id, \*\*params) -> Optional - client.dns.records.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[Record] - client.dns.records.delete(dns_record_id, \*, zone_id) -> Optional -- client.dns.records.edit(dns_record_id, \*, path_zone_id, \*\*params) -> Optional +- client.dns.records.edit(dns_record_id, \*, zone_id, \*\*params) -> Optional - client.dns.records.export(\*, zone_id) -> str - client.dns.records.get(dns_record_id, \*, zone_id) -> Optional - client.dns.records.import\_(\*, zone_id, \*\*params) -> Optional diff --git a/src/cloudflare/resources/dns/records.py b/src/cloudflare/resources/dns/records.py index 2eed4e82629..078bf19d50e 100644 --- a/src/cloudflare/resources/dns/records.py +++ b/src/cloudflare/resources/dns/records.py @@ -59,7 +59,7 @@ def with_streaming_response(self) -> RecordsResourceWithStreamingResponse: def create( self, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["A"], @@ -68,7 +68,6 @@ def create( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -87,7 +86,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier content: A valid IPv4 address. @@ -109,8 +108,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -125,7 +122,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["AAAA"], @@ -134,7 +131,6 @@ def create( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -153,7 +149,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier content: A valid IPv6 address. @@ -175,8 +171,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -191,7 +185,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.CAARecordData, name: str, type: Literal["CAA"], @@ -199,7 +193,6 @@ def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -218,7 +211,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a CAA record. @@ -237,8 +230,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -253,7 +244,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.CERTRecordData, name: str, type: Literal["CERT"], @@ -261,7 +252,6 @@ def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -280,7 +270,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a CERT record. @@ -299,8 +289,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -315,7 +303,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, content: object, name: str, type: Literal["CNAME"], @@ -324,7 +312,6 @@ def create( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -343,7 +330,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier content: A valid hostname. Must not match the record's name. @@ -365,8 +352,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -381,7 +366,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.DNSKEYRecordData, name: str, type: Literal["DNSKEY"], @@ -389,7 +374,6 @@ def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -408,7 +392,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a DNSKEY record. @@ -427,8 +411,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -443,7 +425,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.DSRecordData, name: str, type: Literal["DS"], @@ -451,7 +433,6 @@ def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -470,7 +451,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a DS record. @@ -489,8 +470,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -505,7 +484,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.HTTPSRecordData, name: str, type: Literal["HTTPS"], @@ -513,7 +492,6 @@ def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -532,7 +510,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a HTTPS record. @@ -551,8 +529,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -567,7 +543,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.LOCRecordData, name: str, type: Literal["LOC"], @@ -575,7 +551,6 @@ def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -594,7 +569,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a LOC record. @@ -613,8 +588,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -629,7 +602,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, content: str, name: str, priority: float, @@ -638,7 +611,6 @@ def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -657,7 +629,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier content: A valid mail server hostname. @@ -679,8 +651,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -695,7 +665,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.NAPTRRecordData, name: str, type: Literal["NAPTR"], @@ -703,7 +673,6 @@ def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -722,7 +691,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a NAPTR record. @@ -741,8 +710,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -757,7 +724,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["NS"], @@ -765,7 +732,6 @@ def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -784,7 +750,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier content: A valid name server host name. @@ -803,8 +769,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -819,7 +783,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["PTR"], @@ -827,7 +791,6 @@ def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -846,7 +809,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier content: Domain name pointing to the address. @@ -865,8 +828,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -881,7 +842,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.SMIMEARecordData, name: str, type: Literal["SMIMEA"], @@ -889,7 +850,6 @@ def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -908,7 +868,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a SMIMEA record. @@ -927,8 +887,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -943,7 +901,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.SRVRecordData, name: str, type: Literal["SRV"], @@ -951,7 +909,6 @@ def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -970,7 +927,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a SRV record. @@ -991,8 +948,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1007,7 +962,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.SSHFPRecordData, name: str, type: Literal["SSHFP"], @@ -1015,7 +970,6 @@ def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1034,7 +988,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a SSHFP record. @@ -1053,8 +1007,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1069,7 +1021,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.SVCBRecordData, name: str, type: Literal["SVCB"], @@ -1077,7 +1029,6 @@ def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1096,7 +1047,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a SVCB record. @@ -1115,8 +1066,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1131,7 +1080,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.TLSARecordData, name: str, type: Literal["TLSA"], @@ -1139,7 +1088,6 @@ def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1158,7 +1106,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a TLSA record. @@ -1177,8 +1125,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1193,7 +1139,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["TXT"], @@ -1201,7 +1147,6 @@ def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1220,7 +1165,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier content: Text content for the record. @@ -1239,8 +1184,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1255,7 +1198,7 @@ def create( def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.URIRecordData, name: str, priority: float, @@ -1264,7 +1207,6 @@ def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1283,7 +1225,7 @@ def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a URI record. @@ -1305,8 +1247,6 @@ def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1318,10 +1258,10 @@ def create( ... @required_args( - ["path_zone_id", "content", "name", "type"], - ["path_zone_id", "data", "name", "type"], - ["path_zone_id", "content", "name", "priority", "type"], - ["path_zone_id", "data", "name", "priority", "type"], + ["zone_id", "content", "name", "type"], + ["zone_id", "data", "name", "type"], + ["zone_id", "content", "name", "priority", "type"], + ["zone_id", "data", "name", "priority", "type"], ) def create( self, @@ -1374,12 +1314,12 @@ def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[Record]: - if not path_zone_id: - raise ValueError(f"Expected a non-empty value for `path_zone_id` but received {path_zone_id!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( Optional[Record], self._post( - f"/zones/{path_zone_id}/dns_records", + f"/zones/{zone_id}/dns_records", body=maybe_transform( { "content": content, @@ -1390,7 +1330,6 @@ def create( "proxied": proxied, "tags": tags, "ttl": ttl, - "zone_id": body_zone_id, "data": data, "priority": priority, }, @@ -1414,7 +1353,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["A"], @@ -1423,7 +1362,6 @@ def update( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1441,7 +1379,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -1465,8 +1403,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1482,7 +1418,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["AAAA"], @@ -1491,7 +1427,6 @@ def update( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1509,7 +1444,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -1533,8 +1468,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1550,7 +1483,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.CAARecordData, name: str, type: Literal["CAA"], @@ -1558,7 +1491,6 @@ def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1576,7 +1508,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -1597,8 +1529,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1614,7 +1544,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.CERTRecordData, name: str, type: Literal["CERT"], @@ -1622,7 +1552,6 @@ def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1640,7 +1569,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -1661,8 +1590,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1678,7 +1605,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: object, name: str, type: Literal["CNAME"], @@ -1687,7 +1614,6 @@ def update( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1705,7 +1631,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -1729,8 +1655,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1746,7 +1670,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.DNSKEYRecordData, name: str, type: Literal["DNSKEY"], @@ -1754,7 +1678,6 @@ def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1772,7 +1695,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -1793,8 +1716,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1810,7 +1731,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.DSRecordData, name: str, type: Literal["DS"], @@ -1818,7 +1739,6 @@ def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1836,7 +1756,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -1857,8 +1777,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1874,7 +1792,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.HTTPSRecordData, name: str, type: Literal["HTTPS"], @@ -1882,7 +1800,6 @@ def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1900,7 +1817,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -1921,8 +1838,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1938,7 +1853,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.LOCRecordData, name: str, type: Literal["LOC"], @@ -1946,7 +1861,6 @@ def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1964,7 +1878,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -1985,8 +1899,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2002,7 +1914,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, priority: float, @@ -2011,7 +1923,6 @@ def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2029,7 +1940,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -2053,8 +1964,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2070,7 +1979,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.NAPTRRecordData, name: str, type: Literal["NAPTR"], @@ -2078,7 +1987,6 @@ def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2096,7 +2004,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -2117,8 +2025,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2134,7 +2040,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["NS"], @@ -2142,7 +2048,6 @@ def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2160,7 +2065,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -2181,8 +2086,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2198,7 +2101,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["PTR"], @@ -2206,7 +2109,6 @@ def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2224,7 +2126,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -2245,8 +2147,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2262,7 +2162,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.SMIMEARecordData, name: str, type: Literal["SMIMEA"], @@ -2270,7 +2170,6 @@ def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2288,7 +2187,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -2309,8 +2208,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2326,7 +2223,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.SRVRecordData, name: str, type: Literal["SRV"], @@ -2334,7 +2231,6 @@ def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2352,7 +2248,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -2375,8 +2271,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2392,7 +2286,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.SSHFPRecordData, name: str, type: Literal["SSHFP"], @@ -2400,7 +2294,6 @@ def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2418,7 +2311,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -2439,8 +2332,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2456,7 +2347,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.SVCBRecordData, name: str, type: Literal["SVCB"], @@ -2464,7 +2355,6 @@ def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2482,7 +2372,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -2503,8 +2393,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2520,7 +2408,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.TLSARecordData, name: str, type: Literal["TLSA"], @@ -2528,7 +2416,6 @@ def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2546,7 +2433,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -2567,8 +2454,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2584,7 +2469,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["TXT"], @@ -2592,7 +2477,6 @@ def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2610,7 +2494,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -2631,8 +2515,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2648,7 +2530,7 @@ def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.URIRecordData, name: str, priority: float, @@ -2657,7 +2539,6 @@ def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2675,7 +2556,7 @@ def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -2699,8 +2580,6 @@ def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2712,10 +2591,10 @@ def update( ... @required_args( - ["path_zone_id", "content", "name", "type"], - ["path_zone_id", "data", "name", "type"], - ["path_zone_id", "content", "name", "priority", "type"], - ["path_zone_id", "data", "name", "priority", "type"], + ["zone_id", "content", "name", "type"], + ["zone_id", "data", "name", "type"], + ["zone_id", "content", "name", "priority", "type"], + ["zone_id", "data", "name", "priority", "type"], ) def update( self, @@ -2769,14 +2648,14 @@ def update( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[Record]: - if not path_zone_id: - raise ValueError(f"Expected a non-empty value for `path_zone_id` but received {path_zone_id!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not dns_record_id: raise ValueError(f"Expected a non-empty value for `dns_record_id` but received {dns_record_id!r}") return cast( Optional[Record], self._put( - f"/zones/{path_zone_id}/dns_records/{dns_record_id}", + f"/zones/{zone_id}/dns_records/{dns_record_id}", body=maybe_transform( { "content": content, @@ -2787,7 +2666,6 @@ def update( "proxied": proxied, "tags": tags, "ttl": ttl, - "zone_id": body_zone_id, "data": data, "priority": priority, }, @@ -2980,7 +2858,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["A"], @@ -2989,7 +2867,6 @@ def edit( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3007,7 +2884,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -3031,8 +2908,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3048,7 +2923,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["AAAA"], @@ -3057,7 +2932,6 @@ def edit( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3075,7 +2949,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -3099,8 +2973,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3116,7 +2988,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.CAARecordData, name: str, type: Literal["CAA"], @@ -3124,7 +2996,6 @@ def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3142,7 +3013,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -3163,8 +3034,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3180,7 +3049,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.CERTRecordData, name: str, type: Literal["CERT"], @@ -3188,7 +3057,6 @@ def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3206,7 +3074,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -3227,8 +3095,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3244,7 +3110,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: object, name: str, type: Literal["CNAME"], @@ -3253,7 +3119,6 @@ def edit( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3271,7 +3136,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -3295,8 +3160,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3312,7 +3175,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.DNSKEYRecordData, name: str, type: Literal["DNSKEY"], @@ -3320,7 +3183,6 @@ def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3338,7 +3200,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -3359,8 +3221,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3376,7 +3236,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.DSRecordData, name: str, type: Literal["DS"], @@ -3384,7 +3244,6 @@ def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3402,7 +3261,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -3423,8 +3282,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3440,7 +3297,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.HTTPSRecordData, name: str, type: Literal["HTTPS"], @@ -3448,7 +3305,6 @@ def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3466,7 +3322,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -3487,8 +3343,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3504,7 +3358,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.LOCRecordData, name: str, type: Literal["LOC"], @@ -3512,7 +3366,6 @@ def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3530,7 +3383,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -3551,8 +3404,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3568,7 +3419,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, priority: float, @@ -3577,7 +3428,6 @@ def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3595,7 +3445,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -3619,8 +3469,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3636,7 +3484,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.NAPTRRecordData, name: str, type: Literal["NAPTR"], @@ -3644,7 +3492,6 @@ def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3662,7 +3509,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -3683,8 +3530,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3700,7 +3545,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["NS"], @@ -3708,7 +3553,6 @@ def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3726,7 +3570,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -3747,8 +3591,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3764,7 +3606,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["PTR"], @@ -3772,7 +3614,6 @@ def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3790,7 +3631,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -3811,8 +3652,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3828,7 +3667,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.SMIMEARecordData, name: str, type: Literal["SMIMEA"], @@ -3836,7 +3675,6 @@ def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3854,7 +3692,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -3875,8 +3713,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3892,7 +3728,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.SRVRecordData, name: str, type: Literal["SRV"], @@ -3900,7 +3736,6 @@ def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3918,7 +3753,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -3941,8 +3776,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3958,7 +3791,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.SSHFPRecordData, name: str, type: Literal["SSHFP"], @@ -3966,7 +3799,6 @@ def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3984,7 +3816,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -4005,8 +3837,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4022,7 +3852,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.SVCBRecordData, name: str, type: Literal["SVCB"], @@ -4030,7 +3860,6 @@ def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4048,7 +3877,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -4069,8 +3898,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4086,7 +3913,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.TLSARecordData, name: str, type: Literal["TLSA"], @@ -4094,7 +3921,6 @@ def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4112,7 +3938,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -4133,8 +3959,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4150,7 +3974,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["TXT"], @@ -4158,7 +3982,6 @@ def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4176,7 +3999,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -4197,8 +4020,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4214,7 +4035,7 @@ def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.URIRecordData, name: str, priority: float, @@ -4223,7 +4044,6 @@ def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4241,7 +4061,7 @@ def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -4265,8 +4085,6 @@ def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4278,10 +4096,10 @@ def edit( ... @required_args( - ["path_zone_id", "content", "name", "type"], - ["path_zone_id", "data", "name", "type"], - ["path_zone_id", "content", "name", "priority", "type"], - ["path_zone_id", "data", "name", "priority", "type"], + ["zone_id", "content", "name", "type"], + ["zone_id", "data", "name", "type"], + ["zone_id", "content", "name", "priority", "type"], + ["zone_id", "data", "name", "priority", "type"], ) def edit( self, @@ -4335,14 +4153,14 @@ def edit( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[Record]: - if not path_zone_id: - raise ValueError(f"Expected a non-empty value for `path_zone_id` but received {path_zone_id!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not dns_record_id: raise ValueError(f"Expected a non-empty value for `dns_record_id` but received {dns_record_id!r}") return cast( Optional[Record], self._patch( - f"/zones/{path_zone_id}/dns_records/{dns_record_id}", + f"/zones/{zone_id}/dns_records/{dns_record_id}", body=maybe_transform( { "content": content, @@ -4353,7 +4171,6 @@ def edit( "proxied": proxied, "tags": tags, "ttl": ttl, - "zone_id": body_zone_id, "data": data, "priority": priority, }, @@ -4584,7 +4401,7 @@ def with_streaming_response(self) -> AsyncRecordsResourceWithStreamingResponse: async def create( self, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["A"], @@ -4593,7 +4410,6 @@ async def create( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4612,7 +4428,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier content: A valid IPv4 address. @@ -4634,8 +4450,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4650,7 +4464,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["AAAA"], @@ -4659,7 +4473,6 @@ async def create( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4678,7 +4491,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier content: A valid IPv6 address. @@ -4700,8 +4513,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4716,7 +4527,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.CAARecordData, name: str, type: Literal["CAA"], @@ -4724,7 +4535,6 @@ async def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4743,7 +4553,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a CAA record. @@ -4762,8 +4572,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4778,7 +4586,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.CERTRecordData, name: str, type: Literal["CERT"], @@ -4786,7 +4594,6 @@ async def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4805,7 +4612,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a CERT record. @@ -4824,8 +4631,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4840,7 +4645,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, content: object, name: str, type: Literal["CNAME"], @@ -4849,7 +4654,6 @@ async def create( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4868,7 +4672,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier content: A valid hostname. Must not match the record's name. @@ -4890,8 +4694,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4906,7 +4708,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.DNSKEYRecordData, name: str, type: Literal["DNSKEY"], @@ -4914,7 +4716,6 @@ async def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4933,7 +4734,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a DNSKEY record. @@ -4952,8 +4753,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4968,7 +4767,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.DSRecordData, name: str, type: Literal["DS"], @@ -4976,7 +4775,6 @@ async def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -4995,7 +4793,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a DS record. @@ -5014,8 +4812,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5030,7 +4826,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.HTTPSRecordData, name: str, type: Literal["HTTPS"], @@ -5038,7 +4834,6 @@ async def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5057,7 +4852,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a HTTPS record. @@ -5076,8 +4871,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5092,7 +4885,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.LOCRecordData, name: str, type: Literal["LOC"], @@ -5100,7 +4893,6 @@ async def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5119,7 +4911,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a LOC record. @@ -5138,8 +4930,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5154,7 +4944,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, content: str, name: str, priority: float, @@ -5163,7 +4953,6 @@ async def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5182,7 +4971,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier content: A valid mail server hostname. @@ -5204,8 +4993,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5220,7 +5007,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.NAPTRRecordData, name: str, type: Literal["NAPTR"], @@ -5228,7 +5015,6 @@ async def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5247,7 +5033,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a NAPTR record. @@ -5266,8 +5052,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5282,7 +5066,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["NS"], @@ -5290,7 +5074,6 @@ async def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5309,7 +5092,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier content: A valid name server host name. @@ -5328,8 +5111,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5344,7 +5125,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["PTR"], @@ -5352,7 +5133,6 @@ async def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5371,7 +5151,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier content: Domain name pointing to the address. @@ -5390,8 +5170,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5406,7 +5184,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.SMIMEARecordData, name: str, type: Literal["SMIMEA"], @@ -5414,7 +5192,6 @@ async def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5433,7 +5210,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a SMIMEA record. @@ -5452,8 +5229,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5468,7 +5243,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.SRVRecordData, name: str, type: Literal["SRV"], @@ -5476,7 +5251,6 @@ async def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5495,7 +5269,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a SRV record. @@ -5516,8 +5290,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5532,7 +5304,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.SSHFPRecordData, name: str, type: Literal["SSHFP"], @@ -5540,7 +5312,6 @@ async def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5559,7 +5330,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a SSHFP record. @@ -5578,8 +5349,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5594,7 +5363,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.SVCBRecordData, name: str, type: Literal["SVCB"], @@ -5602,7 +5371,6 @@ async def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5621,7 +5389,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a SVCB record. @@ -5640,8 +5408,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5656,7 +5422,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.TLSARecordData, name: str, type: Literal["TLSA"], @@ -5664,7 +5430,6 @@ async def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5683,7 +5448,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a TLSA record. @@ -5702,8 +5467,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5718,7 +5481,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["TXT"], @@ -5726,7 +5489,6 @@ async def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5745,7 +5507,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier content: Text content for the record. @@ -5764,8 +5526,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5780,7 +5540,7 @@ async def create( async def create( self, *, - path_zone_id: str, + zone_id: str, data: record_create_params.URIRecordData, name: str, priority: float, @@ -5789,7 +5549,6 @@ async def create( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5808,7 +5567,7 @@ async def create( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier data: Components of a URI record. @@ -5830,8 +5589,6 @@ async def create( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5843,10 +5600,10 @@ async def create( ... @required_args( - ["path_zone_id", "content", "name", "type"], - ["path_zone_id", "data", "name", "type"], - ["path_zone_id", "content", "name", "priority", "type"], - ["path_zone_id", "data", "name", "priority", "type"], + ["zone_id", "content", "name", "type"], + ["zone_id", "data", "name", "type"], + ["zone_id", "content", "name", "priority", "type"], + ["zone_id", "data", "name", "priority", "type"], ) async def create( self, @@ -5899,12 +5656,12 @@ async def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[Record]: - if not path_zone_id: - raise ValueError(f"Expected a non-empty value for `path_zone_id` but received {path_zone_id!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( Optional[Record], await self._post( - f"/zones/{path_zone_id}/dns_records", + f"/zones/{zone_id}/dns_records", body=await async_maybe_transform( { "content": content, @@ -5915,7 +5672,6 @@ async def create( "proxied": proxied, "tags": tags, "ttl": ttl, - "zone_id": body_zone_id, "data": data, "priority": priority, }, @@ -5939,7 +5695,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["A"], @@ -5948,7 +5704,6 @@ async def update( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -5966,7 +5721,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -5990,8 +5745,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6007,7 +5760,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["AAAA"], @@ -6016,7 +5769,6 @@ async def update( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6034,7 +5786,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -6058,8 +5810,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6075,7 +5825,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.CAARecordData, name: str, type: Literal["CAA"], @@ -6083,7 +5833,6 @@ async def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6101,7 +5850,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -6122,8 +5871,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6139,7 +5886,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.CERTRecordData, name: str, type: Literal["CERT"], @@ -6147,7 +5894,6 @@ async def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6165,7 +5911,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -6186,8 +5932,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6203,7 +5947,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: object, name: str, type: Literal["CNAME"], @@ -6212,7 +5956,6 @@ async def update( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6230,7 +5973,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -6254,8 +5997,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6271,7 +6012,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.DNSKEYRecordData, name: str, type: Literal["DNSKEY"], @@ -6279,7 +6020,6 @@ async def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6297,7 +6037,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -6318,8 +6058,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6335,7 +6073,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.DSRecordData, name: str, type: Literal["DS"], @@ -6343,7 +6081,6 @@ async def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6361,7 +6098,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -6382,8 +6119,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6399,7 +6134,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.HTTPSRecordData, name: str, type: Literal["HTTPS"], @@ -6407,7 +6142,6 @@ async def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6425,7 +6159,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -6446,8 +6180,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6463,7 +6195,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.LOCRecordData, name: str, type: Literal["LOC"], @@ -6471,7 +6203,6 @@ async def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6489,7 +6220,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -6510,8 +6241,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6527,7 +6256,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, priority: float, @@ -6536,7 +6265,6 @@ async def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6554,7 +6282,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -6578,8 +6306,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6595,7 +6321,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.NAPTRRecordData, name: str, type: Literal["NAPTR"], @@ -6603,7 +6329,6 @@ async def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6621,7 +6346,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -6642,8 +6367,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6659,7 +6382,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["NS"], @@ -6667,7 +6390,6 @@ async def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6685,7 +6407,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -6706,8 +6428,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6723,7 +6443,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["PTR"], @@ -6731,7 +6451,6 @@ async def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6749,7 +6468,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -6770,8 +6489,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6787,7 +6504,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.SMIMEARecordData, name: str, type: Literal["SMIMEA"], @@ -6795,7 +6512,6 @@ async def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6813,7 +6529,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -6834,8 +6550,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6851,7 +6565,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.SRVRecordData, name: str, type: Literal["SRV"], @@ -6859,7 +6573,6 @@ async def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6877,7 +6590,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -6900,8 +6613,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6917,7 +6628,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.SSHFPRecordData, name: str, type: Literal["SSHFP"], @@ -6925,7 +6636,6 @@ async def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -6943,7 +6653,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -6964,8 +6674,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6981,7 +6689,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.SVCBRecordData, name: str, type: Literal["SVCB"], @@ -6989,7 +6697,6 @@ async def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7007,7 +6714,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -7028,8 +6735,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7045,7 +6750,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.TLSARecordData, name: str, type: Literal["TLSA"], @@ -7053,7 +6758,6 @@ async def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7071,7 +6775,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -7092,8 +6796,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7109,7 +6811,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["TXT"], @@ -7117,7 +6819,6 @@ async def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7135,7 +6836,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -7156,8 +6857,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7173,7 +6872,7 @@ async def update( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_update_params.URIRecordData, name: str, priority: float, @@ -7182,7 +6881,6 @@ async def update( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7200,7 +6898,7 @@ async def update( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -7224,8 +6922,6 @@ async def update( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7237,10 +6933,10 @@ async def update( ... @required_args( - ["path_zone_id", "content", "name", "type"], - ["path_zone_id", "data", "name", "type"], - ["path_zone_id", "content", "name", "priority", "type"], - ["path_zone_id", "data", "name", "priority", "type"], + ["zone_id", "content", "name", "type"], + ["zone_id", "data", "name", "type"], + ["zone_id", "content", "name", "priority", "type"], + ["zone_id", "data", "name", "priority", "type"], ) async def update( self, @@ -7294,14 +6990,14 @@ async def update( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[Record]: - if not path_zone_id: - raise ValueError(f"Expected a non-empty value for `path_zone_id` but received {path_zone_id!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not dns_record_id: raise ValueError(f"Expected a non-empty value for `dns_record_id` but received {dns_record_id!r}") return cast( Optional[Record], await self._put( - f"/zones/{path_zone_id}/dns_records/{dns_record_id}", + f"/zones/{zone_id}/dns_records/{dns_record_id}", body=await async_maybe_transform( { "content": content, @@ -7312,7 +7008,6 @@ async def update( "proxied": proxied, "tags": tags, "ttl": ttl, - "zone_id": body_zone_id, "data": data, "priority": priority, }, @@ -7505,7 +7200,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["A"], @@ -7514,7 +7209,6 @@ async def edit( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7532,7 +7226,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -7556,8 +7250,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7573,7 +7265,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["AAAA"], @@ -7582,7 +7274,6 @@ async def edit( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7600,7 +7291,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -7624,8 +7315,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7641,7 +7330,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.CAARecordData, name: str, type: Literal["CAA"], @@ -7649,7 +7338,6 @@ async def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7667,7 +7355,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -7688,8 +7376,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7705,7 +7391,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.CERTRecordData, name: str, type: Literal["CERT"], @@ -7713,7 +7399,6 @@ async def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7731,7 +7416,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -7752,8 +7437,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7769,7 +7452,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: object, name: str, type: Literal["CNAME"], @@ -7778,7 +7461,6 @@ async def edit( proxied: bool | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7796,7 +7478,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -7820,8 +7502,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7837,7 +7517,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.DNSKEYRecordData, name: str, type: Literal["DNSKEY"], @@ -7845,7 +7525,6 @@ async def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7863,7 +7542,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -7884,8 +7563,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7901,7 +7578,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.DSRecordData, name: str, type: Literal["DS"], @@ -7909,7 +7586,6 @@ async def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7927,7 +7603,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -7948,8 +7624,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7965,7 +7639,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.HTTPSRecordData, name: str, type: Literal["HTTPS"], @@ -7973,7 +7647,6 @@ async def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7991,7 +7664,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -8012,8 +7685,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8029,7 +7700,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.LOCRecordData, name: str, type: Literal["LOC"], @@ -8037,7 +7708,6 @@ async def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -8055,7 +7725,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -8076,8 +7746,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8093,7 +7761,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, priority: float, @@ -8102,7 +7770,6 @@ async def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -8120,7 +7787,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -8144,8 +7811,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8161,7 +7826,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.NAPTRRecordData, name: str, type: Literal["NAPTR"], @@ -8169,7 +7834,6 @@ async def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -8187,7 +7851,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -8208,8 +7872,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8225,7 +7887,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["NS"], @@ -8233,7 +7895,6 @@ async def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -8251,7 +7912,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -8272,8 +7933,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8289,7 +7948,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["PTR"], @@ -8297,7 +7956,6 @@ async def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -8315,7 +7973,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -8336,8 +7994,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8353,7 +8009,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.SMIMEARecordData, name: str, type: Literal["SMIMEA"], @@ -8361,7 +8017,6 @@ async def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -8379,7 +8034,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -8400,8 +8055,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8417,7 +8070,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.SRVRecordData, name: str, type: Literal["SRV"], @@ -8425,7 +8078,6 @@ async def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -8443,7 +8095,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -8466,8 +8118,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8483,7 +8133,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.SSHFPRecordData, name: str, type: Literal["SSHFP"], @@ -8491,7 +8141,6 @@ async def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -8509,7 +8158,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -8530,8 +8179,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8547,7 +8194,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.SVCBRecordData, name: str, type: Literal["SVCB"], @@ -8555,7 +8202,6 @@ async def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -8573,7 +8219,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -8594,8 +8240,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8611,7 +8255,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.TLSARecordData, name: str, type: Literal["TLSA"], @@ -8619,7 +8263,6 @@ async def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -8637,7 +8280,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -8658,8 +8301,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8675,7 +8316,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, content: str, name: str, type: Literal["TXT"], @@ -8683,7 +8324,6 @@ async def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -8701,7 +8341,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -8722,8 +8362,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8739,7 +8377,7 @@ async def edit( self, dns_record_id: str, *, - path_zone_id: str, + zone_id: str, data: record_edit_params.URIRecordData, name: str, priority: float, @@ -8748,7 +8386,6 @@ async def edit( comment: str | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, ttl: TTLParam | NotGiven = NOT_GIVEN, - body_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. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -8766,7 +8403,7 @@ async def edit( were used when creating the record. Args: - path_zone_id: Identifier + zone_id: Identifier dns_record_id: Identifier @@ -8790,8 +8427,6 @@ async def edit( Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. - body_zone_id: Identifier - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8803,10 +8438,10 @@ async def edit( ... @required_args( - ["path_zone_id", "content", "name", "type"], - ["path_zone_id", "data", "name", "type"], - ["path_zone_id", "content", "name", "priority", "type"], - ["path_zone_id", "data", "name", "priority", "type"], + ["zone_id", "content", "name", "type"], + ["zone_id", "data", "name", "type"], + ["zone_id", "content", "name", "priority", "type"], + ["zone_id", "data", "name", "priority", "type"], ) async def edit( self, @@ -8860,14 +8495,14 @@ async def edit( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[Record]: - if not path_zone_id: - raise ValueError(f"Expected a non-empty value for `path_zone_id` but received {path_zone_id!r}") + if not zone_id: + raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not dns_record_id: raise ValueError(f"Expected a non-empty value for `dns_record_id` but received {dns_record_id!r}") return cast( Optional[Record], await self._patch( - f"/zones/{path_zone_id}/dns_records/{dns_record_id}", + f"/zones/{zone_id}/dns_records/{dns_record_id}", body=await async_maybe_transform( { "content": content, @@ -8878,7 +8513,6 @@ async def edit( "proxied": proxied, "tags": tags, "ttl": ttl, - "zone_id": body_zone_id, "data": data, "priority": priority, }, diff --git a/src/cloudflare/types/dns/a_record.py b/src/cloudflare/types/dns/a_record.py index dc064cf7d8a..c42be657c7c 100644 --- a/src/cloudflare/types/dns/a_record.py +++ b/src/cloudflare/types/dns/a_record.py @@ -64,9 +64,3 @@ class ARecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/aaaa_record.py b/src/cloudflare/types/dns/aaaa_record.py index 75f77f1ab61..4e4bd1218e6 100644 --- a/src/cloudflare/types/dns/aaaa_record.py +++ b/src/cloudflare/types/dns/aaaa_record.py @@ -64,9 +64,3 @@ class AAAARecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/caa_record.py b/src/cloudflare/types/dns/caa_record.py index 298495fc040..e81689a332e 100644 --- a/src/cloudflare/types/dns/caa_record.py +++ b/src/cloudflare/types/dns/caa_record.py @@ -72,9 +72,3 @@ class CAARecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/cert_record.py b/src/cloudflare/types/dns/cert_record.py index d9a7a6ba9b3..58c471f4c7f 100644 --- a/src/cloudflare/types/dns/cert_record.py +++ b/src/cloudflare/types/dns/cert_record.py @@ -75,9 +75,3 @@ class CERTRecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/cname_record.py b/src/cloudflare/types/dns/cname_record.py index 39e42f0f7d4..9c034629645 100644 --- a/src/cloudflare/types/dns/cname_record.py +++ b/src/cloudflare/types/dns/cname_record.py @@ -64,9 +64,3 @@ class CNAMERecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/dnskey_record.py b/src/cloudflare/types/dns/dnskey_record.py index e2f6284d7ca..72c2ae66d67 100644 --- a/src/cloudflare/types/dns/dnskey_record.py +++ b/src/cloudflare/types/dns/dnskey_record.py @@ -75,9 +75,3 @@ class DNSKEYRecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/ds_record.py b/src/cloudflare/types/dns/ds_record.py index cc6e93c8ab7..d6210dce096 100644 --- a/src/cloudflare/types/dns/ds_record.py +++ b/src/cloudflare/types/dns/ds_record.py @@ -75,9 +75,3 @@ class DSRecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/https_record.py b/src/cloudflare/types/dns/https_record.py index f3a412966f5..6900410e735 100644 --- a/src/cloudflare/types/dns/https_record.py +++ b/src/cloudflare/types/dns/https_record.py @@ -72,9 +72,3 @@ class HTTPSRecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/loc_record.py b/src/cloudflare/types/dns/loc_record.py index 66b3e2d9eaf..5d4f84c06b7 100644 --- a/src/cloudflare/types/dns/loc_record.py +++ b/src/cloudflare/types/dns/loc_record.py @@ -99,9 +99,3 @@ class LOCRecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/mx_record.py b/src/cloudflare/types/dns/mx_record.py index dd2aa333e2a..3722755f904 100644 --- a/src/cloudflare/types/dns/mx_record.py +++ b/src/cloudflare/types/dns/mx_record.py @@ -64,9 +64,3 @@ class MXRecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/naptr_record.py b/src/cloudflare/types/dns/naptr_record.py index 77dc8f3539a..0dc8a697aca 100644 --- a/src/cloudflare/types/dns/naptr_record.py +++ b/src/cloudflare/types/dns/naptr_record.py @@ -81,9 +81,3 @@ class NAPTRRecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/ns_record.py b/src/cloudflare/types/dns/ns_record.py index d71fd5437fa..0b60f0a307f 100644 --- a/src/cloudflare/types/dns/ns_record.py +++ b/src/cloudflare/types/dns/ns_record.py @@ -58,9 +58,3 @@ class NSRecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/ptr_record.py b/src/cloudflare/types/dns/ptr_record.py index 46d91d3a4eb..d5835b62faf 100644 --- a/src/cloudflare/types/dns/ptr_record.py +++ b/src/cloudflare/types/dns/ptr_record.py @@ -58,9 +58,3 @@ class PTRRecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/record_create_params.py b/src/cloudflare/types/dns/record_create_params.py index 4692fe22e71..c7fbb84ff10 100644 --- a/src/cloudflare/types/dns/record_create_params.py +++ b/src/cloudflare/types/dns/record_create_params.py @@ -3,9 +3,8 @@ from __future__ import annotations from typing import List, Union -from typing_extensions import Literal, Required, Annotated, TypedDict +from typing_extensions import Literal, Required, TypedDict -from ..._utils import PropertyInfo from .ttl_param import TTLParam from .record_tags import RecordTags @@ -48,7 +47,7 @@ class ARecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -85,12 +84,9 @@ class ARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class AAAARecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -127,12 +123,9 @@ class AAAARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class CAARecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[CAARecordData] @@ -163,9 +156,6 @@ class CAARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class CAARecordData(TypedDict, total=False): flags: float @@ -179,7 +169,7 @@ class CAARecordData(TypedDict, total=False): class CERTRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[CERTRecordData] @@ -210,9 +200,6 @@ class CERTRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class CERTRecordData(TypedDict, total=False): algorithm: float @@ -229,7 +216,7 @@ class CERTRecordData(TypedDict, total=False): class CNAMERecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[object] @@ -266,12 +253,9 @@ class CNAMERecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class DNSKEYRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[DNSKEYRecordData] @@ -302,9 +286,6 @@ class DNSKEYRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class DNSKEYRecordData(TypedDict, total=False): algorithm: float @@ -321,7 +302,7 @@ class DNSKEYRecordData(TypedDict, total=False): class DSRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[DSRecordData] @@ -352,9 +333,6 @@ class DSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class DSRecordData(TypedDict, total=False): algorithm: float @@ -371,7 +349,7 @@ class DSRecordData(TypedDict, total=False): class HTTPSRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[HTTPSRecordData] @@ -402,9 +380,6 @@ class HTTPSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class HTTPSRecordData(TypedDict, total=False): priority: float @@ -418,7 +393,7 @@ class HTTPSRecordData(TypedDict, total=False): class LOCRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[LOCRecordData] @@ -449,9 +424,6 @@ class LOCRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class LOCRecordData(TypedDict, total=False): altitude: float @@ -492,7 +464,7 @@ class LOCRecordData(TypedDict, total=False): class MXRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -529,12 +501,9 @@ class MXRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class NAPTRRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[NAPTRRecordData] @@ -565,9 +534,6 @@ class NAPTRRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class NAPTRRecordData(TypedDict, total=False): flags: str @@ -590,7 +556,7 @@ class NAPTRRecordData(TypedDict, total=False): class NSRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -621,12 +587,9 @@ class NSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class PTRRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -657,12 +620,9 @@ class PTRRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class SMIMEARecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[SMIMEARecordData] @@ -693,9 +653,6 @@ class SMIMEARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class SMIMEARecordData(TypedDict, total=False): certificate: str @@ -712,7 +669,7 @@ class SMIMEARecordData(TypedDict, total=False): class SRVRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[SRVRecordData] @@ -747,9 +704,6 @@ class SRVRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class SRVRecordData(TypedDict, total=False): name: str @@ -791,7 +745,7 @@ class SRVRecordData(TypedDict, total=False): class SSHFPRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[SSHFPRecordData] @@ -822,9 +776,6 @@ class SSHFPRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class SSHFPRecordData(TypedDict, total=False): algorithm: float @@ -838,7 +789,7 @@ class SSHFPRecordData(TypedDict, total=False): class SVCBRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[SVCBRecordData] @@ -869,9 +820,6 @@ class SVCBRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class SVCBRecordData(TypedDict, total=False): priority: float @@ -885,7 +833,7 @@ class SVCBRecordData(TypedDict, total=False): class TLSARecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[TLSARecordData] @@ -916,9 +864,6 @@ class TLSARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class TLSARecordData(TypedDict, total=False): certificate: str @@ -935,7 +880,7 @@ class TLSARecordData(TypedDict, total=False): class TXTRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -966,12 +911,9 @@ class TXTRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class URIRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[URIRecordData] @@ -1008,9 +950,6 @@ class URIRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class URIRecordData(TypedDict, total=False): target: str diff --git a/src/cloudflare/types/dns/record_edit_params.py b/src/cloudflare/types/dns/record_edit_params.py index a0354033775..4162570edcc 100644 --- a/src/cloudflare/types/dns/record_edit_params.py +++ b/src/cloudflare/types/dns/record_edit_params.py @@ -3,9 +3,8 @@ from __future__ import annotations from typing import List, Union -from typing_extensions import Literal, Required, Annotated, TypedDict +from typing_extensions import Literal, Required, TypedDict -from ..._utils import PropertyInfo from .ttl_param import TTLParam from .record_tags import RecordTags @@ -48,7 +47,7 @@ class ARecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -85,12 +84,9 @@ class ARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class AAAARecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -127,12 +123,9 @@ class AAAARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class CAARecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[CAARecordData] @@ -163,9 +156,6 @@ class CAARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class CAARecordData(TypedDict, total=False): flags: float @@ -179,7 +169,7 @@ class CAARecordData(TypedDict, total=False): class CERTRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[CERTRecordData] @@ -210,9 +200,6 @@ class CERTRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class CERTRecordData(TypedDict, total=False): algorithm: float @@ -229,7 +216,7 @@ class CERTRecordData(TypedDict, total=False): class CNAMERecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[object] @@ -266,12 +253,9 @@ class CNAMERecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class DNSKEYRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[DNSKEYRecordData] @@ -302,9 +286,6 @@ class DNSKEYRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class DNSKEYRecordData(TypedDict, total=False): algorithm: float @@ -321,7 +302,7 @@ class DNSKEYRecordData(TypedDict, total=False): class DSRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[DSRecordData] @@ -352,9 +333,6 @@ class DSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class DSRecordData(TypedDict, total=False): algorithm: float @@ -371,7 +349,7 @@ class DSRecordData(TypedDict, total=False): class HTTPSRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[HTTPSRecordData] @@ -402,9 +380,6 @@ class HTTPSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class HTTPSRecordData(TypedDict, total=False): priority: float @@ -418,7 +393,7 @@ class HTTPSRecordData(TypedDict, total=False): class LOCRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[LOCRecordData] @@ -449,9 +424,6 @@ class LOCRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class LOCRecordData(TypedDict, total=False): altitude: float @@ -492,7 +464,7 @@ class LOCRecordData(TypedDict, total=False): class MXRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -529,12 +501,9 @@ class MXRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class NAPTRRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[NAPTRRecordData] @@ -565,9 +534,6 @@ class NAPTRRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class NAPTRRecordData(TypedDict, total=False): flags: str @@ -590,7 +556,7 @@ class NAPTRRecordData(TypedDict, total=False): class NSRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -621,12 +587,9 @@ class NSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class PTRRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -657,12 +620,9 @@ class PTRRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class SMIMEARecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[SMIMEARecordData] @@ -693,9 +653,6 @@ class SMIMEARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class SMIMEARecordData(TypedDict, total=False): certificate: str @@ -712,7 +669,7 @@ class SMIMEARecordData(TypedDict, total=False): class SRVRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[SRVRecordData] @@ -747,9 +704,6 @@ class SRVRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class SRVRecordData(TypedDict, total=False): name: str @@ -791,7 +745,7 @@ class SRVRecordData(TypedDict, total=False): class SSHFPRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[SSHFPRecordData] @@ -822,9 +776,6 @@ class SSHFPRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class SSHFPRecordData(TypedDict, total=False): algorithm: float @@ -838,7 +789,7 @@ class SSHFPRecordData(TypedDict, total=False): class SVCBRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[SVCBRecordData] @@ -869,9 +820,6 @@ class SVCBRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class SVCBRecordData(TypedDict, total=False): priority: float @@ -885,7 +833,7 @@ class SVCBRecordData(TypedDict, total=False): class TLSARecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[TLSARecordData] @@ -916,9 +864,6 @@ class TLSARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class TLSARecordData(TypedDict, total=False): certificate: str @@ -935,7 +880,7 @@ class TLSARecordData(TypedDict, total=False): class TXTRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -966,12 +911,9 @@ class TXTRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class URIRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[URIRecordData] @@ -1008,9 +950,6 @@ class URIRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class URIRecordData(TypedDict, total=False): target: str diff --git a/src/cloudflare/types/dns/record_update_params.py b/src/cloudflare/types/dns/record_update_params.py index d9af2e9c204..743522c6331 100644 --- a/src/cloudflare/types/dns/record_update_params.py +++ b/src/cloudflare/types/dns/record_update_params.py @@ -3,9 +3,8 @@ from __future__ import annotations from typing import List, Union -from typing_extensions import Literal, Required, Annotated, TypedDict +from typing_extensions import Literal, Required, TypedDict -from ..._utils import PropertyInfo from .ttl_param import TTLParam from .record_tags import RecordTags @@ -48,7 +47,7 @@ class ARecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -85,12 +84,9 @@ class ARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class AAAARecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -127,12 +123,9 @@ class AAAARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class CAARecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[CAARecordData] @@ -163,9 +156,6 @@ class CAARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class CAARecordData(TypedDict, total=False): flags: float @@ -179,7 +169,7 @@ class CAARecordData(TypedDict, total=False): class CERTRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[CERTRecordData] @@ -210,9 +200,6 @@ class CERTRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class CERTRecordData(TypedDict, total=False): algorithm: float @@ -229,7 +216,7 @@ class CERTRecordData(TypedDict, total=False): class CNAMERecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[object] @@ -266,12 +253,9 @@ class CNAMERecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class DNSKEYRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[DNSKEYRecordData] @@ -302,9 +286,6 @@ class DNSKEYRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class DNSKEYRecordData(TypedDict, total=False): algorithm: float @@ -321,7 +302,7 @@ class DNSKEYRecordData(TypedDict, total=False): class DSRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[DSRecordData] @@ -352,9 +333,6 @@ class DSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class DSRecordData(TypedDict, total=False): algorithm: float @@ -371,7 +349,7 @@ class DSRecordData(TypedDict, total=False): class HTTPSRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[HTTPSRecordData] @@ -402,9 +380,6 @@ class HTTPSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class HTTPSRecordData(TypedDict, total=False): priority: float @@ -418,7 +393,7 @@ class HTTPSRecordData(TypedDict, total=False): class LOCRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[LOCRecordData] @@ -449,9 +424,6 @@ class LOCRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class LOCRecordData(TypedDict, total=False): altitude: float @@ -492,7 +464,7 @@ class LOCRecordData(TypedDict, total=False): class MXRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -529,12 +501,9 @@ class MXRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class NAPTRRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[NAPTRRecordData] @@ -565,9 +534,6 @@ class NAPTRRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class NAPTRRecordData(TypedDict, total=False): flags: str @@ -590,7 +556,7 @@ class NAPTRRecordData(TypedDict, total=False): class NSRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -621,12 +587,9 @@ class NSRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class PTRRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -657,12 +620,9 @@ class PTRRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class SMIMEARecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[SMIMEARecordData] @@ -693,9 +653,6 @@ class SMIMEARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class SMIMEARecordData(TypedDict, total=False): certificate: str @@ -712,7 +669,7 @@ class SMIMEARecordData(TypedDict, total=False): class SRVRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[SRVRecordData] @@ -747,9 +704,6 @@ class SRVRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class SRVRecordData(TypedDict, total=False): name: str @@ -791,7 +745,7 @@ class SRVRecordData(TypedDict, total=False): class SSHFPRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[SSHFPRecordData] @@ -822,9 +776,6 @@ class SSHFPRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class SSHFPRecordData(TypedDict, total=False): algorithm: float @@ -838,7 +789,7 @@ class SSHFPRecordData(TypedDict, total=False): class SVCBRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[SVCBRecordData] @@ -869,9 +820,6 @@ class SVCBRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class SVCBRecordData(TypedDict, total=False): priority: float @@ -885,7 +833,7 @@ class SVCBRecordData(TypedDict, total=False): class TLSARecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[TLSARecordData] @@ -916,9 +864,6 @@ class TLSARecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class TLSARecordData(TypedDict, total=False): certificate: str @@ -935,7 +880,7 @@ class TLSARecordData(TypedDict, total=False): class TXTRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" content: Required[str] @@ -966,12 +911,9 @@ class TXTRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class URIRecord(TypedDict, total=False): - path_zone_id: Required[Annotated[str, PropertyInfo(alias="zone_id")]] + zone_id: Required[str] """Identifier""" data: Required[URIRecordData] @@ -1008,9 +950,6 @@ class URIRecord(TypedDict, total=False): minimum reduced to 30 for Enterprise zones. """ - body_zone_id: Annotated[str, PropertyInfo(alias="zone_id")] - """Identifier""" - class URIRecordData(TypedDict, total=False): target: str diff --git a/src/cloudflare/types/dns/smimea_record.py b/src/cloudflare/types/dns/smimea_record.py index 34ce2908956..a8393cee684 100644 --- a/src/cloudflare/types/dns/smimea_record.py +++ b/src/cloudflare/types/dns/smimea_record.py @@ -75,9 +75,3 @@ class SMIMEARecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/srv_record.py b/src/cloudflare/types/dns/srv_record.py index 5bb285beee5..43c8df32709 100644 --- a/src/cloudflare/types/dns/srv_record.py +++ b/src/cloudflare/types/dns/srv_record.py @@ -107,9 +107,3 @@ class SRVRecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/sshfp_record.py b/src/cloudflare/types/dns/sshfp_record.py index 7be08b2031e..3541eefc8c6 100644 --- a/src/cloudflare/types/dns/sshfp_record.py +++ b/src/cloudflare/types/dns/sshfp_record.py @@ -72,9 +72,3 @@ class SSHFPRecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/svcb_record.py b/src/cloudflare/types/dns/svcb_record.py index 5b5fcad2b98..db981322f9d 100644 --- a/src/cloudflare/types/dns/svcb_record.py +++ b/src/cloudflare/types/dns/svcb_record.py @@ -72,9 +72,3 @@ class SVCBRecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/tlsa_record.py b/src/cloudflare/types/dns/tlsa_record.py index a398ee626ec..1d2c1600bad 100644 --- a/src/cloudflare/types/dns/tlsa_record.py +++ b/src/cloudflare/types/dns/tlsa_record.py @@ -75,9 +75,3 @@ class TLSARecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/txt_record.py b/src/cloudflare/types/dns/txt_record.py index f2e0404df9a..3eb3f3402f2 100644 --- a/src/cloudflare/types/dns/txt_record.py +++ b/src/cloudflare/types/dns/txt_record.py @@ -58,9 +58,3 @@ class TXTRecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/src/cloudflare/types/dns/uri_record.py b/src/cloudflare/types/dns/uri_record.py index 15534dd560a..ce953c709d0 100644 --- a/src/cloudflare/types/dns/uri_record.py +++ b/src/cloudflare/types/dns/uri_record.py @@ -75,9 +75,3 @@ class URIRecord(BaseModel): Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" diff --git a/tests/api_resources/dns/test_records.py b/tests/api_resources/dns/test_records.py index 3920e119479..55ae9e690a8 100644 --- a/tests/api_resources/dns/test_records.py +++ b/tests/api_resources/dns/test_records.py @@ -27,7 +27,7 @@ class TestRecords: @parametrize def test_method_create_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -38,7 +38,7 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -47,7 +47,6 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -55,7 +54,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -70,7 +69,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -86,20 +85,19 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_1(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", content="198.51.100.4", name="example.com", type="A", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -110,7 +108,7 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -119,7 +117,6 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -127,7 +124,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -142,7 +139,7 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -158,20 +155,19 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_2(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", content="2400:cb00:2049::1", name="example.com", type="AAAA", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -182,7 +178,7 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", @@ -194,7 +190,6 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -202,7 +197,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -217,7 +212,7 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -233,20 +228,19 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_3(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="CAA", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -257,7 +251,7 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, "certificate": "string", @@ -270,7 +264,6 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -278,7 +271,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -293,7 +286,7 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -309,20 +302,19 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_4(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="CERT", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -333,7 +325,7 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -342,7 +334,6 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -350,7 +341,7 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -365,7 +356,7 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -381,20 +372,19 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_5(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", content={}, name="example.com", type="CNAME", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -405,7 +395,7 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, @@ -418,7 +408,6 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -426,7 +415,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -441,7 +430,7 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -457,20 +446,19 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_6(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="DNSKEY", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -481,7 +469,7 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, "digest": "string", @@ -494,7 +482,6 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -502,7 +489,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -517,7 +504,7 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -533,20 +520,19 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_7(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="DS", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -557,7 +543,7 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -569,7 +555,6 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -577,7 +562,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -592,7 +577,7 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -608,20 +593,19 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_8(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="HTTPS", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -632,7 +616,7 @@ def test_method_create_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, "lat_degrees": 37, @@ -653,7 +637,6 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -661,7 +644,7 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -676,7 +659,7 @@ def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -692,20 +675,19 @@ def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_9(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="LOC", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -717,7 +699,7 @@ def test_method_create_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -726,7 +708,6 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -734,7 +715,7 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -750,7 +731,7 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -767,21 +748,20 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_10(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", content="mx.example.com", name="example.com", priority=10, type="MX", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -792,7 +772,7 @@ def test_method_create_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": "string", "order": 100, @@ -807,7 +787,6 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -815,7 +794,7 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -830,7 +809,7 @@ def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -846,20 +825,19 @@ def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_11(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="NAPTR", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -870,7 +848,7 @@ def test_method_create_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -878,7 +856,6 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -886,7 +863,7 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -901,7 +878,7 @@ def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -917,20 +894,19 @@ def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_12(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", content="ns1.example.com", name="example.com", type="NS", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -941,7 +917,7 @@ def test_method_create_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -949,7 +925,6 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -957,7 +932,7 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -972,7 +947,7 @@ def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -988,20 +963,19 @@ def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_13(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", content="example.com", name="example.com", type="PTR", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -1012,7 +986,7 @@ def test_method_create_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 0, @@ -1025,7 +999,6 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1033,7 +1006,7 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -1048,7 +1021,7 @@ def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -1064,20 +1037,19 @@ def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_14(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="SMIMEA", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -1088,7 +1060,7 @@ def test_method_create_overload_15(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", "port": 8806, @@ -1104,7 +1076,6 @@ def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1112,7 +1083,7 @@ def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_15(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -1127,7 +1098,7 @@ def test_raw_response_create_overload_15(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_15(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -1143,20 +1114,19 @@ def test_streaming_response_create_overload_15(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_15(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="_sip._tcp.example.com", type="SRV", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -1167,7 +1137,7 @@ def test_method_create_overload_16(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, "fingerprint": "string", @@ -1179,7 +1149,6 @@ def test_method_create_with_all_params_overload_16(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1187,7 +1156,7 @@ def test_method_create_with_all_params_overload_16(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_16(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -1202,7 +1171,7 @@ def test_raw_response_create_overload_16(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_16(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -1218,20 +1187,19 @@ def test_streaming_response_create_overload_16(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_16(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="SSHFP", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -1242,7 +1210,7 @@ def test_method_create_overload_17(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -1254,7 +1222,6 @@ def test_method_create_with_all_params_overload_17(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1262,7 +1229,7 @@ def test_method_create_with_all_params_overload_17(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_17(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -1277,7 +1244,7 @@ def test_raw_response_create_overload_17(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_17(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -1293,20 +1260,19 @@ def test_streaming_response_create_overload_17(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_17(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="SVCB", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -1317,7 +1283,7 @@ def test_method_create_overload_18(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 1, @@ -1330,7 +1296,6 @@ def test_method_create_with_all_params_overload_18(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1338,7 +1303,7 @@ def test_method_create_with_all_params_overload_18(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_18(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -1353,7 +1318,7 @@ def test_raw_response_create_overload_18(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_18(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -1369,20 +1334,19 @@ def test_streaming_response_create_overload_18(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_18(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="TLSA", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -1393,7 +1357,7 @@ def test_method_create_overload_19(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -1401,7 +1365,6 @@ def test_method_create_with_all_params_overload_19(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1409,7 +1372,7 @@ def test_method_create_with_all_params_overload_19(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_19(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -1424,7 +1387,7 @@ def test_raw_response_create_overload_19(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_19(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -1440,20 +1403,19 @@ def test_streaming_response_create_overload_19(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_19(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", content="example text content", name="example.com", type="TXT", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -1465,7 +1427,7 @@ def test_method_create_overload_20(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", "weight": 20, @@ -1477,7 +1439,6 @@ def test_method_create_with_all_params_overload_20(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1485,7 +1446,7 @@ def test_method_create_with_all_params_overload_20(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_20(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -1501,7 +1462,7 @@ def test_raw_response_create_overload_20(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_20(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -1518,14 +1479,13 @@ def test_streaming_response_create_overload_20(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_create_overload_20(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", priority=10, type="URI", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -1533,7 +1493,7 @@ def test_path_params_create_overload_20(self, client: Cloudflare) -> None: def test_method_update_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -1545,7 +1505,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -1554,7 +1514,6 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1563,7 +1522,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -1579,7 +1538,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -1595,20 +1554,19 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_1(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="198.51.100.4", name="example.com", type="A", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -1619,7 +1577,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: def test_method_update_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -1631,7 +1589,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -1640,7 +1598,6 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1649,7 +1606,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -1665,7 +1622,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -1681,20 +1638,19 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_2(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="2400:cb00:2049::1", name="example.com", type="AAAA", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -1705,7 +1661,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: def test_method_update_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -1717,7 +1673,7 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", @@ -1729,7 +1685,6 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1738,7 +1693,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -1754,7 +1709,7 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -1770,20 +1725,19 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_3(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="CAA", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -1794,7 +1748,7 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: def test_method_update_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -1806,7 +1760,7 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, "certificate": "string", @@ -1819,7 +1773,6 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1828,7 +1781,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -1844,7 +1797,7 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -1860,20 +1813,19 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_4(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="CERT", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -1884,7 +1836,7 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: def test_method_update_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -1896,7 +1848,7 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -1905,7 +1857,6 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -1914,7 +1865,7 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -1930,7 +1881,7 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -1946,20 +1897,19 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_5(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content={}, name="example.com", type="CNAME", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -1970,7 +1920,7 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: def test_method_update_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -1982,7 +1932,7 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, @@ -1995,7 +1945,6 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2004,7 +1953,7 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -2020,7 +1969,7 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -2036,20 +1985,19 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_6(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="DNSKEY", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -2060,7 +2008,7 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: def test_method_update_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -2072,7 +2020,7 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, "digest": "string", @@ -2085,7 +2033,6 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2094,7 +2041,7 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -2110,7 +2057,7 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -2126,20 +2073,19 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_7(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="DS", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -2150,7 +2096,7 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: def test_method_update_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -2162,7 +2108,7 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -2174,7 +2120,6 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2183,7 +2128,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -2199,7 +2144,7 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -2215,20 +2160,19 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_8(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="HTTPS", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -2239,7 +2183,7 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: def test_method_update_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -2251,7 +2195,7 @@ def test_method_update_overload_9(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, "lat_degrees": 37, @@ -2272,7 +2216,6 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2281,7 +2224,7 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -2297,7 +2240,7 @@ def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -2313,20 +2256,19 @@ def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_9(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="LOC", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -2337,7 +2279,7 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: def test_method_update_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -2350,7 +2292,7 @@ def test_method_update_overload_10(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -2359,7 +2301,6 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2368,7 +2309,7 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -2385,7 +2326,7 @@ def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -2402,21 +2343,20 @@ def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_10(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="mx.example.com", name="example.com", priority=10, type="MX", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -2428,7 +2368,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: def test_method_update_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -2440,7 +2380,7 @@ def test_method_update_overload_11(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": "string", "order": 100, @@ -2455,7 +2395,6 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2464,7 +2403,7 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -2480,7 +2419,7 @@ def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -2496,20 +2435,19 @@ def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_11(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="NAPTR", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -2520,7 +2458,7 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: def test_method_update_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -2532,7 +2470,7 @@ def test_method_update_overload_12(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -2540,7 +2478,6 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2549,7 +2486,7 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -2565,7 +2502,7 @@ def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -2581,20 +2518,19 @@ def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_12(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="ns1.example.com", name="example.com", type="NS", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -2605,7 +2541,7 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: def test_method_update_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -2617,7 +2553,7 @@ def test_method_update_overload_13(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -2625,7 +2561,6 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2634,7 +2569,7 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -2650,7 +2585,7 @@ def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -2666,20 +2601,19 @@ def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_13(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="example.com", name="example.com", type="PTR", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -2690,7 +2624,7 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: def test_method_update_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -2702,7 +2636,7 @@ def test_method_update_overload_14(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 0, @@ -2715,7 +2649,6 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2724,7 +2657,7 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -2740,7 +2673,7 @@ def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -2756,20 +2689,19 @@ def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_14(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="SMIMEA", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -2780,7 +2712,7 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: def test_method_update_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -2792,7 +2724,7 @@ def test_method_update_overload_15(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", "port": 8806, @@ -2808,7 +2740,6 @@ def test_method_update_with_all_params_overload_15(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2817,7 +2748,7 @@ def test_method_update_with_all_params_overload_15(self, client: Cloudflare) -> def test_raw_response_update_overload_15(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -2833,7 +2764,7 @@ def test_raw_response_update_overload_15(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_15(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -2849,20 +2780,19 @@ def test_streaming_response_update_overload_15(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_15(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="_sip._tcp.example.com", type="SRV", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -2873,7 +2803,7 @@ def test_path_params_update_overload_15(self, client: Cloudflare) -> None: def test_method_update_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -2885,7 +2815,7 @@ def test_method_update_overload_16(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, "fingerprint": "string", @@ -2897,7 +2827,6 @@ def test_method_update_with_all_params_overload_16(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2906,7 +2835,7 @@ def test_method_update_with_all_params_overload_16(self, client: Cloudflare) -> def test_raw_response_update_overload_16(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -2922,7 +2851,7 @@ def test_raw_response_update_overload_16(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_16(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -2938,20 +2867,19 @@ def test_streaming_response_update_overload_16(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_16(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="SSHFP", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -2962,7 +2890,7 @@ def test_path_params_update_overload_16(self, client: Cloudflare) -> None: def test_method_update_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -2974,7 +2902,7 @@ def test_method_update_overload_17(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -2986,7 +2914,6 @@ def test_method_update_with_all_params_overload_17(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -2995,7 +2922,7 @@ def test_method_update_with_all_params_overload_17(self, client: Cloudflare) -> def test_raw_response_update_overload_17(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -3011,7 +2938,7 @@ def test_raw_response_update_overload_17(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_17(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -3027,20 +2954,19 @@ def test_streaming_response_update_overload_17(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_17(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="SVCB", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -3051,7 +2977,7 @@ def test_path_params_update_overload_17(self, client: Cloudflare) -> None: def test_method_update_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -3063,7 +2989,7 @@ def test_method_update_overload_18(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 1, @@ -3076,7 +3002,6 @@ def test_method_update_with_all_params_overload_18(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3085,7 +3010,7 @@ def test_method_update_with_all_params_overload_18(self, client: Cloudflare) -> def test_raw_response_update_overload_18(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -3101,7 +3026,7 @@ def test_raw_response_update_overload_18(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_18(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -3117,20 +3042,19 @@ def test_streaming_response_update_overload_18(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_18(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="TLSA", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -3141,7 +3065,7 @@ def test_path_params_update_overload_18(self, client: Cloudflare) -> None: def test_method_update_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -3153,7 +3077,7 @@ def test_method_update_overload_19(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -3161,7 +3085,6 @@ def test_method_update_with_all_params_overload_19(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3170,7 +3093,7 @@ def test_method_update_with_all_params_overload_19(self, client: Cloudflare) -> def test_raw_response_update_overload_19(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -3186,7 +3109,7 @@ def test_raw_response_update_overload_19(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_19(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -3202,20 +3125,19 @@ def test_streaming_response_update_overload_19(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_19(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="example text content", name="example.com", type="TXT", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -3226,7 +3148,7 @@ def test_path_params_update_overload_19(self, client: Cloudflare) -> None: def test_method_update_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -3239,7 +3161,7 @@ def test_method_update_overload_20(self, client: Cloudflare) -> None: def test_method_update_with_all_params_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", "weight": 20, @@ -3251,7 +3173,6 @@ def test_method_update_with_all_params_overload_20(self, client: Cloudflare) -> comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3260,7 +3181,7 @@ def test_method_update_with_all_params_overload_20(self, client: Cloudflare) -> def test_raw_response_update_overload_20(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -3277,7 +3198,7 @@ def test_raw_response_update_overload_20(self, client: Cloudflare) -> None: def test_streaming_response_update_overload_20(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -3294,21 +3215,20 @@ def test_streaming_response_update_overload_20(self, client: Cloudflare) -> None @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_update_overload_20(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", priority=10, type="URI", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -3440,7 +3360,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: def test_method_edit_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -3452,7 +3372,7 @@ def test_method_edit_overload_1(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -3461,7 +3381,6 @@ def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> Non proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3470,7 +3389,7 @@ def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -3486,7 +3405,7 @@ def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -3502,20 +3421,19 @@ def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="198.51.100.4", name="example.com", type="A", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -3526,7 +3444,7 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: def test_method_edit_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -3538,7 +3456,7 @@ def test_method_edit_overload_2(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -3547,7 +3465,6 @@ def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> Non proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3556,7 +3473,7 @@ def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -3572,7 +3489,7 @@ def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -3588,20 +3505,19 @@ def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="2400:cb00:2049::1", name="example.com", type="AAAA", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -3612,7 +3528,7 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: def test_method_edit_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -3624,7 +3540,7 @@ def test_method_edit_overload_3(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", @@ -3636,7 +3552,6 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3645,7 +3560,7 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -3661,7 +3576,7 @@ def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -3677,20 +3592,19 @@ def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="CAA", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -3701,7 +3615,7 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: def test_method_edit_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -3713,7 +3627,7 @@ def test_method_edit_overload_4(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, "certificate": "string", @@ -3726,7 +3640,6 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3735,7 +3648,7 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -3751,7 +3664,7 @@ def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -3767,20 +3680,19 @@ def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="CERT", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -3791,7 +3703,7 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: def test_method_edit_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -3803,7 +3715,7 @@ def test_method_edit_overload_5(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -3812,7 +3724,6 @@ def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> Non proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3821,7 +3732,7 @@ def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -3837,7 +3748,7 @@ def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -3853,20 +3764,19 @@ def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content={}, name="example.com", type="CNAME", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -3877,7 +3787,7 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: def test_method_edit_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -3889,7 +3799,7 @@ def test_method_edit_overload_6(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, @@ -3902,7 +3812,6 @@ def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> Non comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -3911,7 +3820,7 @@ def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -3927,7 +3836,7 @@ def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -3943,20 +3852,19 @@ def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="DNSKEY", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -3967,7 +3875,7 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: def test_method_edit_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -3979,7 +3887,7 @@ def test_method_edit_overload_7(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, "digest": "string", @@ -3992,7 +3900,6 @@ def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> Non comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4001,7 +3908,7 @@ def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -4017,7 +3924,7 @@ def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -4033,20 +3940,19 @@ def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="DS", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -4057,7 +3963,7 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: def test_method_edit_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -4069,7 +3975,7 @@ def test_method_edit_overload_8(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -4081,7 +3987,6 @@ def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> Non comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4090,7 +3995,7 @@ def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -4106,7 +4011,7 @@ def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -4122,20 +4027,19 @@ def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="HTTPS", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -4146,7 +4050,7 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: def test_method_edit_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -4158,7 +4062,7 @@ def test_method_edit_overload_9(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, "lat_degrees": 37, @@ -4179,7 +4083,6 @@ def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> Non comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4188,7 +4091,7 @@ def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> Non def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -4204,7 +4107,7 @@ def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -4220,20 +4123,19 @@ def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="LOC", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -4244,7 +4146,7 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: def test_method_edit_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -4257,7 +4159,7 @@ def test_method_edit_overload_10(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -4266,7 +4168,6 @@ def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> No comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4275,7 +4176,7 @@ def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> No def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -4292,7 +4193,7 @@ def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -4309,21 +4210,20 @@ def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="mx.example.com", name="example.com", priority=10, type="MX", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -4335,7 +4235,7 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: def test_method_edit_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -4347,7 +4247,7 @@ def test_method_edit_overload_11(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": "string", "order": 100, @@ -4362,7 +4262,6 @@ def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> No comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4371,7 +4270,7 @@ def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> No def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -4387,7 +4286,7 @@ def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -4403,20 +4302,19 @@ def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="NAPTR", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -4427,7 +4325,7 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: def test_method_edit_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -4439,7 +4337,7 @@ def test_method_edit_overload_12(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -4447,7 +4345,6 @@ def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> No comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4456,7 +4353,7 @@ def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> No def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -4472,7 +4369,7 @@ def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -4488,20 +4385,19 @@ def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="ns1.example.com", name="example.com", type="NS", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -4512,7 +4408,7 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: def test_method_edit_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -4524,7 +4420,7 @@ def test_method_edit_overload_13(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -4532,7 +4428,6 @@ def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> No comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4541,7 +4436,7 @@ def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> No def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -4557,7 +4452,7 @@ def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -4573,20 +4468,19 @@ def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="example.com", name="example.com", type="PTR", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -4597,7 +4491,7 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: def test_method_edit_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -4609,7 +4503,7 @@ def test_method_edit_overload_14(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 0, @@ -4622,7 +4516,6 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4631,7 +4524,7 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -4647,7 +4540,7 @@ def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -4663,20 +4556,19 @@ def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="SMIMEA", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -4687,7 +4579,7 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: def test_method_edit_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -4699,7 +4591,7 @@ def test_method_edit_overload_15(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", "port": 8806, @@ -4715,7 +4607,6 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4724,7 +4615,7 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -4740,7 +4631,7 @@ def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -4756,20 +4647,19 @@ def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="_sip._tcp.example.com", type="SRV", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -4780,7 +4670,7 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: def test_method_edit_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -4792,7 +4682,7 @@ def test_method_edit_overload_16(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, "fingerprint": "string", @@ -4804,7 +4694,6 @@ def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> No comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4813,7 +4702,7 @@ def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> No def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -4829,7 +4718,7 @@ def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -4845,20 +4734,19 @@ def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="SSHFP", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -4869,7 +4757,7 @@ def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: def test_method_edit_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -4881,7 +4769,7 @@ def test_method_edit_overload_17(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -4893,7 +4781,6 @@ def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> No comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4902,7 +4789,7 @@ def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> No def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -4918,7 +4805,7 @@ def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -4934,20 +4821,19 @@ def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="SVCB", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -4958,7 +4844,7 @@ def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: def test_method_edit_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -4970,7 +4856,7 @@ def test_method_edit_overload_18(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 1, @@ -4983,7 +4869,6 @@ def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> No comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -4992,7 +4877,7 @@ def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> No def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -5008,7 +4893,7 @@ def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -5024,20 +4909,19 @@ def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="TLSA", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -5048,7 +4932,7 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: def test_method_edit_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -5060,7 +4944,7 @@ def test_method_edit_overload_19(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -5068,7 +4952,6 @@ def test_method_edit_with_all_params_overload_19(self, client: Cloudflare) -> No comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5077,7 +4960,7 @@ def test_method_edit_with_all_params_overload_19(self, client: Cloudflare) -> No def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -5093,7 +4976,7 @@ def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -5109,20 +4992,19 @@ def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="example text content", name="example.com", type="TXT", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -5133,7 +5015,7 @@ def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: def test_method_edit_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -5146,7 +5028,7 @@ def test_method_edit_overload_20(self, client: Cloudflare) -> None: def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", "weight": 20, @@ -5158,7 +5040,6 @@ def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> No comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5167,7 +5048,7 @@ def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> No def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -5184,7 +5065,7 @@ def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None: def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -5201,21 +5082,20 @@ def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_path_params_edit_overload_20(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", priority=10, type="URI", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -5414,7 +5294,7 @@ class TestAsyncRecords: @parametrize async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -5425,7 +5305,7 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -5434,7 +5314,6 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5442,7 +5321,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -5457,7 +5336,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -5473,20 +5352,19 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", content="198.51.100.4", name="example.com", type="A", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -5497,7 +5375,7 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -5506,7 +5384,6 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5514,7 +5391,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -5529,7 +5406,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -5545,20 +5422,19 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", content="2400:cb00:2049::1", name="example.com", type="AAAA", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -5569,7 +5445,7 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", @@ -5581,7 +5457,6 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5589,7 +5464,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -5604,7 +5479,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -5620,20 +5495,19 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="CAA", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -5644,7 +5518,7 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, "certificate": "string", @@ -5657,7 +5531,6 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5665,7 +5538,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -5680,7 +5553,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -5696,20 +5569,19 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="CERT", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -5720,7 +5592,7 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -5729,7 +5601,6 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5737,7 +5608,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -5752,7 +5623,7 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -5768,20 +5639,19 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", content={}, name="example.com", type="CNAME", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -5792,7 +5662,7 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, @@ -5805,7 +5675,6 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5813,7 +5682,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -5828,7 +5697,7 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -5844,20 +5713,19 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="DNSKEY", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -5868,7 +5736,7 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, "digest": "string", @@ -5881,7 +5749,6 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5889,7 +5756,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -5904,7 +5771,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -5920,20 +5787,19 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="DS", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -5944,7 +5810,7 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -5956,7 +5822,6 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5964,7 +5829,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -5979,7 +5844,7 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -5995,20 +5860,19 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="HTTPS", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -6019,7 +5883,7 @@ async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, "lat_degrees": 37, @@ -6040,7 +5904,6 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6048,7 +5911,7 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -6063,7 +5926,7 @@ async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -6079,20 +5942,19 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_9(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="LOC", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -6104,7 +5966,7 @@ async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -6113,7 +5975,6 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6121,7 +5982,7 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy @parametrize async def test_raw_response_create_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -6137,7 +5998,7 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -6154,21 +6015,20 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_10(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", content="mx.example.com", name="example.com", priority=10, type="MX", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -6179,7 +6039,7 @@ async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": "string", "order": 100, @@ -6194,7 +6054,6 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6202,7 +6061,7 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy @parametrize async def test_raw_response_create_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -6217,7 +6076,7 @@ async def test_raw_response_create_overload_11(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -6233,20 +6092,19 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_11(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="NAPTR", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -6257,7 +6115,7 @@ async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -6265,7 +6123,6 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6273,7 +6130,7 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy @parametrize async def test_raw_response_create_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -6288,7 +6145,7 @@ async def test_raw_response_create_overload_12(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -6304,20 +6161,19 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_12(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", content="ns1.example.com", name="example.com", type="NS", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -6328,7 +6184,7 @@ async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -6336,7 +6192,6 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6344,7 +6199,7 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy @parametrize async def test_raw_response_create_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -6359,7 +6214,7 @@ async def test_raw_response_create_overload_13(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -6375,20 +6230,19 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_13(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", content="example.com", name="example.com", type="PTR", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -6399,7 +6253,7 @@ async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 0, @@ -6412,7 +6266,6 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6420,7 +6273,7 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy @parametrize async def test_raw_response_create_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -6435,7 +6288,7 @@ async def test_raw_response_create_overload_14(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -6451,20 +6304,19 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_14(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="SMIMEA", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -6475,7 +6327,7 @@ async def test_method_create_overload_15(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", "port": 8806, @@ -6491,7 +6343,6 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6499,7 +6350,7 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy @parametrize async def test_raw_response_create_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -6514,7 +6365,7 @@ async def test_raw_response_create_overload_15(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -6530,20 +6381,19 @@ async def test_streaming_response_create_overload_15(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_15(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="_sip._tcp.example.com", type="SRV", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -6554,7 +6404,7 @@ async def test_method_create_overload_16(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, "fingerprint": "string", @@ -6566,7 +6416,6 @@ async def test_method_create_with_all_params_overload_16(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6574,7 +6423,7 @@ async def test_method_create_with_all_params_overload_16(self, async_client: Asy @parametrize async def test_raw_response_create_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -6589,7 +6438,7 @@ async def test_raw_response_create_overload_16(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -6605,20 +6454,19 @@ async def test_streaming_response_create_overload_16(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_16(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="SSHFP", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -6629,7 +6477,7 @@ async def test_method_create_overload_17(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -6641,7 +6489,6 @@ async def test_method_create_with_all_params_overload_17(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6649,7 +6496,7 @@ async def test_method_create_with_all_params_overload_17(self, async_client: Asy @parametrize async def test_raw_response_create_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -6664,7 +6511,7 @@ async def test_raw_response_create_overload_17(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -6680,20 +6527,19 @@ async def test_streaming_response_create_overload_17(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_17(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="SVCB", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -6704,7 +6550,7 @@ async def test_method_create_overload_18(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 1, @@ -6717,7 +6563,6 @@ async def test_method_create_with_all_params_overload_18(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6725,7 +6570,7 @@ async def test_method_create_with_all_params_overload_18(self, async_client: Asy @parametrize async def test_raw_response_create_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -6740,7 +6585,7 @@ async def test_raw_response_create_overload_18(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -6756,20 +6601,19 @@ async def test_streaming_response_create_overload_18(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_18(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", type="TLSA", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -6780,7 +6624,7 @@ async def test_method_create_overload_19(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -6788,7 +6632,6 @@ async def test_method_create_with_all_params_overload_19(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6796,7 +6639,7 @@ async def test_method_create_with_all_params_overload_19(self, async_client: Asy @parametrize async def test_raw_response_create_overload_19(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -6811,7 +6654,7 @@ async def test_raw_response_create_overload_19(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_19(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -6827,20 +6670,19 @@ async def test_streaming_response_create_overload_19(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_19(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", content="example text content", name="example.com", type="TXT", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -6852,7 +6694,7 @@ async def test_method_create_overload_20(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", "weight": 20, @@ -6864,7 +6706,6 @@ async def test_method_create_with_all_params_overload_20(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6872,7 +6713,7 @@ async def test_method_create_with_all_params_overload_20(self, async_client: Asy @parametrize async def test_raw_response_create_overload_20(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -6888,7 +6729,7 @@ async def test_raw_response_create_overload_20(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_20(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.create( - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -6905,14 +6746,13 @@ async def test_streaming_response_create_overload_20(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_create_overload_20(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.create( - path_zone_id="", + zone_id="", data={}, name="example.com", priority=10, type="URI", - body_zone_id="", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -6920,7 +6760,7 @@ async def test_path_params_create_overload_20(self, async_client: AsyncCloudflar async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -6932,7 +6772,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -6941,7 +6781,6 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -6950,7 +6789,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -6966,7 +6805,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -6982,20 +6821,19 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="198.51.100.4", name="example.com", type="A", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -7006,7 +6844,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -7018,7 +6856,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -7027,7 +6865,6 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7036,7 +6873,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -7052,7 +6889,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -7068,20 +6905,19 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="2400:cb00:2049::1", name="example.com", type="AAAA", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -7092,7 +6928,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -7104,7 +6940,7 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", @@ -7116,7 +6952,6 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7125,7 +6960,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -7141,7 +6976,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -7157,20 +6992,19 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="CAA", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -7181,7 +7015,7 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -7193,7 +7027,7 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, "certificate": "string", @@ -7206,7 +7040,6 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7215,7 +7048,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -7231,7 +7064,7 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -7247,20 +7080,19 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="CERT", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -7271,7 +7103,7 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -7283,7 +7115,7 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -7292,7 +7124,6 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7301,7 +7132,7 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -7317,7 +7148,7 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -7333,20 +7164,19 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content={}, name="example.com", type="CNAME", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -7357,7 +7187,7 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -7369,7 +7199,7 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, @@ -7382,7 +7212,6 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7391,7 +7220,7 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -7407,7 +7236,7 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -7423,20 +7252,19 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="DNSKEY", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -7447,7 +7275,7 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -7459,7 +7287,7 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, "digest": "string", @@ -7472,7 +7300,6 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7481,7 +7308,7 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -7497,7 +7324,7 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -7513,20 +7340,19 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="DS", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -7537,7 +7363,7 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -7549,7 +7375,7 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -7561,7 +7387,6 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7570,7 +7395,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -7586,7 +7411,7 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -7602,20 +7427,19 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="HTTPS", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -7626,7 +7450,7 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -7638,7 +7462,7 @@ async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, "lat_degrees": 37, @@ -7659,7 +7483,6 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7668,7 +7491,7 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -7684,7 +7507,7 @@ async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflar async def test_streaming_response_update_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -7700,20 +7523,19 @@ async def test_streaming_response_update_overload_9(self, async_client: AsyncClo @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="LOC", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -7724,7 +7546,7 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -7737,7 +7559,7 @@ async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -7746,7 +7568,6 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7755,7 +7576,7 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy async def test_raw_response_update_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -7772,7 +7593,7 @@ async def test_raw_response_update_overload_10(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -7789,21 +7610,20 @@ async def test_streaming_response_update_overload_10(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_10(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="mx.example.com", name="example.com", priority=10, type="MX", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -7815,7 +7635,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -7827,7 +7647,7 @@ async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": "string", "order": 100, @@ -7842,7 +7662,6 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7851,7 +7670,7 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy async def test_raw_response_update_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -7867,7 +7686,7 @@ async def test_raw_response_update_overload_11(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -7883,20 +7702,19 @@ async def test_streaming_response_update_overload_11(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_11(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="NAPTR", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -7907,7 +7725,7 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -7919,7 +7737,7 @@ async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -7927,7 +7745,6 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -7936,7 +7753,7 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy async def test_raw_response_update_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -7952,7 +7769,7 @@ async def test_raw_response_update_overload_12(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -7968,20 +7785,19 @@ async def test_streaming_response_update_overload_12(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_12(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="ns1.example.com", name="example.com", type="NS", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -7992,7 +7808,7 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -8004,7 +7820,7 @@ async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -8012,7 +7828,6 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8021,7 +7836,7 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy async def test_raw_response_update_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -8037,7 +7852,7 @@ async def test_raw_response_update_overload_13(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -8053,20 +7868,19 @@ async def test_streaming_response_update_overload_13(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_13(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="example.com", name="example.com", type="PTR", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -8077,7 +7891,7 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -8089,7 +7903,7 @@ async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 0, @@ -8102,7 +7916,6 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8111,7 +7924,7 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy async def test_raw_response_update_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -8127,7 +7940,7 @@ async def test_raw_response_update_overload_14(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -8143,20 +7956,19 @@ async def test_streaming_response_update_overload_14(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_14(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="SMIMEA", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -8167,7 +7979,7 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar async def test_method_update_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -8179,7 +7991,7 @@ async def test_method_update_overload_15(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", "port": 8806, @@ -8195,7 +8007,6 @@ async def test_method_update_with_all_params_overload_15(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8204,7 +8015,7 @@ async def test_method_update_with_all_params_overload_15(self, async_client: Asy async def test_raw_response_update_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -8220,7 +8031,7 @@ async def test_raw_response_update_overload_15(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -8236,20 +8047,19 @@ async def test_streaming_response_update_overload_15(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_15(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="_sip._tcp.example.com", type="SRV", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -8260,7 +8070,7 @@ async def test_path_params_update_overload_15(self, async_client: AsyncCloudflar async def test_method_update_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -8272,7 +8082,7 @@ async def test_method_update_overload_16(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, "fingerprint": "string", @@ -8284,7 +8094,6 @@ async def test_method_update_with_all_params_overload_16(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8293,7 +8102,7 @@ async def test_method_update_with_all_params_overload_16(self, async_client: Asy async def test_raw_response_update_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -8309,7 +8118,7 @@ async def test_raw_response_update_overload_16(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -8325,20 +8134,19 @@ async def test_streaming_response_update_overload_16(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_16(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="SSHFP", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -8349,7 +8157,7 @@ async def test_path_params_update_overload_16(self, async_client: AsyncCloudflar async def test_method_update_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -8361,7 +8169,7 @@ async def test_method_update_overload_17(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -8373,7 +8181,6 @@ async def test_method_update_with_all_params_overload_17(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8382,7 +8189,7 @@ async def test_method_update_with_all_params_overload_17(self, async_client: Asy async def test_raw_response_update_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -8398,7 +8205,7 @@ async def test_raw_response_update_overload_17(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -8414,20 +8221,19 @@ async def test_streaming_response_update_overload_17(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_17(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="SVCB", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -8438,7 +8244,7 @@ async def test_path_params_update_overload_17(self, async_client: AsyncCloudflar async def test_method_update_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -8450,7 +8256,7 @@ async def test_method_update_overload_18(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 1, @@ -8463,7 +8269,6 @@ async def test_method_update_with_all_params_overload_18(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8472,7 +8277,7 @@ async def test_method_update_with_all_params_overload_18(self, async_client: Asy async def test_raw_response_update_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -8488,7 +8293,7 @@ async def test_raw_response_update_overload_18(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -8504,20 +8309,19 @@ async def test_streaming_response_update_overload_18(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_18(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="TLSA", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -8528,7 +8332,7 @@ async def test_path_params_update_overload_18(self, async_client: AsyncCloudflar async def test_method_update_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -8540,7 +8344,7 @@ async def test_method_update_overload_19(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -8548,7 +8352,6 @@ async def test_method_update_with_all_params_overload_19(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8557,7 +8360,7 @@ async def test_method_update_with_all_params_overload_19(self, async_client: Asy async def test_raw_response_update_overload_19(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -8573,7 +8376,7 @@ async def test_raw_response_update_overload_19(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_19(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -8589,20 +8392,19 @@ async def test_streaming_response_update_overload_19(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_19(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="example text content", name="example.com", type="TXT", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -8613,7 +8415,7 @@ async def test_path_params_update_overload_19(self, async_client: AsyncCloudflar async def test_method_update_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -8626,7 +8428,7 @@ async def test_method_update_overload_20(self, async_client: AsyncCloudflare) -> async def test_method_update_with_all_params_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", "weight": 20, @@ -8638,7 +8440,6 @@ async def test_method_update_with_all_params_overload_20(self, async_client: Asy comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8647,7 +8448,7 @@ async def test_method_update_with_all_params_overload_20(self, async_client: Asy async def test_raw_response_update_overload_20(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -8664,7 +8465,7 @@ async def test_raw_response_update_overload_20(self, async_client: AsyncCloudfla async def test_streaming_response_update_overload_20(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -8681,21 +8482,20 @@ async def test_streaming_response_update_overload_20(self, async_client: AsyncCl @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_update_overload_20(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", priority=10, type="URI", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -8827,7 +8627,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -8839,7 +8639,7 @@ async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -8848,7 +8648,6 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncC proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8857,7 +8656,7 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncC async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -8873,7 +8672,7 @@ async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -8889,20 +8688,19 @@ async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="198.51.100.4", name="example.com", type="A", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", type="A", @@ -8913,7 +8711,7 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -8925,7 +8723,7 @@ async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -8934,7 +8732,6 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncC proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -8943,7 +8740,7 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncC async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -8959,7 +8756,7 @@ async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -8975,20 +8772,19 @@ async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="2400:cb00:2049::1", name="example.com", type="AAAA", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", type="AAAA", @@ -8999,7 +8795,7 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -9011,7 +8807,7 @@ async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", @@ -9023,7 +8819,6 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9032,7 +8827,7 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -9048,7 +8843,7 @@ async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -9064,20 +8859,19 @@ async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="CAA", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CAA", @@ -9088,7 +8882,7 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -9100,7 +8894,7 @@ async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, "certificate": "string", @@ -9113,7 +8907,6 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9122,7 +8915,7 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -9138,7 +8931,7 @@ async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -9154,20 +8947,19 @@ async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="CERT", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="CERT", @@ -9178,7 +8970,7 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -9190,7 +8982,7 @@ async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -9199,7 +8991,6 @@ async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncC proxied=False, tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9208,7 +8999,7 @@ async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncC async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -9224,7 +9015,7 @@ async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -9240,20 +9031,19 @@ async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content={}, name="example.com", type="CNAME", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", type="CNAME", @@ -9264,7 +9054,7 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -9276,7 +9066,7 @@ async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, @@ -9289,7 +9079,6 @@ async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncC comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9298,7 +9087,7 @@ async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncC async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -9314,7 +9103,7 @@ async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -9330,20 +9119,19 @@ async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="DNSKEY", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DNSKEY", @@ -9354,7 +9142,7 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -9366,7 +9154,7 @@ async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, "digest": "string", @@ -9379,7 +9167,6 @@ async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncC comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9388,7 +9175,7 @@ async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncC async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -9404,7 +9191,7 @@ async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -9420,20 +9207,19 @@ async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="DS", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="DS", @@ -9444,7 +9230,7 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -9456,7 +9242,7 @@ async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -9468,7 +9254,6 @@ async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncC comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9477,7 +9262,7 @@ async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncC async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -9493,7 +9278,7 @@ async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -9509,20 +9294,19 @@ async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="HTTPS", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="HTTPS", @@ -9533,7 +9317,7 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -9545,7 +9329,7 @@ async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> No async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, "lat_degrees": 37, @@ -9566,7 +9350,6 @@ async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncC comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9575,7 +9358,7 @@ async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncC async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -9591,7 +9374,7 @@ async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -9607,20 +9390,19 @@ async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloud @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="LOC", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="LOC", @@ -9631,7 +9413,7 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -9644,7 +9426,7 @@ async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -9653,7 +9435,6 @@ async def test_method_edit_with_all_params_overload_10(self, async_client: Async comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9662,7 +9443,7 @@ async def test_method_edit_with_all_params_overload_10(self, async_client: Async async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -9679,7 +9460,7 @@ async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -9696,21 +9477,20 @@ async def test_streaming_response_edit_overload_10(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="mx.example.com", name="example.com", priority=10, type="MX", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", priority=10, @@ -9722,7 +9502,7 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -9734,7 +9514,7 @@ async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": "string", "order": 100, @@ -9749,7 +9529,6 @@ async def test_method_edit_with_all_params_overload_11(self, async_client: Async comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9758,7 +9537,7 @@ async def test_method_edit_with_all_params_overload_11(self, async_client: Async async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -9774,7 +9553,7 @@ async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -9790,20 +9569,19 @@ async def test_streaming_response_edit_overload_11(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="NAPTR", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="NAPTR", @@ -9814,7 +9592,7 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -9826,7 +9604,7 @@ async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -9834,7 +9612,6 @@ async def test_method_edit_with_all_params_overload_12(self, async_client: Async comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9843,7 +9620,7 @@ async def test_method_edit_with_all_params_overload_12(self, async_client: Async async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -9859,7 +9636,7 @@ async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -9875,20 +9652,19 @@ async def test_streaming_response_edit_overload_12(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="ns1.example.com", name="example.com", type="NS", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", type="NS", @@ -9899,7 +9675,7 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -9911,7 +9687,7 @@ async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -9919,7 +9695,6 @@ async def test_method_edit_with_all_params_overload_13(self, async_client: Async comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -9928,7 +9703,7 @@ async def test_method_edit_with_all_params_overload_13(self, async_client: Async async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -9944,7 +9719,7 @@ async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -9960,20 +9735,19 @@ async def test_streaming_response_edit_overload_13(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="example.com", name="example.com", type="PTR", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", type="PTR", @@ -9984,7 +9758,7 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -9996,7 +9770,7 @@ async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 0, @@ -10009,7 +9783,6 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -10018,7 +9791,7 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -10034,7 +9807,7 @@ async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -10050,20 +9823,19 @@ async def test_streaming_response_edit_overload_14(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="SMIMEA", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SMIMEA", @@ -10074,7 +9846,7 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -10086,7 +9858,7 @@ async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", "port": 8806, @@ -10102,7 +9874,6 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -10111,7 +9882,7 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -10127,7 +9898,7 @@ async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -10143,20 +9914,19 @@ async def test_streaming_response_edit_overload_15(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="_sip._tcp.example.com", type="SRV", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", type="SRV", @@ -10167,7 +9937,7 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -10179,7 +9949,7 @@ async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, "fingerprint": "string", @@ -10191,7 +9961,6 @@ async def test_method_edit_with_all_params_overload_16(self, async_client: Async comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -10200,7 +9969,7 @@ async def test_method_edit_with_all_params_overload_16(self, async_client: Async async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -10216,7 +9985,7 @@ async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -10232,20 +10001,19 @@ async def test_streaming_response_edit_overload_16(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="SSHFP", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SSHFP", @@ -10256,7 +10024,7 @@ async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -10268,7 +10036,7 @@ async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, "target": ".", @@ -10280,7 +10048,6 @@ async def test_method_edit_with_all_params_overload_17(self, async_client: Async comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -10289,7 +10056,7 @@ async def test_method_edit_with_all_params_overload_17(self, async_client: Async async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -10305,7 +10072,7 @@ async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -10321,20 +10088,19 @@ async def test_streaming_response_edit_overload_17(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="SVCB", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="SVCB", @@ -10345,7 +10111,7 @@ async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -10357,7 +10123,7 @@ async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "certificate": "string", "matching_type": 1, @@ -10370,7 +10136,6 @@ async def test_method_edit_with_all_params_overload_18(self, async_client: Async comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -10379,7 +10144,7 @@ async def test_method_edit_with_all_params_overload_18(self, async_client: Async async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -10395,7 +10160,7 @@ async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -10411,20 +10176,19 @@ async def test_streaming_response_edit_overload_18(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", type="TLSA", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", type="TLSA", @@ -10435,7 +10199,7 @@ async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -10447,7 +10211,7 @@ async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -10455,7 +10219,6 @@ async def test_method_edit_with_all_params_overload_19(self, async_client: Async comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -10464,7 +10227,7 @@ async def test_method_edit_with_all_params_overload_19(self, async_client: Async async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -10480,7 +10243,7 @@ async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_19(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -10496,20 +10259,19 @@ async def test_streaming_response_edit_overload_19(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", content="example text content", name="example.com", type="TXT", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", type="TXT", @@ -10520,7 +10282,7 @@ async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -10533,7 +10295,7 @@ async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> N async def test_method_edit_with_all_params_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", "weight": 20, @@ -10545,7 +10307,6 @@ async def test_method_edit_with_all_params_overload_20(self, async_client: Async comment="Domain verification record", tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, - body_zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -10554,7 +10315,7 @@ async def test_method_edit_with_all_params_overload_20(self, async_client: Async async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -10571,7 +10332,7 @@ async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare async def test_streaming_response_edit_overload_20(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, @@ -10588,21 +10349,20 @@ async def test_streaming_response_edit_overload_20(self, async_client: AsyncClou @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_zone_id` but received ''"): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", - path_zone_id="", + zone_id="", data={}, name="example.com", priority=10, type="URI", - body_zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( "", - path_zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", priority=10, From dc48e66d518b049a4b8686acf29a418c7fdb1fe1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 07:22:31 +0000 Subject: [PATCH 122/124] feat(api): OpenAPI spec update via Stainless API (#1136) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 65dd286b402..eee15c1e024 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cfad07b19358cd949055b19f0b3018c59d6d432d441c6ce1f1bfba4fe2ceb344.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8f0e4a046cf501ff27e9ca8d0f6b1919d7f77feb4eeab632af52b4abde79e1d7.yml From 4efa7b1a64dab2ded7acc9d08155867bfaa417ef Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 24 Jun 2024 18:44:56 +0000 Subject: [PATCH 123/124] feat(api): OpenAPI spec update via Stainless API --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index eee15c1e024..bfdb542ea02 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1353 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8f0e4a046cf501ff27e9ca8d0f6b1919d7f77feb4eeab632af52b4abde79e1d7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1274668bf5bb40cc6a93aa05b9b1c96050656b905a292bccdb53941f50eaf81e.yml From a997b40032618607942ea8265173f606ef2ff496 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 18:45:52 +0000 Subject: [PATCH 124/124] release: 3.0.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 130 ++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- src/cloudflare/_version.py | 2 +- 4 files changed, 133 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 782f39f19fa..4191c8899b7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.0.0-beta.10" + ".": "3.0.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3525bc456e2..2f2f3ff4d30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,135 @@ # Changelog +## 3.0.0 (2024-06-24) + +Full Changelog: [v3.0.0-beta.10...v3.0.0](https://github.com/cloudflare/cloudflare-python/compare/v3.0.0-beta.10...v3.0.0) + +### Features + +* **api:** OpenAPI spec update via Stainless API ([4efa7b1](https://github.com/cloudflare/cloudflare-python/commit/4efa7b1a64dab2ded7acc9d08155867bfaa417ef)) +* **api:** OpenAPI spec update via Stainless API ([#1014](https://github.com/cloudflare/cloudflare-python/issues/1014)) ([f9b879a](https://github.com/cloudflare/cloudflare-python/commit/f9b879a727349e6604c3ae88c7949c388d655766)) +* **api:** OpenAPI spec update via Stainless API ([#1016](https://github.com/cloudflare/cloudflare-python/issues/1016)) ([b762e85](https://github.com/cloudflare/cloudflare-python/commit/b762e85608f579b5b3a69a8a6ee948857b7f605d)) +* **api:** OpenAPI spec update via Stainless API ([#1017](https://github.com/cloudflare/cloudflare-python/issues/1017)) ([7bfbdba](https://github.com/cloudflare/cloudflare-python/commit/7bfbdba867534d51955ded9e009dd501047cf99f)) +* **api:** OpenAPI spec update via Stainless API ([#1018](https://github.com/cloudflare/cloudflare-python/issues/1018)) ([038c47e](https://github.com/cloudflare/cloudflare-python/commit/038c47e76305fc244a936093f65031bdd022b4c6)) +* **api:** OpenAPI spec update via Stainless API ([#1019](https://github.com/cloudflare/cloudflare-python/issues/1019)) ([9367d59](https://github.com/cloudflare/cloudflare-python/commit/9367d593cef36eef75f464930c6e8d5fa97700d5)) +* **api:** OpenAPI spec update via Stainless API ([#1020](https://github.com/cloudflare/cloudflare-python/issues/1020)) ([8e20edf](https://github.com/cloudflare/cloudflare-python/commit/8e20edfc520c31134d110170ff84a927629753dc)) +* **api:** OpenAPI spec update via Stainless API ([#1021](https://github.com/cloudflare/cloudflare-python/issues/1021)) ([7d5572a](https://github.com/cloudflare/cloudflare-python/commit/7d5572aee61a0d57a27878bbdea6e753f08d1021)) +* **api:** OpenAPI spec update via Stainless API ([#1022](https://github.com/cloudflare/cloudflare-python/issues/1022)) ([c1ed21d](https://github.com/cloudflare/cloudflare-python/commit/c1ed21d227a7d7b543d52dcbcd93a6c3ec0e5e9c)) +* **api:** OpenAPI spec update via Stainless API ([#1023](https://github.com/cloudflare/cloudflare-python/issues/1023)) ([caa36b4](https://github.com/cloudflare/cloudflare-python/commit/caa36b444894f9f539595b93d66ed5cecf3defe8)) +* **api:** OpenAPI spec update via Stainless API ([#1024](https://github.com/cloudflare/cloudflare-python/issues/1024)) ([7371f0f](https://github.com/cloudflare/cloudflare-python/commit/7371f0fe9cf17803623f77c6ca1e710020dddbb9)) +* **api:** OpenAPI spec update via Stainless API ([#1025](https://github.com/cloudflare/cloudflare-python/issues/1025)) ([ed9dd82](https://github.com/cloudflare/cloudflare-python/commit/ed9dd829582c670ab471b3a977cb1bd4fe5c63d3)) +* **api:** OpenAPI spec update via Stainless API ([#1026](https://github.com/cloudflare/cloudflare-python/issues/1026)) ([4848bd1](https://github.com/cloudflare/cloudflare-python/commit/4848bd11c2654294cf6a98dc0de66d2f1ae21201)) +* **api:** OpenAPI spec update via Stainless API ([#1027](https://github.com/cloudflare/cloudflare-python/issues/1027)) ([71e22e2](https://github.com/cloudflare/cloudflare-python/commit/71e22e2f9b9b9e89d26017c9883ce682e61c0847)) +* **api:** OpenAPI spec update via Stainless API ([#1028](https://github.com/cloudflare/cloudflare-python/issues/1028)) ([500976b](https://github.com/cloudflare/cloudflare-python/commit/500976bfe6fd9056ea0cc3fad90e2868cb49cab7)) +* **api:** OpenAPI spec update via Stainless API ([#1029](https://github.com/cloudflare/cloudflare-python/issues/1029)) ([55865cf](https://github.com/cloudflare/cloudflare-python/commit/55865cfd42d5a66dbeeb9463a81f6a264597987f)) +* **api:** OpenAPI spec update via Stainless API ([#1030](https://github.com/cloudflare/cloudflare-python/issues/1030)) ([dadf271](https://github.com/cloudflare/cloudflare-python/commit/dadf2717c87f37a3c7e79c830b4edd636dc39ea1)) +* **api:** OpenAPI spec update via Stainless API ([#1031](https://github.com/cloudflare/cloudflare-python/issues/1031)) ([e71b384](https://github.com/cloudflare/cloudflare-python/commit/e71b38484ff5d03788df92b32407932aec8802ba)) +* **api:** OpenAPI spec update via Stainless API ([#1032](https://github.com/cloudflare/cloudflare-python/issues/1032)) ([f6ce7db](https://github.com/cloudflare/cloudflare-python/commit/f6ce7db2669cf56cdb5a53bbe4af6ee98cb66cd4)) +* **api:** OpenAPI spec update via Stainless API ([#1033](https://github.com/cloudflare/cloudflare-python/issues/1033)) ([4ea82b2](https://github.com/cloudflare/cloudflare-python/commit/4ea82b2757c7aa82a994467bbb32f387730403a8)) +* **api:** OpenAPI spec update via Stainless API ([#1034](https://github.com/cloudflare/cloudflare-python/issues/1034)) ([b1a4539](https://github.com/cloudflare/cloudflare-python/commit/b1a45398d3e832f18bb3f27733f42373e73b842f)) +* **api:** OpenAPI spec update via Stainless API ([#1035](https://github.com/cloudflare/cloudflare-python/issues/1035)) ([1f88ee5](https://github.com/cloudflare/cloudflare-python/commit/1f88ee5bdecdf429688e9fbdcf6a1bdaf8d8219e)) +* **api:** OpenAPI spec update via Stainless API ([#1036](https://github.com/cloudflare/cloudflare-python/issues/1036)) ([e020fef](https://github.com/cloudflare/cloudflare-python/commit/e020fef0b68ccc8fcdfdade8ee255dde21c83ef7)) +* **api:** OpenAPI spec update via Stainless API ([#1037](https://github.com/cloudflare/cloudflare-python/issues/1037)) ([b63a076](https://github.com/cloudflare/cloudflare-python/commit/b63a076dd8a8f235d00cb746bbeb7f9e7ca24341)) +* **api:** OpenAPI spec update via Stainless API ([#1038](https://github.com/cloudflare/cloudflare-python/issues/1038)) ([498913d](https://github.com/cloudflare/cloudflare-python/commit/498913d0e8d68490e6e4b7d8fe63951177386fb3)) +* **api:** OpenAPI spec update via Stainless API ([#1039](https://github.com/cloudflare/cloudflare-python/issues/1039)) ([1a82acf](https://github.com/cloudflare/cloudflare-python/commit/1a82acfe5e8892f1abdd2b1197df3c6ec5508766)) +* **api:** OpenAPI spec update via Stainless API ([#1040](https://github.com/cloudflare/cloudflare-python/issues/1040)) ([fe5de84](https://github.com/cloudflare/cloudflare-python/commit/fe5de84b8800c6d3916a7d979deef16692c8c1d2)) +* **api:** OpenAPI spec update via Stainless API ([#1041](https://github.com/cloudflare/cloudflare-python/issues/1041)) ([5acb02c](https://github.com/cloudflare/cloudflare-python/commit/5acb02c8c4cbc6c0c70a1f7b796a2025e023eb39)) +* **api:** OpenAPI spec update via Stainless API ([#1042](https://github.com/cloudflare/cloudflare-python/issues/1042)) ([997098f](https://github.com/cloudflare/cloudflare-python/commit/997098f3139f95d754fb54261191b9bd450cf14a)) +* **api:** OpenAPI spec update via Stainless API ([#1043](https://github.com/cloudflare/cloudflare-python/issues/1043)) ([46c4648](https://github.com/cloudflare/cloudflare-python/commit/46c4648beb57b43598fb0bdbd30072eacd4aaf46)) +* **api:** OpenAPI spec update via Stainless API ([#1044](https://github.com/cloudflare/cloudflare-python/issues/1044)) ([ef5e7ee](https://github.com/cloudflare/cloudflare-python/commit/ef5e7ee79fd11727d9f2e0a272c8799b06181c46)) +* **api:** OpenAPI spec update via Stainless API ([#1045](https://github.com/cloudflare/cloudflare-python/issues/1045)) ([cd59b4a](https://github.com/cloudflare/cloudflare-python/commit/cd59b4a3c7b1310293fbd5c05b9819be159c0317)) +* **api:** OpenAPI spec update via Stainless API ([#1046](https://github.com/cloudflare/cloudflare-python/issues/1046)) ([5e46560](https://github.com/cloudflare/cloudflare-python/commit/5e4656011ad6384e57a017859a8c0518dbbf7fae)) +* **api:** OpenAPI spec update via Stainless API ([#1047](https://github.com/cloudflare/cloudflare-python/issues/1047)) ([4a7b51b](https://github.com/cloudflare/cloudflare-python/commit/4a7b51ba9a6d3a8c482a52095f79fb2ad8e71020)) +* **api:** OpenAPI spec update via Stainless API ([#1048](https://github.com/cloudflare/cloudflare-python/issues/1048)) ([063addb](https://github.com/cloudflare/cloudflare-python/commit/063addb8c350277190beedebe40eeee5e3295169)) +* **api:** OpenAPI spec update via Stainless API ([#1049](https://github.com/cloudflare/cloudflare-python/issues/1049)) ([c996cad](https://github.com/cloudflare/cloudflare-python/commit/c996cadc39d61dc66e5bdec273365cf06dbee08d)) +* **api:** OpenAPI spec update via Stainless API ([#1050](https://github.com/cloudflare/cloudflare-python/issues/1050)) ([381ebf4](https://github.com/cloudflare/cloudflare-python/commit/381ebf4a87c30ad03d89f6bd8188d1ebaa8a8267)) +* **api:** OpenAPI spec update via Stainless API ([#1051](https://github.com/cloudflare/cloudflare-python/issues/1051)) ([f6430b7](https://github.com/cloudflare/cloudflare-python/commit/f6430b7da0306d943b55439b8e796efd083d3e7e)) +* **api:** OpenAPI spec update via Stainless API ([#1053](https://github.com/cloudflare/cloudflare-python/issues/1053)) ([3112e77](https://github.com/cloudflare/cloudflare-python/commit/3112e777017e66a420039fba934b3bb87bcaa9de)) +* **api:** OpenAPI spec update via Stainless API ([#1055](https://github.com/cloudflare/cloudflare-python/issues/1055)) ([aa12de0](https://github.com/cloudflare/cloudflare-python/commit/aa12de061769fba111534d81a441279074d56e8c)) +* **api:** OpenAPI spec update via Stainless API ([#1056](https://github.com/cloudflare/cloudflare-python/issues/1056)) ([db34d57](https://github.com/cloudflare/cloudflare-python/commit/db34d57cbb74e530523d498471c6c4192eefcabe)) +* **api:** OpenAPI spec update via Stainless API ([#1057](https://github.com/cloudflare/cloudflare-python/issues/1057)) ([ea91ee4](https://github.com/cloudflare/cloudflare-python/commit/ea91ee44ccc83e92367dac1fd2fe71d4ce933be5)) +* **api:** OpenAPI spec update via Stainless API ([#1058](https://github.com/cloudflare/cloudflare-python/issues/1058)) ([81b555a](https://github.com/cloudflare/cloudflare-python/commit/81b555abc94747badabcdaace26802de98b26e7d)) +* **api:** OpenAPI spec update via Stainless API ([#1059](https://github.com/cloudflare/cloudflare-python/issues/1059)) ([74de52f](https://github.com/cloudflare/cloudflare-python/commit/74de52fda87c620fabbbce539312dec6d2d59ff3)) +* **api:** OpenAPI spec update via Stainless API ([#1060](https://github.com/cloudflare/cloudflare-python/issues/1060)) ([e9e3fd8](https://github.com/cloudflare/cloudflare-python/commit/e9e3fd85d8069aa955f9a75f45feb08931cebbfb)) +* **api:** OpenAPI spec update via Stainless API ([#1061](https://github.com/cloudflare/cloudflare-python/issues/1061)) ([cd6884d](https://github.com/cloudflare/cloudflare-python/commit/cd6884d6a929540066973d6c1fb4c037119a7826)) +* **api:** OpenAPI spec update via Stainless API ([#1062](https://github.com/cloudflare/cloudflare-python/issues/1062)) ([052747a](https://github.com/cloudflare/cloudflare-python/commit/052747aa5cc15791963dc3e36d280bd15763ef54)) +* **api:** OpenAPI spec update via Stainless API ([#1063](https://github.com/cloudflare/cloudflare-python/issues/1063)) ([01a46c5](https://github.com/cloudflare/cloudflare-python/commit/01a46c58585a06cfbfd88143da063e365da1a360)) +* **api:** OpenAPI spec update via Stainless API ([#1064](https://github.com/cloudflare/cloudflare-python/issues/1064)) ([82bbd71](https://github.com/cloudflare/cloudflare-python/commit/82bbd717741ab44b1d7a381c798c03df47233d89)) +* **api:** OpenAPI spec update via Stainless API ([#1065](https://github.com/cloudflare/cloudflare-python/issues/1065)) ([fdeb11c](https://github.com/cloudflare/cloudflare-python/commit/fdeb11cf9867d9c63653385e9430574e4443de5b)) +* **api:** OpenAPI spec update via Stainless API ([#1066](https://github.com/cloudflare/cloudflare-python/issues/1066)) ([28eaa38](https://github.com/cloudflare/cloudflare-python/commit/28eaa3806500911a261c6d47e03017f7a9e8eba5)) +* **api:** OpenAPI spec update via Stainless API ([#1067](https://github.com/cloudflare/cloudflare-python/issues/1067)) ([6ff321d](https://github.com/cloudflare/cloudflare-python/commit/6ff321dc3d9160b864d735953e28fd054efcc63b)) +* **api:** OpenAPI spec update via Stainless API ([#1068](https://github.com/cloudflare/cloudflare-python/issues/1068)) ([439a829](https://github.com/cloudflare/cloudflare-python/commit/439a8292e7ba4ff45df84c3cd85a23a0dac89711)) +* **api:** OpenAPI spec update via Stainless API ([#1069](https://github.com/cloudflare/cloudflare-python/issues/1069)) ([82e8ca5](https://github.com/cloudflare/cloudflare-python/commit/82e8ca53c4ec9f0ba6e8c1184eb80a3f3c4e971c)) +* **api:** OpenAPI spec update via Stainless API ([#1070](https://github.com/cloudflare/cloudflare-python/issues/1070)) ([22c184e](https://github.com/cloudflare/cloudflare-python/commit/22c184ebf312ea3632bf4afcc1d6e4fb25f35902)) +* **api:** OpenAPI spec update via Stainless API ([#1071](https://github.com/cloudflare/cloudflare-python/issues/1071)) ([3c1897a](https://github.com/cloudflare/cloudflare-python/commit/3c1897a47d652c9fc929c4149520418d21acff6f)) +* **api:** OpenAPI spec update via Stainless API ([#1072](https://github.com/cloudflare/cloudflare-python/issues/1072)) ([1c76624](https://github.com/cloudflare/cloudflare-python/commit/1c766243ebd9f962e451e41230890f6e5930dc93)) +* **api:** OpenAPI spec update via Stainless API ([#1073](https://github.com/cloudflare/cloudflare-python/issues/1073)) ([8703733](https://github.com/cloudflare/cloudflare-python/commit/87037337470772614c0f795684ee6f401c2a7f1c)) +* **api:** OpenAPI spec update via Stainless API ([#1074](https://github.com/cloudflare/cloudflare-python/issues/1074)) ([cc22cb5](https://github.com/cloudflare/cloudflare-python/commit/cc22cb5b753e6b46ec7518f409e60803d659e074)) +* **api:** OpenAPI spec update via Stainless API ([#1075](https://github.com/cloudflare/cloudflare-python/issues/1075)) ([dc30697](https://github.com/cloudflare/cloudflare-python/commit/dc306973d55d184e941fe1c2e676c59cbcca0bf6)) +* **api:** OpenAPI spec update via Stainless API ([#1076](https://github.com/cloudflare/cloudflare-python/issues/1076)) ([69d14b3](https://github.com/cloudflare/cloudflare-python/commit/69d14b389088280354bb9584a0a9228decbc2f7c)) +* **api:** OpenAPI spec update via Stainless API ([#1077](https://github.com/cloudflare/cloudflare-python/issues/1077)) ([51c1d82](https://github.com/cloudflare/cloudflare-python/commit/51c1d82e653cbcdf365b33d811517484cda1f122)) +* **api:** OpenAPI spec update via Stainless API ([#1078](https://github.com/cloudflare/cloudflare-python/issues/1078)) ([ca74a01](https://github.com/cloudflare/cloudflare-python/commit/ca74a013a70525d4e6bc3e50d0d36896ff9c0302)) +* **api:** OpenAPI spec update via Stainless API ([#1079](https://github.com/cloudflare/cloudflare-python/issues/1079)) ([547d81d](https://github.com/cloudflare/cloudflare-python/commit/547d81dee6c5d49cd7f42029130751bc768024ae)) +* **api:** OpenAPI spec update via Stainless API ([#1080](https://github.com/cloudflare/cloudflare-python/issues/1080)) ([a0a142b](https://github.com/cloudflare/cloudflare-python/commit/a0a142b7958e791937147c2cc32665034a3bf417)) +* **api:** OpenAPI spec update via Stainless API ([#1081](https://github.com/cloudflare/cloudflare-python/issues/1081)) ([7932a90](https://github.com/cloudflare/cloudflare-python/commit/7932a902ef30c6b4dcb13990a35c156fd0d93469)) +* **api:** OpenAPI spec update via Stainless API ([#1082](https://github.com/cloudflare/cloudflare-python/issues/1082)) ([ece3ecc](https://github.com/cloudflare/cloudflare-python/commit/ece3ecc92770b2e1ee70dae2f4bb362646a889e0)) +* **api:** OpenAPI spec update via Stainless API ([#1083](https://github.com/cloudflare/cloudflare-python/issues/1083)) ([939d9df](https://github.com/cloudflare/cloudflare-python/commit/939d9df3e326eab43aa5606ccc6fc126996035a7)) +* **api:** OpenAPI spec update via Stainless API ([#1084](https://github.com/cloudflare/cloudflare-python/issues/1084)) ([eb53bcb](https://github.com/cloudflare/cloudflare-python/commit/eb53bcb83ae0303e1c2b33c659c44fa8879e4c66)) +* **api:** OpenAPI spec update via Stainless API ([#1085](https://github.com/cloudflare/cloudflare-python/issues/1085)) ([91ca108](https://github.com/cloudflare/cloudflare-python/commit/91ca108bd5b1e3d938b5f90a2f1ac5ef7dba32e9)) +* **api:** OpenAPI spec update via Stainless API ([#1086](https://github.com/cloudflare/cloudflare-python/issues/1086)) ([928a6d6](https://github.com/cloudflare/cloudflare-python/commit/928a6d613753c427a3f7f202a2b52246f679931d)) +* **api:** OpenAPI spec update via Stainless API ([#1087](https://github.com/cloudflare/cloudflare-python/issues/1087)) ([f4b9ad5](https://github.com/cloudflare/cloudflare-python/commit/f4b9ad590f68d749f11166972154a4ccc12a8c0b)) +* **api:** OpenAPI spec update via Stainless API ([#1088](https://github.com/cloudflare/cloudflare-python/issues/1088)) ([0d97401](https://github.com/cloudflare/cloudflare-python/commit/0d97401137b122a6136ee07806a7d6a95d536106)) +* **api:** OpenAPI spec update via Stainless API ([#1090](https://github.com/cloudflare/cloudflare-python/issues/1090)) ([a9fb4bd](https://github.com/cloudflare/cloudflare-python/commit/a9fb4bd815fa08e5690369283afc53bdc6235fbd)) +* **api:** OpenAPI spec update via Stainless API ([#1091](https://github.com/cloudflare/cloudflare-python/issues/1091)) ([d0f9b65](https://github.com/cloudflare/cloudflare-python/commit/d0f9b652b6d4acbacc343676c9dcffa9a2f4d1d5)) +* **api:** OpenAPI spec update via Stainless API ([#1092](https://github.com/cloudflare/cloudflare-python/issues/1092)) ([01a5f6d](https://github.com/cloudflare/cloudflare-python/commit/01a5f6dc3e00e2d5a6c2f65343e40880b37adb62)) +* **api:** OpenAPI spec update via Stainless API ([#1093](https://github.com/cloudflare/cloudflare-python/issues/1093)) ([8333cc9](https://github.com/cloudflare/cloudflare-python/commit/8333cc9895fc80d61fd979a18a140ceb32c9b196)) +* **api:** OpenAPI spec update via Stainless API ([#1094](https://github.com/cloudflare/cloudflare-python/issues/1094)) ([bbc5c47](https://github.com/cloudflare/cloudflare-python/commit/bbc5c47f99a732bbd7daaa017fe9b82e923507ab)) +* **api:** OpenAPI spec update via Stainless API ([#1095](https://github.com/cloudflare/cloudflare-python/issues/1095)) ([1bb1668](https://github.com/cloudflare/cloudflare-python/commit/1bb16681acaa9736a7a3fc7e8273336e740f7805)) +* **api:** OpenAPI spec update via Stainless API ([#1096](https://github.com/cloudflare/cloudflare-python/issues/1096)) ([97a4a6e](https://github.com/cloudflare/cloudflare-python/commit/97a4a6ecfb9a6dbf281956c39ee8c3f4add0b4b3)) +* **api:** OpenAPI spec update via Stainless API ([#1097](https://github.com/cloudflare/cloudflare-python/issues/1097)) ([d5b6b1e](https://github.com/cloudflare/cloudflare-python/commit/d5b6b1e041b9810cd0a25726e4b7174bf3e527ca)) +* **api:** OpenAPI spec update via Stainless API ([#1098](https://github.com/cloudflare/cloudflare-python/issues/1098)) ([0699645](https://github.com/cloudflare/cloudflare-python/commit/0699645b43c2f37b3fcfc0ae1f56bca8b3f413e1)) +* **api:** OpenAPI spec update via Stainless API ([#1099](https://github.com/cloudflare/cloudflare-python/issues/1099)) ([6aa6dd7](https://github.com/cloudflare/cloudflare-python/commit/6aa6dd76bdf37ea6a41e3931384c02b668c280fa)) +* **api:** OpenAPI spec update via Stainless API ([#1100](https://github.com/cloudflare/cloudflare-python/issues/1100)) ([e13944b](https://github.com/cloudflare/cloudflare-python/commit/e13944b5775e0152c29d442c019a30d18f1b5449)) +* **api:** OpenAPI spec update via Stainless API ([#1101](https://github.com/cloudflare/cloudflare-python/issues/1101)) ([109b240](https://github.com/cloudflare/cloudflare-python/commit/109b2408c8e404eefa83db28aa99bc724a77b96b)) +* **api:** OpenAPI spec update via Stainless API ([#1102](https://github.com/cloudflare/cloudflare-python/issues/1102)) ([a216e21](https://github.com/cloudflare/cloudflare-python/commit/a216e2158452cea410f07ae998b6dc67ba94006d)) +* **api:** OpenAPI spec update via Stainless API ([#1103](https://github.com/cloudflare/cloudflare-python/issues/1103)) ([42bde1c](https://github.com/cloudflare/cloudflare-python/commit/42bde1c4bc75403137acd12666e6d127c66cdceb)) +* **api:** OpenAPI spec update via Stainless API ([#1104](https://github.com/cloudflare/cloudflare-python/issues/1104)) ([cf616e1](https://github.com/cloudflare/cloudflare-python/commit/cf616e1770bee61d444780b293eb97706e1b8a2d)) +* **api:** OpenAPI spec update via Stainless API ([#1105](https://github.com/cloudflare/cloudflare-python/issues/1105)) ([6df8ac0](https://github.com/cloudflare/cloudflare-python/commit/6df8ac087eefa788d940a58f272fb0ed58c8a5b5)) +* **api:** OpenAPI spec update via Stainless API ([#1106](https://github.com/cloudflare/cloudflare-python/issues/1106)) ([26b8d4d](https://github.com/cloudflare/cloudflare-python/commit/26b8d4d554c2fe8090e255890de9f72bea3e9699)) +* **api:** OpenAPI spec update via Stainless API ([#1107](https://github.com/cloudflare/cloudflare-python/issues/1107)) ([07a9d1e](https://github.com/cloudflare/cloudflare-python/commit/07a9d1ef9aaf3fc23c9e0a2ed24b9d0445e7aa39)) +* **api:** OpenAPI spec update via Stainless API ([#1108](https://github.com/cloudflare/cloudflare-python/issues/1108)) ([913c058](https://github.com/cloudflare/cloudflare-python/commit/913c0585eca2062e1590d5093cea5de67a4ec22a)) +* **api:** OpenAPI spec update via Stainless API ([#1109](https://github.com/cloudflare/cloudflare-python/issues/1109)) ([1585de4](https://github.com/cloudflare/cloudflare-python/commit/1585de4614b4181765f07b25b8cb39492a96f429)) +* **api:** OpenAPI spec update via Stainless API ([#1110](https://github.com/cloudflare/cloudflare-python/issues/1110)) ([6d80a41](https://github.com/cloudflare/cloudflare-python/commit/6d80a4114d6daa16eae1350eceacdba01181df40)) +* **api:** OpenAPI spec update via Stainless API ([#1111](https://github.com/cloudflare/cloudflare-python/issues/1111)) ([e53d3c8](https://github.com/cloudflare/cloudflare-python/commit/e53d3c8c801f6604bc17f137ecff31c6924de3f8)) +* **api:** OpenAPI spec update via Stainless API ([#1112](https://github.com/cloudflare/cloudflare-python/issues/1112)) ([08aa37f](https://github.com/cloudflare/cloudflare-python/commit/08aa37f91c4567365f3bdcd0a75f041903a949aa)) +* **api:** OpenAPI spec update via Stainless API ([#1113](https://github.com/cloudflare/cloudflare-python/issues/1113)) ([ecf909a](https://github.com/cloudflare/cloudflare-python/commit/ecf909a83d252f12fef614dd75665cb7d3bb7e6d)) +* **api:** OpenAPI spec update via Stainless API ([#1114](https://github.com/cloudflare/cloudflare-python/issues/1114)) ([5ab5180](https://github.com/cloudflare/cloudflare-python/commit/5ab518014558a829c8011921cfcd99b20cc9d64f)) +* **api:** OpenAPI spec update via Stainless API ([#1115](https://github.com/cloudflare/cloudflare-python/issues/1115)) ([30991e5](https://github.com/cloudflare/cloudflare-python/commit/30991e5f82470586e3ff05973c7d51d6f0c4debf)) +* **api:** OpenAPI spec update via Stainless API ([#1116](https://github.com/cloudflare/cloudflare-python/issues/1116)) ([aa92860](https://github.com/cloudflare/cloudflare-python/commit/aa928602e2ffecead9cae4382d8dba724c90844f)) +* **api:** OpenAPI spec update via Stainless API ([#1117](https://github.com/cloudflare/cloudflare-python/issues/1117)) ([5d7efed](https://github.com/cloudflare/cloudflare-python/commit/5d7efed6050d9d71ca4cc699b88011b68ba38855)) +* **api:** OpenAPI spec update via Stainless API ([#1119](https://github.com/cloudflare/cloudflare-python/issues/1119)) ([e91b22d](https://github.com/cloudflare/cloudflare-python/commit/e91b22d78f5febfb73004c28afc0ff37369c5cd0)) +* **api:** OpenAPI spec update via Stainless API ([#1120](https://github.com/cloudflare/cloudflare-python/issues/1120)) ([e088fa3](https://github.com/cloudflare/cloudflare-python/commit/e088fa35be70b61e682c38505d186d55c526b41a)) +* **api:** OpenAPI spec update via Stainless API ([#1121](https://github.com/cloudflare/cloudflare-python/issues/1121)) ([e5f8fab](https://github.com/cloudflare/cloudflare-python/commit/e5f8fab9950504ff8698fa7829691dada3b050ad)) +* **api:** OpenAPI spec update via Stainless API ([#1122](https://github.com/cloudflare/cloudflare-python/issues/1122)) ([406cd14](https://github.com/cloudflare/cloudflare-python/commit/406cd146437080265845e1c624bed4e4cbc506ae)) +* **api:** OpenAPI spec update via Stainless API ([#1123](https://github.com/cloudflare/cloudflare-python/issues/1123)) ([4d07c92](https://github.com/cloudflare/cloudflare-python/commit/4d07c9279f476bd900fa730e714116d07eef7302)) +* **api:** OpenAPI spec update via Stainless API ([#1124](https://github.com/cloudflare/cloudflare-python/issues/1124)) ([3f4305f](https://github.com/cloudflare/cloudflare-python/commit/3f4305f5e07486a5457974970699092ae377cc28)) +* **api:** OpenAPI spec update via Stainless API ([#1125](https://github.com/cloudflare/cloudflare-python/issues/1125)) ([1c8fc9c](https://github.com/cloudflare/cloudflare-python/commit/1c8fc9c76e9a8d1272855f13d05d4e2709223a56)) +* **api:** OpenAPI spec update via Stainless API ([#1126](https://github.com/cloudflare/cloudflare-python/issues/1126)) ([5fee699](https://github.com/cloudflare/cloudflare-python/commit/5fee6993f6d19ac7c3a5e5882ac624539b2daf5d)) +* **api:** OpenAPI spec update via Stainless API ([#1127](https://github.com/cloudflare/cloudflare-python/issues/1127)) ([d9b6345](https://github.com/cloudflare/cloudflare-python/commit/d9b6345797c9bcf41e496d3bf4d50a1c0e6ec82d)) +* **api:** OpenAPI spec update via Stainless API ([#1128](https://github.com/cloudflare/cloudflare-python/issues/1128)) ([8208127](https://github.com/cloudflare/cloudflare-python/commit/82081277f560979c861108a1504433c0b1fcafb6)) +* **api:** OpenAPI spec update via Stainless API ([#1129](https://github.com/cloudflare/cloudflare-python/issues/1129)) ([a1f5225](https://github.com/cloudflare/cloudflare-python/commit/a1f52251ef825cd2917c8ca2dd15e0fe9ce8ed95)) +* **api:** OpenAPI spec update via Stainless API ([#1130](https://github.com/cloudflare/cloudflare-python/issues/1130)) ([0fbad95](https://github.com/cloudflare/cloudflare-python/commit/0fbad95a26fd182ca9431ea26c17affa87ce6f36)) +* **api:** OpenAPI spec update via Stainless API ([#1131](https://github.com/cloudflare/cloudflare-python/issues/1131)) ([5399fe7](https://github.com/cloudflare/cloudflare-python/commit/5399fe786fa075c154e4f3aeb18b2d3af24f11a4)) +* **api:** OpenAPI spec update via Stainless API ([#1132](https://github.com/cloudflare/cloudflare-python/issues/1132)) ([06c6fbb](https://github.com/cloudflare/cloudflare-python/commit/06c6fbbdfc2af5364bae50137c5f63785af9bad3)) +* **api:** OpenAPI spec update via Stainless API ([#1133](https://github.com/cloudflare/cloudflare-python/issues/1133)) ([cc58279](https://github.com/cloudflare/cloudflare-python/commit/cc58279d91f03df3d94bcd818022b1ba080dc951)) +* **api:** OpenAPI spec update via Stainless API ([#1136](https://github.com/cloudflare/cloudflare-python/issues/1136)) ([dc48e66](https://github.com/cloudflare/cloudflare-python/commit/dc48e66d518b049a4b8686acf29a418c7fdb1fe1)) +* **api:** update via SDK Studio ([#1052](https://github.com/cloudflare/cloudflare-python/issues/1052)) ([9deb2f4](https://github.com/cloudflare/cloudflare-python/commit/9deb2f41db57d3e30f5fdcd06f893f35cdfbcb72)) +* **api:** update via SDK Studio ([#1054](https://github.com/cloudflare/cloudflare-python/issues/1054)) ([7b85d22](https://github.com/cloudflare/cloudflare-python/commit/7b85d2262b210e2f65f08552ba048bf8c3a0f612)) +* **api:** update via SDK Studio ([#1089](https://github.com/cloudflare/cloudflare-python/issues/1089)) ([b02a3a6](https://github.com/cloudflare/cloudflare-python/commit/b02a3a6c0f71b407dab22e92e018d765f8a62c8c)) +* **api:** update via SDK Studio ([#1118](https://github.com/cloudflare/cloudflare-python/issues/1118)) ([8bc99ae](https://github.com/cloudflare/cloudflare-python/commit/8bc99ae68944cedbc668a80efe5a8ac9dae916cf)) +* **api:** update via SDK Studio ([#1134](https://github.com/cloudflare/cloudflare-python/issues/1134)) ([4107247](https://github.com/cloudflare/cloudflare-python/commit/410724701368ba7b53132156b36f0f4aea3659fe)) +* **api:** update via SDK Studio ([#1135](https://github.com/cloudflare/cloudflare-python/issues/1135)) ([d459a47](https://github.com/cloudflare/cloudflare-python/commit/d459a477e6f0d587aba59d2bf785685b641ccd9f)) + ## 3.0.0-beta.10 (2024-06-18) Full Changelog: [v3.0.0-beta.9...v3.0.0-beta.10](https://github.com/cloudflare/cloudflare-python/compare/v3.0.0-beta.9...v3.0.0-beta.10) diff --git a/pyproject.toml b/pyproject.toml index 02bcdae2a23..47ea1a064d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cloudflare" -version = "3.0.0-beta.10" +version = "3.0.0" description = "The official Python library for the cloudflare API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/cloudflare/_version.py b/src/cloudflare/_version.py index 92e51bde907..7fde4ddd25b 100644 --- a/src/cloudflare/_version.py +++ b/src/cloudflare/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "cloudflare" -__version__ = "3.0.0-beta.10" # x-release-please-version +__version__ = "3.0.0" # x-release-please-version